From owner-freebsd-doc@FreeBSD.ORG Sun Nov 1 23:22:20 2009 Return-Path: Delivered-To: freebsd-doc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2F1D106566C for ; Sun, 1 Nov 2009 23:22:20 +0000 (UTC) (envelope-from unixmania@gmail.com) Received: from mail-bw0-f213.google.com (mail-bw0-f213.google.com [209.85.218.213]) by mx1.freebsd.org (Postfix) with ESMTP id 534E78FC13 for ; Sun, 1 Nov 2009 23:22:20 +0000 (UTC) Received: by bwz5 with SMTP id 5so5837869bwz.3 for ; Sun, 01 Nov 2009 15:22:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=GwmCWMYDykCDES7wMbysWWogRex3EXw1LXynGs8RE9E=; b=QZICN8mc/dxOg96bT7+tVgyHPNPN0arM+IYWUmsKZarW4fiMs7vf4G3OirzYFhr7IN 4mqEI1fzhM4Aer5C5bibkSeptqwVGm5+W46G2gR8MoTEdHQuoUR3HcNHmG47fTX7Py9o CsxyO/7JqD1LUnVNEAfQmN3XD3vcaJhjbKqqU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=suXq28NxwYv1fhuVN2HvVJF3XjwZtXX77Y+JkIE9Zrl2RBMqw5GYZb68+NfWmDGB92 FweFVMb8GfEnddTd+NdZyX+a6VFdoo4+wppNcRsh/DbMnaUBM1amgBXX7+cX69ZX8dpB 9PJEKvJZ4O14nXNkRQ/GZx1MuY2Bx5mvVMDqo= MIME-Version: 1.0 Received: by 10.239.130.31 with SMTP id 31mr430438hbh.134.1257116306698; Sun, 01 Nov 2009 14:58:26 -0800 (PST) In-Reply-To: <4AEDF42F.1050009@ubuntu.com> References: <4AEDF42F.1050009@ubuntu.com> Date: Sun, 1 Nov 2009 20:58:26 -0200 Message-ID: From: "Carlos A. M. dos Santos" To: Connor Imes Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-doc@freebsd.org, Ryan Wolf , ubuntu-doc@lists.ubuntu.com, jbmw@earthlink.net Subject: Re: Dual Booting Ubuntu Linux & FreeBSD using the new Grub2 X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2009 23:22:20 -0000 On Sun, Nov 1, 2009 at 6:48 PM, Connor Imes 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.