Bug#773533: efivarfs not mounted by default
Leif Lindholm
leif.lindholm at linaro.org
Fri Dec 19 16:58:41 GMT 2014
On Fri, Dec 19, 2014 at 04:35:51PM +0100, Michael Biebl wrote:
> > Could we build systemd without --disable-efi, please?
>
> It's probably to late to do that for jessie unless there is some major
> breakage caused by that for UEFI systems (which I don't know, not being
> familiar with UEFI).
Well, it causes failures in the efivar testsuite (although, sadly, the
testsuite itself is currently broken on Jessie).
> We'd also have to check, if shipping systemd-efi-boot-generator has
> other side-effects. A quick glance at its sources suggests it generates
> a mount unit for /boot and I don't know how that would interfere with
> the UEFI/boot loader integration in Debian.
An alternative, less invasive, approach would be to simply do
something like (not tested!):
diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c
index e713338..7e964b1 100644
--- a/src/core/mount-setup.c
+++ b/src/core/mount-setup.c
@@ -101,10 +101,8 @@ static const MountPoint mount_table[] = {
NULL, MNT_FATAL|MNT_IN_CONTAINER },
{ "pstore", "/sys/fs/pstore", "pstore",
NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV,
NULL, MNT_NONE },
-#ifdef ENABLE_EFI
{ "efivarfs", "/sys/firmware/efi/efivars", "efivarfs",
NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV,
is_efi_boot, MNT_NONE },
-#endif
};
/* These are API file systems that might be mounted by other
software,
diff --git a/src/shared/efivars.c b/src/shared/efivars.c
index f18f5c4..27822b8 100644
--- a/src/shared/efivars.c
+++ b/src/shared/efivars.c
@@ -29,12 +29,12 @@
#include "utf8.h"
#include "efivars.h"
-#ifdef ENABLE_EFI
bool is_efi_boot(void) {
return access("/sys/firmware/efi", F_OK) >= 0;
}
+#ifdef ENABLE_EFI
static int read_flag(const char *varname) {
int r;
_cleanup_free_ void *v = NULL;
This would mount efivarfs on boot, but enable no other functionality.
/
Leif
More information about the Pkg-systemd-maintainers
mailing list