FreeBSD 13 booting with Grub

Hello, Folks.

I have FreeBSD installed on the 5th partition of a GPT-based disk on a Mac Mini. In Grub, I have a custom menu entry file that looks like this:
Code:
menuentry "FreeBSD" {                                       
         insmod ufs2
         insmod part_gpt
         set root=(hd1,5)
         kfreebsd /boot/loader
         kfreebsd_loadenv /boot/device.hints
         set kFreeBSD.vfs.root.mountfrom=ufs:/dev/ada0s5a
         set kFreeBSD.vfs.root.mountfrom.options=rw
}

When I choose the entry during boot, I just get a blank screen with no info or error messages. Any help would be great!

Thanks!
 
Hello, Folks.

I have FreeBSD installed on the 5th partition of a GPT-based disk on a Mac Mini. In Grub, I have a custom menu entry file that looks like this:
Code:
menuentry "FreeBSD" {                                     
         insmod ufs2
         insmod part_gpt
         set root=(hd1,5)
         kfreebsd /boot/loader
         kfreebsd_loadenv /boot/device.hints
         set kFreeBSD.vfs.root.mountfrom=ufs:/dev/ada0s5a
         set kFreeBSD.vfs.root.mountfrom.options=rw
}

When I choose the entry during boot, I just get a blank screen with no info or error messages. Any help would be great!

Thanks!
I have the following and it works fine:-
Bash:
menuentry "FreeBSD 13.0-RELEASE amd64 ***** STABLE default - use for XWindows ******  {
    insmod ufs2
    insmod part_gpt
    set root=(hd0,2)
    kfreebsd /boot/loader
}
Do you have two disks? Do you need those two set lines? It might be better to use gpt labels in your /etc/fstab
 
Do you have a EFI partition on your disk? I've never been able to get kfreebsd to work for EFI booting, I have to use chainloader. I've just been going over my old notes for this. It's not uncommon to use GPT partitions and still do MBR type boots. In those cases, kfreebsd works fine. Since you're using bsdlabels, that suggests you're doing legacy booting, but I'm not sure.

For legacy boots, I use this style of menuentry... even with bsdlabels, I've never needed the /boot/device.hints...

Code:
menuentry "FreeBSD" {
      insmod ufs2
      root=(hd0,gpt5)
      kfreebsd /boot/loader
}

But for EFI booting, I have to use this type of menuentry:

Code:
menuentry "FreeBSD" {
      insmod ufs2
      root=(hd0,gpt5)
      chainloader /boot/loader.efi
}
Hope this helps. Good luck with it.
 
If you have a freebsd boot partition you can chainload
Code:
menuentry "FREEBSD BOOT FROM BSDPMBR  " {
insmod part_gpt
insmod part_msdos
insmod ufs2
insmod chain
set root=(hd2)
chainloader (hd2)+1
}

If you don't have a freebsd boot partition you can directly load the kernel e.g.,
Code:
menuentry "FREEBSD DIRECTLY LOAD KERNEL" {
insmod part_gpt
insmod part_msdos
insmod ufs2
insmod bsd
set root=(hd2,gpt2)
kfreebsd /boot/kernel/kernel
kfreebsd_loadenv /boot/device.hints
set kFreeBSD.vfs.root.mountfrom=ufs:/dev/ada2p2
set kFreeBSD.kern.vty=vt
}
 
Do you have a EFI partition on your disk? I've never been able to get kfreebsd to work for EFI booting, I have to use chainloader. I've just been going over my old notes for this. It's not uncommon to use GPT partitions and still do MBR type boots. In those cases, kfreebsd works fine. Since you're using bsdlabels, that suggests you're doing legacy booting, but I'm not sure.

For legacy boots, I use this style of menuentry... even with bsdlabels, I've never needed the /boot/device.hints...

Code:
menuentry "FreeBSD" {
      insmod ufs2
      root=(hd0,gpt5)
      kfreebsd /boot/loader
}

But for EFI booting, I have to use this type of menuentry:

Code:
menuentry "FreeBSD" {
      insmod ufs2
      root=(hd0,gpt5)
      chainloader /boot/loader.efi
}
Hope this helps. Good luck with it.

Yes, I do have an EFI partition and that seems to have been the issue. I needed to chainload /boot/loader.efi. I think you're right that's probably the reason the kfreebsd directive wasn't working.

Thanks a lot. I now have FreeBSD 13 booting from Grub!
 
Back
Top