I posted the following to the freeBSD forum and received a single reply shown below the original post.

The reply said that I need to install Grub in a separate partition. Will that really fix the problem? Can the separate partition be in an extended partition containing Ubuntu 12.04?

I don't understand why a separate partition will fix the problem. The Grub manual says that Grub runs before the OS starts. It also says in the instructions for installing grub in a separate partition to format the partition with a file system.  The advantage for installing Grub in the separate mentioned is that it does get messed up if/when you upgrade your operating system containing /boot/Grub. All this make me wonder if a separate partition won't solve the problem.

I did, in trying different things, upgrade Ununtu, and Grub2 now starts instead of Grub-legacy so I have lost the ability to boot freeBSD from the hard disk. I think I need to reinstall Grub-legacy in the MBR. How do I do that? I think see direction for that but do not recall where I saw them. I can still boot freebsd with a CD.

Thanks for any answers and help,

Tom 
[email protected]



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.Reply With Quote
  #2  
Unread January 2nd, 2013, 19:26
Beeblebrox's Avatar
Member
 
Join Date: Sep 2010
Posts: 609
Thanks: 32
Thanked 62 Times in 57 Posts
Default

Quote:
Grub is installed in /boot/Grub in the utuntu file system
That's your mistake. You need a separate partition for grub (think of grub as a separate O/S whose job is just to chainload into the OS you actually want.
A sort-of tutorial is here.
__________________
9_stable - gcc46 - root on zfs - amd64
Douglas Adams: The fact that we live at the bottom of a deep gravity well, on the surface of a gas covered planet going around a nuclear fireball 90 million miles away and think this to be normal is obviously some indication of how skewed our perspective tends to be.
Reply With Quote


_______________________________________________
Help-grub mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-grub

Reply via email to