upgrade kernel destroys ubuntu grub menu.lst entries
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
My gutsy system (i386) has been continuously updated since Tribe 2. I update exclusively with apt-get update, upgrad, dist-upgrade.
The last two kernel upgrades have fudged my grub menu.lst. The kernel and restricted modules and initramfs update successfully, and the grub update lines in the upgrade "look" normal, but under the covers it's wrong for the ubuntu stanzas. Other systems (this is a multi-boot system) are not affected.
Here's an excerpt from the corrected menu.lst
. . .
## ## End Default Options ##
title Ubuntu gutsy (development branch), kernel 2.6.22-12-generic
root (hd1,2)
kernel /boot/vmlinuz-
initrd /boot/initrd.
quiet
title Ubuntu gutsy (development branch), kernel 2.6.22-12-generic (recovery mode)
root (hd1,2)
kernel /boot/vmlinuz-
initrd /boot/initrd.
title Ubuntu gutsy (development branch), kernel 2.6.22-11-generic
root (hd1,2)
kernel /boot/vmlinuz-
initrd /boot/initrd.
quiet
title Ubuntu gutsy (development branch), kernel 2.6.22-11-generic (recovery mode)
root (hd1,2)
kernel /boot/vmlinuz-
initrd /boot/initrd.
. . .
(other ubuntu kernels follow)
. . .
### END DEBIAN AUTOMAGIC KERNELS LIST
After a kernel update, the new kernel stanzas are added, and all the ubuntu kernel entries have
root (hd0,7) and the UUID is no longer that of hdb3. I failed to record the actual incorrect UUID.
ls /dev/disk/by-uuid -al and blkid show nothing for hda8, an empty partition. This partition used to contain an earlier ubuntu system, removed before this problem reared its head.
1. How can I fix this?
2. How can this be cured permanently?
It's a super PITA to need to boot an alternate system and repair the menu.lst manually.
I had a similar experience. It is expected and by design. Anything inside
#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST
### BEGIN AUTOMAGIC KERNELS LIST
### END DEBIAN AUTOMAGIC KERNELS LIST
is liable to being re-written.
You probably need to set the default kopt and groot to match your system so grub uses them when menu.lst is updated. For example, here's the default options I have:
# kopt=root= UUID=f8f56c60- 4507-47ff- beaf-bb87352f31 28 ro
# groot=(hd0,4)