FreeBSD 10.0, booting with grub (grub2)

Warren Block wblock at
Wed Jul 16 21:37:50 UTC 2014

On Wed, 16 Jul 2014, Noel Hunt wrote:

> I have a FreeBSD 10.0/Solaris 11.1 dual-boot machine. Solaris was
> installed after FreeBSD and since it uses grub by default I am using
> that to boot. Currently I am just invoking /boot/loader from grub.cfg
> in Solaris, but I would like to boot directly. This just doesn't work.
> I have installed grub2 on FreeBSD via ports, and run `grub-mkconfig'
> to get some entries for grub.cfg which I have simply applied to the
> Solaris installation (via the custom.cfg script).
> But, these entries just don't work. I have tried running each command
> by hand at the grub CLI with debugging but after all the debug output
> is printed the screen goes black and the machine reverts to the
> normal power-on screen, and the boot selection process starts all
> over again.
> This is the entry:
> menuentry 'FreeBSD, with kFreeBSD kernel' {
>        insmod part_gpt
>        insmod ufs2
>        search --no-floppy --fs-uuid --set=root 53a87fa1e9b6256d
>        echo 'Loading kernel of FreeBSD kernel ...'
>        kfreebsd  /boot/kernel/kernel
>        kfreebsd_loadenv   /boot/device.hints
>        kfreebsd_module_elf     /boot/kernel/ufs.ko
>        set kFreeBSD.vfs.root.mountfrom=ufs:ufsid/53a87fa1e9b6256d
>        set kFreeBSD.vfs.root.mountfrom.options=rw
> }

I'm not sure what you mean about "/boot/loader from grub.cfg in 
Solaris".  All I've done is:

   menuentry "FreeBSD" {
     set root="(hd0,gpt3)"  # GPT partition 3
     kfreebsd /boot/loader

The first partition was the Grub2 bootcode, the second partition was 
Linux, the third FreeBSD.

More information about the freebsd-questions mailing list