user prompted twice on ec2 grub-pc upgrade from 1.98-1ubuntu7 to 1.98-1ubuntu8

Bug #683379 reported by Scott Moser
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
cloud-init (Ubuntu)
Fix Released
Low
Unassigned
Lucid
Fix Released
High
Unassigned
Natty
Fix Released
Low
Unassigned
grub2 (Ubuntu)
Won't Fix
High
Unassigned
Lucid
Won't Fix
Undecided
Unassigned
Natty
Won't Fix
High
Unassigned

Bug Description

Binary package hint: grub2

During an 'apt-get update && apt-get install grub-pc' on a currently released ami (ami-4a0df923) I'm prompted twice by debconf for grub-pc. ami-4a0df923 is us-east-1 ebs/ubuntu-lucid-10.04-amd64-server-20101020.

The two prompts are for:
 * Linux command line
 * Continue without installing grub

a diff of 'debconf-get-selections' from before and after shows only:
-grub-pc grub-pc/install_devices_empty boolean false
+grub-pc grub-pc/install_devices_empty boolean true

The first prompt can be avoided by:
$ printf "%s\t%s\t%s\t%s\n" grub-pc grub2/linux_cmdline string "x" |
   sudo debconf-set-selections

The second prompt can be avoided by:
$ printf "%s\t%s\t%s\t%s\n" grub-pc grub-pc/install_devices_empty boolean true |
   sudo debconf-set-selections

Also, subsequent revert to 1ubuntu7 and then forward to 1ubuntu8 do not see any prompts.

I'm not sure whether or not this prompt is new with 1ubuntu8, and looking at the changelog alone, I would suspect that either
a.) it has been present in all updates of grub-pc on lucid ec2
b.) it was new in 1.98-1ubuntu7

Overall, there is no reason for the ec2 user to see this prompt, and I've attempted to seed properly so that the prompts would be avoided. How can I ensure that the user isn't prompted?

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: grub-pc 1.98-1ubuntu8
ProcVersionSignature: User Name 2.6.32-309.18-ec2 2.6.32.21+drm33.7
Uname: Linux 2.6.32-309-ec2 x86_64
Architecture: amd64
Date: Tue Nov 30 19:51:05 2010
Ec2AMI: ami-0e1bec67
Ec2AMIManifest: (unknown)
Ec2AvailabilityZone: us-east-1c
Ec2InstanceType: t1.micro
Ec2Kernel: aki-ba1aeed3
Ec2Ramdisk: unavailable
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: grub2

Originally raised: http://groups.google.com/group/ec2ubuntu/browse_thread/thread/de2b26e0b9a5951e#

Revision history for this message
Scott Moser (smoser) wrote :
Scott Moser (smoser)
summary: - user prompted twice on grub-pc upgrade from 1.98-1ubuntu7 to
+ user prompted twice on ec2 grub-pc upgrade from 1.98-1ubuntu7 to
1.98-1ubuntu8
Scott Moser (smoser)
description: updated
Revision history for this message
Scott Moser (smoser) wrote :

I have just verified that this bug has been present in all 10.04 images. Ie, a grub-pc upgrade of on any of our released images would force the 2 prompts.

This can be worked around with:
$ printf "%s\t%s\t%s\t%s\n%s\t%s\t%s\t%s\n" \
  grub-pc grub-pc/install_devices_empty boolean true \
  grub-pc grub2/linux_cmdline string "x" |
  sudo debconf-set-selections
$ sudo apt-get upgrade

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

In the original opening of the bug, I said:

| For the first, though, a value has already been pre-seeded, just to an empty value.
| During the image build process, we seed
| grub-pc grub2/linux_cmdline string " "

That is incorrect. Currently, we only do that on maverick or later builds.

description: updated
Revision history for this message
Scott Moser (smoser) wrote :
Revision history for this message
Scott Moser (smoser) wrote :
Revision history for this message
Scott Moser (smoser) wrote :
Revision history for this message
Scott Moser (smoser) wrote :
Revision history for this message
Scott Moser (smoser) wrote :
Revision history for this message
Scott Moser (smoser) wrote :
Revision history for this message
Colin Watson (cjwatson) wrote :

Where can I find the image building code?

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

image building code at http://bazaar.launchpad.net/~ubuntu-on-ec2/vmbuilder/automated-ec2-builds/files
of interest to you is probably /vmbuilder-uec-ec2-fixes .

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

Collin, other interaction with grub and pre-seeding in the images (maverick+ only) is done with cloud-init on first boot, at http://bazaar.launchpad.net/%7Ecloud-init-dev/cloud-init/trunk/annotate/head%3A/cloudinit/CloudConfig/cc_grub_dpkg.py

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

As i learn more about debconf, I see that the following debconf pre-seed info has the same effect of not prompting user:
  grub-pc grub-pc/install_devices_empty boolean true
  grub-pc grub2/linux_cmdline seen true

(mostly, just writing that down for my own reference)

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

I'm virtually certain this is fixed in both natty and maverick. It affects only 10.04

Changed in grub2 (Ubuntu Natty):
importance: Undecided → Low
status: New → Fix Released
Revision history for this message
Colin Watson (cjwatson) wrote :

grub2/linux_cmdline has been there forever, since well before I was maintaining grub2. I'm not sure whether the grub2 package will be able to sensibly do anything about this - your initial preseeding for these images was wrong if it didn't preseed those.

grub-pc/install_devices_empty has been there for a while, although that code was changed around quite a bit in 1.98-1ubuntu7. Your current preseeding looks fine, but as you say it wasn't there in lucid. I don't know how to correct this without a time machine.

Changed in grub2 (Ubuntu Natty):
status: Fix Released → Confirmed
importance: Low → High
Revision history for this message
Colin Watson (cjwatson) wrote :

Incidentally, there's no point ever preseeding grub-pc/install_devices_empty to false - it will be ignored, and if there weren't special-case code to ignore it it would cause an infinite loop instead. If idevs_empty is False, you should just not preseed grub-pc/install_devices_empty at all.

Revision history for this message
Scott Moser (smoser) wrote : Re: [Bug 683379] Re: user prompted twice on ec2 grub-pc upgrade from 1.98-1ubuntu7 to 1.98-1ubuntu8

On Wed, 1 Dec 2010, Colin Watson wrote:

> grub2/linux_cmdline has been there forever, since well before I was
> maintaining grub2. I'm not sure whether the grub2 package will be able
> to sensibly do anything about this - your initial preseeding for these
> images was wrong if it didn't preseed those.
>
> grub-pc/install_devices_empty has been there for a while, although that
> code was changed around quite a bit in 1.98-1ubuntu7. Your current
> preseeding looks fine, but as you say it wasn't there in lucid. I don't
> know how to correct this without a time machine.

Colin, thanks for your attention.
I'll fix this by seeding in new 10.04 images, which are due for a refresh
anyway.

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

Colin,
  The reason I marked 'fixed' in natty is that its not an issue for the UEC images in natty, because they seed
grub-pc grub2/linux_cmdline string " "
  and on first boot, cloud-config seeds:
grub-pc/install_devices
and
grub-pc/install_devices_empty

You're welcome to leave it open as a general issue though.

Scott Moser (smoser)
Changed in cloud-init (Ubuntu Natty):
importance: Undecided → Low
status: New → Fix Released
Changed in cloud-init (Ubuntu Lucid):
importance: Undecided → High
status: New → In Progress
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted cloud-init into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in cloud-init (Ubuntu Lucid):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Scott Moser (smoser) wrote :

see bug 683890 comment 13 for verification information.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Scott Moser (smoser) wrote :

Above should have said bug 683890 comment '3'.

$ dpkg-query --show cloud-init
cloud-init 0.5.10-0ubuntu1.5
$ sudo apt-get update && sudo apt-get install --reinstall grub-pc
...

no prompts (ami-3413e55d = ebs/ubuntu-lucid-daily-i386-server-20101210.1)

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

This bug was fixed in the package cloud-init - 0.5.10-0ubuntu1.5

---------------
cloud-init (0.5.10-0ubuntu1.5) lucid-proposed; urgency=low

  * make grub-config code run on instance first boot so user is not
    prompted on grub upgrade (LP: #683890, LP: #683379)

cloud-init (0.5.10-0ubuntu1.4) lucid-proposed; urgency=low

  * add grub-legacy-ec2 to support utilizing pv-grub
   rebooting into new kernels (LP: #671103)
 -- Scott Moser <email address hidden> Thu, 02 Dec 2010 09:42:17 -0500

Changed in cloud-init (Ubuntu Lucid):
status: Fix Committed → Fix Released
Revision history for this message
Colin Watson (cjwatson) wrote :

As agreed at the rally last week, there's not very much that can sensibly be done about this in the grub2 packages, and it's already been handled in cloud-init, so I'm going to close the grub2 tasks.

Changed in grub2 (Ubuntu Natty):
status: Confirmed → Won't Fix
Changed in grub2 (Ubuntu):
status: Confirmed → Won't Fix
Changed in grub2 (Ubuntu Lucid):
status: New → 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.