I don't believe GRUB detects FreeBSD. If you're using GRUB2 to boot the various operating systems on your machine, he syntax you would need, assuming FreeBSD is on
/dev/sd3 is
Code:
menuentry "FreeBSD" {
set root='(hd0,3)'
chainloader (hd0,3)+1
}
Some people find that doesn't work and use
but for my setups, that has given me errors, whereas the the hd0,3 without an "a" works for me.
The way I do it is to create a
/boot/grub2/custom.cfg file. That's in Fedora, which creates a
grub2 directory, rather than a
grub directory. Debian and its variants, such as Ubuntu, use
/boot/grub rather than
/boot/grub2. (As those are directories, are we supposed to use file tags? Well, if I see it's been edited, I'll do it in the future.)
Although there is another way to do it, using some directory's
40_custom_rules or something similar -- the number might be 41. (I'm writing this from CentOS, which doesn't use GRUB2, so I don't remember the exact name), somewhere in the GRUB2 scripts, it will say to use a
custom.cfg file if it exists. I use the
custom.cfg, but other people add it to the 40 or
41_custom or whatever it's called.
If you're using legacy GRUB, then it's even simpler. Just edit your
menu.lst or
grub.conf with a stanza like
Code:
title FreeBSD
rootnoverify (hd0,2)
chainloader +1
I don't have a FreeBSD install on a machine with legacy GRUB to test, but that should be right. Note that this time, the partition count starts at 0. With GRUB2 it starts at 1. So, if it's
/dev/sda3 use
hd0,2 as shown. Also, in GRUB2, at least in Fedora, I have found that the chainloader line must be written as I had it, with no spaces between (
hd0,3) and the
+ sign. With legacy GRUB, you need the space between the word 'chainloader' and the '+1'. (In case it's not clear, by legacy, I mean the GRUB 0.97 or 0.98, used by RedHat and its clones.)