Grub2: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Zeile 10: | Zeile 10: | ||
==/boot/grub/grub.cfg== | ==/boot/grub/grub.cfg== | ||
− | + | vi /boot/grub/grub.cfg | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | Um die Reihenfolge zu ändern, müssen dor tide "Menuentry's" geändert werden: | |
− | + | Grub wird es von oben nach unten anzeigen. | |
− | + | Beispiel: Im Moment ist der Booteintrag mit der "Wiederherstellungskonsole" an zweiter Stelle. Deshalb wird dieser Eintrag ausgeschnitten und über den ersten eingefügt. | |
− | |||
− | |||
− | |||
− | + | <pre> | |
− | + | menuentry 'Ubuntu, mit Linux 3.5.0-36-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.5.0-36-generic-advanced-3daa1a20-ab97-4eb8-84e3-137a1743bafd' { | |
− | + | recordfail | |
− | + | gfxmode $linux_gfx_mode | |
− | + | 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 3daa1a20-ab97-4eb8-84e3-137a1743bafd | |
− | + | else | |
− | + | search --no-floppy --fs-uuid --set=root 3daa1a20-ab97-4eb8-84e3-137a1743bafd | |
− | + | fi | |
− | + | echo 'Linux 3.5.0-36-generic wird geladen …' | |
− | + | linux /boot/vmlinuz-3.5.0-36-generic root=UUID=3daa1a20-ab97-4eb8-84e3-137a1743bafd ro | |
− | + | echo 'Initiale Ramdisk wird geladen …' | |
− | + | initrd /boot/initrd.img-3.5.0-36-generic | |
− | + | } | |
− | + | menuentry 'Ubuntu, mit Linux 3.5.0-36-generic (Wiederherstellungsmodus)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.5.0-36-generic-recovery-3daa1a20-ab97-4eb8-84e3-137a1743bafd' { | |
− | + | recordfail | |
− | + | 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 3daa1a20-ab97-4eb8-84e3-137a1743bafd | |
− | + | else | |
− | + | search --no-floppy --fs-uuid --set=root 3daa1a20-ab97-4eb8-84e3-137a1743bafd | |
− | + | fi | |
− | + | echo 'Linux 3.5.0-36-generic wird geladen …' | |
− | + | linux /boot/vmlinuz-3.5.0-36-generic root=UUID=3daa1a20-ab97-4eb8-84e3-137a1743bafd ro recovery nomodeset | |
− | + | echo 'Initiale Ramdisk wird geladen …' | |
− | + | initrd /boot/initrd.img-3.5.0-36-generic | |
− | + | } | |
− | + | </pre> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | menuentry ' | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | nun ändern in: | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | <pre> | ||
+ | menuentry 'Ubuntu, mit Linux 3.5.0-36-generic (Wiederherstellungsmodus)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.5.0-36-generic-recovery-3daa1a20-ab97-4eb8-84e3-137a1743bafd' { | ||
+ | recordfail | ||
+ | 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 3daa1a20-ab97-4eb8-84e3-137a1743bafd | ||
+ | else | ||
+ | search --no-floppy --fs-uuid --set=root 3daa1a20-ab97-4eb8-84e3-137a1743bafd | ||
+ | fi | ||
+ | echo 'Linux 3.5.0-36-generic wird geladen …' | ||
+ | linux /boot/vmlinuz-3.5.0-36-generic root=UUID=3daa1a20-ab97-4eb8-84e3-137a1743bafd ro recovery nomodeset | ||
+ | echo 'Initiale Ramdisk wird geladen …' | ||
+ | initrd /boot/initrd.img-3.5.0-36-generic | ||
+ | } | ||
+ | menuentry 'Ubuntu, mit Linux 3.5.0-36-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.5.0-36-generic-advanced-3daa1a20-ab97-4eb8-84e3-137a1743bafd' { | ||
+ | recordfail | ||
+ | gfxmode $linux_gfx_mode | ||
+ | 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 3daa1a20-ab97-4eb8-84e3-137a1743bafd | ||
+ | else | ||
+ | search --no-floppy --fs-uuid --set=root 3daa1a20-ab97-4eb8-84e3-137a1743bafd | ||
+ | fi | ||
+ | echo 'Linux 3.5.0-36-generic wird geladen …' | ||
+ | linux /boot/vmlinuz-3.5.0-36-generic root=UUID=3daa1a20-ab97-4eb8-84e3-137a1743bafd ro | ||
+ | echo 'Initiale Ramdisk wird geladen …' | ||
+ | initrd /boot/initrd.img-3.5.0-36-generic | ||
+ | } | ||
</pre> | </pre> | ||
==/etc/default/grub== | ==/etc/default/grub== | ||
==/etc/grub.d/== | ==/etc/grub.d/== |
Version vom 13. Februar 2014, 11:46 Uhr
Installation
Grub wird in den MBR der angeben Festplatte geschrieben: (BSP)
grub-install /dev/sda [Achtung, Bootreihenfolge im BIOS/UEFI beachten!]
oder auf einer Partition: (BSP)
grub-install --force /dev/sda3
Konfigurationsdateien
/boot/grub/grub.cfg
vi /boot/grub/grub.cfg
Um die Reihenfolge zu ändern, müssen dor tide "Menuentry's" geändert werden: Grub wird es von oben nach unten anzeigen. Beispiel: Im Moment ist der Booteintrag mit der "Wiederherstellungskonsole" an zweiter Stelle. Deshalb wird dieser Eintrag ausgeschnitten und über den ersten eingefügt.
menuentry 'Ubuntu, mit Linux 3.5.0-36-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.5.0-36-generic-advanced-3daa1a20-ab97-4eb8-84e3-137a1743bafd' { recordfail gfxmode $linux_gfx_mode 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 3daa1a20-ab97-4eb8-84e3-137a1743bafd else search --no-floppy --fs-uuid --set=root 3daa1a20-ab97-4eb8-84e3-137a1743bafd fi echo 'Linux 3.5.0-36-generic wird geladen …' linux /boot/vmlinuz-3.5.0-36-generic root=UUID=3daa1a20-ab97-4eb8-84e3-137a1743bafd ro echo 'Initiale Ramdisk wird geladen …' initrd /boot/initrd.img-3.5.0-36-generic } menuentry 'Ubuntu, mit Linux 3.5.0-36-generic (Wiederherstellungsmodus)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.5.0-36-generic-recovery-3daa1a20-ab97-4eb8-84e3-137a1743bafd' { recordfail 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 3daa1a20-ab97-4eb8-84e3-137a1743bafd else search --no-floppy --fs-uuid --set=root 3daa1a20-ab97-4eb8-84e3-137a1743bafd fi echo 'Linux 3.5.0-36-generic wird geladen …' linux /boot/vmlinuz-3.5.0-36-generic root=UUID=3daa1a20-ab97-4eb8-84e3-137a1743bafd ro recovery nomodeset echo 'Initiale Ramdisk wird geladen …' initrd /boot/initrd.img-3.5.0-36-generic }
nun ändern in:
menuentry 'Ubuntu, mit Linux 3.5.0-36-generic (Wiederherstellungsmodus)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.5.0-36-generic-recovery-3daa1a20-ab97-4eb8-84e3-137a1743bafd' { recordfail 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 3daa1a20-ab97-4eb8-84e3-137a1743bafd else search --no-floppy --fs-uuid --set=root 3daa1a20-ab97-4eb8-84e3-137a1743bafd fi echo 'Linux 3.5.0-36-generic wird geladen …' linux /boot/vmlinuz-3.5.0-36-generic root=UUID=3daa1a20-ab97-4eb8-84e3-137a1743bafd ro recovery nomodeset echo 'Initiale Ramdisk wird geladen …' initrd /boot/initrd.img-3.5.0-36-generic } menuentry 'Ubuntu, mit Linux 3.5.0-36-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.5.0-36-generic-advanced-3daa1a20-ab97-4eb8-84e3-137a1743bafd' { recordfail gfxmode $linux_gfx_mode 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 3daa1a20-ab97-4eb8-84e3-137a1743bafd else search --no-floppy --fs-uuid --set=root 3daa1a20-ab97-4eb8-84e3-137a1743bafd fi echo 'Linux 3.5.0-36-generic wird geladen …' linux /boot/vmlinuz-3.5.0-36-generic root=UUID=3daa1a20-ab97-4eb8-84e3-137a1743bafd ro echo 'Initiale Ramdisk wird geladen …' initrd /boot/initrd.img-3.5.0-36-generic }