Can anyone help me with booting FreeBSD from GRUB?

Hubert Hauser hubot at mail.com
Sun Dec 9 19:34:21 UTC 2018


I have got installed Debian 9 Stretch and FreeBSD with UFS boot
partition and root filesystem on ZFS. I use GPT scheme of partitioning
on a legacy BIOS. Here's content of /etc/grub.d/40_custom:

menuentry "FreeBSD" {
    insmod bsd
    insmod ufs2
    set root='(hd0,gpt5)'
    chainloader +1
}

When I'm trying to boot FreeBSD through GRUB I receive `error: attempt
to read or write outside of disk 'hd0'`.

My partition layout is:

  * ada0 - primary 3 TB hard drive with GPT partition scheme
  * ada0p1 - BIOS boot
  * ada0p2 - linux filesystem, mountpoint: /boot
  * ada0p3 - linux filesystem LVM on LUKS
  * ada0p4 - FreeBSD boot, gptboot
  * ada0p5 - FreeBSD UFS, mountpoint: /boot, required by geli to boot
    FreeBSD
  * ada0p6 - FreeBSD swap
  * ada0p7 - FreeBSD ZFS on geli

My actual config

menuentry "FreeBSD" {
    insmod bsd
    insmod ufs2
    insmod part_gpt
    set root='(hd0,gpt4)'
    kfreebsd /boot/loader
}

doesn't work.

It returns an error: unknown filesystem.

Can anyone help me?



More information about the freebsd-hackers mailing list