I recently installed a freeBSD 9.0 system using an
entire 2nd disk.
From various Internet sites, I found that
Grub-legacy will not boot
freeBSD 9.0. Following directions I found in the
Grub documentation, I
have upgraded Grub to Grub2 such that I can now
open Grub2 menu from
the Grub-legacy menu.
The primary disk is a 1.0 tb disk, partitioned in
4 partitions. The
first partition, with a ufs file system, contains
freeBSD 8.2. The
third partition is is an extended partition
divided in two for Ubuntu.
The Ubuntu partition is ext2. Partition 2 is ufs,
and partition 4 is
ext2, both used for extra storage.
Grub is installed in
/boot/Grub in the utuntu file
system
I have been unable to boot the freeBSD 8.2 OS on
the main disk using
the Grub2 menu. It boots successfully from the
Grub-legacy menu. The
Ubuntu will boot successfully from either the
Grub-legacy or Grub2
menu. When I change the boot order in the bios to
the second disk,
freeBSD 9.0 boots successfully using the freeBSD
boot loader.
I expect that if and when I get the freeBSD 8.2
system to boot from the
Grub2 menu, that getting the freeBSD 9.0 system to
boot will be
straight forward.
The portion of the Grub-legacy menu.lst for
booting the FreeBSD 8.2 is:
Code:
# For booting FreeBSD
title FreeBSD
root (hd0,0,a)
kernel /boot/loader
The portion of the Grub2 grub.cfg that boots
ubuntu is”
Code:
menuentry 'Ubuntu, with Linux 2.6.38-8-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(hd1,msdos5)'
search --no-floppy --fs-uuid --set=root 34d13e9c-7bf7-4eda-aa21-d9461e6c2e12
linux /boot/vmlinuz-2.6.38-8-generic-pae root=UUID=34d13e9c-7bf7-4eda-aa21-d9461e6c2e12 ro quiet splash vt.handoff=7
initrd /boot/initrd.img-2.6.38-8-generic-pae
}
I have found many sites on-line with solutions for
booting
freeBSD from Grub2, but none have worked for my
case. I have tried many
of these solutions by editing using the grub
editor and/or changing the
code in grub.cfg. I have the code in grub.cfg for
test, not in
/etc/grub.d/40_custom. The solution in the Grub
manual for freeBSD
refers to file that are not in my freeBSD 8.2
/boot.
I have received several different error messages,
with different
grub.cfg code. The current code gives a File not
Found error. The
current version of the Grub2 grub.cfg for booting
freeBSD 8.2 is:
Code:
# For booting FreeBSD
menuentry "FreeBSD 8.2" {
# insmod part_msdos
insmod ufs
set root=(/hd1,msdos1)
search --no-floppy --fs-uuid --set=root 34d13e9c-7bf7-4eda-aa21-d9461e6c2e12
kfreebsd /boot/loader
kfreebsd.vfs.root.mountfrom=ufs:ad4s1a
}
I think there must be something simple that I am
missing, but
have no idea what it is! Any idea how to change
things to make Grub2 to
boot freeBSD 8.2?
Thanks.