update-grub does not update /boot/grub/menu.lst

Bug #187362 reported by Michael Vogt
4
Affects Status Importance Assigned to Milestone
grub (Ubuntu)
Fix Released
High
Steve Langasek

Bug Description

Binary package hint: grub

With grub 0.97-29ubuntu12 I get a strange behavior on a dapper->hardy test upgrade. update-grub is called during the upgrade but the menu.list file is not updated. No error or other indication that something is wrong is given. If update-grub is run on the installed system it says that it finds the relevant kernels, but it does not update the menu.list file. I will attach a typescript of the operation.

Related branches

Revision history for this message
Michael Vogt (mvo) wrote :
description: updated
Revision history for this message
Michael Vogt (mvo) wrote :

It looks like the problem is happening during ucf_update_kernels(). The content in "buffer" is ok, but when
ucf --debconf-ok \
  --debconf-template grub/update_grub_changeprompt_threeway \
  --three-way "$buffer" $ucf_menu_file
is called, the $ucf_menu_file is not updated.

I attach a new typescript with ucf debug output.

Revision history for this message
Michael Vogt (mvo) wrote :

It looks like for some reason it believes that the md5sum of the existing file /v/r/grub/menu.list and the newly constructed file $buffer match and therefore does not take action and uses the file /v/r/grub/menu.list

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

Michael,

Which debconf frontend is this test done with? Was the menu.lst customized before the upgrade?

Revision history for this message
Michael Vogt (mvo) wrote :

The debconf frontend during the upgrade test was set to noninteractive, the menu.lst was not customized on the dapper system. When I logged into the upgraded system, I set the debian frontend to dialog, but got no debconf question during update-grub. I can attach the full upgrade log if that helps.

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

I can confirm this behavior here. On upgrade from dapper to hardy (and gutsy to hardy as well, reported in a follow-up to bug #21412), the menu.lst is detected as being "locally modified" because the ucf code doesn't know to handle changes to the output of lsb-release. Since you ran with DEBIAN_FRONTEND=noninteractive, the ucf prompt was defaulted to keeping the locally-modified file.

I'll work on a fix to compensate for the title differences.

Changed in grub:
assignee: nobody → vorlon
importance: Undecided → High
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub - 0.97-29ubuntu14

---------------
grub (0.97-29ubuntu14) hardy; urgency=low

  * debian/update-grub:
    - on initial ucf registration, handle the case that the old title string
      doesn't match the current one.
    - also handle the differences caused by the UUID conversion on upgrades
      from Ubuntu 6.06 LTS.
    - LP: #187362.

 -- Steve Langasek <email address hidden> Wed, 30 Jan 2008 21:24:20 -0800

Changed in grub:
status: In Progress → Fix Released
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for the quick fix, unfortunately the 0.97-29ubuntu14 does not fix the issue for me. I will attach the output of ucf -v -d when update-grub is run.

Changed in grub:
status: Fix Released → Confirmed
Revision history for this message
Michael Vogt (mvo) wrote :
Revision history for this message
Michael Vogt (mvo) wrote :
Revision history for this message
Michael Vogt (mvo) wrote :
Revision history for this message
Steve Langasek (vorlon) wrote :

ok, ubuntu14 should fix the gutsy->hardy upgrade, but dapper->hardy has an additional issue in that the old version of update-grub wrote out 'savedefault' and 'boot' lines and the current version does not. Will work on this for hardy alpha5.

Changed in grub:
milestone: none → hardy-alpha-5
status: Confirmed → In Progress
Revision history for this message
Nicolò Chieffo (yelo3) wrote :

hello I'm in the same situation (running hardy from alpha 5 cd install). my menu.lst is not updated (and does not have any uncommented entries!)
during the first dist-upgrade there was a debconf question that asked me to overwrite menu.lst with a new one (I chose no because mine was configured by me), but in the end the file was overwritten with this new (I also loss my configuration)
my grub version is 0.97-29ubuntu14

Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 187362] Re: update-grub does not update /boot/grub/menu.lst

Hi Nicolò,

> hello I'm in the same situation (running hardy from alpha 5 cd install).

I guess this should be alpha 4, since alpha 5 is not out yet. :)

> my menu.lst is not updated (and does not have any uncommented entries!)
> during the first dist-upgrade there was a debconf question that asked me to
> overwrite menu.lst with a new one (I chose no because mine was configured
> by me), but in the end the file was overwritten with this new (I also loss
> my configuration)
> my grub version is 0.97-29ubuntu14

This is very strange. That is of course not a complete menu.lst file so
that's quite a serious bug for the config to be overwritten this way, but
I've not seen anything like this in my tests and it's not the same problem
reported by Michael. Is there any chance that you have a copy of your
original menu.lst from before the dist-upgrade? You were dist-upgrading
from dapper when this happened, correct?

Revision history for this message
Nicolò Chieffo (yelo3) wrote : Re: [Bug 187362] Re: update-grub does not update /boot/grub/menu.lst

No, I had a clean install from hardy alpha 4, and I don't have the
original menu.lst anymore. I thought that the problem was the same,
but I was wrong. I will open another bug, sorry!

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

ok - yes, please do open another bug, including information about how you did the alpha 4 install (which CD, any relevant install choices, etc). No one else has reported this problem on new installs of alpha 4.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub - 0.97-29ubuntu17

---------------
grub (0.97-29ubuntu17) hardy; urgency=low

  * debian/update-grub: use db_x_loadtemplatefile instead of
    debconf-loadtemplate, so that we can call update-grub from maintainer
    scripts of packages that do their own debconf prompting (LP: #189005).
  * debian/control: depend on debconf (>= 1.5.19) | cdebconf instead of
    debconf-utils, for the above change.
  * if there are any "boot" lines in the existing menu during initial ucf
    registration, we have a config generated by an old version of
    update-grub; emulate the old behavior during the ucf registration to
    ensure smooth upgrades. LP: #187362.

 -- Steve Langasek <email address hidden> Thu, 21 Feb 2008 09:59:35 -0800

Changed in grub:
status: In Progress → Fix Released
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.