On 01/08/2013 12:26 PM, Chris Murphy wrote:
On Jan 8, 2013, at 11:42 AM, Andrey Borzenkov<[email protected]>  wrote:
have two basic questions:
1. Is correct that it necessary for the Grub2 MBR to be access Grub files 
installed in a separate partition in order for it to boot freeBSD?
No.

Not quite. GRUB2 has modular design. It consists of many small drivers
(modules), each for a single feature. The part, that is embedded (in
post-MBR gap) usually contains the minimal number of modules which are
exactly enough to access another file system, where all other modules
are located.

So to have full featured GRUB2 answer is - yes, it needs access to
GRUB2 files in another partition.

It is possible to build monolithic GRUB2 that has everything, but then
it won't fit in post-MBR gap anymore.
Yeah I misunderstood the question, I think. The *.mod files and grub.cfg can be 
essentially anywhere with the current version of GRUB2. I can't vouch for 1.98. 
But 2.00 will find these files on extended partitions, buried inside LVM LV's, 
and even on a six disk RAID 0. It's kinda amazing actually.


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


I finally found how to boot the freeBSD 8.2 OS with the Grub2 2.00 installed in ubuntu 12.10 installed on a separate partition of the same disk. The grub.cfg menuentry is:

/menuentry "FreeBSD 8.2" {//
//        insmod ufs2//
//        set root='(hd0,msdos1)'//
// #       search --no-floppy --fs-uuid --set  4c9511e4308fb60f//
//        kfreebsd /boot/kernel/kernel//
// #       kfreebsd_loadenv /boot/device.hints//
// #       kfreebsd_module /boot/splash.bmp type=splash_image_data//
//        set kFreeBSD.vfs.root.mountfrom=ufs:ad4s1a//
//}/

I just kept changing things in the menuentry and finally found the right combination.

I have not been able to get the Grub2 version 2.00 to recognize the partitions on the second disk with the freeBSD 9.0 OS. Gparted from ubuntu sees them just fine. Three partitions of 64Kb, 145Gb, 4Gb, and unallocated of 51.82Mb.

The menu entry I tried last was:

/[menuentry "FreeBSD 9.0"{//
// insmod ufs2//
//    set root='(hd1,gpt2)'//
//   kfreebsd /boot/kernel/kernel//
//  set kFreeBSD.vfs.root.mountfrom=ufs:ad1p2//
//}/

I have tried using in the menuentry both:
/set root='(hd1,2)'/and /set root='(hd1,bsd2)'/

all of these give a "no such partition" error, or something with the same meaning. I also tried using /chainloader +1/ instead of trying to load the kernel.

If I switch the boot order the freeBSD 9.0 OS boots correctly.

Thanks Tom

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

Reply via email to