[Bug 1009294] Re: Grub update breaks automated dist-upgrade scripts on AMI images

Scott Moser smoser at ubuntu.com
Thu Jun 7 18:16:10 UTC 2012


My testing implies that the fix I've committed to the build scripts [1] will resolve this issue.
Heres what I did to test:
 * ran 3 instances of ami-a29943cb (us-east-1 ebs/ubuntu-precise-12.04-amd64-server-20120424)
    a.) control instance [verified config-changed prompt]
          apt-get update && apt-get install grub-pc
    b.) no user-data instance
          DEBIAN_FRONTEND=noninteractive dpkg-reconfigure grub-pc
          apt-get update && apt-get install grub-pc
          # verified no grub prompt
     c.) user-data that disabled running of grub-dpkg module in cloud-init
          DEBIAN_FRONTEND=noninteractive dpkg-reconfigure grub-pc
          sudo cloud-init-cfg grub_dpkg
          apt-get update && apt-get install grub-pc
          # verified no grub prompt

'c' was necessary above, because cloud-init modifies debconf preseed
values in grub on first boot.  I was concerned that having run 'dpkg-
reconfigure grub-pc' in the build process, then booting and having
cloud-init modify some portion of grub-pc debconf, then upgrading could
cause a similar issue.  It did not.

After we get images built with this change in them, we can verify that the issue is fixed by:
 * launching an instance of quantal or precise with serial > 20120607
 * adding a repository with a grub update (possibly a ppa with just a grub rebuild)
 * apt-get update
 * apt-get install grub-pc

--
[1] http://bazaar.launchpad.net/~ubuntu-on-ec2/vmbuilder/automated-ec2-builds/revision/485

** Changed in: grub2 (Ubuntu Precise)
       Status: In Progress => Fix Committed

** Package changed: grub2 (Ubuntu) => ubuntu

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2 in Ubuntu.
https://bugs.launchpad.net/bugs/1009294

Title:
  Grub update breaks automated dist-upgrade scripts on AMI images

Status in Ubuntu:
  Triaged
Status in The Precise Pangolin:
  Fix Committed

Bug description:
  The update committed here:
  https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/978464  appears
  to have exposed a bug in either grub or apt that is breaking scripts
  based on the Amazon images from cloud.ubuntu.com.

  See http://askubuntu.com/questions/146921/how-do-i-apt-get-y-dist-
  upgrade-without-a-grub-config-prompt

  
  Specifically, dpkg is giving the upgraded config file prompt upon configuring grub-pc ("A new version of configuration file /etc/default/grub is available, but the version installed currently has been locally modified.")

  However, the following does not work:
  sudo apt-get update
  sudo apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade

  Furthermore, dpkg -S /etc/default/grub  doesn't appear to show this
  file as being owned by any package prior to upgrade.  I'm not sure how
  this file is generated (or how dpkg determines who owns it), but it's
  currently breaking scripts and I can't figure out a way to work around
  it short of deleting the file prior to the upgrade (which probably
  isn't safe).

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+bug/1009294/+subscriptions




More information about the foundations-bugs mailing list