Erstmal meine Konfiguration Code-Zeilen aus grub- customizer entnommen:
3 Systemplatten - 3 Systeme (Debian -Testing)
1. System (Gnome) -->Grub + os-prober (während des Schreibens gepurgt) = Boot- Platte
2. System (Xfce) nur Grub (im MBR))
3. System (Cinnamon) nur Grub (im MBR))
1.Eintrag :Sparky Gnome, mit Linux 4.8.0-2-amd64
Code: Alles auswählen
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
set root='hd0,gpt3'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3 8b3cf64c-1c7f-45af-ba13-3db329651412
else
search --no-floppy --fs-uuid --set=root 8b3cf64c-1c7f-45af-ba13-3db329651412
fi
echo 'Linux 4.8.0-2-amd64 wird geladen …'
linux /boot/vmlinuz-4.8.0-2-amd64 root=UUID=8b3cf64c-1c7f-45af-ba13-3db329651412 ro quiet splash
echo 'Initiale Ramdisk wird geladen …'
initrd /boot/initrd.img-4.8.0-2-amd64
2. Eintrag: Sparky Xfce mit Linux 4.8.0-2 (auf /dev/sdc1)
Code: Alles auswählen
insmod part_msdos
insmod ext2
set root='hd2,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd2,msdos1 --hint-efi=hd2,msdos1 --hint-baremetal=ahci2,msdos1 ce83c144-66ff-4c4c-8803-a4a846cee916
else
search --no-floppy --fs-uuid --set=root ce83c144-66ff-4c4c-8803-a4a846cee916
fi
linux /boot/vmlinuz-4.8.0-2-amd64 root=UUID=ce83c144-66ff-4c4c-8803-a4a846cee916 ro quiet splash
initrd /boot/initrd.img-4.8.0-2-amd64
3. Eintrag: Cinnamon, mit Linux 4.8.0-2-amd64 (auf /dev/sdb2)
Code: Alles auswählen
insmod part_msdos
insmod ext2
set root='hd1,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos2 --hint-efi=hd1,msdos2 --hint-baremetal=ahci1,msdos2 28ac974c-1558-4520-83ca-f6de8d814047
else
search --no-floppy --fs-uuid --set=root 28ac974c-1558-4520-83ca-f6de8d814047
fi
linux /boot/vmlinuz-4.8.0-2-amd64 root=UUID=28ac974c-1558-4520-83ca-f6de8d814047 ro quiet
initrd /boot/initrd.img-4.8.0-2-amd64
Nach den Haupteinträgen folgen dann, wie üblich, die Erweiterten Optionen (recovery mode, andere Kernel)
Das funktioniert, solange ich kein Kernel-Update hatte und os-prober gelaufen ist.
Dann gibt es das Perfekte Chaos mit Einträgen die ähnlich diesem aussehen.
Abhilfe ist dann nur noch durch "Handbetrieb" und ändern der zu ladenden intrid.img möglich.
Mein Ziel ist einen immer funktionierenden Grub auf hdO (1. Eintrag) zu erstellen, der dann den jeweiligen Grub auf den anderen Festplatten aufruft.
Eine andere Lösung die nach einem Kernel-Update die korrekte intrid auf der anderen Platte aufruft fällt mir nicht ein.
in einem anderen Thread von mir
hatte smubert folgenden Vorschlag gemacht:
Als erstes habe ich erst mal os-prober gepurgt und die op-prober Dateien in etc/grub.d gelöscht (wurden nicht entferntIch würde auf os-prober verzichten (deinstallieren) und manuell einen Booteintrag für das zweite System erstellen, etwa indem du das an die Datei »/etc/grub.d/40_custom« hängst:
Damit verwendest du zum Starten des cinnamon-Systems die grub-Konfigurationsdatei des cinnamon-Systems, du bist also nirgends mehr auf os-prober angewiesen und startest beide Systeme immer mit der aktuellen grub.cfg und nicht in dem Zustand (ie mit dem Kernel) in dem os-prober sie zuletzt erkannt hat.Code: Alles auswählen
menuentry 'Debian GNU/Linux (cinnamon)' { insmod part_msdos insmod ext2 set root='hd1,msdos2' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos2 --hint-efi=hd1,msdos2 --hint-baremetal=ahci1,msdos2 28ac974c-1558-4520-83ca-f6de8d814047 else search --no-floppy --fs-uuid --set=root 28ac974c-1558-4520-83ca-f6de8d814047 fi configfile /boot/grub/grub.cfg }
Das setzt allerdings voraus, dass auf dem cinnamon-System ebenfalls grub installiert ist, ohne dass dieser Grub in den mbr geschrieben wurde.
Mein Verzeichnis etc/grub.d enthält allerding alle mögliche *.proxy Dateien, deren Bedetung mir nicht so recht klar ist.
Code: Alles auswählen
/etc/grub.d$ ls -al
insgesamt 112
drwxr-xr-x 5 root root 4096 Dez 26 12:33 .
drwxr-xr-x 167 root root 12288 Dez 26 12:37 ..
-rwxr-xr-x 1 root root 9783 Nov 1 12:10 00_header
-rwxr-xr-x 1 root root 6258 Jan 22 2016 05_debian_theme
-rwxr-xr-x 1 root root 6155 Feb 16 2015 06_sparky_theme
-rwxr-xr-x 1 root root 6080 Dez 26 10:20 10_linux_proxy
-rwxr-xr-x 1 root root 1268 Dez 26 10:20 31_linux_proxy
-rwxr-xr-x 1 root root 716 Dez 26 10:20 40_custom_proxy
-rwxr-xr-x 1 root root 776 Dez 26 10:20 42_custom_proxy
-rwxr-xr-x 1 root root 11281 Nov 1 12:10 43_linux_xen
-rwxr-xr-x 1 root root 902 Dez 26 10:20 45_custom_proxy
-rwxr-xr-x 1 root root 1418 Sep 6 2015 47_uefi-firmware
-rwxr-xr-x 1 root root 1039 Dez 26 10:20 48_custom_proxy
-rwxr-xr-x 1 root root 216 Dez 12 2013 50_custom
drwxr-xr-x 4 root root 4096 Nov 21 00:24 backup
drwxr-xr-x 2 root root 4096 Nov 21 00:24 bin
drwxr-xr-x 2 root root 4096 Dez 26 10:20 proxifiedScripts
-rw-r--r-- 1 root root 483 Apr 29 2013 README
-rw-r--r-- 1 root root 240 Dez 26 10:20 .script_sources.txt
Code: Alles auswählen
#!/bin/sh
cat <<EOF
if [ -f \${config_directory}/custom.cfg ]; then
source \${config_directory}/custom.cfg
elif [ -z "\${config_directory}" -a -f \$prefix/custom.cfg ]; then
source \$prefix/custom.cfg;
fi
EOF
1: Analog zu smuberts obigen Vorschlag würde ich zwei Einträge in welche Datei (?) erstellen:
Code: Alles auswählen
menuentry 'Debian GNU/Linux (cinnamon)' {
insmod part_msdos
insmod ext2
set root='hd1,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos2 --hint-efi=hd1,msdos2 --hint-baremetal=ahci1,msdos2 28ac974c-1558-4520-83ca-f6de8d814047
else
search --no-floppy --fs-uuid --set=root 28ac974c-1558-4520-83ca-f6de8d814047
fi
configfile /boot/grub/grub.cfg
}
menuentry 'Debian GNU/Linux (Xfce)' {
insmod part_msdos
insmod ext2
set root='hd2,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos2 --hint-efi=hd1,msdos2 --hint-baremetal=ahci1,msdos2 28ac974c-1558-4520-83ca-f6de8d814047
else
search --no-floppy --fs-uuid --set=root ce83c144-66ff-4c4c-8803-a4a846cee916
fi
configfile /boot/grub/grub.cfg
}
Code: Alles auswählen
dpkg-reconfigure grub-pc
Ketzerische Frage :
Nach der korrektur von Grub (ohne os-prober) dürften da ja nur noch die Einträge von
1.Eintrag :Sparky Gnome, mit Linux 4.8.0-2-amd64
drinstehen
Könnte ich die oben genannten Code- Zeilen nicht auch einfach mit dem Grub Customizer als neue Einträge anlegen?