bugGNU GRUB - Bugs: bug #49942, EFI: grub-install may fail if...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #49942: EFI: grub-install may fail if /boot/efi is managed by autofs

Submitter:  felix <felix_s>
Submitted:  Wed 28 Dec 2016 12:02:20 AM UTC
   
 
Category:  Installation Severity:  Major
Priority:  5 - Normal Item Group:  Software Error
Status:  Fixed Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Closed Release:  Git master
Release:  Reproducibility:  None
Planned Release:  2.02

Tue 24 Jan 2017 05:07:56 PM UTC, comment #5: 

Should be fixed in a2932fbe8a602f3abd7c9b97004a31dc1a384639.

Andrei Borzenkov <arvidjaar>
Group Member
Thu 19 Jan 2017 12:20:42 PM UTC, comment #4: 

The ML patch seems to work, modulo bug #50093.

felix <felix_s>
Wed 18 Jan 2017 04:24:31 AM UTC, comment #3: 

It turned out to be less trivial than I hoped due to the fact that stat() does not trigger automount with Linux autofs. I think I have found workaround, will post later patch to list for review.

We need this to be fixed in 2.02 as systemd now defaults to automounting ESP.

Andrei Borzenkov <arvidjaar>
Group Member
Tue 17 Jan 2017 02:54:06 PM UTC, comment #2: 

Yes, but it doesn't mount the file system unless I add something more.


$ realpath /boot/efi
/boot/efi
$ mount | fgrep efi
systemd-1 on /boot/efi type autofs (rw,relatime,fd=43,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
$ realpath /boot/efi/.
/boot/efi
$ mount | fgrep efi
systemd-1 on /boot/efi type autofs (rw,relatime,fd=43,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
$ realpath /boot/efi/xyzzy
/boot/efi/xyzzy
$ mount | fgrep efi
systemd-1 on /boot/efi type autofs (rw,relatime,fd=43,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
/dev/sda2 on /boot/efi type vfat (rw,relatime,fmask=7113,dmask=7002,allow_utime=0020,shortname=lower,check=r,usefree,utf8,tz=UTC,errors=remount-ro)


`ls -ld /boot/efi` mounts; `stat /boot/efi` doesn't.

felix <felix_s>
Wed 28 Dec 2016 03:39:53 AM UTC, comment #1: 

Does "realpath /boot/efi" work in such case (i.e. when it is not yet mounted)?

Andrei Borzenkov <arvidjaar>
Group Member
Wed 28 Dec 2016 12:02:20 AM UTC, original submission:  

On my system, I have systemd managing my mount points using autofs. If by the time I run grub-install the /boot/efi partition hasn't been properly mounted, the installer may fail with the following quite cryptic message, which even the --verbose flag doesn't clear up:


# grub-install --verbose --target=x86_64-efi
Installing for x86_64-efi platform.
grub-install: info: cannot open `/boot/grub/device.map': No such file or directory.
grub-install: error: failed to get canonical path of `systemd-1'.


felix <felix_s>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by arvidjaar (Posted a comment)
  • -email is unavailable- added by felix_s (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-01-24 arvidjaar StatusNone Fixed
        Open/ClosedOpen Closed
    2017-01-18 arvidjaar Planned ReleaseNone 2.02

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code