System Installation - cephi-sui/dotfiles GitHub Wiki
Connect to the Internet using the interactive iwctl
command.
iwctl
<device>
and<SSID>
are dependent on the device list and desired network.
device list
station <device> scan
station <device> get-networks
station <device> connect <SSID>
quit
Check that the connection is up.
ping archlinux.org
In case the ISO is out of date.
pacman -Sy archlinux-keyring
fdisk -l
fdisk </dev/the_disk_to_be_partitioned>
Mount point | Partition | Partition Type | Size of Choice |
---|---|---|---|
/mnt/boot | /dev/efi_system_partition | EFI system partition (uefi, 1) | 1GiB |
/mnt | /dev/root_partition | Linux x86-64 root (23) | At least 128GiB |
/mnt/home | /dev/home_partition | Linux home (42) | Remainder of the device |
Mount point | Partition | Partition Type | Size of Choice |
---|---|---|---|
/mnt/boot | /dev/efi_system_partition | EFI system partition (uefi, 1) | 1GiB |
/dev/lvm_partition | Linux LVM (lvm, 44) | Remainder of the device |
Create physical volume.
pvcreate </dev/lvm_partition>
Create volume group on physical volume.
vgcreate <vg_name> </dev/lvm_partition>
Create logical volumes in volume group.
lvcreate -L <root_size_in_GiB>G <vg_name> -n root
lvcreate -l 100%FREE <vg_name> -n home
Check status.
lvmdiskscan
pvdisplay
vgdisplay
lvdisplay
By default, ext4 reserves 5% of the filesystem's blocks for root processes.
Only ~50GiB are required for this purpose, so <reserved_block_%>
can be lowered to meet this target.
mkfs.fat -F 32 </dev/efi_system_partition> -n GRUB
mkfs.ext4 </dev/root_partition> -L ARCH
mkfs.ext4 -m <reserved_block_%> </dev/home_partition> -L HOME
Mount the filesystems into the live environment to generate the fstab and install Arch Linux.
mount </dev/root_partition> /mnt
mount --mkdir </dev/efi_system_partition> /mnt/boot
mount --mkdir </dev/home_partition> /mnt/home
mkswap --size <swap_size_in_GiB>G --file /mnt/swapfile
swapon /mnt/swapfile
Install Arch Linux.
pacstrap -K /mnt base linux linux-firmware linux-headers
Install utilities.
pacstrap -K /mnt e2fsprogs firewalld networkmanager vim w3m tmux
Optional: Install onboard audio firmware with
pacstrap -K sof-firmware
Generate fstab based on mounted filesystems.
genfstab -U /mnt >> /mnt/etc/fstab
The next few sections depend on being chrooted into the mounted filesystem.
arch-chroot /mnt
Edit /etc/pacman.conf
with desired settings.
/etc/pacman.conf |
---|
ParallelDownloads = 5 |
[multilib] Include = /etc/pacman.d/mirrorlist
|
<Region>
and<City>
are dependent on location.
ln -srf /usr/share/zoneinfo/<Region>/<City> /etc/localtime
hwclock --systohc
Edit /etc/locale.gen
and uncomment en_US.UTF-8 UTF-8
and other desired locales.
/etc/locale.gen |
---|
en_US.UTF-8 UTF-8 |
Generate locales.
locale-gen
Create /etc/locale.conf
with default locale.
/etc/locale.conf |
---|
LANG=en_US.UTF-8 |
Create /etc/hostname
with a desired hostname in it.
/etc/hostname |
---|
<hostname> |
Add the lvm2 module to /etc/mkinitcpio.conf
.
/etc/mkinitcpio.conf |
---|
HOOKS=(base udev autodetect microcode modconf kms keyboard keymap block lvm2 filesystems fsck) |
Installing the lvm2 userspace tools will automatically run mkinitcpio -P
.
pacman -Syu lvm2
Create a password for root.
passwd
Install the appropriate ucode package for the CPU.
pacman -Syu amd-ucode
OR pacman -Syu intel-ucode
Install bootloader packages.
pacman -Syu grub efibootmgr
Install bootloader.
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=arch
Modify bootloader configuration.
/etc/default/grub |
---|
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet splash nowatchdog" |
Generate bootloader configuration.
grub-mkconfig -o /boot/grub/grub.cfg
exit
reboot