How to boot FreeBSD 11.2 from GRUB 2 (installed on Tumbleweed)

I have successfully installed FreeBSD on the 4th primary partition of my second HDD. I can mount the partition in openSUSE Tumbleweed without problems:
Code:
mount -t ufs -o ufstype=ufs2 /dev/sdb4 /mnt
ls -la /mnt
insgesamt 32896
drwxr-xr-x 19 root root     1024 13. Jul 15:33 ./
drwxr-xr-x 22 root root     4096 17. Mär 17:43 ../
drwxr-xr-x  2 root root     1024 22. Jun 06:33 bin/
drwxr-xr-x  8 root root     1536 13. Jul 14:45 boot/
-r--r--r--  1 root root     6197 22. Jun 06:34 COPYRIGHT
-rw-r--r--  2 root root      957 22. Jun 06:34 .cshrc
drwxr-xr-x  2 root root      512 13. Jul 14:40 dev/
-rw-------  1 root root     4096 13. Jul 14:45 entropy
drwxr-xr-x 27 root root     2048 13. Jul 14:45 etc/
lrwxr-xr-x  1 root root        8 13. Jul 14:44 home -> usr/home/
drwxr-xr-x  4 root root     1536 22. Jun 06:33 lib/
drwxr-xr-x  3 root root      512 13. Jul 14:40 libexec/
drwxr-xr-x  2 root root      512 22. Jun 06:32 media/
drwxr-xr-x  2 root root      512 22. Jun 06:32 mnt/
drwxr-xr-x  2 root root      512 22. Jun 06:32 net/
dr-xr-xr-x  2 root root      512 22. Jun 06:32 proc/
-rw-r--r--  2 root root      474 22. Jun 06:34 .profile
drwxr-xr-x  2 root root     2560 22. Jun 06:33 rescue/
drwxr-xr-x  2 root root      512 22. Jun 06:34 root/
drwxr-xr-x  2 root root     2560 22. Jun 06:34 sbin/
drwxrwxr-x  2 root tty       512 13. Jul 14:40 .snap/
-r--------  1 root root 33554432 13. Jul 14:40 .sujournal
lrwxr-xr-x  1 root root       11 22. Jun 06:35 sys -> usr/src/sys
drwxrwxrwt  2 root root      512 13. Jul 14:45 tmp/
drwxr-xr-x 16 root root      512 13. Jul 14:45 usr/
drwxr-xr-x 24 root root      512 22. Jun 06:32 var/

I tried to add entries to /boot/grub2/custom.cfg to enable booting FreeBSD from GRUB 2, but none of them works.
Code:
# FreeBSD
menuentry "chainloader FreeBSD 11.2 @ (hd1,4)" {
   set root=(hd1,msdos4)
   chainloader +1
}
menuentry "chainloader FreeBSD 11.2 @ (hd1,4)" {
   set root=(hd1,4)
   chainloader +1
}
menuentry "chainloader FreeBSD 11.2 @ (hd1,4)" {
   insmod ufs2
   insmod bsd
   insmod chain
   set root=(hd1,4)
   chainloader +1
}
menuentry "kfreebsd /boot/loader FreeBSD 11.2 @ (hd1,4)" {
   set root=(hd1,4)
   kfreebsd /boot/loader
}
menuentry "kfreebsd /boot/loader FreeBSD 11.2 @ (hd1,4)" {
   insmod ufs2
   insmod bsd
   set root=(hd1,4)
   kfreebsd /boot/loader
   kfreebsd_loadenv /boot/device.hints
   set kFreeBSD.vfs.root.mountfrom=ufs:/dev/ada1s4a
   set kFreeBSD.vfs.root.mountfrom.options=rw
}
menuentry "kfreebsd /boot/kernel/kernel FreeBSD 11.2 @ (hd1,4)" {
   insmod ufs2
   insmod bsd
   set root=(hd1,4)
   kfreebsd /boot/kernel/kernel
   kfreebsd_loadenv /boot/device.hints
   set kFreeBSD.vfs.root.mountfrom=ufs:/dev/ada1s4a
   set kFreeBSD.vfs.root.mountfrom.options=rw
}
For the "chainloader +1" entries, I only get a blank screen and nothing happens even after minutes of waiting. For the other entries, I get an error message "unknown filesystem" and "you have to load the kernel first". So does anyone have an idea how to solve this?
 
Your fifth entry is the auto-generated one that exists on my system, but at (hd0,2) and it works just fine.
 
Back
Top