Benutzer:Lars/grub-efi-Bootproblem
Inhaltsverzeichnis |
Überblick
Auf zwei unsere Virtualisierungsserver (Server/ryoko und Server/tamago) stießen wir unter Debian Stretch auf ein Problem beim Booten via grub und EFI.
Das Problem ist in Debian Buster nur noch teilweise vorhanden. Mit Debian Bullseye / Bookworm ist das Problem abschließend gelöst.
Das Problem scheint nur beim Einsatz von Festplatten mit 4k-Sektoren aufzutreten (siehe "fdisk -l /dev/sda").
Die folgenden Hinweise dienen als Erinnerung für die Behebung des Problems.
Problemanalyse
Die Grundlage des Problems ist wahrscheinlich grub#56312.
Kurz zusammengefasst: "grub-probe" kann die übergeordneten Geräte des root-Dateisystems nicht auflösen. Somit fehlt das Modul für die Partitionstabelle (GPT) und das RAID-Blockdevice.
root@tamago:~# grub-probe -v --device /dev/md0 --target=partmap grub-probe: Info: adding hd0' -> /dev/md0' from device.map. grub-probe: Info: adding hd1' -> /dev/sda' from device.map. grub-probe: Info: adding hd2' -> /dev/sdb' from device.map. grub-probe: Info: /dev/md0 is present. grub-probe: Info: Looking for /dev/md0. grub-probe: Info: /dev/md0 is a parent of /dev/md0. grub-probe: Info: /dev/md0 is present. grub-probe: Info: Looking for /dev/md0. grub-probe: Info: /dev/md0 is a parent of /dev/md0. grub-probe: Info: /dev/md0 is present. grub-probe: Info: Looking for /dev/md0. grub-probe: Info: /dev/md0 is a parent of /dev/md0. grub-probe: Info: opening hd0. grub-probe: Info: drive = 0. grub-probe: Info: the size of hd0 is 439258368. grub-probe: Info: no partition map found for hd0.
Die kritische Zeile ist wahrscheinlich /dev/md0 is a parent of /dev/md0.
Problem 1: grub-efi-Image ohne GPT-Unterstützung
- Symptom:
- keine GPT-Unterstützung im efi-Bootloader
- Lösung:
- grub-install "--modules=part_gpt mdraid1x"
- jede Ausführung von "grub-install" lässt das Problem zurückkehren
- grub-install "--modules=part_gpt mdraid1x"
- Erfolgsindikation:
strings /boot/efi/EFI/debian/grubx64.efi | grep gpt partmap/gpt.c part_gpt grub_gpt_partition_map_iterate
Dieses Problem tritt in Debian Buster nicht mehr auf.
Problem 2: fehlende Module in grub-Konfiguration
- Symptom:
- keine grub-Module für gpt/mdraid
- Lösung:
- /etc/default/grub: GRUB_PRELOAD_MODULES="part_gpt mdraid1x"
- Erfolgsindikator:
- die folgenden Zeilen stehen in /boot/grub/grub.cfg:
insmod part_gpt insmod mdraid1x