[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
grub2 on ubuntu 10.10 can't find loader on 1st partation
From: |
tom oakes |
Subject: |
grub2 on ubuntu 10.10 can't find loader on 1st partation |
Date: |
Sun, 24 Oct 2010 15:06:08 -0600 |
User-agent: |
Thunderbird 2.0.0.9 (X11/20080213) |
hello,
I have a computer configured with 2 disk drives configured as follows:
shown with parted -l ubuntu:
Model: ATA WDC WD1600AAJB-0 (scsi)
Disk /dev/sda: 160GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.3kB 160GB 160GB primary ext2 boot
Model: ATA Hitachi HDS72101 (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.3kB 252GB 252GB primary freebsd-ufs boot
2 252GB 503GB 252GB primary freebsd-ufs
3 503GB 755GB 252GB extended lba
5 503GB 745GB 242GB logical ext3
6 745GB 755GB 9973MB logical linux-swap(v1)
4 755GB 1000GB 245GB primary
As reported from freebsd fdisk -s :
# fdisk -s
/dev/ad4: 1938021 cyl 16 hd 63 sec
Part Start Size Type Flags
1: 63 491519889 0xa5 0x80
2: 491519952 491519952 0x83 0x00
3: 983042046 491515906 0x0f 0x00
4: 1474559856 478965312 0x83 0x00
# fdisk -s /dev/ad1
/dev/ad1: 310101 cyl 16 hd 63 sec
Part Start Size Type Flags
1: 63 312576642 0xa5 0x80
the 160 GB disk does not have an OS installed.
Freebsd 8.1 is installed on the 1st slice of the 1st partition of the
big disk. Fresh install.
ubuntu 10.10 is installed in the logical partition 5 of the extended
partition 3. Fresh install.
grub version 2.6.35-22.
ubuntu boots correctly when booting from the hard disk with grub2, but
I have been unable to configure
grub2 to boot freebsd.
I can boot freebsd with a cd that I made with grub-legacy while
attempting to install grub on
freebsd. I was never able to get freebsd to boot from the hard disk with
grub-legacy or grub2 installed on freebsd.
I am able to mount, read only, successfully the freebsd partition from
ubuntu.
As you can see in the grub.cfg copied below that ubuntu is loaded from
set root='(hd1,msdos5)' This works, but is not consistent with what is
returned by ls from the grub command line.
(hd0) (hd0,msdos6) (hd0,msdos5) (hd0,msdos4) (hd0,msdos2)
(hd0,msdos4,msdos1) (hd0,msdos1) (hd1) (hd1,msdos1)
A set from the grub command line shows: root=hd0,msdos5
Editing the set root and executing from the splash screen I have tried
these, (hd1,msdos1.msdos1) and (hd0,msdos1.msdos1),. I alway get an error.
Usually the error is: "No such Partition", sometime something about not
finding the file. There is a file /boot/loader on the first slice of the
first partition.
I can not use the chain loader as the MBR for the big disk contains the
one from ubuntu not from freebsd.
I have not tried to put the commands to do a direct boot with code like
like below, from http://forums.freebsd.org/showthread.php?t=5918, as the
problem seems to be finding the loader file, not executing it. I do not
understand this code.
menuentry "FreeBSD ad4, direct" {
insmod ufs2
set root=(hd0,1,a)
search --no-floppy --fs-uuid --set 4b22f9090565ab77
freebsd /boot/kernel/kernel
freebsd_loadenv /boot/device.hints
set FreeBSD.vfs.root.mountfrom=ufs:/dev/ad4s1a
set FreeBSD.vfs.root.mountfrom.options=rw
}
Is there something that I am missing in the configuration, or is this a
bug in the way this version of grub2 finds partitions from a logical
partitions?
Any suggestion as to what I should try next will be appreciated!
Tom
grub.cfg below
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then
save_env recordfail; fi; fi
}
function load_video {
insmod vbe
insmod vga
}
insmod part_msdos
insmod ext2
set root='(hd1,msdos5)'
search --no-floppy --fs-uuid --set 34d13e9c-7bf7-4eda-aa21-d9461e6c2e12
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd1,msdos5)'
search --no-floppy --fs-uuid --set 34d13e9c-7bf7-4eda-aa21-d9461e6c2e12
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
if [ "${recordfail}" = 1 ]; then
set timeout=-1
else
set timeout=10
fi
play 480 440 1
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.35-22-generic-pae' --class ubuntu
--class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd1,msdos5)'
search --no-floppy --fs-uuid --set
34d13e9c-7bf7-4eda-aa21-d9461e6c2e12
linux /boot/vmlinuz-2.6.35-22-generic-pae
root=UUID=34d13e9c-7bf7-4eda-aa21-d9461e6c2e12 ro
initrd /boot/initrd.img-2.6.35-22-generic-pae
}
menuentry 'Ubuntu, with Linux 2.6.35-22-generic-pae (recovery mode)'
--class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd1,msdos5)'
search --no-floppy --fs-uuid --set
34d13e9c-7bf7-4eda-aa21-d9461e6c2e12
echo 'Loading Linux 2.6.35-22-generic-pae ...'
linux /boot/vmlinuz-2.6.35-22-generic-pae
root=UUID=34d13e9c-7bf7-4eda-aa21-d9461e6c2e12 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-22-generic-pae
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod part_msdos
insmod ext2
set root='(hd1,msdos5)'
search --no-floppy --fs-uuid --set
34d13e9c-7bf7-4eda-aa21-d9461e6c2e12
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd1,msdos5)'
search --no-floppy --fs-uuid --set
34d13e9c-7bf7-4eda-aa21-d9461e6c2e12
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
if [ "x${timeout}" != "x-1" ]; then
if sleep --verbose --interruptible 5 ; then
set timeout=0
fi
fi
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply
type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry "freebsd" {
insmod ufs2
set root=(hd1,1,a)
kfreebsd /boot/loader
} ### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
- grub2 on ubuntu 10.10 can't find loader on 1st partation,
tom oakes <=