"No efivarfs filesystem is mounted" error when running efi-readvar
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
efitools (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
When running efi-readvar with no parameters, I get this error:
No efivarfs filesystem is mounted
This tool is totally broken for me and I cannot use it.
Yet, mount -l shows that it is mounted:
<snip>
efivarfs on /sys/firmware/
<snip>
It appears that this is a known bug with efitools: https:/
And a patch made for it here: https:/
I am running Ubuntu 15.10. Version of package installed is 1.4.2+git201401
Please consider, at minimum, getting this patch into Xenial and ideally into Wily?
--- a/lib/kernel_
+++ a/lib/kernel_
@@ -66,10 +66,10 @@ kernel_
while (ptr < buf + st.st_size) {
int count;
- sscanf(ptr, "%*s on %s type %s %*s\n%n", path, type, &count);
+ sscanf(ptr, "%*s on %s type %s %*[^\n]\n%n", path, type, &count);
ptr += count;
- if (strcmp(type, "efivarfs") != 0)
- continue;
+ if (strcmp(type, "efivarfs") == 0)
+ break;
}
if (strcmp(type, "efivarfs") != 0) {
fprintf(stderr, "No efivarfs filesystem is mounted\n");
FYI, full output of mount -l on my system:
sysfs on /sys type sysfs (rw,nosuid, nodev,noexec, relatime) nodev,noexec, relatime) relatime, size=3039364k, nr_inodes= 759841, mode=755) noexec, relatime, gid=5,mode= 620,ptmxmode= 000) noexec, relatime, size=611104k, mode=755) sda3_crypt on / type btrfs (rw,relatime, ssd,space_ cache,subvolid= 257,subvol= /@) [Root0Label] security type securityfs (rw,nosuid, nodev,noexec, relatime) nodev,noexec, relatime, size=5120k) nodev,noexec, mode=755) cgroup/ systemd type cgroup (rw,nosuid, nodev,noexec, relatime, xattr,release_ agent=/ lib/systemd/ systemd- cgroups- agent,name= systemd) nodev,noexec, relatime) efi/efivars type efivarfs (rw,nosuid, nodev,noexec, relatime) cgroup/ cpu,cpuacct type cgroup (rw,nosuid, nodev,noexec, relatime, cpu,cpuacct) cgroup/ freezer type cgroup (rw,nosuid, nodev,noexec, relatime, freezer) cgroup/ blkio type cgroup (rw,nosuid, nodev,noexec, relatime, blkio) cgroup/ memory type cgroup (rw,nosuid, nodev,noexec, relatime, memory) cgroup/ hugetlb type cgroup (rw,nosuid, nodev,noexec, relatime, hugetlb) cgroup/ devices type cgroup (rw,nosuid, nodev,noexec, relatime, devices) cgroup/ perf_event type cgroup (rw,nosuid, nodev,noexec, relatime, perf_event) cgroup/ cpuset type cgroup (rw,nosuid, nodev,noexec, relatime, cpuset, clone_children) cgroup/ net_cls, net_prio type cgroup (rw,nosuid, nodev,noexec, relatime, net_cls, net_prio) fs/binfmt_ misc type autofs (rw,relatime, fd=23,pgrp= 1,timeout= 0,minproto= 5,maxproto= 5,direct) fuse/connection s type fusectl (rw,relatime) ssd,space_ cache,subvolid= 5,subvol= /) [Boot0Label] fmask=0077, dmask=0077, codepage= 437,iocharset= iso8859- 1,shortname= mixed,errors= remount- ro) sda3_crypt on /home type btrfs (rw,relatime, ssd,space_ cache,subvolid= 258,subvol= /@home) [Root0Label] nodev,relatime, size=611104k, mode=700) nodev,relatime, size=611104k, mode=700, uid=1000, gid=1000) fs/binfmt_ misc type binfmt_misc (rw,relatime) debug/tracing type tracefs (rw,relatime)
proc on /proc type proc (rw,nosuid,
udev on /dev type devtmpfs (rw,nosuid,
devpts on /dev/pts type devpts (rw,nosuid,
tmpfs on /run type tmpfs (rw,nosuid,
/dev/mapper/
securityfs on /sys/kernel/
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,
cgroup on /sys/fs/
pstore on /sys/fs/pstore type pstore (rw,nosuid,
efivarfs on /sys/firmware/
cgroup on /sys/fs/
cgroup on /sys/fs/
cgroup on /sys/fs/
cgroup on /sys/fs/
cgroup on /sys/fs/
cgroup on /sys/fs/
cgroup on /sys/fs/
cgroup on /sys/fs/
cgroup on /sys/fs/
systemd-1 on /proc/sys/
mqueue on /dev/mqueue type mqueue (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
fusectl on /sys/fs/
/dev/sda2 on /boot type btrfs (rw,relatime,
/dev/sda1 on /boot/efi type vfat (rw,relatime,
/dev/mapper/
tmpfs on /run/user/0 type tmpfs (rw,nosuid,
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,
binfmt_misc on /proc/sys/
tracefs on /sys/kernel/