If you use the "chainloader" option, you are telling grub to handoff the control to whatever loader is installed in the partition you choosed: set root=(hd0, 2), in that case you don't need to load the ZFS module, dealing with ZFS will be a job of the chainloaded loader.
Apparently you run grub-mkconfig from linux, and not from GhostBSD, else I don't understand why it did not detected GhostBSD.
To help you, I need a few info:
a) when you installed GhostBSD what bootloader did you choose ? (grub, freebsd loader, or freebsd loader + boot manager)
b) I need to know how you partitioned the disk, a default ghostbsd will create a freebsd-boot partition, a freebsd-zfs or a freebsd-ufs, and a freebsd-swap), the best way to provide the correct info is by running a live GhostBSD and provide the output of the following command:
Assuming /dev/ada0p1 (sda1) is a freebsd-boot partition you need to chainload (hd0, 1) and not (hd0, 2).
~~~
Beside that, if /dev/ada0p2 is where you instaled GhostBSD, you could use somehing like (
in case of UFS):
that means passing control from grub to the freebsd 2nd stage loader, it is otherwise equivalent to chainloading:
Code: Select all
menuentry "GhostBSD Loader" {
insmod ufs2
set root="(hd0,2)"
kfreebsd /boot/loader
}
that is telling grub that hd0,2 is a ufs partition and will direct grub to load the freebsd loader.
In case of ZFS I'm unsure, I always used the chainload option for grub+zfs and that worked for me.
A third way, the one that come from GhostBSD grub autodetection is something like:
Code: Select all
menuentry "GhostBSD Kernel" {
insmod zfs
set root="(hd0,2)"
kfreebsd /boot/kernel/kernel
kfreebsd_loadenv /boot/device.hints
kfreebsd_module_elf /boot/kernel/ums.ko
kfreebsd_module_elf /boot/kernel/crypto.ko
kfreebsd_module_elf /boot/kernel/aesni.ko
kfreebsd_module_elf /boot/kernel/geom_eli.ko
kfreebsd_module_elf /boot/kernel/nullfs.ko
kfreebsd_module_elf /boot/kernel/geom_uzip.ko
kfreebsd_module_elf /boot/kernel/drm2.ko
set kFreeBSD.vfs.root.mountfrom=ufs:/dev/ada0s1a
set kFreeBSD.kern.geom.eli.visible_passphrase=2
set kFreeBSD.hw.memtest.tests=0
set kFreeBSD.grub.platform=$grub_platform
set kFreeBSD.vfs.zfs.arc_max=128M
set kFreeBSD.kern.vty=vt
set kFreeBSD.kern.geom.label.disk_ident.enable=0
set kFreeBSD.kern.geom.label.gptid.enable=0
set kFreeBSD.kern.geom.label.ufsid.enable=0
}
the latter is significatively more complex, and imply some discrepance with the standard freebsd documentation, that something to avoid for a new user. (it load the freebd kernel directly but skip loader.conf, therefore things usually set in loader.conf must be set in grub.cfg directly).