It's been a while since I read about UEFI and forgot how some pieces connect. I forgot how UEFI and the Grub bootloader work together. I'll say what I recall, please correct me if I'm wrong:
- UEFI is OS independent and works by having a single ESP partition no matter the amount of disks.
- The ESP partition is where new operating systems will "subscribe" themselves to the UEFI process by adding their bootloaders and partition references in their own folders. Basically there's one folder in /boot/efi for each OS that is installed.
- Bootloaders are stored in NVRAM as a sequence.
Right now I'm using a machine that has Ubuntu, Windows and Arch. Every OS has its bootloader but whenever my machine shows me the "boot entries" I'm actually looking at Ubuntu's Grub configuration. It's like I'm using Ubuntu's grub to load any of the operating systems in my machine.
So the question is: How does UEFI know that Ubuntu is my "main" bootloader. Why am I not presented with the Windows or Arch bootloaders whenever I start my machine?