As usual the wiki has it all, so follow it Arch Wiki The following notes are just for me to remember when installing Arch
setfont ter-132b change “132” for a lower value to make the font smaller to set the font to default only run setfontlsblk to get the name of the disk you will be using, usually it is most of the time nvme0n1fdisk
gdisk /dev/nvme0n1 # run `lsblk` to see what label your drive obtained
p # Shows which partition there are
d # Deletes partitions
t # Changes the typr of partitiong
w # Saves all changes
d # run it until all parition have been deleted
# Efi partition
n
ENTER
ENTER
+1G
L
Look up "efi"
ef00 # This should be the output unless otherwise
# Boot partition
n
ENTER
ENTER
+2G
L
Look up "boot"
ef02 # This should be the output unless otherwise
# Disk partition
n
ENTER
ENTER
ENTER # Since this partition will using what remains of the disk
L
Look up "luks"
8309 # This should be the output to set the partition as a LUKS partition type
Finally, type "w" to save all changes to the disk
Press "Y" to confirm the changes
cryptsetup luksFormat /dev/nvme0n1p2 # Change drive label accordantly12345678 wink winkluks encrypted drive, exec cryptsetup open --type luks /dev/nvme0n1p2 lvm Note: Call the drive whichever you want “lvm” is just an examplepvcreate /dev/mapper/lvmvgcreate volgroup0 /dev/mapper/lvmlvcreate -n swap -L 20G -C y volgroup0 adjust as neededlvcreate -L 100GB volgroup0 -n lv_root adjust size as neededlvcreate -l 100%FREE volgroup0 -n lv_home the rest of the FREE Space will be assigned to lv_homenvme0n1p1 as FAT32
mkfs.fat -F 32 /dev/nvme0n1p1 to format the EFI partitionmkfs.ext4 /dev/nvme0n1p2 to format the Boot partitiondm_mod and enable all volumes
modprobe dm_modvgscanvgchange -aylv as btrfs by running the following commands
mkfs.btrfs -L root /dev/volgroup0/lv_rootmkfs.btrfs -L home /dev/volgroup0/lv_homeswap partition
mkswap /dev/volgroup0/swapswapon /dev/volgroup0/swap to mount the swap memory partitionmount /dev/volgroup0/lv_root /mnt to mount the root partitionmkdir -p /mnt/{home,boot} to create home and boot foldersmount /dev/nvme0n1p2 /mnt/boot to mount the boot partition, this will be obviously different on each system, make sure to mount the right partitionsmount /dev/volgroup0/lv_home /mnt/home to mount the home partitionefi folder within /mnt/bootmkdir /mnt/boot/efi to be able to mount the efi partitionmount /dev/nvme0n1p1 /mnt/boot/efi to mount the efi partitionpacman-key --init and pacman-key --populatepacstrap -K /mnt base base-devel linux linux-lts linux-headers linux-lts-headers linux-firmware git lvm2 networkmanager openssh os-prober sudo grub efibootmgr vim neovim nano man zsh ranger tmux bash
Note: This will take sometime to complete
genfstab -U /mnt >> /mnt/etc/fstabfstab cat /mnt/etc/fstabarch-chroot /mntln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtimehwclock --systohc This syncs the time to the hardware clock/etc/locale.gen and uncomment en_US.UTF-8 UTF-8
locale-genlocal.conf in /etc/locale.conf
nvim /etc/locale.conf and enter LANG=en_US.UTF-8hostname name it something like Arch
nvim /etc/hostname input Arch/etc/mkinitcpio.conf and run/input the followingnvim /etc/mkinitcpio.conf
Add "encrypt lvm2" in between "block and filesystems"
# Generate Kernel Ramdisks, run each kernel you installed
mkinitcpio -p linux
mkinitcpio -p linux-lts
disk UUID by running blkid /dev/nvme0n1p2 the drive label will be different or the same, write/save the UUID (This is case sensitive, be careful)
/etc/default/grub and add the following right after GRUB_CMDLINE_LINUX_DEFAULT="loglevel-3 quietcryptdevice=UUID=Disk_UUID:volgroup0 the “UUID” we got in step 1grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB
/dev/sda2 efi partition and even make the /boot/efi folder as wellgrub-mkconfig -o /boot/grub/grub.cfg This generates the config file for GRUBnvim /etc/systemd/timesyncd.conf and set the followingNTP=0.arch.pool.ntp.org 1.arch.pool.ntp.org 2.arch.pool.ntp.org 3.arch.pool.ntp.orgFallbackNTP=0.pool.ntp.org 1.pool.ntp.orgsystemctl enable systemd-timesyncd.servicemkinitcpio -p linuxmkinitcpio -p linux-lts# Install display manager
pacman -S sddm
# Install Microcode updates for CPU
pacman -S intel-ucode # For Intel CPUs
pacman -S amd-ucode # For AMD CPUs
# One liner
pacman -S sddm intel-ucode
# Change root passwd and add usr
passwd # This will change root passwd
# -m creates a home dir, -G add the user to the Wheel group (admid group)
useradd -mG wheel -s /bin/zsh toniiz
passwd toniiz # Add passwd for "toniiz"
# Uncomment the wheel line, save file and exit it
visudo
# Enable Network Manager and Display Manager
systemctl enable NetworkManager sddm
# Also regenerate grub config file
grub-mkconfig -o /boot/grub/grub.cfg
chroot unmount all and reboot
exit onceumount -R /mnt unmounts all mounted volumesrebootLearn more about “systemd-boot + uki with secure boot enabled”
Choosing between systemd-boot and GRUB largely depends on your specific needs and preferences. Here’s a breakdown of the pros and cons of each: systemd-boot
Pros:
Simplicity: systemd-boot is much simpler to set up and configure compared to GRUB. It uses straightforward configuration files and is integrated with systemd, which is already a core part of many Linux systems.
Speed: It tends to be faster since it directly loads the kernel and initramfs without the additional scripting layer GRUB uses.
Maintenance: Easier to maintain because it automatically updates boot entries for installed kernels.
Cons:
Features: It has fewer features than GRUB. For instance, it doesn't support booting from non-EFI systems, encrypted partitions, or certain complex boot setups.
Compatibility: Limited to UEFI systems, so if you're using BIOS, you can't use systemd-boot.
Advanced Configurations: Not as flexible for complex boot scenarios or dual-booting with non-Linux operating systems.
GRUB
Pros:
Flexibility: GRUB is extremely versatile and can handle a wide variety of boot scenarios, including dual-booting with Windows, booting from encrypted partitions, and supporting both BIOS and UEFI systems.
Features: It offers advanced features like scripting capability, booting from network sources, and complex partition setups.
Compatibility: Works with both BIOS and UEFI systems, making it a more universal choice.
Cons:
Complexity: GRUB can be more challenging to set up and troubleshoot due to its complexity and the extensive configuration options.
Maintenance: Kernel updates can sometimes require manual intervention to update GRUB's configuration.
Reputation for Issues: While GRUB itself is stable, the complexity can lead to user errors or issues during updates, which might be why you’ve heard it tends to break. However, it's not inherently unstable; careful configuration and maintenance can mitigate this.
Summary
Choose systemd-boot if you value simplicity, speed, and are using a UEFI system with straightforward boot needs.
Choose GRUB if you require more flexibility, are using a BIOS system, or need to support complex boot scenarios.
Regarding your concern about GRUB breaking a lot: it mostly comes down to user error during updates or misconfigurations rather than inherent instability. With careful management, GRUB can be very reliable.