grub2 can't find freebsd on second drive

Hello guys, I decided to try out FreeBSD but when after I installed it on my second hard drive, I can't boot it. I have Ubuntu 10.04 on my first drive, so I tried under ubuntu updating grub2 menu using update-grub2. Normally all OSs installed will be detected and automatically added to the boot menu, but FreeBSD couldn't be detected. I'm not sure if it's FreeBSD system itself or the fact that it's on the second drive so I have to do some extra things to make it work. Any help or hint would be appreciated!
 
Try this....

While in Ubuntu, edit the file /etc/grub.d/40_custom and add the following...

Code:
menuentry "FreeBSD" {
insmod ufs2
set root=(hd1,1)
chainloader +1
}

Keep the parentheses using the same syntax and the closing parentheses as the last line for the menu entry.

I am also assuming that FreeBSD resides on the first partiton of your second drive (Note: Grub2 uses a different syntax for partition numbering as compared to legacy Grub).

After saving the file, as root run update-grub

Code:
#update-grub

Or as the primary user...

Code:
%sudo update-grub

The update-grub program creates and /or updates your grub.cfg file.

It is always best in Grub2 to add your custom menu entries as described above instead of just editing the grub.cfg file directly. That way the next time you update Ubuntu with a new kernel, the system automatically runs update-grub and your custom menu entries will still be included after the new kernel is installed. By only editing grub.cfg directly, you will lose menu entries the next time update-grub is run.

Good Luck....

More info here on Ubuntu and Grub2....

https://help.ubuntu.com/community/Grub2
 
Back
Top