准备磁盘分区
mkdir /mntmkdir /mnt/bootmkdir /mnt/home
- 挂在根分区和swap
Mount the root partition on /mnt. After that, create directories for and mount any other partitions (/mnt/boot, /mnt/home, ...) and activate your swap partition if you want them to be detected later by genfstab.
mount /dev/sdax /mntmount /dev/sdax/bootmount /dev/sdax/home
连接网络
wifi-menu
wget -O /etc/pacman.d/mirrorlist https://www.archlinux.org/mirrorlist/all/
安装系统
pacstrap /mnt base
配置系统
- Generate an fstab file (use -U or -L to define by UUID or labels):
genfstab -p /mnt >> /mnt/etc/fstab
arch-chroot /mnt
echo computer_name > /etc/hostname
ln -sf /usr/share/zoneinfo/zone/subzone /etc/localtime
nano -w /etc/locale.genlocale-gen
passwd
Create a new initial RAM disk:
mkinitcpio -p linux
Install a bootloader:
pacman -S grubgrub-install --target=i386-pc --recheck /dev/sda
pacman -S os-prober
grub-mkconfig -o /boot/grub/grub.cfg