[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: changing from BIOS to GPT



There are a few approximations, let me add a few comments. In short, most of
what you wrote is good practice, but not actually required.

Arno Schuring:
> There's still some confusion here:
> - The ESP (Efi System Partition) is recommended to be around 100-200MB

It needs to be big enough to contain the basic files of the bootloader. The
bootloaders for the proprietary commercial OSes are bloated. A GRUB
bootloader is quite small (the modules can reside on another partition). Of
course, nowadays, hard disks are huge, better not be stingy.

>   and should be formatted as FAT32.

More precisely: a conforming UEFI firmware MUST be able to read FAT32
partitions. It CAN be able to read other types: apple's implementation can
read apple's proprietary filesystem.

If you KNOW that YOUR firmware supports ext2, you can use ext2. More likely,
your firmware only supports FAT32, possibly NTFS.

>   Its partition type in gdisk should be EF00,
>   and it should be mounted on /boot/efi.

Not much. It should be mounted there if you want to use grub-install with
the default options, and probably a few other similar tools, but that is
all.

Unlike /boot, which is needed whenever apt-get update rebuilds the initrd or
upgrade the kernel for the security issue of the week, the UEFI system
partition is not needed at all during normal system operation.

Personally, I only mount it whenever it is needed, i.e. a few times when
installing the system. That reduces the risks of files being modified by
mistake.

And you could mount it wherever you want, provided you give the correct
paths to the tools. But there is no reason to gratuitously use a different
path.

>   It is required to be present when using EFI boot.

This is not true at all.

When using UEFI boot, you need a bootloader on a supported filesystem in a
supported partition, pointed by the UEFI variables for the menu. The GPT
type of the partition is irrelevant.

You need an UEFI system partition with the precise characteristics if you
want your firmware to GUESS the bootloader to use on the device, without a
boot variable pointing to it.

Of course, since your UEFI firmware probably does not support LVM / RAID /
Btrfs, you still need a GPT FAT32 partition, you can as well call it 0xEF00.

> If there wasn't an EFI System Partition, you were not booting through
> UEFI but in BIOS mode

One way of finding that out is to load the efivars module and see if it
creates the entries in /sys/firmware/.

> (which we already knew, as Windows does not support booting in EFI mode
> from an MBR-style disk)

I am no windows specialist, but I doubt this is true: I have observed a
barely-conforming laptop without BIOS emulation booting a windows 8 recovery
USB stick formated in MBR format.

Regards,

-- 
  Nicolas George


Reply to: