jaunty to karmic upgrade failed to update menu.lst (update-grub missing from kernel-img.conf)

Bug #470265 reported by Robert Collins
50
This bug affects 5 people
Affects Status Importance Assigned to Milestone
grub (Ubuntu)
Expired
High
Unassigned

Bug Description

Symptoms
========

No sound devices in Sound Preferences -> Hardware, or no video support are the most obvious symptoms. Running 'uname -a' reports a kernel version from Jaunty (e.g. 2.6.28-11-generic) rather than one from Karmic (e.g. 2.6.31-14-generic)

Summary
=======

Upgrades from Jaunty to karmic may fail to configure the new kernel in grub's menu.lst. The Jaunty installed kernel-img.conf is missing a post-inst hook to call update-grub. We are investigating what would cause this at the moment.

Workaround
==========

Running 'sudo update-grub' should update the grub menu.lst to list the new Karmic kernel. A reboot of the machine is required to activate the new kernel. Subsequent to doing this, some users report that the sound hardware is detected but muted - simply adjusting the volume up should work at this point.

Revision history for this message
Robert Collins (lifeless) wrote :
Revision history for this message
Robert Collins (lifeless) wrote :
Revision history for this message
Robert Collins (lifeless) wrote :
Revision history for this message
Robert Collins (lifeless) wrote :
Revision history for this message
Robert Collins (lifeless) wrote :
Revision history for this message
Robert Collins (lifeless) wrote :
summary: - intrepid to karmic upgrade failed to update menu.lst
+ [MASTER] intrepid to karmic upgrade failed to update menu.lst
Revision history for this message
Robert Collins (lifeless) wrote : Re: [MASTER] intrepid to karmic upgrade failed to update menu.lst

-rw-r--r-- 1 root root 4814 2009-11-01 00:41 menu.lst
-rw-r--r-- 1 root root 4400 2009-11-01 00:41 menu.lst~

summary: - [MASTER] intrepid to karmic upgrade failed to update menu.lst
+ [MASTER] jaunty to karmic upgrade failed to update menu.lst
Revision history for this message
Steve Langasek (vorlon) wrote : Re: [MASTER] intrepid to karmic upgrade failed to update menu.lst (update-grub missing from kernel-img.conf)

Have triaged this with Robert on IRC; the problem is that kernel-img.conf is missing the calls to update-grub, so installing/removing kernels never triggers an update-grub.

The menu.lst{,~} attached here are the output of him manually running update-grub.

summary: - [MASTER] jaunty to karmic upgrade failed to update menu.lst
+ [MASTER] intrepid to karmic upgrade failed to update menu.lst (update-
+ grub missing from kernel-img.conf)
Changed in grub (Ubuntu):
importance: Undecided → High
Revision history for this message
Robert Collins (lifeless) wrote :

kernel-img.conf, modified 21 april 09 (which I think is when I installed this machine)

Revision history for this message
Robert Collins (lifeless) wrote :

Thats the deb timestamp, machine was installed on 6 may 2009.

Revision history for this message
Robert Collins (lifeless) wrote :
Revision history for this message
Robert Collins (lifeless) wrote :
Revision history for this message
Robert Collins (lifeless) wrote :
Revision history for this message
Robert Collins (lifeless) wrote :
Revision history for this message
Robert Collins (lifeless) wrote :
description: updated
summary: - [MASTER] intrepid to karmic upgrade failed to update menu.lst (update-
- grub missing from kernel-img.conf)
+ [MASTER] jaunty to karmic upgrade failed to update menu.lst (update-grub
+ missing from kernel-img.conf)
Revision history for this message
Mackenzie Morgan (maco.m) wrote : Re: [MASTER] jaunty to karmic upgrade failed to update menu.lst (update-grub missing from kernel-img.conf)
Revision history for this message
Steve Langasek (vorlon) wrote :

Looking at ubiquity, grub-installer in both jaunty and karmic is supposed to unconditionally add the update-grub hooks to /etc/kernel-img.conf if not already present. So the absence of these hooks from the livefs kernel-img.conf doesn't (presently) worry me.

Revision history for this message
Mackenzie Morgan (maco.m) wrote :
Revision history for this message
Dave Morley (davmor2) wrote :
Revision history for this message
Dave Morley (davmor2) wrote :
Revision history for this message
Dave Morley (davmor2) wrote :
LimCore (limcore)
summary: [MASTER] jaunty to karmic upgrade failed to update menu.lst (update-grub
- missing from kernel-img.conf)
+ missing from kernel-img.conf) - defaulting to old kernel 2.6.28
Steve Langasek (vorlon)
summary: [MASTER] jaunty to karmic upgrade failed to update menu.lst (update-grub
- missing from kernel-img.conf) - defaulting to old kernel 2.6.28
+ missing from kernel-img.conf)
Revision history for this message
CurlySurmudgeon (curlysurmudgeon) wrote :

After 4 days of fighting the sound problem in 9.10 Daniel T Chen noticed that my kernel was old. The 9.10 update installed vmlinuz-2.6.31-14-generic but didn't edit /boot/grub/menu.lst. Adding the kernel by manually editing the new kernel fixed my sound problems.

Revision history for this message
Daniel (djr1215) wrote : Re: [Bug 470265] Re: [MASTER] jaunty to karmic upgrade failed to update menu.lst (update-grub missing from kernel-img.conf)

CurlySurmudgeon wrote:
> After 4 days of fighting the sound problem in 9.10 Daniel T Chen noticed
> that my kernel was old. The 9.10 update installed
> vmlinuz-2.6.31-14-generic but didn't edit /boot/grub/menu.lst. Adding
> the kernel by manually editing the new kernel fixed my sound problems.
>
>
Thanks for your input on the sound problem. I managed to get the sound
working by having to try and install a new kernel. The kernel didn't
install but somehow my /boot/grub/menu.lst got updated in the process so
now I have sound. I still need to edit the menu.lst file to delete the
kernel that didn't install. In the ealier version (9.04) I had a grub
editor installed but since that's not available in 9.10 how do I edit
the menu.lst file?
Daniel

Revision history for this message
CurlySurmudgeon (curlysurmudgeon) wrote : Re: [MASTER] jaunty to karmic upgrade failed to update menu.lst (update-grub missing from kernel-img.conf)

I used a gnome terminal window with two tabs. In one I listed the files in /boot/

xxx@xxx-desktop:~$ ls /boot
abi-2.6.27-7-generic memtest86+.bin
abi-2.6.31-14-generic System.map-2.6.27-7-generic
config-2.6.27-7-generic System.map-2.6.31-14-generic
config-2.6.31-14-generic vmcoreinfo-2.6.27-7-generic
grub vmcoreinfo-2.6.31-14-generic
initrd.img-2.6.27-7-generic vmlinuz-2.6.27-7-generic
initrd.img-2.6.31-14-generic vmlinuz-2.6.31-14-generic

In the other tabbed terminal copy menu.lst for safety:

xxx@xxx-desktop:!$ sudo cp /boot/grub/menu.lst /boot/grub/menu.lst.safe

Then edit like this:

xxx@xxx-desktop:!$ sudo nano /boot/grub/menu.lst

Page down, toward the end you will see the available choices as GRUB new exists. Mine was:

## ## End Default Options ##
                                                      ***********insert new kernel here************
title Ubuntu 8.10, kernel 2.6.27-7-generic
uuid 4418ded9-9545-40c9-9126-cf54b69c33c0
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=4418ded9-9545-40c9-9126-cf54b69c33c0 ro quiet splash acpi=force noacpi
initrd /boot/initrd.img-2.6.27-7-generic
quiet

title Ubuntu 8.10, kernel 2.6.27-7-generic (recovery mode)
uuid 4418ded9-9545-40c9-9126-cf54b69c33c0
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=4418ded9-9545-40c9-9126-cf54b69c33c0 ro single acpi=force noacpi
initrd /boot/initrd.img-2.6.27-7-generic

title Ubuntu 8.10, memtest86+
uuid 4418ded9-9545-40c9-9126-cf54b69c33c0
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

After:

## ## End Default Options ##

title Ubuntu 9.10, kernel 2.6.31-14-generic
uuid 4418ded9-9545-40c9-9126-cf54b69c33c0
kernel /boot/vmlinuz-2.6.31-14-generic root=UUID=4418ded9-9545-40c9-9126-cf54b69c33c0 ro quiet splash acpi=force noacpi
initrd /boot/initrd.img-2.6.31-14-generic
quiet

title Ubuntu 9.10, kernel 2.6.31-14-generic (recovery mode)
uuid 4418ded9-9545-40c9-9126-cf54b69c33c0
kernel /boot/vmlinuz-2.6.31-14-generic root=UUID=4418ded9-9545-40c9-9126-cf54b69c33c0 ro single acpi=force noacpi
initrd /boot/initrd.img-2.6.31-14-generic

title Ubuntu 8.10, kernel 2.6.27-7-generic
uuid 4418ded9-9545-40c9-9126-cf54b69c33c0
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=4418ded9-9545-40c9-9126-cf54b69c33c0 ro quiet splash acpi=force noacpi
initrd /boot/initrd.img-2.6.27-7-generic
quiet

title Ubuntu 8.10, kernel 2.6.27-7-generic (recovery mode)
uuid 4418ded9-9545-40c9-9126-cf54b69c33c0
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=4418ded9-9545-40c9-9126-cf54b69c33c0 ro single acpi=force noacpi
initrd /boot/initrd.img-2.6.27-7-generic

title Ubuntu 8.10, memtest86+
uuid 4418ded9-9545-40c9-9126-cf54b69c33c0
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

A typo prevented this from working the first time, copy from the first tabbed terminal listing then pasting into nano works better.

Revision history for this message
Steve Langasek (vorlon) wrote :

Bad advice. Adding kernels by hand will only make it more difficult for update-grub to reconcile the boot stanzas the next time it runs. You should fix this by running "sudo update-grub" instead.

Revision history for this message
Steve Langasek (vorlon) wrote :

Also, if update-grub fails to update menu.lst for you (which is *not* what this bug report is about), you can force a full regeneration of menu.lst by sudo mv /boot/grub/menu.lst /boot/grub/menu.lst.safe and then running sudo update-grub. (If you have any customizations to your menu.lst that will be lost by this change, you should add them to the variables /above/ he boot stanzas, as described at <https://wiki.ubuntu.com/KarmicKoala/ReleaseNotes#GRUB%20menu.lst:%20install%20the%20maintainer%27s%20version%20vs.%20keep%20the%20local%20version>.)

Revision history for this message
CurlySurmudgeon (curlysurmudgeon) wrote :

I agree, ostensibly update-grub is superior.

Tried that, it didn't work.

Steve Langasek (vorlon)
summary: - [MASTER] jaunty to karmic upgrade failed to update menu.lst (update-grub
- missing from kernel-img.conf)
+ jaunty to karmic upgrade failed to update menu.lst (update-grub missing
+ from kernel-img.conf)
Revision history for this message
Daniel (djr1215) wrote : Re: [Bug 470265] Re: [MASTER] jaunty to karmic upgrade failed to update menu.lst (update-grub missing from kernel-img.conf)

Steve Langasek wrote:
> Bad advice. Adding kernels by hand will only make it more difficult for
> update-grub to reconcile the boot stanzas the next time it runs. You
> should fix this by running "sudo update-grub" instead.
>
>
I tried running "sudo update-grub" and got the following result:

> [sudo] password for daniel:
> Searching for GRUB installation directory ... found: /boot/grub
> Searching for default file ... found: /boot/grub/default
> Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
> Searching for splash image ... none found, skipping ...
> Found kernel: /boot/vmlinuz-2.6.31.5
> Found kernel: /boot/vmlinuz-2.6.31-14-generic
> Found kernel: /boot/vmlinuz-2.6.28-16-generic
> Found kernel: /boot/memtest86+.bin
> Updating /boot/grub/menu.lst ... done
I'm a bit concerned about the line "searching for splash image ... none
found, skipping ...". Is this something that needs to be corrected?
Daniel

Revision history for this message
Steve Langasek (vorlon) wrote :

Daniel,

Splash images are an optional feature of grub that we don't use by default in Ubuntu.

Revision history for this message
Katatawnic (katatawnic) wrote :

Just thought I'd update on the user end. I successfully ran "sudo update-grub" a couple weeks ago, but a couple days ago my sound and the hardware settings in sound preferences disappeared again. Running "sudo update-grub" didn't work this time.

Revision history for this message
Martin Pool (mbp) wrote :

I'm also seeing this on a Karmic machine upgraded from Jaunty; this was causing me to suffer <https://bugs.edge.launchpad.net/ubuntu/+source/linux/+bug/430694?comments=all> even after it was fixed upstream.

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 470265] Re: jaunty to karmic upgrade failed to update menu.lst (update-grub missing from kernel-img.conf)

By 'this' Martin means 'no hooks in kernel-img.conf'.

-Rob

Revision history for this message
LaMont Jones (lamont) wrote :

In my case, the machine was installed with jaunty (using alternate) onto LVM, preserving an existing /home and such (cross-grade from i386 to amd64).

tarball of /var/log/installer attached. Interestingly, part of the diff between the coldinstall and the existing i386 jaunty is the dropping of the hooks from kernel-img.conf

lamont

Revision history for this message
Steve Langasek (vorlon) wrote :

LaMont's failure is much more straightforward to understand, From /var/log/installer/syslog:

Feb 10 17:24:37 grub-installer: info: Installing grub on '(hd0)'
Feb 10 17:24:38 grub-installer: info: grub-install supports --no-floppy
Feb 10 17:24:38 grub-installer: info: Running chroot /target grub-install --no-floppy "(hd0)"
Feb 10 17:24:38 grub-installer: Probing devices to guess BIOS drives. This may take a long time.
Feb 10 17:24:38 grub-installer: Unknown partition table signature
Feb 10 17:24:38 grub-installer: Unknown partition table signature
Feb 10 17:24:39 grub-installer: Searching for GRUB installation directory ... found: /boot/grub
Feb 10 17:24:40 grub-installer: Unknown partition table signature
Feb 10 17:24:40 grub-installer: Unknown partition table signature
Feb 10 17:24:41 grub-installer: Unknown partition table signature
Feb 10 17:24:41 grub-installer: Unknown partition table signature
Feb 10 17:24:42 grub-installer: Unknown partition table signature
Feb 10 17:24:42 grub-installer: Unknown partition table signature
Feb 10 17:24:43 grub-installer: Unknown partition table signature
Feb 10 17:24:43 grub-installer: Unknown partition table signature
Feb 10 17:24:44 grub-installer: Unknown partition table signature
Feb 10 17:24:44 grub-installer: Unknown partition table signature
Feb 10 17:24:45 grub-installer: The file /boot/grub/stage1 not read correctly.
Feb 10 17:24:45 grub-installer: error: Running 'grub-install --no-floppy "(hd0)"' failed.
Feb 11 05:24:00 main-menu[3051]: WARNING **: Configuring 'grub-installer' failed with error code 1
Feb 11 05:24:00 main-menu[3051]: WARNING **: Menu item 'grub-installer' failed.
Feb 11 05:24:01 main-menu[3051]: INFO: Modifying debconf priority limit from 'high' to 'medium'
[...]
Feb 11 05:24:23 main-menu[3051]: INFO: Menu item 'nobootloader' selected

So yes, evidently grub-installer failed to complete, and you opted to skip bootloader configuration rather than resolve the underlying error. That's always going to cause problems with the bootloader integration.

Ultimately, that particular problem should be fixed by having the bootloader install a hook to /etc/kernel/post{inst,rm}.d/ instead of relying on the installer to modify /etc/kernel-img.conf.

Revision history for this message
YunQiang Su (wzssyqa) wrote :

in lucid on 2009-12-8,after install linux-image-2.6.32-7,it did not run update-grub.
and after reboot when remove 2.6.32-6,it did not run update-grub still.

cat /etc/kernel-img.conf

do_symlinks = yes
relative_links = yes
do_bootloader = no
do_bootfloppy = no
do_initrd = yes
link_in_boot = no

Revision history for this message
Steve Langasek (vorlon) wrote :

wzssyqa,

Could you also attach your /var/log/installer/syslog?

Revision history for this message
John Papineau (j-lp) wrote :

did you try to update to the new ubuntu version? It is a good idea to keep your ubuntu updated to the new version if posible . THis will help your computer and driver for your hardware to run correctly

Goddard (kinggoddard)
Changed in grub (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for grub (Ubuntu) because there has been no activity for 60 days.]

Changed in grub (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.