Comment 2 for bug 1695666

Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 1695666] Re: users shoot themselves in the foot by removing /boot/efi from /etc/fstab; u-r-u should warn and refuse to let them upgrade

On Wed, Jun 07, 2017 at 06:08:25PM -0000, Adam Conrad wrote:
> >From the POV of "u-r-u shouldn't be a dumping ground for quirking
> upgrade issues we can fix in packages", shouldn't this check be in
> preinsts for the packages that twiddle /boot/efi, not in the upgrader?

No, because the preinst is also run in the middle of the upgrade and causes
the upgrade overall to fail.

> Also, can we do better here (like we do with non-mounted bootloader
> partitions, like PReP) and somehow automatically detect the correct
> partition and mount it before attempting to use it?

If you detect multiple ESPs, how do you decide which one to mount?

(It's possible that yes, we could work this out based on things like current
efibootmgr settings, but I think it would be somewhat error prone and you
would still want to detect it all before starting the dist-upgrade.)

blkid -t PARTUUID=$(efibootmgr -v | awk '/^Boot..... ubuntu\t/ { print $NF }' | cut -f3 -d,)