grub-multi-install: get_mounted_device chokes on systemd automounts
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub2 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
On systems where /boot/efi is a systemd .automount, the postinst script fails without any error messages. While trying to figure out what’s wrong, I found this:
Trying to migrate /boot/efi into esp config
++ get_mounted_device /boot/efi
++ mountpoint=
++ cat /proc/mounts
...
++ read -r line
++ set -f
++ set -- systemd-1 /boot/efi autofs rw,relatime,
++ set +f
++ '[' /boot/efi = /boot/efi ']'
++ echo systemd-1
++ break
+ esp=systemd-1
+ '[' systemd-1 ']'
++ device_to_id systemd-1
get_mounted_device doesn’t know that automounts are special. The attached patch teaches is to go one step further and attempt to resolve it.
Please note that I didn’t improve error handling, this still needs to be done.
The attachment "0001-Teach- get_mounted_ device- to-not- choke-on- automounted. patch" 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.]