Extra steps on kernel upgrades

When upgrading the kernel on instances launched from AMIs published prior to September 3rd, 2014 special actions need to be taken or the instance will not reboot.

Due to a bug (https://bugzilla.suse.com/show_bug.cgi?id=893368) the menu.lst file is not re-generated properly during a kernel update on instances launched from images released prior to September 3rd, 2014 and users upgrading the kernel need to take special action after upgarding the kernel.

On HVM images:

The device map is missing and need to be re-generated, as root execute:

grub --device-map=/boot/grub/device.map

in the grub shell that is started just enter

quit

On HVM and PV images
The menu.lst file is not properly generated. At first determine the version number of the kernel installed

rpm -qa | grep kernel

Now edit /boot/grub/menu.lst and change the value following the “default” entry. Staring at 0 count each entry in menu.lst until you find an entry that matches kernel version you previously determined. Entries in the file are delimited by comments and thus are reasonably easy to distinguish. In most cases the value for “default” should be 1, i.e.

default 1

[COLOR="#FF0000"]Attention[/COLOR]
Depending on the kernel version you are upgrading to, the menu.lst entry for the new kernel may be empty, i.e. look as follows:

###Don't change this comment - YaST2 identifier: Original name: linux###
title Ec2 -- SUSE Linux Enterprise Server 11 SP3 - 3.0.101-0.40 (ec2)
    kernel
    initrd

In this case if you just change the setting for default the VM will not reboot either as no kernel is specified. In this case you must create a proper entry. This would look as follows:

###Don't change this comment - YaST2 identifier: Original name: linux###
title Ec2 -- SUSE Linux Enterprise Server 11 SP3 - 3.0.101-0.40 (ec2)
    root (hd0,0)
    kernel /boot/vmlinuz-ec2 vga=normal xencons=xvc0 console=xvc0 multipath=off root=/dev/sda1 showopts
    initrd /boot/initrd-ec2

Good information; thank-you for sharing.


Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below…