Install Archlinux in EFI model

# 记得打开EFI 开启EFI 模式所需一段时间,请耐心等待
ping -c 3 www.baidu.com
lsblk
cfdisk /dev/sda
# 512MiB EFI System boot ef00
# 3GiB Linux swap swap 8200
# 15GiB Linux x86-64 toor (/) root 8304
# 31.5GiB Linux /home home 8302
mkfs.fat -F32 /dev/sda1
mkswap /dev/sda2
swapon /dev/sda2
mkfs.ext4 /dev/sda3
mkfs.ext4 /dev/sda4
mount /dev/sda3 /mnt
mkdir /mnt/boot
mkdir /mnt/home
mount /dev/sda1 /mnt/boot
mount /dev/sda4 /mnt/home
nano /etc/pacman.d/mirrorlist
#Server https://mirrors.ustc.edu.cn/archlinux/$repo/os/$arch
pacman -Syy
pacstrap -i /mnt base base-devel
genfstab -U /mnt >> /mnt/etc/fstab #check it
arch-chroot /mnt
nano /etc/locale.gen
#en_US.UTF-8 UTF-8
#zh_CN.UTF-8 UTF-8
#zh_TW.UTF-8 UTF-8
locale-gen
echo LANG=en_US.UTF-8 > /etc/locale.conf
export LANG=en_US.UTF-8
ln -s /usr/share/zoneinfo/Asia/Shanghai > /etc/localtime
hwclock --systohc --utc
echo axionl-arch > /etc/hostname
nano /etc/pacman.conf
# 取消mulitilib 仓库的注释
#[archlinuxcn]
#Server = https://mirrors.ustc.edu.cn/archlinuxcn/$arch
#然后请安装 archlinuxcn-keyring 包以导入 GPG key
pacman -Syu
passwd root
useradd -m -g users -G wheel,storage,power -s /bin/bash axionl
EDITOR=nano visudo
#取消%wheel 组注释
#在其下方添加 Defaults rootpw
pacman -S bash-completion
#检验是否开启efi mount -t efivarfs efivarfs /sys/firmware/efi/efivars
bootctl install
blkid -s PARTUUID -o value /dev/sda3 > /boot/loader/entries/arch.conf #check it
pacman -S intel-ucode
#在前面添加
#title Arch Linux
#linux /vmlinuz-linux
#initrd /intel-ucode.img
#initrd /initrafms-linux.img
#options root=PARTUUID=你的UUID rw
exit
umount -R /mnt
reboot

你可能感兴趣的:(Install Archlinux in EFI model)