NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: GRUB2 chainloading GPT NetBSD partition
On Sat, 5 Jul 2025, beaker wrote:
I'm having trouble setting up GRUB2 chainloader booting of a NetBSD system.
Here's my working GRUB config on my home laptop:
```
$ cat /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 'FreeBSD 14.2' --class freebsd --class bsd --class os $menuentry_id_option 'freebsd' {
search --efidisk-only --fs-uuid 42F8-14F2 --hint hd0,gpt6 --set root
chainloader /efi/boot/bootx64.efi
}
menuentry 'NetBSD HEAD' --class netbsd --class bsd --class os $menuentry_id_option 'netbsd' {
search --efidisk-only --fs-uuid 7AB0-0BFD --hint hd0,gpt9 --set root
chainloader /efi/boot/bootx64.efi
}
menuentry 'OpenBSD 7.6' --class openbsd --class bsd --class os $menuentry_id_option 'openbsd' {
search --efidisk-only --fs-uuid C8D7-D5E8 --hint hd0,gpt13 --set root
chainloader /efi/boot/bootx64.efi
}
menuentry 'rEFInd' --class openbsd --class bsd --class os $menuentry_id_option 'refind' {
search --efidisk-only --fs-uuid C8D7-D5E8 --hint hd0,gpt13 --set root
chainloader /efi/refind/refind_x64.efi
}
$
```
The only tricky part is figuring out the `--fs-uuid' value. Use `lsblk -f' on
Linux to get this. (It's _not_ any of the GPT GUIDs.) As you can see, I have
separate EFI ESP partitions for each of the OSes.
HTH,
-RVP
Home |
Main Index |
Thread Index |
Old Index