menu.lst corrupted during kernel update (hardy)

Bug #372342 reported by Philippe Chabbert on 2009-05-05
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub (Ubuntu)
Undecided
Unassigned

Bug Description

After the last kernel update (from 2.6.24-23 to 2.6.24-24 on Ubuntu 8.04.2) the menu.lst file was updated with a new menu entry but all the (hd0,1) were replaced by (hd1,1). Everything seems to work fine after fixing menu.lst with a liveCD.

collinp (collinp) on 2009-05-15
affects: ubuntu → grub (Ubuntu)
Philippe Chabbert (p-chabbert) wrote :
Download full text (3.3 KiB)

Same problem this evening with the last kernel update. This time I have more data.

The update data in the Synaptic history:

Commit Log for Thu Oct 22 20:00:33 2009

Les paquets suivant ont été mis à jour :
linux-generic (2.6.24.24.26) to 2.6.24.25.27
linux-headers-generic (2.6.24.24.26) to 2.6.24.25.27
linux-image-generic (2.6.24.24.26) to 2.6.24.25.27
linux-libc-dev (2.6.24-24.61) to 2.6.24-25.63
linux-restricted-modules-common (2.6.24.18-24.1) to 2.6.24.18-25.2
linux-restricted-modules-generic (2.6.24.24.26) to 2.6.24.25.27
nvidia-glx-new (169.12+2.6.24.18-24.1) to 169.12+2.6.24.18-25.2

Les paquets suivants ont été installés :
linux-headers-2.6.24-25 (2.6.24-25.63)
linux-headers-2.6.24-25-generic (2.6.24-25.63)
linux-image-2.6.24-25-generic (2.6.24-25.63)
linux-restricted-modules-2.6.24-25-generic (2.6.24.18-25.2)
linux-ubuntu-modules-2.6.24-25-generic (2.6.24-25.42)

The menu.lst before update:

## ## End Default Options ##

title Ubuntu 8.04.3 LTS, kernel 2.6.24-24-generic
root (hd0,1)
kernel /vmlinuz-2.6.24-24-generic root=UUID=0044adc9-0ba7-4876-9e3a-2a483c5ceee3 ro quiet splash
initrd /initrd.img-2.6.24-24-generic
quiet

title Ubuntu 8.04.3 LTS, kernel 2.6.24-24-generic (recovery mode)
root (hd0,1)
kernel /vmlinuz-2.6.24-24-generic root=UUID=0044adc9-0ba7-4876-9e3a-2a483c5ceee3 ro single
initrd /initrd.img-2.6.24-24-generic

title Ubuntu 8.04.3 LTS, kernel 2.6.24-23-generic
root (hd0,1)
kernel /vmlinuz-2.6.24-23-generic root=UUID=0044adc9-0ba7-4876-9e3a-2a483c5ceee3 ro quiet splash
initrd /initrd.img-2.6.24-23-generic
quiet

title Ubuntu 8.04.3 LTS, kernel 2.6.24-23-generic (recovery mode)
root (hd0,1)
kernel /vmlinuz-2.6.24-23-generic root=UUID=0044adc9-0ba7-4876-9e3a-2a483c5ceee3 ro single
initrd /initrd.img-2.6.24-23-generic

title Ubuntu 8.04.3 LTS, memtest86+
root (hd0,1)
kernel /memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

The menu.lst after the update:

## ## End Default Options ##

title Ubuntu 8.04.3 LTS, kernel 2.6.24-25-generic
root (hd1,1)
kernel /vmlinuz-2.6.24-25-generic root=UUID=0044adc9-0ba7-4876-9e3a-2a483c5ceee3 ro quiet splash
initrd /initrd.img-2.6.24-25-generic
quiet

title Ubuntu 8.04.3 LTS, kernel 2.6.24-25-generic (recovery mode)
root (hd1,1)
kernel /vmlinuz-2.6.24-25-generic root=UUID=0044adc9-0ba7-4876-9e3a-2a483c5ceee3 ro single
initrd /initrd.img-2.6.24-25-generic

title Ubuntu 8.04.3 LTS, kernel 2.6.24-24-generic
root (hd1,1)
kernel /vmlinuz-2.6.24-24-generic root=UUID=0044adc9-0ba7-4876-9e3a-2a483c5ceee3 ro quiet splash
initrd /initrd.img-2.6.24-24-generic
quiet

title Ubuntu 8.04.3 LTS, kernel 2.6.24-24-generic (recovery mode)
root (hd1,1)
kernel /vmlinuz-2.6.24-24-generic root=UUID=0044adc9-0ba7-4876-9e3a-2a483c5ceee3 ro single
initrd /initrd.img-2.6.24-24-generic

title Ubuntu 8.04.3 LTS, kernel 2.6.24-23-generic
root (hd1,1)
kernel /vmlinuz-2.6.24-23-generic root=UUID=0044adc9-0ba7-4876-9e3a-2a483c5ceee3 ro quiet splash
initrd /initrd.img-2.6.24-23-generic
quiet

title Ubuntu 8.04.3 LTS, kernel 2.6.24-23-generic (recovery mode)
root (hd1,1)
kernel /vmlinuz-2.6.24-23-generic root=UUID=0044adc9-0ba7-4876-9e3a-2a483c5ceee3 ro single
initrd /i...

Read more...

Steve Langasek (vorlon) wrote :

If you have the hardy version of grub installed, you should have seen a prompt on upgrade, asking you how to resolve the conflict between your manually-modified kernel boot entries and the ones that update-grub is trying to generate. Did you answer that you wanted to "install the package maintainer's version"? If so, this is the expected consequence.

The "right" way to fix your problem, for a hardy system, is to fix the line:

# groot=(hd1,1)

that appears /above/ this in the file, then rerun update-grub.

For karmic and beyond, this is addressed by using grub2 as the bootloader, which has an improved configuration syntax that doesn't require such rewrites of config entries.

Please confirm that the above takes care of your problem.

Changed in grub (Ubuntu):
status: New → Incomplete
Philippe Chabbert (p-chabbert) wrote :

Yes I answered "Install the package's version".

I changed # groot=(hd1,1) into # groot=(hd0,1) in the menu.lst, rerun update-grub and it solve the problem.

Thank you for your help.

Steve Langasek (vorlon) wrote :

Ok, closing the bug report then. Thanks!

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

Other bug subscribers