 | Senior Member with 210 posts. | | Join Date: May 2007 Experience: Intermediate | | Configure GRUB to boot FreeBSD I have a dual boot setup with Ubuntu and FreeBSD. The FreeBSD partition is mounted on /dev/sda3. So I figured that the entry in menu.lst would look like this:
title FreeBSD 7.0
root (hd0,3)
kernel /boot/loader
But then I get a message saying that that partition doesn't exist. Any suggestions? | | Senior Member with 210 posts. | | Join Date: May 2007 Experience: Intermediate | | For those who need it, here's my GRUB configuration.
# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.
## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default 0
## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 3
## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
hiddenmenu
# Pretty colours
#color cyan/blue white/blue
## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret
#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#
#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST
### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below
## DO NOT UNCOMMENT THEM, Just edit them to your needs
## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=d60fc9cb-4b80-46bc-88f2-7edf65190e90 ro
## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0
## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,0)
## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true
## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false
## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash
## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false
## Xen hypervisor options to use with the default Xen boot option
# xenhopt=
## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0
## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(recovery mode) single
## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all
## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true
## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false
## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false
## ## End Default Options ##
title Ubuntu 7.10, kernel 2.6.22-14-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=d60fc9cb-4b80-46bc-88f2-7edf65190e90 ro quiet splash
initrd /boot/initrd.img-2.6.22-14-generic
quiet
title Ubuntu 7.10, kernel 2.6.22-14-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=d60fc9cb-4b80-46bc-88f2-7edf65190e90 ro single
initrd /boot/initrd.img-2.6.22-14-generic
title Ubuntu 7.10, memtest86+
root (hd0,0)
kernel /boot/memtest86+.bin
quiet
title FreeBSD 7.0
root (hd0,3)
kernel /boot/loader
### END DEBIAN AUTOMAGIC KERNELS LIST | | Distinguished Member with 14,984 posts. | | Join Date: Sep 2003 Location: -71.45091, 42.27841 | | Using Ubuntu, from the root account, issue the command:
# fdisk -l
and post the result in this thread.
I suspect that to make your scheme work with Grub, you may need to repartition FreeBSD to have a /boot partition separate from its main active partition - but, I am not sure, OTOH, you may simply be missing the partition id for your FreeBSD partition. saikee (a member here at TSG) may know the answer off the top of his head as I'm sure he may even have encounter this problem before.
You should note that FreeBSD will not be using any Linux filesystem partitions usually with an ID of 82 for swap, and 83 for either /boot or / root partitions that Grub (being a Linux bootloader probably knows about). The missing information needed for your Unix partition from the screenshot attachment you posted can probably be found here which lists a table of partition ids for PCs. Note: FreeBSD is a5. I would first try assigning a5 to the FreeBSD partition id field with your partitioning software. From your menu.lst entry, it looks to be what the Gnu Grub manual 0.97 specifies, so maybe all you are missing is the partition id specification for FreeBSD in the partition table. In fact, checking with saikee's post for A grub menu booting 100+ systems of Dos, Windows, Linux, BSD and Solaris, it looks like that might be the aswer.
Also, here is a link to How It Works: Partition Tables which may help you understand what you have to do to make your scheme work with Grub further if the above suggestion does not solve your problem, although, I suspect it will.
-- Tom
__________________ The independence created by philosophical insight is - in my opinion - the mark of distinction
between a mere artisan or specialist and a real seeker after truth. - Einstein 1944
Imagination is more important than knowledge. - Einstein | | Senior Member with 210 posts. | | Join Date: May 2007 Experience: Intermediate | | Another little bit of info:
fdisk -l /dev/sda
Disk /dev/sda: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xd0f4738c
Device Boot Start End Blocks Id System
/dev/sda1 1 4732 38009758+ 83 Linux
/dev/sda2 9465 9726 2104515 5 Extended
/dev/sda3 * 4733 9464 38009790 a5 FreeBSD
/dev/sda5 9465 9726 2104483+ 82 Linux swap / Solaris
Partition table entries are not in disk order | | Distinguished Member with 2,835 posts. | | Join Date: Jun 2004 Location: Newcastle Experience: A Linux user gone nuts on multi-boot | | Try this in menu.lst Code: title FreeBSD 7.0 in sda3 but dude said it is (hd0,2)
root (hd0,2)
chainloader +1
FreeBSD has BSDsubparts that work like logical partitions and its boot loader may be in one of the subparts. In a standard installation it is a lot easier to chainload the BSD bootloader than to ask Grub to fire the BSD up. The difference is to let Grub boots FreeBSD boot loader and the FreeBSD boot loader boots the BSD system.
The partition type a5 is standard for FreeBSD and its variants.
Last edited by saikee : 03-Mar-2008 10:45 AM.
| | Senior Member with 210 posts. | | Join Date: May 2007 Experience: Intermediate | | I'm gonna try this:
title FreeBSD 7.0
root (hd0,3,a)
kernel /boot/loader
chainloader +1
BBL to see if it works.
Thanks everyone for all your input.
Looks like my method didn't work. Saikee, I'm gonna try your method.
Last edited by absolutezero1287 : 03-Mar-2008 11:11 AM.
Reason: Update!
| | Senior Member with 210 posts. | | Join Date: May 2007 Experience: Intermediate | | Here's a pic from Ubuntu. Why are there so many partitions? Lol. | | Senior Member with 210 posts. | | Join Date: May 2007 Experience: Intermediate | | Well, with my previous configuration:
title FreeBSD 7.0
root (hd0,3,a)
kernel /boot/loader
chainloader +1
it said that it couldn't find the partition. But with the current configuration:
title FreeBSD 7.0 in sda3 but dude said it is (hd0,2)
root (hd0,2)
chainloader +1
It said that it can't mount the partition.
To my understanding, this means that GRUB can't handle BSD partitions or that I simply have the wrong partition.
On a side note: I was told that I could have GRUB load the FreeBSD bootloader which would in turn be able to handle my FreeBSD partition(s). | | Senior Member with 210 posts. | | Join Date: May 2007 Experience: Intermediate | | Quote:
Originally Posted by saikee Try this in menu.lst Code: title FreeBSD 7.0 in sda3 but dude said it is (hd0,2)
root (hd0,2)
chainloader +1
FreeBSD has BSDsubparts that work like logical partitions and its boot loader may be in one of the subparts. In a standard installation it is a lot easier to chainload the BSD bootloader than to ask Grub to fire the BSD up. The difference is to let Grub boots FreeBSD boot loader and the FreeBSD boot loader boots the BSD system.
The partition type a5 is standard for FreeBSD and its variants. | I tried it out but to no avail. Would I need to install the FreeBSD bootloader?
By default it installs it to the MBR, but I'm worried that it may screw with Ubuntu.
BTW, your post in justlinux.com rocks | | Distinguished Member with 14,984 posts. | | Join Date: Sep 2003 Location: -71.45091, 42.27841 |
03-Mar-2008, 12:39 PM
#10 | Quote:
Originally Posted by absolutezero1287 I tried it out but to no avail. Would I need to install the FreeBSD bootloader?
By default it installs it to the MBR, but I'm worried that it may screw with Ubuntu.
BTW, your post in justlinux.com rocks | Hi,
The line:
kernel /boot/loader
in your menu.lst entry assumes that the FreeBSD bootloader is installed in /boot/loader if I am not mistaken.
-- Tom | | Distinguished Member with 2,835 posts. | | Join Date: Jun 2004 Location: Newcastle Experience: A Linux user gone nuts on multi-boot |
03-Mar-2008, 03:23 PM
#11 | The chainloader +1 only works if you have installed the boot loader in the root partition (sda3) of FreeBSD. | | Senior Member with 210 posts. | | Join Date: May 2007 Experience: Intermediate |
03-Mar-2008, 03:36 PM
#12 | Oh, I see. So the bootloader must be installed in sda3...I'm gonna give it a shot. | | Junior Member with 24 posts. | | Join Date: Mar 2008 Experience: Advanced |
04-Mar-2008, 06:26 PM
#13 | the line for free bsd should be as follows:
title FreeBSD 7.0
root (hd0,2)
kernel /boot/loader
now let me explain why... the title is of course the title. the root is where the partition is located going from 0 as one on up(drive,partition#) your number for bsd is sda3 so it will be a two instead of a 3. the kernal is of course the kernal.... so yeah change that one number and you should be good to go... |  THIS THREAD HAS EXPIRED.
Are you having the same problem?
We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.
|
Smart Search
| Find your solution! | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | |  WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
| You Are Using: |
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 05:01 AM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd. | |
|