osdep/linux: handle autofs entries in /proc/self/mountinfo
authorAndrei Borzenkov <arvidjaar@gmail.com>
Tue, 24 Jan 2017 17:05:19 +0000 (20:05 +0300)
committerAndrei Borzenkov <arvidjaar@gmail.com>
Tue, 24 Jan 2017 17:05:19 +0000 (20:05 +0300)
commita2932fbe8a602f3abd7c9b97004a31dc1a384639
tree2ab36828cca69dad1a76c95b1d826db4586a7b20
parent972765fe8245cdf44d465329f33b5aa9ac6c2f47
osdep/linux: handle autofs entries in /proc/self/mountinfo

These entries have placeholder for device name and so are useless for our
purpose. grub failed with something like

grub-install: error: failed to get canonical path of `systemd-1'.

When we see autofs entry, record it (to keep parent-child relationship) but
continue to look for real mount. If it is found, we process it as usual. If
only autofs entry exists, attempt to trigger mount by opening mount point
and retry. Mount point itself is then kept open to avoid timeout.

Recent systemd is by default using automount for /boot/efi so this should
become more popular problem on EFI systems.

Closes: 49942
grub-core/osdep/linux/getroot.c