[Bug 1948571] [NEW] grub-multi-install: get_mounted_device chokes on systemd automounts
Andrej Shadura
1948571 at bugs.launchpad.net
Sun Oct 24 08:07:54 UTC 2021
Public bug reported:
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=/boot/efi
++ cat /proc/mounts
...
++ read -r line
++ set -f
++ set -- systemd-1 /boot/efi autofs rw,relatime,fd=51,pgrp=1,timeout=60,minproto=5,maxproto=5,direct,pipe_ino=2548 0 0
++ 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.
** Affects: grub2 (Ubuntu)
Importance: Undecided
Status: New
** Tags: patch postinst uefi
** Patch added: "0001-Teach-get_mounted_device-to-not-choke-on-automounted.patch"
https://bugs.launchpad.net/bugs/1948571/+attachment/5535500/+files/0001-Teach-get_mounted_device-to-not-choke-on-automounted.patch
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2 in Ubuntu.
https://bugs.launchpad.net/bugs/1948571
Title:
grub-multi-install: get_mounted_device chokes on systemd automounts
Status in grub2 package in Ubuntu:
New
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=/boot/efi
++ cat /proc/mounts
...
++ read -r line
++ set -f
++ set -- systemd-1 /boot/efi autofs rw,relatime,fd=51,pgrp=1,timeout=60,minproto=5,maxproto=5,direct,pipe_ino=2548 0 0
++ 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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1948571/+subscriptions
More information about the foundations-bugs
mailing list