PDA

View Full Version : [ubuntu] GRUB problem in Karmic



Marcelo Ruiz
December 21st, 2009, 12:58 AM
Hi,

I made a fresh install of Karmic and got the following problem: when I restarted the computer I got the following:

GRUB Loading:
error: no such device df5d2965-fb8a-4140-ad6f-2ae18ce64475

After getting that error, Ubuntu starts, but completely skipping the GRUB boot menu.

With Ubuntu 9.04 there were issues with people having a separate boot partition, so I don't know if that is still the case with Ubuntu 9.10

my fstab file is like follows:



/dev/fd0 /media/floppy0 vfat noauto 0 0
/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0
UUID=2542ae4f-79d8-4aee-9662-8893d4bc4c32 /boot ext4 defaults 0 2
UUID=df5d2965-fb8a-4140-ad6f-2ae18ce64475 / ext4 defaults 0 1
UUID=13161dc9-4ac1-427c-a81f-5b4df55a5b9a /home ext4 defaults 0 0
UUID=c4c9249e-b4af-4ad3-b604-6c9144755999 /mnt/Backup ext4 defaults 0 0
UUID=9b7086f0-660f-43a0-b7d7-ec85cc916dd3 none swap sw 0 0
UUID=15223E61AF646FA9 /mnt/Documentos ntfs-3g umask=000 0 0
UUID=5C64BB8064BB5C08 /mnt/Media ntfs-3g defaults 0 0


and my grub.cfg is:



#
# 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 /boot/grub/grubenv ]; then
have_grubenv=true
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
saved_entry=${prev_saved_entry}
save_env saved_entry
prev_saved_entry=
save_env prev_saved_entry
fi
insmod ext2
set root=(hd0,10)
search --no-floppy --fs-uuid --set
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
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/white
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, Linux 2.6.31-16-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 2542ae4f-79d8-4aee-9662-8893d4bc4c32
linux /vmlinuz-2.6.31-16-generic root=UUID=df5d2965-fb8a-4140-ad6f-2ae18ce64475 ro splash quiet splash
initrd /initrd.img-2.6.31-16-generic
}
menuentry "Ubuntu, Linux 2.6.31-16-generic (recovery mode)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 2542ae4f-79d8-4aee-9662-8893d4bc4c32
linux /vmlinuz-2.6.31-16-generic root=UUID=df5d2965-fb8a-4140-ad6f-2ae18ce64475 ro single splash
initrd /initrd.img-2.6.31-16-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 2542ae4f-79d8-4aee-9662-8893d4bc4c32
linux /vmlinuz-2.6.31-14-generic root=UUID=df5d2965-fb8a-4140-ad6f-2ae18ce64475 ro splash quiet splash
initrd /initrd.img-2.6.31-14-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic (recovery mode)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 2542ae4f-79d8-4aee-9662-8893d4bc4c32
linux /vmlinuz-2.6.31-14-generic root=UUID=df5d2965-fb8a-4140-ad6f-2ae18ce64475 ro single splash
initrd /initrd.img-2.6.31-14-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
linux16 /memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
linux16 /memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ ${timeout} != -1 ]; then
if keystatus; then
if keystatus --shift; then
set timeout=-1
else
set timeout=0
fi
else
if sleep --interruptible 3 ; then
set timeout=0
fi
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.
### END /etc/grub.d/40_custom ###


Can someone please tell me what is wrong with all this? :confused:
Thanks a lot!!!

Marcelo.

PheonixAsh
December 21st, 2009, 01:23 AM
Did you install is off a mass storage device like a flash key or sd card?

Marcelo Ruiz
December 21st, 2009, 01:27 AM
No, I installed it from the CD.

PheonixAsh
December 21st, 2009, 01:35 AM
what does you device.map look like (/boot/grub/devices.map) and how many drives do you have? and one extra question is / and /boot on the same drive?

Marcelo Ruiz
December 21st, 2009, 01:51 AM
Hi,

Both / and /boot are on the only hard drive I have.

My /boot/grub/device.map



(hd0) /dev/sda


I noticed you typed devices.map, is maybe that the reason for my error? :confused:
Thanks!

PheonixAsh
December 21st, 2009, 01:57 AM
No sorry thats my bad.

lidex
December 21st, 2009, 02:43 AM
First thing I would try is these commands in a terminal;

sudo apt-get update
sudo apt-get upgrade
sudo update-grub

Then reboot

lidex
December 21st, 2009, 02:45 AM
BTW you can access the grub boot menu by holding down the shift key after the bios screen.

Marcelo Ruiz
December 21st, 2009, 02:57 AM
Hi, thanks for your answer lidex.

I could see the boot menu after holding the shift key down, but I still get:

error: no such device df5d2965-fb8a-4140-ad6f-2ae18ce64475

then it boots normally.
Any idea of why that happens?

Thanks

Marcelo Ruiz
December 21st, 2009, 07:05 AM
I am still having this problem... :confused:

after doing
sudo update-grub I noticed this section changed:



### BEGIN /etc/grub.d/00_header ###
if [ -s /boot/grub/grubenv ]; then
have_grubenv=true
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
saved_entry=${prev_saved_entry}
save_env saved_entry
prev_saved_entry=
save_env prev_saved_entry
fi
insmod ext2
set root=(hd0,10)
search --no-floppy --fs-uuid --set df5d2965-fb8a-4140-ad6f-2ae18ce64475
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
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###

Could that be the problem? Any ideas?

Thanks!

elite_angel
December 21st, 2009, 07:14 AM
May we know how you installed it?

Did you use advanced partitioning?

Please tell us how you installed the system.

Marcelo Ruiz
December 21st, 2009, 03:38 PM
Hi elite_angel!
Thanks for your reply.
I installed Karmic from a CD in a hard drive I had previously partitioned. I used advanced partitioning and during that process I requested formatting the four partitions I was going to use:



UUID=2542ae4f-79d8-4aee-9662-8893d4bc4c32 /boot ext4 defaults 0 2
******************EXTENDED PARTITION**********************************
UUID=9b7086f0-660f-43a0-b7d7-ec85cc916dd3 none swap sw 0 0
UUID=df5d2965-fb8a-4140-ad6f-2ae18ce64475 / ext4 defaults 0 1
UUID=13161dc9-4ac1-427c-a81f-5b4df55a5b9a /home ext4 defaults 0 0
(and here +3 legacy NTFS partitions from the dark times)
************************************************** ********************

I still don't get from which part of the script GRUB2 is getting the reference to the root partition (UUID=df5d2965-fb8a-4140-ad6f-2ae18ce64475) which, in fact, exists.
Thanks for your help!

meierfra.
December 21st, 2009, 06:29 PM
search --no-floppy --fs-uuid --set df5d2965-fb8a-4140-ad6f-2ae18ce64475

I believe it's this line which is causing your problem. Some bios are not able to search the whole hard drive and you end up with the "no such device" message. So I suggest to disable that line:



cd /boot/grub
sudo chmod +w grub.cfg
gksudo gedit grub.cfg

and then add a "#" in front of the search line:


#search --no-floppy --fs-uuid --set df5d2965-fb8a-4140-ad6f-2ae18ce64475

The search only is a precaution, in case the the preceding "root (hd0,10)" is not correct. So disabling it should not cause any problems.
Unfortunately there does not seems to be a way to disable this line permanently. So you will have to add the "#" everytime "update-grub" is run, for example after kernel updates.

meierfra.
December 21st, 2009, 06:50 PM
I think I found a permanent solution:


gksudo gedit /etc/grub.d/00_header


Change (this should be at line 76)


prepare_grub_to_access_device `${grub_probe} --target=device ${GRUB_FONT_PATH}`
cat << EOF
if loadfont `make_system_path_relative_to_its_root ${GRUB_FONT_PATH}` ; then

To


# prepare_grub_to_access_device `${grub_probe} --target=device ${GRUB_FONT_PATH}`
cat << EOF
insmod ext2
set root=(hd0,10)
if loadfont `make_system_path_relative_to_its_root ${GRUB_FONT_PATH}` ; then

Save the file and then


sudo update-grub

Marcelo Ruiz
December 21st, 2009, 08:26 PM
Hi Maiefra!

Thanks! It worked! Now I need to figure out how to show the image, but that is a minor problem.
That line you pointed out in grub.cfg looked suspicious to me, but I didn't know if I could break things by removing it.
Anyway, it work, so thank you!!!

Marcelo.