Bug 1972223
Summary: | /sys/firmware/efi/efivars is not mounted on installed system | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 9 | Reporter: | Jan Stodola <jstodola> | |
Component: | systemd | Assignee: | Michal Sekletar <msekleta> | |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Frantisek Sumsal <fsumsal> | |
Severity: | high | Docs Contact: | ||
Priority: | high | |||
Version: | 9.0 | CC: | bgoncalv, coxu, dtardon, efuller, ernunes, fsumsal, fweimer, jamacku, jbastian, jieli, jjaburek, jpazdziora, msalter, msekleta, pbunyan, pholica, piliu, pvlasin, ravarghe, systemd-maint-list, systemd-maint, xiawu, zbyszek | |
Target Milestone: | beta | Keywords: | TestBlocker, Triaged | |
Target Release: | 9.0 Beta | |||
Hardware: | All | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | systemd-249-6.el9_b | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 2003130 (view as bug list) | Environment: | ||
Last Closed: | 2021-12-07 21:57:54 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1942219, 1971841, 1972424, 1977651, 2003130 |
Description
Jan Stodola
2021-06-15 13:03:37 UTC
I also encountered this recently and today (what a coincidence) asked about /sys/firmware/efi/vars vs efivarfs on tech-list. My efibootmgr is working, however, thanks to a /sys/firmware/efi/vars fallback: # mount | grep efivarfs # efibootmgr BootCurrent: 0001 Timeout: 0 seconds BootOrder: 0001,0002,0000,0003 Boot0000* UiApp Boot0001* Red Hat Enterprise Linux Boot0002* UEFI Misc Device Boot0003* EFI Internal Shell # strace -f efibootmgr ... access("/sys/firmware/efi/efivars/", F_OK) = 0 statfs("/sys/firmware/efi/efivars/", {f_type=SYSFS_MAGIC, ...) = 0 openat(AT_FDCWD, "/sys/firmware/efi/vars/", ...) = 4 ... (In reply to Jiri Jaburek from comment #2) > I also encountered this recently and today (what a coincidence) asked about > /sys/firmware/efi/vars vs efivarfs on tech-list. > > My efibootmgr is working, however, thanks to a /sys/firmware/efi/vars > fallback: To be clear - this is x86_64 UEFI (efibootmgr working, but no efivarfs mount), whereas the OP is aarch64. Caused by bug 1957211. *** Bug 1975541 has been marked as a duplicate of this bug. *** Commit 963fabf37f6a has been around since 5.10-rc1, so that probably isn't the problem. (In reply to Mark Salter from comment #7) > Commit 963fabf37f6a has been around since 5.10-rc1, so that probably isn't > the problem. No, I mean, it's the reason we _don't_ see a problem on x86: RHEL9 on x86 still has the old efivars feature enabled and efibootmgr will fall back to it if efivarfs is not available. efivars is not available on ARM -- due to commit 963fabf37f6a -- so efibootmgr does not have a fallback path on ARM systems. Note: bug 1972424 is about disabling efivars on x86 too, so when that happens, efibootmgr will fail on x86 too (unless efivarfs is manually mounted or this systemd bug is fixed). It's hard on the eyes to tell the difference between efivars and efivarfs :-) I've hit this bug as well on aarch64 and very unfortunate effect is that the rhts-reboot effectively cannot be used as many of the systems just boot to efishell (after unsuccessful netboot) and won't continue booting from HDD (which rhts-reboot would do by running efibootmgr -n XXXX). I'm adding TESTBLOCKER keyword as this bug prevents way to many tests executed in Beaker cannot finish due to this bug. Changing Hardware to All as my report in this BZ is from x86_64 (where it doesn't block anything, but is an obsolete interface) whereas others seem to be blocked on aarch64 where the same issue causes functionality breakages. I've posted the patch upstream that changes under what conditions we mount efivarfs. Previously, we would attempt to mount the filesystem if we were compiled with EFI support and system was booted in EFI mode. However, on RHEL-9 we don't want to be compiled with EFI support (as we don't want to ship systemd-boot and bootctl) but we want to mount the efivarfs anwyway (provided that system is booted in EFI mode). First reaction of upstream to the patch was not positive but I will try to persuade the upstream developers to change their mind. Worst case we should be able to introduce this as a downstream change. https://github.com/systemd/systemd/pull/20532 What if you build systemd with EFI support enabled, but then simply remove the systemd-boot and bootctl binaries in the spec file so we don't ship them in the rpm? That might be the simplest work around. Pseudo-code: %build ./configure make %install make install rm -f ${buildroot}/%{_sbindir}/systemd-boot rm -f ${buildroot}/%{_sbindir}/bootctl ... Other rpms do this, so there is precedent. For example, from strace.spec: %install make DESTDIR=%{buildroot} install ... # remove unpackaged files from the buildroot rm -f %{buildroot}%{_bindir}/strace-graph ... fix merged to github rhel-9.0.0-beta branch -> https://github.com/redhat-plumbers/systemd-rhel9/pull/24 fix merged to github main branch -> https://github.com/redhat-plumbers/systemd-rhel9/pull/23 fix merged to github rhel-9.0.0-beta branch -> https://github.com/redhat-plumbers/systemd-rhel9/pull/31 fix merged to github main branch -> https://github.com/redhat-plumbers/systemd-rhel9/pull/30 |