It seems impossible to boot FreeBSD with grub. In grub, I can find the
Freebsd /boot directory and load some files. But, it will not boot.
I used Freebsd from 0.1 386bsd to FreeBSD 11. Then switched to linux for
a major application. Now, I have a couple applications to run on
FreeBSD. It did not seem so hard earlier...
There are many 'different' examples that turn up when I google. But,
none of them seem to work.
I give up.
I boot FreeBSD with grub all the time but my setup is ZFS only. There
are multiple versions of FreeBSD, each installed into its own ZFS pool,
on the system and I use grub to select which one to boot.
My grub.cfg looks like this and works with BIOS and UEFI:
---
insmod part_msdos
insmod part_gpt
insmod chain
insmod fat
insmod bsd
insmod zfs
load_env
menuentry "FreeBSD 13" {
search -s -l bsd13
kfreebsd -D /@/boot/zfsloader
set default="${chosen}"
save_env default
}
menuentry "FreeBSD 12" {
search -s -l bsd12
kfreebsd -D /@/boot/zfsloader
set default="${chosen}"
save_env default
}
and so on...
---
The most complicated FreeBSD entry that I can find in all the grub.cfg
files that I have is this old one (BIOS only). It boots the system from
an mfsbsd ISO:
menuentry "mfsBSD 11.2-RELEASE" {
loopback loop /boot/mfsbsd-11.2-RELEASE-amd64.iso
kfreebsd -D (loop)/boot/kernel/kernel.gz
kfreebsd_loadenv (loop)/boot/device.hints
kfreebsd_module (loop)/boot/kernel/ahci.ko
kfreebsd_module (loop)/mfsroot.gz type=mfs_root
set kFreeBSD.console="comconsole,vidconsole"
set kFreeBSD.comconsole_speed="115200"
set kFreeBSD.vfs.root.mountfrom="ufs:/dev/md0"
set kFreeBSD.mfsbsd.autodhcp="YES"
}
Regards,
Navdeep
I am willing to use grub, since it is already installed. I do not want
additional, unknown code.