[GTALUG] UEFI mysteries [was Re: war story: power failure makes CentOS system unbootable]

D. Hugh Redelmeier hugh at mimosa.com
Sun Jul 9 16:33:13 EDT 2017


| From: William Park via talk <talk at gtalug.org>

| Another reason why I don't use UEFI is that the boot manager is 
| written to motherboard's non-volatile memory (what used to be "BIOS").  
| So, you can't simply take the harddisk and put into another machine.  
| Found out the hard way.

I wrote and discarded several long responses.  Here's a shorter one.

There are conventionally two kinds of relevant non-volatile memory on a 
motherboard;

- the eeprom that contains the firmware.  It is only updated when one 
  updates the BIOS

- what was called the CMOS memory: battery-backed up RAM.  It was used to 
  store the "BIOS settings".  I imagine this is quite a bit larger now so 
  that it can accommodate the UEFI settings.

I think that you are referring to the second.

The UEFI settings include public keys for Secure Boot; if you've added 
some, you have to install them on the new machine too.  I'll ignore
this issue.

The key mystery in the UEFI settings is the boot choices.  I don't really 
understand them, so I've been looking at a gentle introduction
<https://www.happyassassin.net/2014/01/25/uefi-boot-how-does-that-actually-work-then/>

Try the command
	sudo efibootmgr -v

On my machine, some of the entries are pretty ugly, possibly because 
some file names are in UTF-16 (an abomination).

Here's the first entry:
Boot0000* Fedora	HD(2,GPT,f66e4ede-1301-47fd-af96-7f45aee7bc28,0x40800,0xb4000)/File(\EFI\fedora\shim.efi)

This means:
- present it as "Fedora" in the boot prompt
- if selected, run it from
  + hard drive 2,
  + with GPT partitioning,
  + from the partition with Globally Unique ID
    f66e4ede-1301-47fd-af96-7f45aee7bc28
  + from file \EFI\fedora\shim.efi
  + mystery: 0x40800,0xb4000

If you move this disk to a new machine, there is no way that the
firmware will boot this entry without reconfiguring.

Apparently it will be able to boot \EFI\BOOT\BOOTX64.EFI

How to tell the setup screen that you wish to add something to the
boot menu is not standardized and is often difficult to figure out.


More information about the talk mailing list