Install archlinux
timedatectl set-ntp true
See detail
Indentify the device and partition, don't forget to mark bootable.
lsblk
fdisk xxx
Formating
lsblk /dev/sdx
mkfs.ext4 /dev/sdxy
# if there is swap partition
mkswap /dev/sdxy
swapon /dev/sdxy
mount /dev/sdxy /mnt
# if there is a /boot partition
mkdir -p /mnt/boot
mout /dev/sdxy /mnt/boot
Select the mirros in /ect/pacman.d/mirrorlist
Install the base packages
pacstrap -i /mnt base base-devel
Genrate the fstab file
genfstab -U /mnt >> /mnt/etc/fstab
chroot
arch-chroot /mnt /bin/bash
Locale
# uncomment `en_US.UTF-8`
vi /etc/locale.gen
locale-gen
# add `LANG=en_US.UTF-8`
vi /etc/locale.conf
Time
tzselect
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
hwclock --systohc --utc
Initramfs
mkinitcpio -p linux
Install grub
pacman -S grub
Install boot files to disk
grub-install --target=i386-pc /dev/sdx
grub-mkconfig -o /boot/grub/grub.cfg
see also arch wiki grub
passwd
Ctrl + D
to exist the chroot environment
Then
umount -R /mnt
reboot
pacman -S vim openssh