menu.lst is overwritten

Bug #136621 reported by Andrew Frank
6
Affects Status Importance Assigned to Milestone
grub (Ubuntu)
New
Undecided
TJ

Bug Description

updating (especially automatic updates) seem to overwrite menu.lst completely. this is inacceptable if the menu.lst ist edited (for example to allow to different ubuntu on the same hard disk in different partitions).

today (1.9.07) the automatic update for 7.04 (feisty) required a restart. at this time the menu item for 7.04 (which goes to sda5 in my case) was overwritten with the UUID for the sda7, where 7.10 resides). it then tried to start the 7.10 code with the 7.04 related kernel (2.6.20-16, which i think was updated).

the update for the new 7.04 kernel should have only edited the related entry.

--

general suggestion : publish a method how two ubuntu on one disk coexist!

Revision history for this message
TJ (tj) wrote :

As documented, grub-update will re-write everything between:

# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

and

### END DEBIAN AUTOMAGIC KERNELS LIST

Any boot menu entries you want to retain should be placed outside this block, at the end of the file.

Example:

## ## End Default Options ##

title Ubuntu, kernel 2.6.20-16-generic
root (hd0,4)
kernel /vmlinuz-2.6.20-16-generic root=UUID=f8f56c60-4507-47ff-beaf-bb87352f3128 ro vga=791 quiet splash
initrd /initrd.img-2.6.20-16-generic
quiet
savedefault

title Ubuntu, kernel 2.6.20-16-generic (recovery mode)
root (hd0,4)
kernel /vmlinuz-2.6.20-16-generic root=UUID=f8f56c60-4507-47ff-beaf-bb87352f3128 ro single
initrd /initrd.img-2.6.20-16-generic

title Ubuntu, kernel 2.6.20-15-generic-x32
root (hd0,4)
kernel /vmlinuz-2.6.20-15-generic-x32 root=UUID=f8f56c60-4507-47ff-beaf-bb87352f3128 ro vga=791 quiet splash
initrd /initrd.img-2.6.20-15-generic-x32
quiet
savedefault

title Ubuntu, kernel 2.6.20-15-generic-x32 (recovery mode)
root (hd0,4)
kernel /vmlinuz-2.6.20-15-generic-x32 root=UUID=f8f56c60-4507-47ff-beaf-bb87352f3128 ro single
initrd /initrd.img-2.6.20-15-generic-x32

title Ubuntu, memtest86+
root (hd0,4)
kernel /memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

title Ubuntu Gutsy Tribe-5, kernel 2.6.22-10-generic
root (hd0,4)
kernel /vmlinuz-2.6.22-10-generic root=UUID=9bab8491-9029-4c78-a6f4-cd953cd7d9b4 ro quiet splash
initrd /initrd.img-2.6.22-10-generic
quiet
savedefault

title Ubuntu Gutsy Tribe-5, kernel 2.6.22-10-generic (recovery mode)
root (hd0,4)
kernel /vmlinuz-2.6.22-10-generic root=UUID=9bab8491-9029-4c78-a6f4-cd953cd7d9b4 ro single
initrd /initrd.img-2.6.22-10-generic

# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Sony Windows Recovery Tool
root (hd0,0)
savedefault
makeactive
chainloader +1

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda2
title Windows Vista Home Premium
root (hd0,1)
savedefault
makeactive
chainloader +1

Revision history for this message
Andrew Frank (frank-geoinfo) wrote : Re: [Bug 136621] Re: menu.lst is overwritten

thank you!
especially your exampel is very helpful - i will follow your advice!

andrew

On 1 Sep 07 19 00, TJ wrote:
> As documented, grub-update will re-write everything between:
>
> # Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST
>
> ### BEGIN AUTOMAGIC KERNELS LIST
> ## lines between the AUTOMAGIC KERNELS LIST markers will be modified
> ## by the debian update-grub script except for the default options
> below
>
> and
>
> ### END DEBIAN AUTOMAGIC KERNELS LIST
>
> Any boot menu entries you want to retain should be placed outside this
> block, at the end of the file.
>
> Example:
>
> ## ## End Default Options ##
>
> title Ubuntu, kernel 2.6.20-16-generic
> root (hd0,4)
> kernel /vmlinuz-2.6.20-16-generic
> root=UUID=f8f56c60-4507-47ff-beaf-bb87352f3128
> ro vga=791 quiet splash
> initrd /initrd.img-2.6.20-16-generic
> quiet
> savedefault
>
> title Ubuntu, kernel 2.6.20-16-generic (recovery mode)
> root (hd0,4)
> kernel /vmlinuz-2.6.20-16-generic
> root=UUID=f8f56c60-4507-47ff-beaf-bb87352f3128
> ro single
> initrd /initrd.img-2.6.20-16-generic
>
> title Ubuntu, kernel 2.6.20-15-generic-x32
> root (hd0,4)
> kernel /vmlinuz-2.6.20-15-generic-x32
> root=UUID=f8f56c60-4507-47ff-beaf-bb87352f3128 ro vga=791 quiet splash
> initrd /initrd.img-2.6.20-15-generic-x32
> quiet
> savedefault
>
> title Ubuntu, kernel 2.6.20-15-generic-x32 (recovery
> mode)
> root (hd0,4)
> kernel /vmlinuz-2.6.20-15-generic-x32
> root=UUID=f8f56c60-4507-47ff-beaf-bb87352f3128 ro single
> initrd /initrd.img-2.6.20-15-generic-x32
>
> title Ubuntu, memtest86+
> root (hd0,4)
> kernel /memtest86+.bin
> quiet
>
> ### END DEBIAN AUTOMAGIC KERNELS LIST
>
> title Ubuntu Gutsy Tribe-5, kernel 2.6.22-10-generic
> root (hd0,4)
> kernel /vmlinuz-2.6.22-10-generic
> root=UUID=9bab8491-9029-4c78-a6f4-cd953cd7d9b4
> ro quiet splash
> initrd /initrd.img-2.6.22-10-generic
> quiet
> savedefault
>
> title Ubuntu Gutsy Tribe-5, kernel 2.6.22-10-generic
> (recovery mode)
> root (hd0,4)
> kernel /vmlinuz-2.6.22-10-generic
> root=UUID=9bab8491-9029-4c78-a6f4-cd953cd7d9b4
> ro single
> initrd /initrd.img-2.6.22-10-generic
>
> # This is a divider, added to separate the menu items below from the
> Debian
> # ones.
> title Other operating systems:
> root
>
>
> # This entry automatically added by the Debian installer for a
> non-linux OS
> # on /dev/sda1
> title Sony Windows Recovery Tool
> root (hd0,0)
> savedefault
> makeactive
> chainloader +1
>
>
> # This entry automatically added by the Debian installer for a
> non-linux OS
> # on /dev/sda2
> title Windows Vista Home Premium
> root (hd0,1)
> savedefault
> makeactive
> chainloader +1
>
>
> ** Changed in: ubuntu
> Assignee: (unassigned) => TJ
>
> --
> menu.lst is overwritten
> https://bugs.launchpad.net/bugs/136621
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Paul Sharp (paul5082) wrote :

This also happens with 7.10 Gutsy. It only happens after the kernel gets an update. I have 4 hard drives in my system, one has Windows XP on it, one has Ubuntu on it. The other two are data storage. After a kernel update and you reboot, it can't find the partition. It also doesn't see the Windows partition. I always have to edit the line to boot to the proper hard drive, boot into Ubuntu & edit the menu.lst. Prior to 7.04, it would always just add to the list. It doesn't even seem to "read" the current menu.lst & update it, which I think it should.

Revision history for this message
Paul Sharp (paul5082) wrote :

After a kernel update today, it did the same. I am attaching the original menu.lst, and the replacement called menu.new. Totally re-written.

Revision history for this message
Paul Sharp (paul5082) wrote :

Now for the replacement - it is attached here. It shouldn't make such drastic changes - a newbie would have a real difficult time figuring this out.

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

Thank you for taking the time to report this bug and help to improve Ubuntu.

This bug has previously been reported as bug #21412, which has already been resolved for the upcoming 8.04 release. I'm therefore marking this bug as a duplicate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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