On Wednesday, 18 October 2023 08:36:06 BST Neil Bothwick wrote:
> On Tue, 17 Oct 2023 21:50:35 -0500, Dale wrote:
> > > EFI is much simpler to work with. for one thing, you don't need the
> > > monster that GRUB has become.
> > 
> > While I kinda dread it, it does seem that quite a while ago, it has
> > become much easier.  I noticed as I went through the install of Gentoo,
> > there didn't seem to be a lot of stuff to do with efi.  One might could
> > think it is quicker and simpler as you say.  I recall when it first came
> > out.  It was complicated but I think most of that was because it was new
> > and the documentation was not quite there yet.  After all this time tho,
> > that shouldn't be a problem. 
> > 
> > It's a bridge I'll have to cross tho.  It looks easy enough.  Biggest
> > thing is partitioning the drive differently.  Gotta remember that.  O_O 

It is a relatively simple bridge to cross.  Use gdisk to partition the drive, 
which if you've used fdisk before you'll find it quite similar.  If you prefer 
it fdisk will work too, but make sure first you create a GUID Partition Table 
(GPT) and not an MBR table.

You can also use sgdisk to create a 1GB EFI System Partition (type 0xEF00) in 
a single command, as your first partition in an empty disk; e.g.:

sgdisk -n 1:2048:2068470 -t 1:ef00 -c 1:"ESP-Boot" /dev/sda

Then format it:

mkfs.fat -v -F 32 -n ESP /dev/sda1

mount it as mnt/gentoo/boot and 'mkdir /mnt/gentoo/boot/EFI', to store at a 
later stage your kernel/initrd in it, before you continue with the rest of 
your installation.  That's all there is to it.


> If you usually use a separate partition for /boot, all you need to do
> differently is set its partition type to EF00 and format it with FAT
> instead of ext2.
> 
> Oh, and if you use GPT, you no longer need the MBR compatibility
> partition, or whatever its called. I no longer need it so I can't
> remember the exact name.

Man pages of partitioning tools refer to it as "Protective MBR", although I've 
seen it mentioned in the interwebs as "protective GPT", which I think is more 
accurate.  It uses the first sector (LBA 0) to store an MBR table showing the 
whole disk, or 2TB if smaller, as an MBR partition.  This is the first 
partition on the disk, typically 1 MiB in size.  It is meant to stop 20 year 
old partitioning tools from messing up a GPT partitioning scheme because they 
can't see it.  Arguably nobody uses Windows 98 these days, so it should be 
safe to not have a protective MBR on your GPT disks.

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to