User Tools

This is an old revision of the document!


Writing /var/www/html/wiki.freefm.uk/data/log/deprecated/2025-12-16.log failed
Writing /var/www/html/wiki.freefm.uk/data/log/error/2025-12-16.log failed
Writing /var/www/html/wiki.freefm.uk/data/log/error/2025-12-16.log failed
Writing /var/www/html/wiki.freefm.uk/data/log/error/2025-12-16.log failed
Writing /var/www/html/wiki.freefm.uk/data/log/error/2025-12-16.log failed

A partitioning scheme for UEFI GPT simpler than the one suggested by the Gentoo Handbook

I had always gone the BIOS MBR route and used fdisk for partitioning, but today I went for an UEFI GPT install using parted. Scary stuff! The installation handbook goes for a partitioning scheme which should work on most systems, but is unnecessary for UEFI GPT:

Partition	Mount point	Description
/dev/sda1	-	BIOS boot
/dev/sda2	/boot	BOOT/EFI
/dev/sda3	/swap	swap
/dev/sda4	/	root fs
To be fair the handbook does mention on previous sections that two of these partitions are not necessary for UEFI GPT, but the next sections (including bootloader install) are based on this scheme, and for me personally it was a bit confusing - BIOS boot and a separate /boot which is also for EFI? What? Also, IMO going the “one size fits all” route is not the Gentoo way. So, as I wait for xorg-server to compile, here is a simpler scheme I used, along with GRUB2 installation instructions:

Partition	Mount point	Description
/dev/sda1	/boot/efi	esp
/dev/sda2	/	root fs

The same scheme is suggested on GRUB2’s page on Gentoo’s wiki, as I found out later.

For someone used to BIOS, MBR, and fdisk, doing this with parted was a little scary, so here are the commands I used successfully in case anyone finds it useful:

# Preparing the disks
parted -a optimal /dev/sda
mklabel gpt
unit mib
mkpart primary fat32 1 101 # or 257 for non-GRUB
name 1 esp
mkpart primary ext4 101 -1 # or 257 for non-GRUB
name 2 rootfs
set 1 boot
quit
mkfs.fat -F 32 -n efi-boot /dev/sda1
mkfs.ext4 /dev/sda2
# ... follow next handbook sections
# GRUB2 install
emerge sys-boot/grub:2
# Edit fstab (see example below)
mkdir /boot/efi
mount /boot/efi
grub-install --target=x86_64-efi --efi-directory=/boot/efi
grub-mkconfig -o /boot/grub/grub.cfg

And my fstab with UUIDs:

UUID=as_reported_by_blkid /boot/efi vfat noauto,noatime 1 2
UUID=as_reported_by_blkid / ext4 noatime 0 1

Notice this assumes your disk is /dev/sda and you’re doing a full disk install. Check first! Also, always back up your data beforehand!

This was done for Gentoo/Windows dual boot with the systems on physically separated disks (I physically disconnected the Windows one during install for safety).