Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Nov 2009 20:58:26 -0200
From:      "Carlos A. M. dos Santos" <unixmania@gmail.com>
To:        Connor Imes <rocket2dmn@ubuntu.com>
Cc:        freebsd-doc@freebsd.org, Ryan Wolf <ryanjudaswolf@gmail.com>, ubuntu-doc@lists.ubuntu.com, jbmw@earthlink.net
Subject:   Re: Dual Booting Ubuntu Linux & FreeBSD using the new Grub2
Message-ID:  <e71790db0911011458q19a88454o79874af954578a65@mail.gmail.com>
In-Reply-To: <4AEDF42F.1050009@ubuntu.com>
References:  <f86423ba0911010106s5621508es2896c52dd89db2ab@mail.gmail.com> <4AEDF42F.1050009@ubuntu.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Nov 1, 2009 at 6:48 PM, Connor Imes <rocket2dmn@ubuntu.com> wrote:
> Ryan Wolf wrote:
>> To the Ubuntu & FreeBSD Documentation Folks:
>>
>> I spent all day trying to figure this out all because there isn't
>> proper documentation in books or on the internet on it, and no one's
>> documentation is up to date yet. After I figured it out, thought I
>> would put together a document so that others won't have to strain as
>> hard as I did just installing two operating systems that don't talk to
>> each other to well. I hope Ubuntu decides to have more support for
>> access to BSD partitions, as it doesn't seem to support it too well at
>> the moment.
>>
>> Enjoy the document guys. It's my first time writing one, so I hope it
>> helps.
>>
>> ~ Ryan
> That is a nice looking document, Ryan. =A0One of the Ubuntu Documentation
> contributors, drs305, has written (and been updating) a wiki page on
> Grub2, which you can find here [1]. =A0It is geared toward Ubuntu users
> who have Grub2 installed from Ubuntu, but a lot of the basics should be
> applicable to FreeBSD as well. =A0You are welcome to expand on the wiki
> page, or if you host your guide on a FreeBSD site, please let us know.
> I don't believe the existing wiki page outlines multibooting in much
> detail yet, so your knowledge in this field would be very helpful.
>
> [1] https://help.ubuntu.com/community/Grub2

I'm 4-booting Ubuntu 9.04, FreeBSD 7, 8 and -CURRENT using GRUB. I had
to apply the following patch to grub2-1.96+20080512 in order to make
it pass the correct info to the FreeBSD loader because I'm using a
GPT-partitioned disk, with 17 partitions:

--- loader/i386/bsd.c.orig	2008-02-19 13:40:45.000000000 -0300
+++ loader/i386/bsd.c	2009-02-01 21:20:59.000000000 -0200
@@ -101,6 +101,8 @@

 	  if ((p[0] >=3D 'a') && (p[0] <=3D 'z'))
 	    *part =3D p[0] - 'a';
+	  else
+	    *part =3D 0xff;
 	}
     }
 }

FreeBSD boot partitions are 2, 5, 8. I created the following
"/etc/grub.d/10_freebsd" file, so "update-grub" does not remove
FreeBSD from the boot menu.

#!/bin/sh -e
cat << EOF
menuentry "FreeBSD 7-STABLE AMD64" {
	set root=3D(hd0,5)
	freebsd /boot/loader
}
menuentry "FreeBSD 8-STABLE AMD64" {
	set root=3D(hd0,8)
	freebsd /boot/loader
}
menuentry "FreeBSD 9-CURRENT AMD64" {
	set root=3D(hd0,2)
	freebsd /boot/loader
}
EOF

Then I created a "/etc/grub.d/01_casantos" file, to unset the defult
OS and timeout:

#!/bin/sh -e
cat << EOF
unset default
unset timeout
EOF


--=20
My preferred quotation of Robert Louis Stevenson is "You cannot
make an omelette without breaking eggs". Not because I like the
omelettes, but because I like the sound of eggs being broken.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e71790db0911011458q19a88454o79874af954578a65>