PDA

View Full Version : [ubuntu] ubuntu 10.04 grub missing operating system



ke3pup
May 1st, 2010, 04:02 PM
hi guys
today i installed Ubuntu 10.04 on my macbook pro which also has Mac and windows7 installed on it.

I installed ubuntu on /dev/sda5 and i installed grub also to /dev/sda5 via that advance option window.

problem is when i try to boot, Linux icon shows up on reFIT but when i choose it it says "Operating system missing"!

I know its there since i try to fix it by booting into liveCD again and doing:

sudo -i
mount /dev/sda5/ /mnt
mount --bind /proc /mnt/proc
mount --bind /dev /mnt/dev
mount --bind /sys /mnt/sys
chroot /mnt update-grub

when i did that grub generated the list finding linux kernel and windows 7. but again when i reboot and pick the linux icon it says "Operating system missing"!

can someone please help. Thanks

i did it this way so that when i pick the Windows icon on reFIT i don't see gurb and boot straight into windows and only see grub menu when i actually pick the linux icon. How can i fix it?

ke3pup
May 1st, 2010, 04:56 PM
ok i tried the following (keeping in mind my linux partition is /dev/sda5

sudo -i
mount /dev/sda5/ /mnt
mount --bind /proc /mnt/proc
mount --bind /dev /mnt/dev
mount --bind /sys /mnt/sys

grub-install --force --root-directory=/mnt /dev/sda5

chroot /mnt update-grub

now when i reboot and pick th linux icon it boots into windows straight away as though i've clicked the windows icon on reFIT!

Can someone please tell me what i'm doing wrong?

ke3pup
May 1st, 2010, 05:49 PM
any suggestions at all?

malrost
May 1st, 2010, 06:11 PM
Please post your /boot/grub/menu.lst

ke3pup
May 2nd, 2010, 09:44 AM
there's no menu.lst in the boot/grub folder i think its because its grub2 but i found a grub.cfg file which might give someone here a hint on how i can fix this?


#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/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
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
}
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 67a362f1-d520-4707-9e04-bf27935df884
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 67a362f1-d520-4707-9e04-bf27935df884
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32-21-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 67a362f1-d520-4707-9e04-bf27935df884
linux /boot/vmlinuz-2.6.32-21-generic root=UUID=67a362f1-d520-4707-9e04-bf27935df884 ro quiet splash
initrd /boot/initrd.img-2.6.32-21-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-21-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 67a362f1-d520-4707-9e04-bf27935df884
echo 'Loading Linux 2.6.32-21-generic ...'
linux /boot/vmlinuz-2.6.32-21-generic root=UUID=67a362f1-d520-4707-9e04-bf27935df884 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-21-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 67a362f1-d520-4707-9e04-bf27935df884
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 67a362f1-d520-4707-9e04-bf27935df884
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Mac OS X (32-bit) (on /dev/sda2)" {
insmod hfsplus
set root='(hd0,2)'
search --no-floppy --fs-uuid --set e887b1524bbb9c79
insmod vbe
set do_resume=0
if [ /var/vm/sleepimage -nt10 / ]; then
if xnu_resume /var/vm/sleepimage; then
set do_resume=1
fi
fi
if [ $do_resume == 0 ]; then
xnu_uuid e887b1524bbb9c79 uuid
if [ -f /Extra/DSDT.aml ]; then
acpi -e /Extra/DSDT.aml
fi
xnu_kernel /mach_kernel boot-uuid=${uuid} rd=*uuid
if [ /System/Library/Extensions.mkext -nt /System/Library/Extensions ]; then
xnu_mkext /System/Library/Extensions.mkext
else
xnu_kextdir /System/Library/Extensions
fi
if [ -f /Extra/Extensions.mkext ]; then
xnu_mkext /Extra/Extensions.mkext
fi
if [ -d /Extra/Extensions ]; then
xnu_kextdir /Extra/Extensions
fi
if [ -f /Extra/devprop.bin ]; then
xnu_devprop_load /Extra/devprop.bin
fi
if [ -f /Extra/splash.jpg ]; then
insmod jpeg
xnu_splash /Extra/splash.jpg
fi
if [ -f /Extra/splash.png ]; then
insmod png
xnu_splash /Extra/splash.png
fi
if [ -f /Extra/splash.tga ]; then
insmod tga
xnu_splash /Extra/splash.tga
fi
fi
}
menuentry "Mac OS X (64-bit) (on /dev/sda2)" {
insmod hfsplus
set root='(hd0,2)'
search --no-floppy --fs-uuid --set e887b1524bbb9c79
insmod vbe
set do_resume=0
if [ /var/vm/sleepimage -nt10 / ]; then
if xnu_resume /var/vm/sleepimage; then
set do_resume=1
fi
fi
if [ $do_resume == 0 ]; then
xnu_uuid e887b1524bbb9c79 uuid
if [ -f /Extra/DSDT.aml ]; then
acpi -e /Extra/DSDT.aml
fi
xnu_kernel64 /mach_kernel boot-uuid=${uuid} rd=*uuid
if [ /System/Library/Extensions.mkext -nt /System/Library/Extensions ]; then
xnu_mkext /System/Library/Extensions.mkext
else
xnu_kextdir /System/Library/Extensions
fi
if [ -f /Extra/Extensions.mkext ]; then
xnu_mkext /Extra/Extensions.mkext
fi
if [ -d /Extra/Extensions ]; then
xnu_kextdir /Extra/Extensions
fi
if [ -f /Extra/devprop.bin ]; then
xnu_devprop_load /Extra/devprop.bin
fi
if [ -f /Extra/splash.jpg ]; then
insmod jpeg
xnu_splash /Extra/splash.jpg
fi
if [ -f /Extra/splash.png ]; then
insmod png
xnu_splash /Extra/splash.png
fi
if [ -f /Extra/splash.tga ]; then
insmod tga
xnu_splash /Extra/splash.tga
fi
fi
}
menuentry "Windows 7 (loader) (on /dev/sda3)" {
insmod ntfs
set root='(hd0,3)'
search --no-floppy --fs-uuid --set a6f01b3bf01b1163
chainloader +1
}
### 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.
### END /etc/grub.d/40_custom ###


i hope its helpful.

fatigue
May 3rd, 2010, 06:36 PM
You can boot/fix grub menu by Super Grub Disk


Download Super Grub Disk (http://forjamari.linex.org/projects/supergrub/)
Burn into a cdrom (better) or a floppy
Boot from it


This program, QGRUBeditor is really good program to fix/add new Grub menu.

http://linuxappfinder.com/package/qgrubeditor (http://linuxappfinder.com/package/qgrubeditor)

1 First, use super grub disk and "advance and tool" and "show partition"
Find out what is your windows root number (hd0,?). ? part is important

2 By using QGRUBeditor, you can add windows grub menu.

Windows will be like this

title Windows 7 (Boot)
root (hd0,*)
chainloader +1


Ubuntu will be like

title Ubuntu 10.04 LTS, kernel 2.6.32-21-generic
root (hd0,5)
kernel /boot/vmlinuz-2.6.32-21-generic root=UUID=e3265ff1-6500-457 ro quiet splash
initrd /boot/initrd.img-2.6.32-21-generic
quiet

efflandt
May 3rd, 2010, 06:58 PM
I guess the primary question is whether your mbr or whatever boot loader you are chaining to grub2 can boot grub on a "logical" partition? I know grub2 (or grub) work on a "primary" partition marked as the boot partition in the partition table using a standard mbr (I do that on my desktop PC), but I have never tried using a standard mbr to boot a "logical" partition.

gumaste
May 22nd, 2010, 05:43 AM
Did you find a resolution to this issue? I have the same problem.