docs:tips_n_tricks:grub:index.html
Table of Contents
GRUB
Pages
Links
- Good description of GRUB boot steps in an Stackexchange answer.
ISO Image on Harddisk
- custom.cfg
menuentry "custom.cfg: debian-live-12.5.0-amd64-lxde.iso" { insmod part_gpt insmod ext2 search --no-floppy --fs-uuid --set=root 8e1fa52e-49de-49f4-b55a-2e261d27891b loopback loop /boot/iso/debian-live-12.5.0-amd64-lxde.iso linux (loop)/live/vmlinuz boot=live findiso=/boot/iso/debian-live-12.5.0-amd64-lxde.iso initrd (loop)/live/initrd.img }
Use config file of other installation on GPT disk
- custom.cfg
menuentry 'custom.cfg: /boot/grub/grub.cfg on /dev/sda5 [ a66894b3-dc45-48fc-82c8-04dfdc8d9ff3 ]' { insmod part_gpt insmod ext2 search --no-floppy --fs-uuid --set=root a66894b3-dc45-48fc-82c8-04dfdc8d9ff3 configfile /boot/grub/grub.cfg } menuentry 'custom.cfg: /boot/grub/grub.cfg on /dev/sda5 [ --label 'MyLabel' --hint hd0,gpt5 ]' { insmod part_gpt insmod ext2 search --no-floppy --set=root --label 'MyLabel' --hint hd0,gpt5 configfile /boot/grub/grub.cfg } menuentry 'custom.cfg: /boot/grub/grub.cfg on /dev/sda5 [ set root=(hd0,gpt5) ]' { insmod part_gpt insmod ext2 set root=(hd0,gpt5) configfile /boot/grub/grub.cfg }
Find out, whether MBR has GRUB code
dd if=/dev/sda bs=512 count=1 | xxd | grep GRUB dd if=/dev/sda bs=1 count=16 skip="$(( 16#180 ))" | xxd -o "$(( 16#180 ))"
xxd -s "$(( 16#180 ))" -l 16 /dev/sda
dd if=/dev/sda bs=1 count=512 | grep -aob GRUB
The previous line might help to (automatically) identify the version of GRUB installed, as the position varies with version.
dd if=/dev/sda bs=512 count=1 | xxd | diff -U100 --color=always - <( xxd /boot/grub/i386-pc/boot.img ) | less -SR
References:
man xxd
Tagged pages (tag plugin)
Indexed pages (subjectindex plugin)
docs/tips_n_tricks/grub/index.html.txt · Last modified: 16.02.2025 00:54 CET by peter