UEFI Gentoo Quick Install Guide

Gentoo doesn't officially support UEFI, but it is not hard to install gentoo onto an UEFI system. To do this you will need to basically follow the installation handbook of your architecture. The first place you will diverge from the guide is the partition setup.

UEFI doesn't use MBR (Master Boot Record), so you'll need to create a GPT partition table. UEFI works by reading an .efi file in a FAT32 partition, that you will need to create and upon which you will mount /boot.

Here is how I created my partitions.

Now continue along with the install guide.

For the kernel configuration, make sure you specify the kernel options mentioned here: EFI stub kernel

Here are my steps:

Now the tricky part. You need to tell the UEFI Firmware about your new bootx64.efi, to do this you will use a tool called efibootmgr, but also you need to have booted the system WITH UEFI.

So you can grab any linux distribution that support boot in UEFI mode, and do the work. Another option that does work, is if you stick your new bootx64.efi file on a USB flash stick, the laptop will automatically find that and boot it.

So insert a USB stick, we'll pretend it comes up as /dev/sdd in the following code:

Now reboot the box and hit F2 (or whatever) to enter the UEFI Firmware Boot Menu on boot.

In the UEFI list, choose to boot the new USB flash stick that should be showing up.

The kernel should load up and boot your sytem.

Make sure efivars kernel module is loaded:

Now you can tell the UEFI Firmware about your bootx64.efi that is on the hard drive:

Now enter the UEFI Firmware Boot Menu again and you should see "Gentoo" in the list!

Congrats, it should now boot!