Arch Linux Install Guide For EFI Systems

Because nobody seems to know how to actually install Arch, here’s a brief guide.

Setup:
You need a machine to install Arch on. You also need a version of the Arch installation disk on some bootable medium. You can see what versions are available here. Create the bootable medium however you would like, e.g. by burning the iso onto a CD or a USB stick. Make sure that it is labelled properly, e.g. `ARCH_YYYYMM’. You should now be able to boot to your USB stick given that BIOS settings such as secure boot have been turned off. Make sure you have a working internet connection. Otherwise, run `# wifi-menu’ to connect via wireless.

Partitioning:
To properly do EFI, we need at least two partitions. An EFI partition and a root partition. The EFI partition should be mounted at /boot. If not, you will have to do the manual task of copying your initramfs images over to wherever you mounted your EFI partition after every kernel update. So just use /boot to save yourself some time. Then mount everything wherever you want it to be. Note: if you have a /usr partition, you should add the usr, fsck, and shutdown hooks to /etc/mkinitcpio.conf after installation. See the configuration file for any other things you may need to do for non-standard configurations.

Installation:
Edit /etc/pacman.d/mirrorlist and put whatever mirror you want to use at the front. I tend to use mirrors.kernel.org. Then, assuming you mounted your root filesystem at /mnt, we can do `# pacstrap base /mnt’. Usually it is also a good idea to include base-devel with `# pacstrap base base-devel /mnt’, but if you aren’t going to build anything and just want a working system base is the bare minimum.

Configuration:
After installing the base system, it’s usually nice to configure some things. We should probably tell the system how to mount our partitions. Run `# genfstab -U /mnt >> /mnt/etc/fstab’ to write your partition (and mount) scheme to the file the loader reads to mount everything. Run `# arch-chroot /mnt’ to run a script that sets up some nice symlinks and chroots into your installation. Set the hostname by writing to /etc/hostname. Set the timezone and configure NTP with timedatectl(1). Edit /etc/locale.gen to and run `# locale-gen’ to generate some locales, and write locale.conf(5) to set the default locale. Also make sure to set a root password.

Installing a bootloader:
Follow the instructions on the Arch Wiki for this. For example, for systemd-boot, we would run `# bootctl install’, and setup /boot/loader/loader.conf and /boot/loader/entries/arch.conf by looking at examples in /usr/share/systemd/bootctl. For GRUB, we would do `# grub-install –target=x86_64-efi –efi-directory=/boot –bootloader-id=grub –debug’ and a `# grub-mkconfig -o /boot/grub/grub.cfg’.

Reboot:
Unmount and reboot. Your system should now be working.

This entry was posted in Software. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *