Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Jan 2012 12:07:59 +0000
From:      Kaya Saman <kayasaman@gmail.com>
To:        Bas Smeelen <b.smeelen@ose.nl>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Dual Booting Linux with FreeBSD 9.0 - Grub in MBR
Message-ID:  <4F23E51F.8080908@gmail.com>
In-Reply-To: <20120128095412.03a18132@mpw>
References:  <4F2317DA.6010508@gmail.com> <20120128095412.03a18132@mpw>

next in thread | previous in thread | raw e-mail | index | archive | help
On 01/28/2012 08:54 AM, Bas Smeelen wrote:
> On Fri, 27 Jan 2012 21:32:10 +0000
> Kaya Saman<kayasaman@gmail.com>  wrote:
>
>> Hi,
>>
>> am just wondering if anyone has successfully managed to boot FreeBSD
>> 9.0 and Linux.
>>
>> I run Fedora 16 x64 with Grub installed in my MBR.
>>
>> FBSD9 installed as the new disk scheme GPT..... I think (I manually
>> partitioned as my disk is quite crowded).
>>
>> Anyway I found this:
>>
>> http://lists.freebsd.org/pipermail/freebsd-questions/2011-October/234858.html
>>
>> and at the moment I have this in my Grub config:
>>
>> menuentry 'FreeBSD 9.0'  {
>>       set root=(ada0,1,a)
>>       kfreebsd /boot/loader
>>       boot
>> }
>>
>> But unfortunately no boot :-(
>>
>>
>> I have tried using (hd0,0), (hd0,1,a), (hd0,0,a), and (hd0,a) but
>> unfortunately nothing is working.
>>
>>
>> The Grub version is 2.
>>
>>
>> Can anyone help me?
>>
> Hi
>
> I have the following partition layout
> P1 linux swap
> P2 FreeBSD
> P3 linux
> P4 extended which holds 2 more linux partitions
>
> FreeBSD 9 installed on P2 and the FreeBSD bootloader on P2
>
> In /etc/grub.d/40_custom I have put the following:
>
> menuentry "FreeBSD" {
>               set root=(hd0,2)
>               chainloader +1
>       }
>
> Then run update-grub as root.
>
> The (hd0,2) entry means first harddisk (this laptop only has one) and
> the second partition, which holds the FreeBSD bootloader that gets
> loaded with the enry chainloader +1.
>
> This works for me. Hope it helps.
>
> I think with the way you have the setup now, a module must be loaded
> first in the grub config. Insmod ufs or similair.
>
>
> Disclaimer: http://www.ose.nl/email
>
Thanks for the response!!

Actually I got this working but eventually was up for nearly 24 hours 
which meant I was too tired to post back here :-)


My Grub is just weird! Which is why I couldn't work things out. For 
anyone running Fedora 16 or alike this may help; I have this partition 
layout:

1. FreeBSD UFS2
4. Extended Partition
5. Linux / Ext4
2 Linux Swap
3 Linux JFS


Don't ask why 4,5 partitions but Fedora installer took over and left me 
with no control otherwise Fedora should have been on 2.


Now the Grub entry is as follows:


menuentry 'FreeBSD 9.0'  {
         insmod part_msdos
         set root='(hd0,msdos1)'
         chainloader +1
}


I have no idea why my version of grub is sooo different from everyone 
elses as finding many dualboot bsd/linux combos with Grub entries being 
more like yours, Bas, this is certainly puzzling.


Anyhow the situation is solved :-)



Regards,


Kaya



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