Add FreeBSD to Grub Menu

Chris Murphy lists at colorremedies.com
Mon Oct 1 00:42:49 UTC 2012


On Sep 30, 2012, at 6:29 PM, Antonio Olivares wrote:
>>> 
>>> exec tail -n +3 $0
>>> # This file provides an easy way to add custom menu entries.  Simply
>>> type the
>>> # menu entries you want to add after this comment.  Be careful not to
>>> change
>>> # the 'exec tail' line above.
>>> menuentry "FreeBSD" {
>>>   insmod part_msdos
>>>   set root='(hd0,msdos3)'
>>>   chainloader +1
>> 
>> msdos3 is a Linux partition. Your fdisk results indicate FreeBSD is on
>> hd0,msdos1.
>> 
>> 
>> Chris Murphy
>> --
> 
> Thank you Chris for noticing.  I copied it from the Fedora 17 aspire netbook :(
> Tried changing it to msdos1 and it does not show up in grub menu :(
> What shall I try next?

Make sure you have an 'insmod' for the file system, i.e. UFS or ZFS. I think chainloader is wrong. From the GRUB2 manual I see this as the FreeBSD example, and honestly if that doesn't work I'd go subscribe to and post on help-grub at gnu.org. I'm not sure how many FreeBSD + GRUB2 experts you'll find on here. 

You aren't making these edits directly to grub.cfg are you? But the scripts in /etc/grub.d and then running grub2-mkconfig after each change right?


     menuentry "FreeBSD" {
               insmod zfs
               search --set=root --label freepool --hint hd0,msdos7
               kfreebsd /freebsd@/boot/kernel/kernel
               kfreebsd_module_elf /freebsd@/boot/kernel/opensolaris.ko
               kfreebsd_module_elf /freebsd@/boot/kernel/zfs.ko
               kfreebsd_module /freebsd@/boot/zfs/zpool.cache type=/boot/zfs/zpool.cache
               set kFreeBSD.vfs.root.mountfrom=zfs:freepool/freebsd
               set kFreeBSD.hw.psm.synaptics_support=1


More information about the test mailing list