6

I know the UEFI boot loaders are stored on a FAT32 partition on my (usually GPT) drive, but where is the boot order stored?

My reasoning:

  • It can't be stored as part of the firmware settings, since it's specific to the storage drive, not the computer.
  • It can't be in a boot-loader-specific database, because then the firmware wouldn't know how to change the order since it wouldn't know the format (but mine can).
  • It doesn't seem to be in a text file or something.

So where is it?

user541686
  • 23,918
  • 6
    In the firmaware of the system board Time for some reading also over here – Moab Aug 11 '15 at 21:56
  • 1
    @Moab: Oh what the heck. So if I move the drive to another instance of the same computer model it won't boot? – user541686 Aug 11 '15 at 22:07
  • It should, the firmware is a mini OS that enumerates all attached hardware before the actual boot process. – Moab Aug 11 '15 at 23:09
  • Also when you move a windows installation to different hardware, even if it is the same model exactly, widows activation may be inactivated. – Moab Aug 11 '15 at 23:12
  • 1
    @Moab: That doesn't make sense. If the boot entries are stored in the system board's NVRAM then that means the second computer can't find the boot entries on the drive, since they're not there. Hence I don't see how it could possibly be able to boot from the drive. And yes, I know perfectly well about Windows activation but that's irrelevant to my question here. – user541686 Aug 11 '15 at 23:13
  • Uefi enumerates all hardware upon loading, it still looks for bootable hard drives and adds them to the boot list, i guess that is why they call it extensible. – Moab Aug 11 '15 at 23:30
  • @Moab: You realize the entries contain more information than just the hard drive ID, right? Such as the boot loader path? And that there can be multiple boot loaders on a single disk? Do you not see the problem with your claimed procedure? – user541686 Aug 11 '15 at 23:59
  • If you would please read the links @Mehrdad posted it would answer your questions. It has a EFI boot partition of sorts and inside of that is an EFI folder with all of the boot loader files. – Unfundednut Aug 12 '15 at 03:47
  • @MrStatic: I did look at those, but it seems to me that the second computer could only ever boot \EFI\BOOT\BOOTXYZ.EFI and would not be able to boot anything else on that drive unless the boot loader happened to take care of this. i.e. it wouldn't necessarily be able to boot the same things as the first computer. – user541686 Aug 12 '15 at 06:19
  • The EFI\BOOT\bootx64.efi file is a "fallback" boot loader file (on x86-64 hardware; the filename varies with the CPU type). That file is launched if no other file is registered in the NVRAM, or if it's configured to boot before others. In most cases, an OS will install a boot loader somewhere else (say, EFI\ubuntu\shimx64.efi), register that file, and the computer will then launch it. If the disk is moved to another computer, it won't boot unless the OS also installed to EFI\BOOT\bootx64.efi. Many people find this lack of disk portability annoying, but that's just the way it is. – Rod Smith Aug 12 '15 at 18:48

1 Answers1

5

Moab was right, the order is stored in the pc in NVRAM.

From the link Moab shared: (https://www.happyassassin.net/2014/01/25/uefi-boot-how-does-that-actually-work-then/)

“The UEFI boot manager is a firmware policy engine that can be configured by modifying architecturally defined global NVRAM variables. The boot manager will attempt to load UEFI drivers and UEFI applications (including UEFI OS boot loaders) in an order defined by the global NVRAM variables.”

And from the linux efibootmgr manual (a utility to manipulate the boot order etc, here: https://linux.die.net/man/8/efibootmgr ):

Note: efibootmgr requires that the kernel support access to EFI non-volatile variables