cfdisk分区,假设是/dev/sda,sda1是efi,sda2是linux; mkfs.fat -F32 /dev/sda1 mkfs.ext4 /dev/sda2 mount /dev/sda2 /mnt
添加清华镜像源: vim /etc/pacman.d/mirrorlist
添加 Server = https://mirrors.tuna.tsinghua.edu.cn/archlinux/$repo/os/$arch
执行pacman -Sy
,之后pacstrap /mnt base base-devel
,结束后genfstab -U -p /mnt >> /mnt/etc/fstab
。
chroot进新安装的系统:arch-chroot /mnt echo _hostname_ > /etc/hostname
,然后设定/etc/locale.gen,修改后locale-gen,同时 echo LANG=en_US.UTF-8 > /etc/locale.conf ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime hwclock --systohc --utc
修改root密码:passwd;新建用户: useradd -m -G wheel,storage,power -s /bin/bash _username_ passwd _username_
然后添加sudo权限: visudo _username_ ALL=(ALL) ALL
最后处理UEFI的grub: pacman -S grub efibootmgr dosfstools mkdir /boot/EFI mount /dev/sda1 /boot/EFI grub-install --target=x86_64-efi --bootloader-id=grub_uefi --recheck grub-mkconfig -o /boot/grub/grub.cfg
重启进入arch之后需要执行systemctl enable dhcpcd
才能启动时自动获取联网地址