制作启动盘

rufus: made the usb install drive

设置BIOS

set UEFI in BIOS

ls /sys/firmware/efi/efivars
ping
timedatectl set-ntp true

分区与挂载

lsblk
parted /dev/sdb
(parted)mklabel gpt
(parted)mkpart ESP fat32 1MiB 513MiB
(parted)set 1 boot on
(parted)mkpart primary ext4 513MiB 50GiB
(parted)mkpart primary ext4 50GiB 100%
(parted)print
(parted)quit
lsblk
mkfs.fat -F32 /dev/sdb1
mkfs.ext4 /dev/sdb2
mkfs.ext4 /dev/sdb3
mount /dev/sdb2 /mnt
mkdir -p /mnt/boot
mount /dev/sdb1 /mnt/boot
mkdir /mnt/home
mount /dev/sdb3 /mnt/home
lsblk

更新源,安装基本系统

vim /etc/pacman.d/mirrorlist
pacman -Syy
pacstrap -i /mnt base base-devel

生成文件系统表

genfstab -U /mnt >> /mnt/etc/fstab
vim /mnt/etc/fstab

进入系统

arch-chroot /mnt /bin/bash

设置语言

nano /etc/locale.gen
locale-gen
echo LANG=en_US.UTF-8 > /etc/locale.conf

设置时区

tzselect
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
hwclock --systohc --utc

mkinitcpio -p linux

启动设置,这里用bootctl

bootctl install
vim /boot/loader/loader.conf

default arch
timeout 5
editor 0

blkid -s PARTUUID -o value /dev/sdb2
vim /boot/loader/entries/arch.conf

title ArchLinux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options root=PARTUUID=17e4ea27-54ae-4fa4-8d2f-48f941a2e085 rw

主机名,用户,密码等

echo MarcHan > /etc/hostname
vim /etc/hosts
systemctl enable dhcpcd

passwd
exit

umount -R /mnt

reboot

useradd -m -G wheel han
passwd han

visudo

软件

chrome/chromium
firefox
git
gnome
gvim
ibus-rime
mariadb
maxima
ntfs-3g
openssh
screenfetch
shadowsocks
wget
yaourt