Solved problem with grub controlled boot

I thought I'd move from running my freeBSD instances in a VM, onto a real server in dual boot config with Debian Linux. Linux is already installed and boots through grub just fine. However, after installing BSD on a spare disk in the system, I simply cannot get grub to boot BSD. It is a legacy BIOS system. I've tried all the google spawned configuration options such as making sure the ufs2, bsd, and gpt modules are installed. I did a uuid search of the sub-partition where BSD resides and grub knows the uuid of the BSD root. About as close as I can come is getting to the point where it says it cannot find /boot/loader. the BSD disk contains a single partition and it looks like BSD hides sub partitions in there, of which there should only be one (/).

They didn't do something silly with BSD 15 like making the default filesystem ZFS, did they?

Another weird thing is that while grub sees the whole disk device where (hd2) is doesn't indicate that there is an (hd2,?), which there should be since it does have a single partition created in it, and is seen by fdisk and gpart.

Does anyone have a similar enough config to be able to help me diagnose this?
 
I have no problem booting FreeBSD from grub using the chain bootloader or with kfreebsd:

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

ETA: this is UFS, I never tried it with root on ZFS.
 
cracauer@ Thanks! Your entry was almost identical to mine. However, for Debian12 grub, I had to explicitly do "insmod part_bsd" for it to parse the bsd subpartitions and be able to read the filesystem. I think it's fixed, or at least it booted this time.
 
Back
Top