[Bug 1993541] Re: initramfs need to mount efivarfs because kernel 6.0 deprecated 'efivars' sysfs interface
Cyrus Lien
1993541 at bugs.launchpad.net
Sat Apr 15 16:48:36 UTC 2023
Thank you for your reminder.
Here is my test result.
1. Mount same mountpoint:
Test method: Adding init-top/01_mount_efivarfs_twice to mount efivarfs again.
Result: Indeed, it failed to mount at second time, and "Device or resource busy" error message shows up but that doesn't affect the boot scripts keep going also doesn't impact mdadm.
Log: initramfs.debug
2. Unmount before transitioning to rootfs:
Test method: Adding init-bottom/zz_unmount_efivarfs to unmount efivarfs just before transition.
Result: There is no problem to unmount efivarfs at this stage.
Log: initramfs.debug
3. Also compared the file attributes in efivarfs. The attributes are identical no matter efivarfs is mounted in initrd or by systemd.
Log: lsattr-efivars-mount-by-systemd.log, lsattr-efivars-mount-in-initrd.log
Please find the test scripts and logs in the attached tarball. Thank
you.
** Attachment added: "test-5.17.0-1029-mount-efivarfs-twice-and-unmount.tgz"
https://bugs.launchpad.net/ubuntu/+source/mdadm/+bug/1993541/+attachment/5664277/+files/test-5.17.0-1029-mount-efivarfs-twice-and-unmount.tgz
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to mdadm in Ubuntu.
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:
Triaged
Status in mdadm source package in Jammy:
Triaged
Status in mdadm source package in Kinetic:
Triaged
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 foundations-bugs
mailing list