[Bug 1993541] Re: initramfs need to mount efivarfs because kernel 6.0 deprecated 'efivars' sysfs interface

Steve Langasek 1993541 at bugs.launchpad.net
Fri Apr 21 16:19:51 UTC 2023


Thanks for this important clarification, Andreas.  I misremembered,
thinking that both /sys/firmware/efi/vars/ and
/sys/firmware/efi/efivars/ were mount points, and believed that this was
about mounting the *deprecated* path, rather than about mounting the new
path so that it's available for use in the initramfs.

As to whether this then belongs in initramfs-tools rather than mdadm, I
still think mdadm is the right place even though this isn't a deprecated
filesystem, because it's unusual for anything in the initramfs to need
access to firmware variables - VROC is the only instance I'm aware of.
So I expect this only affects mdadm, and we should keep the code close
together.

Regarding risk of regression from switching to use the new interface
instead of the old interface on old kernels: the interfaces of the two
paths, while not identical, are similar enough that I do not expect any
subtle issues with parsing of the data (it should either work all the
time or none of the time).  However, if you want to mitigate any
possible risk on older kernels, we could adjust the initramfs script to
mount efivarsfs ONLY if /sys/firmware/efi/vars is not present.
Thoughts?

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1993541

Title:
  initramfs need to mount efivarfs because kernel 6.0 deprecated
  'efivars' sysfs interface

Status in OEM Priority Project:
  In Progress
Status in mdadm package in Ubuntu:
  In Progress
Status in mdadm source package in Jammy:
  In Progress
Status in mdadm source package in Kinetic:
  In Progress
Status in mdadm package in Debian:
  Fix Released

Bug description:
  [ Impact ]

  kernel 6.0 deprecated efivars sysfs interface [1]. For Intel VROC
  RAID, mdadm needs initramfs to mount efivarfs instead.

  [1] The commit:
  commit 0f5b2c69a4cbe4166ca24b76d5ada98ed2867741
  Author: Ard Biesheuvel <ardb at kernel.org>
  Date: Mon Jun 20 13:34:03 2022 +0200

      efi: vars: Remove deprecated 'efivars' sysfs interface

  [ Test Plan ]

  1. Install initramfs-tools
  2. update-initramfs -u
  3. unmkinitramfs initrd.img-`uname -r` /tmp/extract-initramfs
  4. Check if boot script 00_mount_efivarfs exists in directory /tmp/extract-initramfs/main/scripts/init-top/
  5. Check /tmp/extract-initramfs/main/scripts/init-top/ORDER if the boot script 00_mount_efivarfs will be execute before udev.

  [ Where problems could occur ]

  Not sure if there any other tools/utilities also need to mount efivarfs as early as mdadm but the probability of file conflict should be very low.
  Also, there are no impact mounting efivarfs multiple times.
  mount: /sys/firmware/efi/efivars: efivarfs already mounted on /sys/firmware/efi/efivars.

  [ Scope ]

  Jammy

  [ Other Info ]

  The private bug link
  https://bugs.launchpad.net/somerville/+bug/1990231

To manage notifications about this bug go to:
https://bugs.launchpad.net/oem-priority/+bug/1993541/+subscriptions




More information about the Ubuntu-sponsors mailing list