How to dual-boot FreeBSD 9 with Linux?

Carl Johnson carlj at peak.org
Sat Oct 29 04:12:59 UTC 2011


Unga <unga888 at yahoo.com> writes:

> Hi all
>
> Is any one by now successfully dual-booting FreeBSD 9 with Linux?
>
> I have tried with OpenSuse 11.4 with FreeBSD 9. OpenSuse installs
> Grub1 to mbr. Grub1 doesn't seem to support FreeBSD 9. It cannot
> recognise the file system type.
>
> Any help in this regard is very much appreciated.

It isn't very difficult and there are at least two ways to do it.
Grub1 actually does support ffs and ufs2 file systems, but the linux
distributions don't seem to include the drivers.  If you can get the
source, that should have all of them.  I think that I just got the grub
package from the FreeBSD file system and copied the additional drivers
directly into my linux grub directory, but I am not sure now.

The other way is to use the 'chainloader' command.  You just specify the
disk and partition (slice) with the root command, and then add the
commands 'chainloader +1' and 'boot'.  The chainloader command just
means to boot whatever is at the first sector of the previously
specified disk and slice.  I think the first sector of a ufs2 file
system just jumps to the loader.

The menu items from mine are just:

title           FreeBSD /boot/loader
root            (hd1,2,a)
kernel          /boot/loader
boot

title           FreeBSD chainloader
root            (hd1,2)
chainloader     +1
boot

In my case, those specifies that they use the third slice on the second
disk.  The first menu item requires that you already have the
'ufs2_stage1_5' file in your grub directory.

-- 
Carl Johnson		carlj at peak.org



More information about the freebsd-questions mailing list