Grub upgrade erases Windows boot option

Bug #2646 reported by Jan-Eric Lindh
12
Affects Status Importance Assigned to Milestone
grub
Invalid
Undecided
Unassigned
grub (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

When I made one of my daily (27 sep) upgrades in Breezy (Colony 5 - dualboot with XP) something went wrong.
Next time I started the computer Windows XP was not in the Grub menu.
The upgrade process had replaced the original menu.lst with a new one and Windows whas wiped out and the original file was not backuped.

Revision history for this message
Dennis Kaarsemaker (dennis) wrote :

The menu.lst is regenerated every time the kernel is updated. Did you perhaps move the windows XP entry to between the Ubuntu entries?

Changed in grub:
status: New → Rejected
Revision history for this message
Jan-Eric Lindh (jelh) wrote : Re: [Bug 2646] Grub upgrade erases Windows boot option

Dennis Kaarsemaker skrev:
> Public bug report changed:
> https://launchpad.net/malone/bugs/2646
>
> Comment:
> The menu.lst is regenerated every time the kernel is updated. Did you
> perhaps move the windows XP entry to between the Ubuntu entries?

No but I put XP before Ubuntu boot option (so XP starts automatically)
like this:

# on /dev/hda1
title Microsoft Windows XP Home Edition
root (hd0,1)
savedefault
makeactive
chainloader +1

title Ubuntu, kernel 2.6.12-9-386
root (hd0,4)
kernel /boot/vmlinuz-2.6.12-9-386 root=/dev/hda5 ro quiet splash
initrd /boot/initrd.img-2.6.12-9-386
savedefault

Revision history for this message
Dennis Kaarsemaker (dennis) wrote :

Yeah, that messes it up. Read that file thoroughly and you'll see why. You should not manually put entries between ##BEGIN DEBAIN AUTOMAGIC KERNEL LIST and ##END DEBIAN AUTOMAGIC KERNEL LIST. Closing this bug -- notabug

Changed in grub:
status: New → Rejected
Revision history for this message
Mark Shuttleworth (sabdfl) wrote : Documentation of Grub menu.lst file

Perhaps this not-bugreport is a good catalyst for us to consider a
better way of dealing with that file. I think we should add an "include"
capability, and include the auto-generated file, rather than embedding
the auto-generated contents inside the text file. This is likely to
result in a LOT less end-user grief (I think I got bitten by this myself
a few years back).

Jeff, I'm cc'ing you on this mail, could you see if that's a job you're
suited to and if not let me know who the best assignee for it would be?

Mark

Revision history for this message
Matt Zimmerman (mdz) wrote :

On Thu, Oct 06, 2005 at 08:09:13PM +0100, Mark Shuttleworth wrote:
>
> Perhaps this not-bugreport is a good catalyst for us to consider a
> better way of dealing with that file. I think we should add an "include"
> capability, and include the auto-generated file, rather than embedding
> the auto-generated contents inside the text file. This is likely to
> result in a LOT less end-user grief (I think I got bitten by this myself
> a few years back).
>
> Jeff, I'm cc'ing you on this mail, could you see if that's a job you're
> suited to and if not let me know who the best assignee for it would be?

Being tracked as http://bugzilla.ubuntu.com/show_bug.cgi?id=15188 already.

--
 - mdz

Revision history for this message
Jeff Bailey (jbailey) wrote :

Le jeudi 06 octobre 2005 à 20:09 +0100, Mark Shuttleworth a écrit :

> Perhaps this not-bugreport is a good catalyst for us to consider a
> better way of dealing with that file. I think we should add an "include"
> capability, and include the auto-generated file, rather than embedding
> the auto-generated contents inside the text file. This is likely to
> result in a LOT less end-user grief (I think I got bitten by this myself
> a few years back).
>
> Jeff, I'm cc'ing you on this mail, could you see if that's a job you're
> suited to and if not let me know who the best assignee for it would be?

Looks doable. That code isn't in its own function, but it shouldn't be
that difficult to put it there.

The other option is to look at phasing in grub2. The upstream authors
have now starting advocate that people start switching to it now.

I'll take assign the bug to me.

Tks,
Jeff Bailey

Changed in grub:
assignee: nobody → jbailey
status: Rejected → Accepted
Revision history for this message
Thierry Moisan (thierryn) wrote :

I have a similar problem with grub : if I want to delete an old kernel to make place to a new one, I delete the package of the kernel. But the grub menu list doesn't update for the deleted kernel. So now I have so many old kernel that I can't get the new one, and I have to edit manually a line of the list each time I boot, to reach the new ubuntu kernel.

Revision history for this message
Jean-Luc Thirion (jlinho) wrote :

It would be nice if the existing grub menu.list file would be completed with the addition of new kernel entries instead of listing every image found in /boot.
It's not very good to have a list of 15 kernels in the grub menu.

If I have customized my menu.list with my own labels for instance, I have to do edit the menu.lst manually... :(

Revision history for this message
human (human) wrote :

I also installed edgy this morning in my desktop pc. I let the livecd installer do all the work with grub. I got 3 hard disks at this pc, and i installed ubuntu at /dev/hdc1 (Got Windows/NTFS at hda1 and a storage drive/FAT32 at hcd2).

When i restart the system, hiddenmenu was activated, Windows was not detected and Ubuntu didn't start boot. I think there's something weird with the script that writes menu.lst that screw up the count to set grub devices, because i did correct all settings manually and add Windows to the menu.lst file.

So i did boot with livecd and i did mount the ubuntu partition, edit menu.lst and notified that the script configured ubuntu to start from (hd1,0) instead of (hd2,0). I correct it and add the windows entry, remove menu.lst and everything works now.

I Think the problem is there.

Revision history for this message
SpinCycle (djspincycle) wrote :

I am running Edgy 5.10. Let the automatic updates run today and it overwrote my Windows boot option -- it had never done that before, and I do NOT have it within the Debian section, I have it at the end. Thus, I think that the script has be re-written with yet another bug.

Jim

Revision history for this message
human (human) wrote :

I've seen that bug also in 5.10. Got two workstations at work that are running 5.10 and the last kernel update i did fail also on that and deletes my windows entry.

Revision history for this message
Loe Spee (lgespee) wrote :

I have had the same problem as "human" described above:
> So i did boot with livecd and i did mount the ubuntu partition, edit menu.lst and notified that the > script configured ubuntu to start from (hd1,0) instead of (hd2,0). I correct it and add the
> windows entry, remove menu.lst and everything works now.

It happens on a PC of people I know, they have a dual boot system with Windows XP and Ubuntu Edgy Eft. Whenever they get a kernel update the menu.lst is changed and the root entry for every kernel is changed from
root (hd0,3)
into
root (hd0,2)

Tollef Fog Heen (tfheen)
Changed in grub:
assignee: tfheen → nobody
Revision history for this message
PresuntoRJ (fabio-tleitao) wrote :

I know it sounds an old problem, but I might need to use my windows partition (dual boot) every now and then but GRUB keeps missing the setup on every kernel image upgrade.

Since it always works if I set it back manually, that was not a big deal to me, but it is pretty stupid since it is able to detect and use the Windows partition (or secondary disc) on the installation process, why will it keep failing on a day-to-day upgrade?

Revision history for this message
EarlJ1242 (i82bz24ku) wrote :

I have had Ubuntu and windows dual boot for a while , I booted into ubuntu the other day and did the updates and booted out. I could not boot into windows it wasn't there anymore. So I wiped my harddrive and reinstalled windows and then ubuntu.Everything worked good till I updated ubuntu again for the second time .Same thing happend again .So this time I just have windows installed.Ubuntu sucks, besides I tried installing movie players and none of them even play movies.you have to download drivers for them and for a beginner you can't find the F*****g things.I hope all the ubuntu programers go bankrupt for F*****g up my commputer .If there program is not stable they should not offer it!!

Revision history for this message
Guillermo Jaramillo (g-a-jaramillo-g) wrote :

you are wrong Grub create a backup file menu,lst~

Steve Langasek (vorlon)
Changed in grub:
status: New → Invalid
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.