From e09559d6dc3d8b0aa559b11f93469cc578ee9d66 Mon Sep 17 00:00:00 2001 From: "Carl D. Roth" Date: Wed, 2 May 2018 16:39:59 -0700 Subject: [PATCH] load the efivarfs filesystem if needed --- .../src/python/onl/install/InstallUtils.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/base/all/vendor-config-onl/src/python/onl/install/InstallUtils.py b/packages/base/all/vendor-config-onl/src/python/onl/install/InstallUtils.py index 85fe2c01..834eeaac 100644 --- a/packages/base/all/vendor-config-onl/src/python/onl/install/InstallUtils.py +++ b/packages/base/all/vendor-config-onl/src/python/onl/install/InstallUtils.py @@ -1059,6 +1059,16 @@ class InitrdContext(SubprocessMixin): cmd = ('mount', '-t', 'sysfs', 'sysfs', dst,) self.check_call(cmd, vmode=self.V1) + # Hurr, the efivarfs module may not be loaded + with open("/proc/filesystems") as fd: + buf = fd.read() + if "efivarfs" not in buf: + cmd = ('modprobe', 'efivarfs',) + try: + self.check_call(cmd, vmode=self.V1) + except subprocess.CalledProcessError: + pass + dst = os.path.join(self.dir, "sys/firmware/efi/efivars") if os.path.exists(dst): cmd = ('mount', '-t', 'efivarfs', 'efivarfs', dst,)