On 12/05/17 15:18, Pascal Hambourg wrote:
Le 05/12/2017 à 06:55, David Christensen a écrit :
4. The firmware finds the first GPT partition and file system, which
look "right" for EFI boot images.
No.
5. The firmware reads this file system and finds only one file, which
it loads and runs (starting GRUB):
/EFI/debian/grubx64.efi
No.
(If there were more than one choice, my guess is that I'd have to
pre-select one in the CMOS setup, or perhaps have to select one from a
menu at the end of POST?)
No.
First, a compliant UEFI firmware should look up its EFI boot variables
and try each boot entry Boot* in the order defined in the BootOrder
variable. The text description associated to theses entries is usually
displayed in the EFI boot menu. If no entry is defined or works, then
the firmware should look for a partition with the "EFI system partition"
type GUID and look for an /EFI/Boot/bootx64.efi file (default path used
on removable devices).
GRUB can be installed in such a path with
grub-install --removable
6. GRUB finds the second GPT partition and file system, which looks
"right" for GRUB, reads the file system, locates the appropriate files
(notably /boot/grub/grub.cfg), and boots the system.
When /boot/grub is in a plain partition on the same drive as GRUB's core
image (grubx64.efi here), the partition number is hardcoded in the core
image.
Again -- are there any other commands I should run that readers might
find interesting?
You can print the EFI boot variables with
efibootmgr -v
root@debian:~# efibootmgr -v
Timeout: 1 seconds
BootOrder: 0001,0000,000B,000D,000E
Boot0000* Windows Boot Manager
HD(1,GPT,b1ed9b97-3b16-4838-8b46-3978e905fdd9,0x800,0x32000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...a................
Boot0001* debian
HD(1,GPT,c89f1523-fff6-45d1-abbe-b2eaaa0216e0,0x800,0x100000)/File(\EFI\debian\grubx64.efi)
Boot000B* CD/DVD Drive BBS(CDROM,,0x0)P3: HL-DT-ST BD-RE WH14NS40 .
Boot000D* Network Card BBS(Network,,0x0)IBA GE Slot 00C8 v1395.
Boot000E* Hard Drive BBS(HD,,0x0)P0: INTEL SSDSC2CW060A3.
Boot0000 -- there is no Windows drive in this machine.
Boot0001 -- corresponds to the first GPT partition on the SSD that is in
the machine:
root@debian:~# blkid /dev/sda1
/dev/sda1: UUID="8F67-ADA4" TYPE="vfat"
PARTUUID="c89f1523-fff6-45d1-abbe-b2eaaa0216e0"
root@debian:~# mount /dev/sda1 /mnt
root@debian:~# ls -l /mnt/EFI/debian/grubx64.efi
-rwx------ 1 root root 121856 Dec 4 20:23 /mnt/EFI/debian/grubx64.efi
Boot000B -- corresponds to my optical drive.
Boot000D -- corresponds to my network interface.
Boot000E -- corresponds to an SSD (with Debian Stretch BIOS/MBR) that
was in the machine in the past, but was not installed when I installed
Debian UEFI/GPT and currently is not installed.
STFW I see:
http://www.uefi.org/
http://www.uefi.org/sites/default/files/resources/UEFI%20Spec%202_6.pdf
2,706 pages -- that's going to take a while to read...
David