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>
quitCheck that the connection is up.
ping archlinux.orgIn case the ISO is out of date.
pacman -Sy --needed archlinux-keyringfdisk -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 homeCheck status.
lvmdiskscan
pvdisplay
vgdisplay
lvdisplayBy 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 HOMEMount 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/homemkswap -U clear --size <swap_size_in_GiB>G --file /mnt/swapfileswapon /mnt/swapfileInstall Arch Linux.
pacstrap -K /mnt base linux linux-firmware linux-headersInstall utilities.
pacstrap -K /mnt e2fsprogs firewalld networkmanager vim w3m tmuxOptional: Install onboard audio firmware with
pacstrap -K sof-firmware
Generate fstab based on mounted filesystems.
genfstab -U /mnt >> /mnt/etc/fstabThe next few sections depend on being chrooted into the mounted filesystem.
arch-chroot /mntEdit /etc/pacman.conf with desired settings.
| /etc/pacman.conf |
|---|
[multilib]Include = /etc/pacman.d/mirrorlist
|
<Region>and<City>are dependent on location.
ln -srf /usr/share/zoneinfo/<Region>/<City> /etc/localtime
hwclock --systohcEdit /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-genCreate /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 lvm2Create a password for root.
passwdInstall the appropriate ucode package for the CPU.
pacman -Syu amd-ucode OR pacman -Syu intel-ucode
Install bootloader packages.
pacman -Syu grub efibootmgrInstall bootloader.
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=archModify bootloader configuration.
| /etc/default/grub |
|---|
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet splash nowatchdog" |
Generate bootloader configuration.
grub-mkconfig -o /boot/grub/grub.cfgexit
reboot