uefi: os-prober doesn't skip cdrom iso9660 type

Bug #1819363 reported by Rik Shaw
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
os-prober (Ubuntu)
New
Undecided
Unassigned

Bug Description

File: /usr/lib/os-probes/50mounted-tests

Issue: on a respin of Ubuntu (yes, not supported but I believe the issue could possibly affect Ubuntu as well) when booting the USB in 'secure boot' UEFI mode, when installing, the update-grub command gives the following error which then stops the installer with the all-too-common "failed to install grub-efi-amd64-signed" to /target error:

grub-probe: error: cannot find a GRUB drive for /dev/sdb1. Check your device.map.

The problem is, however, that in this case /dev/sdb1 is the live system's "cdrom" and should NOT be probed! So I propose the following addition to 50mounted-tests that would ensure "optical media" partitions would be skipped by os-prober:

elif [ "$types" = iso9660 ]; then
    debug "$1 is an optical media iso9660 partition; skipping"
    exit 0

With this addition, update-grub no longer returns an error which I am hoping will make ubiquity not give the following error:

ubiquity: installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 127
ubiquity: Errors were encountered while processing:
ubiquity: grub-efi-amd64-signed
ubiquity: E: Sub-process /usr/bin/dpkg returned an error code (1)

I hope this addition will help others that have issues with secure boot mode! I have not created a patch yet but can if it seems acceptable.

Rik Shaw (rik-shaw)
tags: added: grub ubiquity
Revision history for this message
Rik Shaw (rik-shaw) wrote :

Attached is a patch for this issue. I am noting that this patch is necessary when running in uefi mode to install shim-signed / grub-efi-amd64-signed / etc.

Revision history for this message
Rik Shaw (rik-shaw) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "patch for 50mounted-tests" 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
Brian Murray (brian-murray) wrote :

Which version of os-prober did you write this patch for?

Changed in os-prober (Ubuntu):
status: New → Incomplete
Revision history for this message
Rik Shaw (rik-shaw) wrote :

I only stick to "LTS" so it is for version 1.74ubuntu1 for bionic. Sorry I neglected to see if any updates had been made in any possible newer version

Rik Shaw (rik-shaw)
Changed in os-prober (Ubuntu):
status: Incomplete → New
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.