LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   XP, Ubuntu, FreeBSD triple boot problem (https://www.linuxquestions.org/questions/linux-software-2/xp-ubuntu-freebsd-triple-boot-problem-713699/)

mistertylersmith 03-23-2009 12:14 AM

XP, Ubuntu, FreeBSD triple boot problem
 
I have XP and Ubuntu installed fine and I use Grub. I installed Free BSD on its own 150gig partition, install went fine but when I rebooted my comp it booted straight to FreeBSD skipped Grub and all... ideas?
-T

Junior Hacker 03-23-2009 01:06 AM

You need to rerun grub to get the menu back as the FreeBSD installer installed it's own boot information in the MBR overwriting grub stuff. Boot into a live session with the Ubuntu CD and get to a prompt. Type: sudo fdisk -l to get a list of partitions.

EXAMPLE (assuming you only have one drive):
If the Ubuntu / or /boot partition is /dev/sda2, run these four commands to reinstall grub in the MBR:
Code:

sudo grub
root (hd0,1)
setup (hd0)
quit

Grub counts from 0, the second partition is hd1 in grub dialect.
This is no guarantee that the BSD partition will be in the menu, but this should get your XP and Ubuntu back for now.

harry_uk 03-23-2009 02:06 AM

Just to add to what he said, as an explanation, sda1 is 0 for grub and sda2 is 1 for grub, thats why he types hd0,1

root is the command to set the root partition for grub and asks it to mount it to read.

I really wish you take the time to read this:

http://www.troubleshooters.com/linux/grub/grub.htm

its worth.....

JZL240I-U 03-23-2009 05:04 AM

While you are fiddling with the boot loaders...

I use FreBSD 6.0 and its documentation explicitly states that one should use the FreeBSD boot loader and nothing else (because the interface (?) is prone to change or some such). So I installed the FreeBSD boot loader into /boot and chainload it from GRUB. Never had any problems with that. But I don't know about the latest version of FreeBSD...

mistertylersmith 03-27-2009 01:33 AM

Alright. I successfully installed freeBSD without messing up my xp/ubuntu grub configuration. My next step which I need help with is editing my grublist file to recognize freebsd. One thing tho, I used freeBSD's file structure.. does that matter?
heres how my partitions are set up
xp: sda1 ntfs
ubuntu:
/ sda2 ext3
sda3 extended
/home sda5 ext3 logical
swap sda6
freebsd: sda4 "unknown" flag=boot

JZL240I-U 04-01-2009 01:46 AM

Okay, it was simply too long ago, I'm not really sure that the boot loader is in /boot or in the beginning of the slice. Here is my stanza from GRUB's menu.lst:
Code:

...
###Don't change this comment - YaST2 identifier: Original name: FreeBSD###
title FreeBSD 6.0
    rootnoverify (hd0,2)
    makeactive
    chainloader (hd0,2)+1
...

HTH.

archtoad6 04-06-2009 03:45 PM

Assuming you managed to put the BSD bootloader in the boot record of sda4 (the logical place for it), then you need to invoke it from GRUB using the (GRUB) chainloader command:
Code:

title FreeBSD at sda4
root (hd0,3)
chainloader +1


mistertylersmith 04-27-2009 03:31 PM

ok, so during the freebsd install process it asks you if you want to install 1) the freebsd boot manager 2) a standard boot manager or 3) no boot manager (leave the MBR alone). I installed using option #3. I already have XP and Ubuntu on their own partitions and am using grub located on the linux partition. Did I select the correct option (to not alter the MBR)? I have

Code:

title                FreeBSD
root                (hd0,3,a)
kernel                /boot/loader

as my grub entry for fbsd, but I get an error that says it doesnt recognize the device.. is there something else I have to add to this?
thanks
T

yancek 04-27-2009 06:13 PM

Quote:

I already have XP and Ubuntu on their own partitions and am using grub located on the linux partition. Did I select the correct option (to not alter the MBR)?
If you want to use Grub/Ubuntu bootloader it's correct.

Don't think the entry you have for BSD will work in Grub menu.lst. Try:

title FreeBSD
root (hd0,3)
chainloader +1


All times are GMT -5. The time now is 05:04 PM.