Configure the System
This is 3.1-3.7 from https://wiki.archlinux.org/title/Installation_guide
Fstab
Run
genfstab -U /mnt >> /mnt/etc/fstab
Data Drive
TIP
Skip this part if you don't have additional internal data drives
See https://wiki.archlinux.org/title/Fstab for additional information
First, run blkid
and note down the UUID
of the data drive (not PARTUUID
!).
Then edit the fstab
nvim /etc/fstab
It should look something like this
# Static information about the filesystems.
# See fstab(5) for details.
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sda3 LABEL=root
UUID=abecc6aa-fd5e-4bb8-babc-a6b23e542369 / ext4 rw,relatime 0 1
# /dev/sda1
UUID=814D-7D51 /boot vfat rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 2
# /dev/sda2 LABEL=swap
UUID=f74f5afa-b349-477b-a26b-bfe5fdccd48d none swap defaults 0 0
WARNING
The device in the comment might be incorrect, if they are, correct them
Add a new entry for the data drive, replace the UUID below with the UUID you found with blkid
# /dev/nvme0n1p1 LABEL=data
UUID=dd477979-cacd-4809-9cc0-e12fd37fbc01 /media/data ext4 nodev,nosuid 0 2
TIP
See wiki link above for what the options mean
Finally, create the mount point
mkdir -p /media/data
Chroot to system
This will change the root from the live environment to the system we just installed
arch-chroot /mnt
Set time zone
Run the following to set the time zone. Replace US/Pacific
with your time zone
ln -sf /usr/share/zoneinfo/US/Pacific /etc/localtime
TIP
If you don't know what time zones are available, run this to list all time zone regions
ls /usr/share/zoneinfo
Select the region, the run
ls /usr/share/zoneinfo/<Region>
Then run this to generate /etc/adjtime
hwclock --systohc
Localization
Edit /etc/locale.gen
nvim /etc/locale.gen
Uncomment the line with en_US.UTF-8 UTF-8
.
TIP
Uncomment other locales if you need
Run this to generate the locales
locale-gen
Then config the locale with
echo "LANG=en_US.UTF-8" > /etc/locale.conf
TIP
If you changed keyboard layout, edit /etc/vconsole.conf
with nvim /etc/vconsole.conf
and add this line (see https://wiki.archlinux.org/title/Installation_guide#Localization)
KEYMAP=<Layout>
Network
Create the host name file with the following, replace pistonite
with the host name you want (i.e. name for your VM)
echo pistonite > /etc/hostname
Then enable network manager with
systemctl enable NetworkManager
Initramfs
Usually this should be optional but run this anyway
mkinitcpio -P
See https://wiki.archlinux.org/title/Installation_guide#Initramfs for more details
Root password
Set the root password now. This is the actual root password.
passwd
Next we will set up the boot loader, which is technically the last setup in the OS installation. We will set up user login after that so we can stop using root login.