0

I'm very confused about the UEFI terminology. I have read many pages and this is what I know: (please correct me if I'm wrong)

  • UEFI can boot from SATA and NVMe disks
  • UEFI can boot from MBR and GPT disks
  • EFI partitions are just FAT32 partitions labeled EF00 or such code. Unclear about this
  • UEFI boot does not read the MBR and looks for "boot entries" that must be manually (or installed by the OS) configured

The last point leads to my question
What I don't know and it is my main doubt: does UEFI MUST have a EFI partition to boot?

On the same context: how does this EFI partition (AKA ESP) relates to the so called secure boot? What exactly secure boot means?

A little background: I have a dual boot laptop with 1 TB NVMe disk. It has four MBR partitions and I want to convert it to GPT:

  1. Ubuntu 22 bootable
  2. Empty. It was a swap partition that Ubuntu no longer uses. This one I want to use as ESP in case is a must
  3. Windows 10 NTFS main bootable partition
  4. Windows NTFS second hard disk

This layout may seem odd. The reason is time. I installed and formatted a laptop long time ago, during the preUEFI/preSSD eras. I've used Clonezilla over time to copy the disk to new laptops. Although it boots fine both Ubuntu and windows, I guess it's time to evolve to the (somehow still obscure for me) UEFI and not to panic when BIOS becomes defunct. Even if I somehow manage to convert the disk to GPT and UEFI I'm not sure how I will configure the dual boot (currently GRUB takes care of that) but that's theme for another question

7
  • Yes, UEFI mode absolutely requires an ESP (EFI System Partition). And no, although you can convert stuff that's risky in itself and takes longer than reinstalling the OSes. BTW, welcome to the present. Your confusion is because your knowledge haven't kept up with the times, you stuck in the time before 2012, in a nutshell. Commented Sep 8, 2023 at 16:10
  • UEFI lives in a partition. Of course you need it. This very elementary Windows installation work.
    – anon
    Commented Sep 8, 2023 at 16:19
  • @ChanganAuto I'll do some tests but reinstalling is not an option since both are long time fine tuned installation that will take longer time even to remember what I have done, not to mention that this disk contains many original software that does not allow reinstall (windows in the first place). Also, in my experience I have seen many current machines that still use BIOS/MBR so I guess I'm not the only one stuck. I'm researching on this precisely not to become that
    – alvaroc
    Commented Sep 8, 2023 at 18:57
  • 1
    Why the downvotes?
    – davidgo
    Commented Sep 8, 2023 at 19:13
  • MBR and GPT is a partition schema not a "type of disk". Additionally, your disk cannot be converted to GPT, since you already have 4 partitions. Windows 10 has MBR2GPT, if the empty partition is not actually allocated, and all requirements for the conversion are meet you can use that tool to convert to GPT. This will require you to unable UEFi mode of course. Take a full backup.
    – Ramhound
    Commented Sep 8, 2023 at 21:07

1 Answer 1

3

UEFI can boot from SATA and NVMe disks

As with any other firmware type, UEFI can boot from devices that it has drivers for. Newer UEFI systems will generally have drivers for NVMe; older ones may be SATA-only.

UEFI can boot from MBR and GPT disks

Yes, although the OS being booted may have its own restrictions. It's usually said that Windows doesn't like UEFI-booting from MBR disks.

(Note that booting from an MBR disk doesn't actually use the MBR boot code; only the MBR partition table.)

EFI partitions are just FAT32 partitions labeled EF00 or such code. Unclear about this

Both MBR and GPT have a "partition type/purpose" field for each partition. In MBR, the type is 0xEF for the EFI partition (vs 0x07 for a Windows data partition).

In GPT, the type for an EFI partition is C12A7328-F81F-11D2-BA4B-00A0C93EC93B, which the gdisk partitioning tool abbreviates to EF00 for convenience.

FAT32 is the mandatory baseline that all UEFI implementations must support.

UEFI boot does not read the MBR and looks for "boot entries" that must be manually (or installed by the OS) configured

It doesn't read the MBR boot code, yes. It looks for "boot entries" that are stored in the motherboard's NVRAM (the "CMOS memory").

Boot entries point to a specific file within a specific partition, e.g. \EFI\Ubuntu\grub.efi.

For removable disks (and often for internal disks also, if no boot entries are present), UEFI will also look for a bootable .EFI file at a fixed path within each EFI-compatible partition it finds.

What I don't know and it is my main doubt: does UEFI MUST have a EFI partition to boot?

Technically, no. The boot files must be somewhere on the disk, but it doesn't necessarily need to be a dedicated partition.

For removable disks (USB sticks) a dedicated partition isn't required at all; often the .efi bootloader file is just on the main partition of the USB stick.

For fixed disks, it's usually needed because the standard type of an EFI partition is FAT32 and you don't want that for the main OS partition. However, since UEFI implementations may support other filesystems, I have actually seen systems that have the EFI files dumped on the main Windows NTFS partition – the user's firmware supported NTFS and just used whatever partition the boot-entry told it to use.

(The "partition type" ID isn't actually checked when booting; boot entries specify the partition's unique ID instead.)

That being said, you really should have it as a separate partition, and especially if your OS is going to use something like Ext4 you won't be able to pull the "single partition" trick because your firmware does not support Ext4.

On the same context: how does this EFI partition (AKA ESP) relates to the so called secure boot? What exactly secure boot means?

Secure Boot means digital signature checks on everything that's booted. Mainly, this means that the .efi files that you'll have in the EFI partition have digital signatures embedded in them (the same format as .exe files) and the firmware will enforce that.

Even if I somehow manage to convert the disk to GPT and UEFI I'm not sure how I will configure the dual boot (currently GRUB takes care of that) but that's theme for another question

If you don't use Secure Boot, you can continue using GRUB for that (and it will usually autoconfigure to recognize Windows as before). Launching one .efi app from another is a thing.

The cleaner method would be to have two UEFI boot entries, each directly going into the corresponding OS bootloader (e.g. you select "Ubuntu" and get GRUB). The entries will show up in the same boot menu that you get by pressing F8 or such.

2
  • Thanks for your clear answer. I've read that gpt can transparently convert the disk to GPT and even create the EFI partition. Is that correct?
    – alvaroc
    Commented Sep 8, 2023 at 18:59
  • Converting the disk is easy, creating the EFI partition in a dual-boot system might need manual work (Windows' mbr2gpt.exe won't know what to do with Ubuntu). After conversion, partition and format it manually, then install both bootloaders using bcdboot.exe and grub-install. Keep in mind that after GPT conversion you're not limited to 4 partitions anymore, and that it's usually possible to shrink partitions, so you can later create a new Linux swap partition elsewhere if you want. Commented Sep 8, 2023 at 19:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .