user prompted to update unmodified grub configuration during Ubuntu server upgrade

Bug #759545 reported by Jean-Baptiste Lallement
32
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Release Notes for Ubuntu
Fix Released
Undecided
Colin Watson
grub2 (Ubuntu)
Won't Fix
High
Adam Conrad
Natty
Won't Fix
Medium
Unassigned
Oneiric
Won't Fix
Medium
Adam Conrad
Precise
Won't Fix
Medium
Adam Conrad

Bug Description

Binary package hint: grub2

During a server upgrade with 'do-release-upgrade -d' from maverick to natty the user is prompted by debconf to update grub-pc the configuration file /etc/default/grub. But it was a fresh installation of maverick and the original configuration has not been changed before the upgrade.

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: grub-pc 1.99~rc1-12ubuntu1
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic-pae 2.6.38.2
Uname: Linux 2.6.38-8-generic-pae i686
Architecture: i386
Date: Wed Apr 13 09:59:10 2011
InstallationMedia: Ubuntu-Server 10.10 "Maverick Meerkat" - Release i386 (20101007)
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: grub2
UpgradeStatus: Upgraded to natty on 2011-04-13 (0 days ago)

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :
tags: added: iso-testing
Dave Walker (davewalker)
tags: added: server-nro
Revision history for this message
Scott Moser (smoser) wrote :

I can confirm this.
During 'do-release-upgrade -d' I saw two prompts:
 * one from 'libc6.postinst' mentioning restarting of sshd/telnetd
 * one for grub /etc/grub/default
heres the diff I was provided with for /etc/grub/default from the existing to new:

Changed in grub2 (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
Changed in grub2 (Ubuntu Natty):
assignee: nobody → Canonical Foundations Team (canonical-foundations)
Changed in grub2 (Ubuntu Natty):
assignee: Canonical Foundations Team (canonical-foundations) → Stéphane Graber (stgraber)
Revision history for this message
Stéphane Graber (stgraber) wrote :

The attached debdiff should do the trick by adding maverick's default /etc/default/grub md5sum to ucf's known good md5.

I'll be able to test that as soon as maverick is installable/upgradable again :)

Revision history for this message
Colin Watson (cjwatson) wrote :

This looks like the right approach (I'm pretty sure I've been careless in failing to update that file), but we should add a few more entries:

$ bzr log --line debian/default/grub
2122: Colin Watson 2011-02-21 [merge] merge from Debian 1.99~rc1-3
2002: Colin Watson 2010-07-05 [merge] merge from Debian 1.98+20100705-1
1949: Colin Watson 2010-03-09 [merge] merge from Debian 1.98-1
1895: Colin Watson 2009-12-14 {1.97+20091130-1ubuntu1} import remainder of 1.97+20091130-1ubuntu1
1856: Robert Millan 2009-11-21 [merge] New upstream snapshot.
$ for x in 1856 1895 1949 2002 2122; do bzr cat -r$x debian/default/grub | md5sum; done
18c81703dc5052c6fa7587362d63193a -
57ba8b2c0ca710c44cf2e331ffea0f1a -
c1c8949bf31cdb3cf6e2221d9e9e758c -
35b0353f36cd7eea9ef5374b779e1435 -
038c1c68801ef42ad81fa4d00f67fbc1 -

Revision history for this message
Colin Watson (cjwatson) wrote :

The other problem is that /etc/default/grub is handled in a thoroughly gross way, with mangling happening *before* ucf is run. I'll have to do some experimentation to see what appropriate defaults actually are.

tags: added: patch
Revision history for this message
Colin Watson (cjwatson) wrote :

Never mind my comments; postinst fiddling means that these results are questionable, and we need to do test installs to determine anything. I've reverted my changes and applied Stéphane's patch instead.

Changed in grub2 (Ubuntu Natty):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub2 - 1.99~rc1-13ubuntu2

---------------
grub2 (1.99~rc1-13ubuntu2) natty; urgency=low

  [ Stéphane Graber ]
  * Update default/grub.md5sum to include maverick's default md5sum to avoid
    prompt during update (LP: #759545).

  [ Colin Watson ]
  * Cherry-pick from upstream:
    - Support huge btrfs chunks.
    - Fix stack pointer handling in 16-bit relocator (LP: #683904).
 -- Colin Watson <email address hidden> Thu, 21 Apr 2011 00:11:40 +0100

Changed in grub2 (Ubuntu Natty):
status: Fix Committed → Fix Released
Revision history for this message
Stéphane Graber (stgraber) wrote :

Re-opening as the fix doesn't work.
The md5sum is correct but the .md5sum file is completely ignored as a "lastsum" exists in the state-dir.

I'm not sure what's the right way to fix that as I can't find any flag to ucf to tell it to ignore whatever is stored in the cache.
Except setting --state-dir to /tmp which seems like a bad idea.

Changed in grub2 (Ubuntu Natty):
status: Fix Released → Triaged
Revision history for this message
Stéphane Graber (stgraber) wrote :

root@stgraber-vm:~# ucf --three-way --debconf-ok --sum-file /usr/share/grub/default/grub.md5sum /usr/share/grub/default/grub /etc/default/grub --debug
The new start file is `/usr/share/grub/default/grub\'
The destination is `/etc/default/grub\' (`\/etc\/default\/grub\')
The history is kept under \'/usr/share/grub/default\'
The file may be cached at \'/var/lib/ucf/cache/:etc:default:grub\'
The destination file exists, and has md5sum:
965e5137eff659cded3adb640357c33d /etc/default/grub
The old md5sum exists, and is:
722366d5b1162a5e289f2114a2e41961
The new file exists, and has md5sum:
038c1c68801ef42ad81fa4d00f67fbc1 /usr/share/grub/default/grub
The historical md5sum file /usr/share/grub/default/grub.md5sum exists

root@stgraber-vm:~# md5sum /etc/default/grub
965e5137eff659cded3adb640357c33d /etc/default/grub

root@stgraber-vm:~# md5sum /usr/share/grub/default/grub
038c1c68801ef42ad81fa4d00f67fbc1 /usr/share/grub/default/grub

root@stgraber-vm:~# grep 965e5137eff659cded3adb640357c33d /usr/share/grub/default/grub.md5sum
965e5137eff659cded3adb640357c33d maverick_1.98+20100705-1ubuntu1

root@stgraber-vm:~# grep grub /var/lib/ucf/hashfile
038c1c68801ef42ad81fa4d00f67fbc1 /etc/default/grub (I wouldn't trust this one, as I did a lot of tests, might be different from the initial value)

Revision history for this message
Stéphane Graber (stgraber) wrote :

Ok, the correct value in hashfile at the time of the upgrade is: ee9df6805efb2a7d1ba3f8016754a119

This value doesn't match any /etc/default/grub or /usr/share/grub/default/grub file either on maverick or on natty.

Changed in grub2 (Ubuntu Natty):
status: Triaged → Won't Fix
assignee: Stéphane Graber (stgraber) → nobody
Changed in grub2 (Ubuntu):
assignee: Stéphane Graber (stgraber) → nobody
Changed in grub2 (Ubuntu Oneiric):
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Canonical Foundations Team (canonical-foundations)
milestone: none → oneiric-alpha-1
Revision history for this message
Colin Watson (cjwatson) wrote :

Release-noted:

 * In some cases (particularly if different kernel parameters from the default are in use), upgrades from Ubuntu 10.10 may prompt to resolve conflicts in the `/etc/default/grub` configuration file even when it has not been manually changed. Performing a three-way merge should normally be sufficient if presented with this prompt, although you should check afterwards to ensure that `/etc/default/grub` still looks correct. (Bug:759545)

Changed in ubuntu-release-notes:
assignee: nobody → Colin Watson (cjwatson)
status: New → Fix Released
Colin Watson (cjwatson)
Changed in grub2 (Ubuntu Oneiric):
assignee: Canonical Foundations Team (canonical-foundations) → Colin Watson (cjwatson)
milestone: oneiric-alpha-1 → oneiric-alpha-2
Martin Pitt (pitti)
Changed in grub2 (Ubuntu):
milestone: oneiric-alpha-2 → oneiric-alpha-3
Dave Walker (davewalker)
tags: added: server-o-ro
removed: server-nro
Revision history for this message
Lynne Stevens (jackie40d) wrote :

Seems that no matter what program is installed I get a error message saying NOT INSTALLED but the program is there and works or so far they do . . I am considering re doing the computer with a CD . . Just rip it out and re do it completely . . get the same with the Updates using the update manager

Changed in grub2 (Ubuntu Oneiric):
milestone: oneiric-alpha-3 → ubuntu-11.10-beta-1
Revision history for this message
Khairul Aizat Kamarudzzaman (fenris) wrote :

im still having this issue while updating maverick to natty on amazon ec2 :

ubuntu@ip-10-134-146-53:/var/www$ sudo update-grub
Generating grub.cfg ...
/usr/sbin/grub-probe: warn: disk does not exist, so falling back to partition device /dev/sda1.
/usr/sbin/grub-probe: warn: disk does not exist, so falling back to partition device /dev/sda1.
/usr/sbin/grub-probe: warn: disk does not exist, so falling back to partition device /dev/sda1.
/usr/sbin/grub-probe: warn: disk does not exist, so falling back to partition device /dev/sda1.
/usr/sbin/grub-probe: warn: disk does not exist, so falling back to partition device /dev/sda1.
/usr/sbin/grub-probe: warn: disk does not exist, so falling back to partition device /dev/sda1.
/usr/sbin/grub-probe: warn: disk does not exist, so falling back to partition device /dev/sda1.
/usr/sbin/grub-probe: warn: disk does not exist, so falling back to partition device /dev/sda1.
/usr/sbin/grub-probe: warn: disk does not exist, so falling back to partition device /dev/sda1.
Found linux image: /boot/vmlinuz-2.6.38-11-virtual
Found initrd image: /boot/initrd.img-2.6.38-11-virtual
/usr/sbin/grub-probe: warn: disk does not exist, so falling back to partition device /dev/sda1.
/usr/sbin/grub-probe: warn: disk does not exist, so falling back to partition device /dev/sda1.
/usr/sbin/grub-probe: warn: disk does not exist, so falling back to partition device /dev/sda1.
/usr/sbin/grub-probe: warn: disk does not exist, so falling back to partition device /dev/sda1.
Found linux image: /boot/vmlinuz-2.6.35-24-virtual
Found initrd image: /boot/initrd.img-2.6.35-24-virtual
/usr/sbin/grub-probe: warn: disk does not exist, so falling back to partition device /dev/sda1.
/usr/sbin/grub-probe: warn: disk does not exist, so falling back to partition device /dev/sda1.
/usr/sbin/grub-probe: warn: disk does not exist, so falling back to partition device /dev/sda1.
/usr/sbin/grub-probe: warn: disk does not exist, so falling back to partition device /dev/sda1.
/usr/sbin/grub-probe: warn: disk does not exist, so falling back to partition device /dev/sda1.
Found memtest86+ image: /boot/memtest86+.bin
done

Revision history for this message
Khairul Aizat Kamarudzzaman (fenris) wrote :

its just a warning right ? its still updated to the latest kernel install right?

Revision history for this message
Scott Moser (smoser) wrote :

you can ignore those warnings. a reboot should put you into the natty -virtual kernel.

Martin Pitt (pitti)
Changed in grub2 (Ubuntu):
milestone: ubuntu-11.10-beta-1 → ubuntu-11.10-beta-2
Dave Walker (davewalker)
Changed in grub2 (Ubuntu):
milestone: ubuntu-11.10-beta-2 → ubuntu-11.10
Revision history for this message
Adam Conrad (adconrad) wrote :

If people poke me violently about this post-release, I'll hunt it down and make sure it doesn't affect the LTS (and see about backporting for SRUs, if appropriate).

Revision history for this message
Colin Watson (cjwatson) wrote :

Thrown your way - thanks!

Changed in grub2 (Ubuntu Oneiric):
milestone: ubuntu-11.10 → oneiric-updates
Changed in grub2 (Ubuntu Precise):
milestone: none → precise-alpha-1
assignee: nobody → Adam Conrad (adconrad)
Changed in grub2 (Ubuntu Oneiric):
assignee: Colin Watson (cjwatson) → Adam Conrad (adconrad)
Changed in grub2 (Ubuntu Precise):
status: New → Triaged
importance: Undecided → Medium
Colin Watson (cjwatson)
Changed in grub2 (Ubuntu Precise):
milestone: precise-alpha-1 → precise-alpha-2
Colin Watson (cjwatson)
Changed in grub2 (Ubuntu Precise):
milestone: precise-alpha-2 → ubuntu-12.04-beta-1
Revision history for this message
Ben Howard (darkmuggle-deactivatedaccount) wrote :

Regarding comment #13 -- The error messages are cosmetic. It is caused by the "virtual" partitions in EC2, where a raw disk is presented as a /dev/{s,xv}da1 when /etc/kernel/*/zz-update-grub is executed. The kernel update script that handles the kernel updates on EC2 is /etc/kernel/*/x-grub-legacy-ec2. On both instance-store and EBS instances, there is no need for to run zz-update-grub, since the paravirtual grub (pvgrub) is being run outside the instance. However for HVM instances, we are using Grub2 to boot the images.

Essentially, the scripts should be mutually exclusive. In order to fix this problem, there needs to be a mechanism for deciding which one should run -- for example if it is running on bare metal or HVM, then it would run the zz-update-grub, but if it was running on EC2-like hardware, it would run x-grub-legacy-ec2.

Martin Pitt (pitti)
Changed in grub2 (Ubuntu):
milestone: ubuntu-12.04-beta-1 → ubuntu-12.04-beta-2
Martin Pitt (pitti)
Changed in grub2 (Ubuntu Precise):
milestone: ubuntu-12.04-beta-2 → ubuntu-12.04
Revision history for this message
Dave Walker (davewalker) wrote :

Adam, any progress on this?

Steve Langasek (vorlon)
Changed in grub2 (Ubuntu):
importance: Medium → High
milestone: ubuntu-12.04 → quantal-alpha-3
Revision history for this message
Steve Langasek (vorlon) wrote :

Bug #1009294 revealed that there has been some confusion around this bug. The original issue reported was prompting for unmodified /etc/default/grub; however, the issue the server team is concerned about is actually a case where /etc/default/grub *has* been modified, because it's modified as part of the cloud image generation scripts at creation time. So it's not a user modification, but from the perspective of the grub package the file has still been modified.

I think this is best tracked as a separate issue. In which case, I'm not sure if the original issue in this report is still a problem, or if it should be closed as resolved.

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

This bug has had no activity since 2012; since there have been no duplicate bugs reported since then, I presume this either was fixed (as the comments two years ago suggest), or it was a one-time event on upgrade to pre-12.04 releases and is no longer worth fixing. Closing the report accordingly.

Changed in grub2 (Ubuntu Oneiric):
status: Triaged → Won't Fix
Changed in grub2 (Ubuntu Precise):
milestone: ubuntu-12.04 → none
status: Triaged → Won't Fix
Changed in grub2 (Ubuntu):
status: Triaged → Won't Fix
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.