PDA

View Full Version : [ubuntu] grub2 problems



mugs
October 24th, 2010, 04:55 PM
Hi, I have a long running 9.10 installation. All of a sudden, on boot, I get this error: "loading initial ramdisk error: file not found" If I hit 'E' at the menu entry, I can scroll all the way to the end of the boot command, and it appears that the last 'c' on 'generic' is missing from the kernel name. If I add the c and hit ctrl-x it boots fine. The grub.cfg appears to be correct, it has the full generic spelled out. I am looking for some ideas, suggestions, thanks.

sikander3786
October 24th, 2010, 05:56 PM
Try,


sudo update-grub

And then reboot to see if it fixed itself.

mugs
October 24th, 2010, 06:49 PM
Thanks, but I have tried that, still not working.

mugs
October 24th, 2010, 08:05 PM
to be more clear, the last line that appears when I press e to edit the boot line: initrd /boot/initrd.img-2.6.xx.xx-generi

The c is missing.

Cavsfan
October 24th, 2010, 08:13 PM
Look inside the /boot/ directory. That is where that file name should reside.

Cavsfan
October 24th, 2010, 08:15 PM
And if that is where it is misspelled, of course enter sudo update-grub and then sudo grub-mkconfig will list the stuff that grub will
display w/o rebooting.

mugs
October 24th, 2010, 08:20 PM
Nothing is mispelled, it all seems correct in the cfg files

Cavsfan
October 24th, 2010, 08:22 PM
Does the output of sudo grub-mkconfig
look OK and the 'c' is not missing in the output?

mugs
October 24th, 2010, 08:24 PM
yes, the output looks fine:


Generating grub.cfg ...
#
# 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
}
insmod ext2
set root=(hd1,1)
search --no-floppy --fs-uuid --set 78741291-e4de-4c3a-819d-c1890751a2e4
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=(hd1,1)
search --no-floppy --fs-uuid --set 78741291-e4de-4c3a-819d-c1890751a2e4
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=5
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod ext2
set root=(hd1,1)
search --no-floppy --fs-uuid --set 78741291-e4de-4c3a-819d-c1890751a2e4
insmod png
loadfont /boot/grub/dejavu_sans_10.pf2
loadfont /boot/grub/dejavu_sans_12.pf2
loadfont /boot/grub/dejavu_sans_bold_14.pf2
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 ###
Found linux image: /boot/vmlinuz-2.6.31-22-generic
Found initrd image: /boot/initrd.img-2.6.31-22-generic
menuentry "Ubuntu, with Linux 2.6.31-22-generic" --class ubuntu --class gnu-linux --class gnu --class os {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set gfxpayload=keep
insmod ext2
set root=(hd1,1)
search --no-floppy --fs-uuid --set 78741291-e4de-4c3a-819d-c1890751a2e4
echo Loading Linux 2.6.31-22-generic ...
linux /boot/vmlinuz-2.6.31-22-generic root=UUID=78741291-e4de-4c3a-819d-c1890751a2e4 ro quiet splash
echo Loading initial ramdisk ...
initrd /boot/initrd.img-2.6.31-22-generic
}
menuentry "Ubuntu, with Linux 2.6.31-22-generic (recovery mode)" --class ubuntu --class gnu-linux --class gnu --class os {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set gfxpayload=keep
insmod ext2
set root=(hd1,1)
search --no-floppy --fs-uuid --set 78741291-e4de-4c3a-819d-c1890751a2e4
echo Loading Linux 2.6.31-22-generic ...
linux /boot/vmlinuz-2.6.31-22-generic root=UUID=78741291-e4de-4c3a-819d-c1890751a2e4 ro single
echo Loading initial ramdisk ...
initrd /boot/initrd.img-2.6.31-22-generic
}
### END /etc/grub.d/10_linux ###

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

### BEGIN /etc/grub.d/30_os-prober ###
Found Fedora Core release 5 (Bordeaux) on /dev/sda2
### 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 ###
done
mommy@mommy-desktop:~/Desktop$

Cavsfan
October 24th, 2010, 08:30 PM
That's strange... I don't have any more clues myself. But, I am sure someone around here can figure this out.
But, you should probably highlight all of that output and then click on the # button
at the top right of the edit menu to put CODE around the text so it doesn't take up so much room.

Cavsfan
October 24th, 2010, 08:34 PM
I am pretty sure that if you went by the tutorial in my sig. it would correct this problem. It makes it hard coded and you just have to plugin the UUID.
If you are not dual booting, you would just leave of the 3rd part about windows 7 and have the default line be 0.