Linux – I wanted to install arch linux on a UEFI/GPT system and had questions about the process

arch linuxlinuxuefi

My original formal question was "How do I install Arch linux on a GPT/UEFI system"

This is meant to be addressed with the documentation provided by the arch linux community, located here:

https://wiki.archlinux.org/index.php/Installation_guide

I tried to follow the documentation but I couldn't get the process to work. More precisely, I ran into issues with setting up the mounts and then installing the base system. Arch linux is documented in a highly modular, non-linear fashion so while following the guide you'll have to jump from one section to the other fairly often. I must have gotten lost in this as I was not able to figure out the order of things from their guide(s). I ended up cobbling together my own process (with some help by folks in the Arch Linux Forum here : https://bbs.archlinux.org/viewtopic.php?id=196339 ) and I wanted to post it here in case it could help someone else out.

I've noticed since I've posted my findings on the Arch linux forum that my thread has over 1,000 views so I'm hoping it's helping some folks out. I thought it would also be good to post it here to increase its availability.

Here's everything I have, from start to finish, all in one place.

Please note this was for the Asus M5A97 R2.0, different systems may implement UEFI differently.

Best Answer

Did you know that the Arch wiki has a beginner's guide which is easier to follow for users unfamiliar with the Arch installation process ?

The installation is pretty straightforward so I won't document it here completely, I'll just highlight the UEFI-related parts :

  • first you need to use a GPT partition table. I prefer to use gdisk (the GPT equivalent of fdisk) instead of parted, so you need to create an EFI system partition. It has a minimum size which is 260MB for 4K sector drives and of 100MB for conventional 512B sector drives. You can play it safe and always use 260MB or more. When creating the partition in gdisk, set the type to ef00.

  • once the partition is created, put a FAT32 file system on it - mkfs.fat -F32 /dev/sdX1.

  • create and format your other partitions as you want and mount them according to the wiki - don't create a /boot partition, we can use the EFI system partition for that.

  • mount that EFI partition on /mnt/boot - mount /dev/sdX1 /mnt/boot.

  • follow the installation guide, but don't install a bootloader - there's no need as the Linux kernel can directly be booted as an UEFI application, and it's even documented in the wiki, so we only need to install efibootmgr (a package to manage UEFI boot entries) and run the following command to declare our Arch system in the UEFI NVRAM : efibootmgr -d /dev/sdX -p 1 -c -L "Arch Linux" -l /vmlinuz-linux -u "root=/dev/<root partition, UUIDs or LABELs can be used> initrd=/initramfs-linux.img"

Exit the chroot and admire the magic.

Related Question