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

Bug #1994936 reported by Cyrus Lien
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OEM Priority Project
Invalid
Critical
Cyrus Lien
initramfs-tools (Debian)
Fix Released
Unknown
initramfs-tools (Ubuntu)
New
Undecided
Unassigned

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 <email address hidden>
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, Kinetic

[ Other Info ]

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

debian MR:
https://salsa.debian.org/kernel-team/initramfs-tools/-/merge_requests/66

Cyrus Lien (cyruslien)
Changed in oem-priority:
status: New → Confirmed
importance: Undecided → Critical
assignee: nobody → Cyrus Lien (cyruslien)
Changed in initramfs-tools (Debian):
status: Unknown → New
tags: added: foundations-todo
Revision history for this message
Rex Tsai (chihchun) wrote :

Canonical will need to carry this patch as a Ubuntu sauce for Jammy, in order to support Intel VMD in 22.04 (jammy) with linux-oem 6.0+ kernel.

Revision history for this message
Cyrus Lien (cyruslien) wrote :
Revision history for this message
Cyrus Lien (cyruslien) wrote :
Cyrus Lien (cyruslien)
Changed in oem-priority:
status: Confirmed → In Progress
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

so this is not fixed in lunar yet?

and Debian seems to have fixed it in mdadm instead?

Revision history for this message
Cyrus Lien (cyruslien) wrote :

Tried Debian mdadm (4.2+20230223-1) it doesn't fix the issue and the only script mounting efivarfs is mdadm hook scrips.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

ok, but what about lunar?

Revision history for this message
Cyrus Lien (cyruslien) wrote :

Lunar also doesn't fix it yet. Do we need to send the patch to mdadm instead?

Revision history for this message
Cyrus Lien (cyruslien) wrote :
Changed in initramfs-tools (Debian):
status: New → Fix Released
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

that debdiff does a lot more than just adds the script?

Revision history for this message
Cyrus Lien (cyruslien) wrote :

Due to lunar bumped shellcheck to version 0.9.0-1, a lot of shellcheck findings need to be fixed to prevent build failure.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

ok, but please mention it on the changelog too

Revision history for this message
Cyrus Lien (cyruslien) wrote :

According to https://bugs.launchpad.net/ubuntu/+source/mdadm/+bug/1993541/comments/9, apply the patch to mdadm instead initramfs-tools.

Changed in oem-priority:
status: In Progress → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.