GRUB2’s os-prober findet ja die meisten OSs (ausser mindestens FreeBSD auf ufs2) und produziert daraus eine lange grub.cfg-Datei. Nur, dass ich einen Teil davon überhaupt nicht verstehe. Beispiel:
if x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 --hint='hd0,msdos5' a13e1c0f-c157-4ee5-a1c3-67a39ebe01d1
else
search --no-floppy --fs-uuid --set=root a13e1c0f-c157-4ee5-a1c3-67a39ebe01d1
fi
font="/usr/share/grub2/unicode.pf2"
fi
Speziell das lange if-statement ist mir unklar, ich weiß nicht wie die Variablen Werte zugewiesen bekommen und in der GRUB2 Dokumentation ist auch nichts.
Hier dasselbe, obgleich ich wenigstens verstehe, dass die SuSE hier gestartet wird, nur die Details entgehen mir:
menuentry 'openSUSE 12.3 (on /dev/sda5)' --class 'opensuse-12-3' --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-a13e1c0f-c157-4ee5-a1c3-67a39ebe01d1'{
savedefault
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1' e8b9e1af-e836-4332-8446-d149a0c68d40
else
search --no-floppy --fs-uuid --set=root e8b9e1af-e836-4332-8446-d149a0c68d40
fi
echo 'Loading Linux 3.7.10-1.16-desktop ...'
linux /vmlinuz-3.7.10-1.16-desktop root=UUID=a13e1c0f-c157-4ee5-a1c3-67a39ebe01d1 showopts video=1366x768 resume=/dev/disk/by-id/ata-WDC_WD3200BPVT-22JJ5T0_WD-WXU1CB1S5967-part3 nosplash noquiet
echo 'Loading initial ramdisk ...'
initrd /initrd-3.7.10-1.16-desktop
Für Hinweise auf eine Schritt für Schritt Erklärung wäre ich dankbar.