Monday, November 14, 2016

Grub no longer boots after kernel update (second time now)



Some weeks ago I configured a dual boot laptop to run Xubuntu 10.4 on the third partition of my disk (i.e. I had to set the installation location manually). Everything was fine until I had installed the bunch of automatic updates (including a new kernel), which were discovered after Wifi was finally working. After rebooting, Grub didn't boot into Xubuntu anymore (which it did several times before), but just showed a prompt. I managed to get the system repaired using a live CD and a good hour of Internet reading.



For some weeks everything was fine, including automatic updates. Yesterday I got a new kernel through automatic updates. And guess what? The laptop refused to boot afterwards.



To me it looks like every kernel update makes my system unbootable. How can I prevent this besides the obvious "Don't install updates"? Is there anything else I should inspect or monitor on that system? Or are my conclusions about the kernel update completely wrong and I should look for something else causing these symptomes?




EDIT: Some more details as asked in the comments: I didn't start Windows between the update and the crash, so for me it seems to be related to Xubuntu only. Grub is Grub2 (version 1.98something). /boot/grub/grub.cfg looks like 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 c1550ae8-66af-414c-874d-15cb43176ba5
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 c1550ae8-66af-414c-874d-15cb43176ba5

set locale_dir=($root)/boot/grub/locale
set lang=de
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, mit Linux 2.6.32-24-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,5)'

search --no-floppy --fs-uuid --set c1550ae8-66af-414c-874d-15cb43176ba5
linux /boot/vmlinuz-2.6.32-24-generic root=UUID=c1550ae8-66af-414c-874d-15cb43176ba5 ro quiet splash
initrd /boot/initrd.img-2.6.32-24-generic
}
menuentry 'Ubuntu, mit Linux 2.6.32-24-generic (Wiederherstellungsmodus)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set c1550ae8-66af-414c-874d-15cb43176ba5
echo 'Linux 2.6.32-24-generic wird geladen …'

linux /boot/vmlinuz-2.6.32-24-generic root=UUID=c1550ae8-66af-414c-874d-15cb43176ba5 ro single
echo 'Initiale Ramdisk wird geladen …'
initrd /boot/initrd.img-2.6.32-24-generic
}
menuentry 'Ubuntu, mit 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 c1550ae8-66af-414c-874d-15cb43176ba5
linux /boot/vmlinuz-2.6.32-21-generic root=UUID=c1550ae8-66af-414c-874d-15cb43176ba5 ro quiet splash

initrd /boot/initrd.img-2.6.32-21-generic
}
menuentry 'Ubuntu, mit Linux 2.6.32-21-generic (Wiederherstellungsmodus)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set c1550ae8-66af-414c-874d-15cb43176ba5
echo 'Linux 2.6.32-21-generic wird geladen …'
linux /boot/vmlinuz-2.6.32-21-generic root=UUID=c1550ae8-66af-414c-874d-15cb43176ba5 ro single
echo 'Initiale Ramdisk wird geladen …'

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 c1550ae8-66af-414c-874d-15cb43176ba5
linux16 /boot/memtest86+.bin

}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set c1550ae8-66af-414c-874d-15cb43176ba5
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###

menuentry "Microsoft Windows XP Professional (on /dev/sda1)" {
insmod ntfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 883cb1b73cb1a09c
drivemap -s (hd0) ${root}
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 ###


Everytime there is a new kernel added as part of software update, the grub configuration is updated. So the information Javier Rivera requested is very important. The relevant config file is /boot/grub/grub.cfg - in case you don't find it then look for /boot/grub/menu.lst



Also, you can run update-grub and check if you get any errors - pls post the result of that also. If, however, update-grub is successful, then a workaround would be to manually run this everytime your updates include a new kernel.


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...