-
Reference
-
pf's note(too old)
Download the Archlinux ISO from a mirror site, dd into a USB stick.
After booting from a USB stick, you'll get a zsh root shell.
- ping google
ping google.com- the DHCP client daemon should be started automatically
-
dhcpcd -korsystemctl stop dhcpcd.servicefirst to disable DHCP networking -
use
ipcommand andresolv.confto configure network manually
ip link # interface, something like 'eth0' or 'enp2s0'
ip link set <if> up
ip addr add <ip address>/<subnetmask> dev <if>
ip route add default via <gateway's ip address>
vi /etc/resolv.conf
-------------------
nameserver 8.8.8.8
nameserver 8.8.4.4
search foo.bar.com- remember to install
netctlafterchroot, otherwise the network will be broken after rebooting
iw dev
wifi-menutimedatectl set-ntp true
timedatectl status- check for old partitions first
fdisk -l
lsblk
lsblk -f- destroy the whole world
- see Partitioning on Arch wiki
cfdisk /dev/sda
=================================
An example for creating partition tabel
/ 25G /dev/sda1
swap 1G /dev/sda2
/home else /dev/sda3- format partitions (
ext4)
mkfs.ext4 /dev/sda1
mkfs.ext4 /dev/sda3- swap
mkswap /dev/sda2 && swapon /dev/sda2- verify all things are done well
lsblk /dev/sdamount /dev/sda1 /mnt
mkdir /mnt/home && mount /dev/sda3 /mnt/home- choose NCTU or tku in Taiwan
vi /etc/pacman.d/mirrorlist- base system
pacstrap -i -K /mnt base linux linux-firmware vim intel-ucode- if the keylist is out-of-date
pacman -S archlinux-keyring
pacman-key --init && pacman-key --populate archlinuxgenfstab -U /mnt >> /mnt/etc/fstab
cat /mnt/etc/fstab- edit
/mnt/etc/fstaband adddiscard,noatimeif you're using SSD
arch-chroot /mnt
. /etc/profile
PS1="(chroot) $PS1"tzselect
ln -sf /usr/share/zoneinfo/Asia/Taipei /etc/localtime
hwclock --systohc
timedatectl status- note:
/etc/timezoneis no longer used now Arch wiki: System time
- remove comments for your locale
vi /etc/locale.gen
------------------
en_US.UTF-8 UTF-8
en_US ISO-8859-1
zh_TW.UTF-8 UTF-8locale-gen
locale
echo "LANG=en_US.UTF-8" > /etc/locale.conf- set hostname
echo hostname > /etc/hostname- add your hostname in
/etc/hosts
vi /etc/hosts-
check Arch wiki: systemd-netowrkd for details.
-
enable systemd-networkd services
systemctl enable systemd-networkd.service
systemctl enable systemd-resolved.service- do the following later after first reboot
systemctl restart systemd-networkd
- delete or rename the existing file and create the following symbolic link
ln -s /run/systemd/resolve/resolv.conf /etc/resolv.confnetworkctl list -a
networkctl status -avim /etc/systemd/network/wired.network
--------------------------------------
[Match]
Name=enp1s0
[Network]
DHCP=ipv4vim /etc/systemd/network/wired.network
--------------------------------------
[Match]
Name=enp1s0
[Network]
Address=10.1.10.9/24
Gateway=10.1.10.1- Google Compute Engine uses 1460 for MTU
[Link]
MTUBytes=1460
-
try Wicd or basic
wifi-menu -
note:
dialogis required bywifi-menu
pacman -S iw wpa_supplicant dialog- you also can use
systemd-networkdfor your wireless networking - see Arch wiki: systemd-networkd
vim /etc/systemd/network/wireless.network
-----------------------------------------
[Match]
Name=wlp2s0
[Network]
DHCP=ipv4mkinitcpio -P-
note: you might take a look of
/etc/mkinitcpio.confand add someHOOKSif necessary- for QEMU/VKM/Google Compute Engine, in order to boot from a virtio drive, add the following:
MODULES="virtio virtio_blk virtio_pci virtio_net"
passwd
useradd -m xatier
passwd xatier- see Arch boot process and GRUB
pacman -S grub os-prober
grub-install --recheck /dev/sda
grub-mkconfig -o /boot/grub/grub.cfgInstall yay.
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -sipacman -Syyuexitumount /mnt/{home,}rebootsu -pacman -S openssh sudo screen tmux htop rsync git acpivisudo- Vbox needs some special settings, see Archlinux wiki Virtualbox
sudo pacman -S alsa-utils xorg-server xorg-xinit mesa [xf86-video-intel xf86-video-ati xf86-video-nouveau nvidia xf86-video-vmware] xf86-input-libinput ttf-dejavu ttf-inconsolatasudo pacman -S awesome
vim ~/.xinitrc
--------------
exec awesome >> ~/.cache/awesome_stdout 2>> ~/.cache/awesome_stderr