grub-pc does not allow preseeding install_devices

Bug #1791200 reported by Sebastian Unger
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)

Bug Description

Upon configuration the postinst maintainer script checks to see whether it needs to convert the debconf variable install_devices from the old device name format to the new 'by-id' format. It bases this decision on a version comparison against the "previously installed".

In a new installation, this comparison is successful since the empty version string is older than any other version.

postinst then goes on to check a few special cases where it can make informed decisions on whether the conversion was good without involving the user. Failing those checks it forces the debconf question to be presented to the user again with the converted device ids for confirmation.

If an administrator has preseeded the install_devices question (using the new 'by-id' format) before installing grub-pc, then the above algorithm incorrectly decides that the user needs to confirm the devices again.

The attached patch adds another special case that checks if the device IDs where already in the new 'by-id' format and in that case accepts them without asking the user again.

I have observed this bug for many years, but only now gotten around to tracking it to its source. The patch is against version 2.02-2ubuntu8.4 of grub-pc.

Tags: patch
Revision history for this message
Sebastian Unger (sebunger44) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "patch against version 2.02-2ubuntu8.4 of grub-pc" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

A patch is attached, and it's a well-defined problem. Just needs that I take the patch and test that it behaves correctly to land it.

Changed in grub2 (Ubuntu):
status: New → Triaged
importance: Undecided → High
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.