Grub: Unterschied zwischen den Versionen

Aus Info-Theke
Zur Navigation springen Zur Suche springen
Zeile 32: Zeile 32:
</pre>
</pre>


= Grub-Konfiguration korrigieren =
= Grub-Konfiguration korrigieren  
<pre>setxkbmap de
<pre>setxkbmap de
DEV=sda2
DEV=sda2
Zeile 42: Zeile 42:
chroot /t
chroot /t
dpkg-reconfigure grub-pc
dpkg-reconfigure grub-pc
</pre>
= Tipps =
* Dauerhaft Menü einblenden: Modifizieren von /etc/grub.d/40-custom:
<pre>
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry "start config from /dev/sda3" {
  search --no-floppy --fs-uuid --set=root 85d66001-4f02-402a-96ea-14458a4eb305
  configfile /boot/grub/grub.cfg
}
</pre>
</pre>

Version vom 23. Juni 2021, 15:53 Uhr


Links

Grub und BtrFS

linux /@/boot/vmlinuz-5.0.0-32-generic root=UUID=.... rootflags=subvol=@
initrd /@/boot/vmlinuz-5.0.0-32-generic

Boot-Recovery

  • Wenn das "normale" Grub-Menü angezeigt wird, mit "c" kommt man in die Grub-Kommandozeile
  • Wenn nach dem Booten die Grub-Shell (Zeilenanfang "grub>") angezeigt wird, können evt. folgende Befehle helfen:
# Info für uber die 1.te Platte (z.B. sda), erste Partition:
ls (hd0,1)
# Laden des Grub-Menüs von der 2.ten Platte:
configfile (hd1,1)/boot/grub/grub.cfg

# Laden des Grub-Menüs von der 1.ten Platte:
configfile (hd0,1)/boot/grub/grub.cfg

# Grub mitteilen, wo die Konfiguration liegt:
set prefix=(hd1,1)/boot/grub
insmod normal
# Starten des Standard-Bootmenüs:
normal

# Starten ohne Konfiguration
linux /boot/vmlinuz root=/dev/sdb1
initrd /boot/initrd.img
boot

= Grub-Konfiguration korrigieren

setxkbmap de
DEV=sda2
mkdir /t
mount /dev/$DEV /t
for dir in proc dev sys; do
  mount -o bind /$dir /t/$dir
done
chroot /t
dpkg-reconfigure grub-pc

Tipps

  • Dauerhaft Menü einblenden: Modifizieren von /etc/grub.d/40-custom:
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry "start config from /dev/sda3" {
  search --no-floppy --fs-uuid --set=root 85d66001-4f02-402a-96ea-14458a4eb305
  configfile /boot/grub/grub.cfg
}