Linux grub: Difference between revisions
(Die Seite wurde neu angelegt: „Grub Linux =grub rescue>= The problem: <source lang=bash> ... Entering rescue mode...…“) |
m (Text replacement - "<source" to "<syntaxhighlight") |
||
Line 3: | Line 3: | ||
=grub rescue>= | =grub rescue>= | ||
The problem: | The problem: | ||
< | <syntaxhighlight lang=bash> | ||
... | ... | ||
Entering rescue mode... | Entering rescue mode... | ||
Line 13: | Line 13: | ||
Find your devices: | Find your devices: | ||
< | <syntaxhighlight lang=bash> | ||
grub rescue> ls | grub rescue> ls | ||
</source> | </source> | ||
Line 19: | Line 19: | ||
===Find the directory where the normal.mod file resides=== | ===Find the directory where the normal.mod file resides=== | ||
In this example we have LVM and the /boot/grub is in VG vg-root and the LV lv-root. | In this example we have LVM and the /boot/grub is in VG vg-root and the LV lv-root. | ||
< | <syntaxhighlight lang=bash> | ||
grub rescue> ls (lvm/vg--root-lv--root)/boot/grub/i386-pc | grub rescue> ls (lvm/vg--root-lv--root)/boot/grub/i386-pc | ||
... normal.mod ... | ... normal.mod ... | ||
Line 25: | Line 25: | ||
===Set the prefix to the right place=== | ===Set the prefix to the right place=== | ||
< | <syntaxhighlight lang=bash> | ||
grub rescue> set prefix=(lvm/vg--root-lv--root)/boot/grub | grub rescue> set prefix=(lvm/vg--root-lv--root)/boot/grub | ||
</source> | </source> | ||
===Now you can load and start the module called "normal"=== | ===Now you can load and start the module called "normal"=== | ||
< | <syntaxhighlight lang=bash> | ||
grub rescue> insmod normal | grub rescue> insmod normal | ||
grub rescue> normal | grub rescue> normal | ||
Line 36: | Line 36: | ||
If the menu not occurs you get something like this: | If the menu not occurs you get something like this: | ||
< | <syntaxhighlight lang=bash> | ||
GNU GRUB version 1.99,5.11.0.175.2.0.0.42.2 | GNU GRUB version 1.99,5.11.0.175.2.0.0.42.2 | ||
Line 48: | Line 48: | ||
==Normal grub is bootet, now start the Kernel== | ==Normal grub is bootet, now start the Kernel== | ||
Example for LVM: | Example for LVM: | ||
< | <syntaxhighlight lang=bash> | ||
insmod gzio | insmod gzio | ||
insmod part_msdos | insmod part_msdos | ||
Line 59: | Line 59: | ||
Example for ZFS-Root: | Example for ZFS-Root: | ||
< | <syntaxhighlight lang=bash> | ||
insmod gzio | insmod gzio | ||
insmod part_msdos | insmod part_msdos |
Revision as of 15:20, 25 November 2021
grub rescue>
The problem: <syntaxhighlight lang=bash> ... Entering rescue mode... grub rescue> </source>
Get into the normal grub
Find your devices: <syntaxhighlight lang=bash> grub rescue> ls </source>
Find the directory where the normal.mod file resides
In this example we have LVM and the /boot/grub is in VG vg-root and the LV lv-root. <syntaxhighlight lang=bash> grub rescue> ls (lvm/vg--root-lv--root)/boot/grub/i386-pc ... normal.mod ... </source>
Set the prefix to the right place
<syntaxhighlight lang=bash> grub rescue> set prefix=(lvm/vg--root-lv--root)/boot/grub </source>
Now you can load and start the module called "normal"
<syntaxhighlight lang=bash> grub rescue> insmod normal grub rescue> normal </source>
If the menu not occurs you get something like this: <syntaxhighlight lang=bash>
GNU GRUB version 1.99,5.11.0.175.2.0.0.42.2
Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists possible device or file completions.
grub> </source>
Normal grub is bootet, now start the Kernel
Example for LVM: <syntaxhighlight lang=bash> insmod gzio insmod part_msdos insmod lvm insmod ext2 set root='lvmid/KAlPF4-Qb8I-Sx41-10cC-lACw-Msoh-3qEohv/pmE9Nt-rLG3-FlNM-CwOT-hy42-gSnm-fZSn3l' linux /boot/vmlinuz-4.4.0-53-generic root=/dev/mapper/vg--root-lv--root ro initrd /boot/initrd.img-4.4.0-53-generic </source>
Example for ZFS-Root: <syntaxhighlight lang=bash> insmod gzio insmod part_msdos insmod zfs set root='hd0,msdos4' linux /ROOT/ubuntu-15.04@/boot/vmlinuz-4.4.0-57-generic root=ZFS=rpool/ROOT/ubuntu-15.04 boot=zfs zfs_force=1 ro quiet splash nomdmonddf nomdmonisw $vt_handoff initrd /ROOT/ubuntu-15.04@/boot/initrd.img-4.4.0-57-generic </source>