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.
Thank you for your reminder.
Here is my test result.
1. Mount same mountpoint: 01_mount_ efivarfs_ twice to mount efivarfs again.
Test method: Adding init-top/
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: zz_unmount_ efivarfs to unmount efivarfs just before transition.
Test method: Adding init-bottom/
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. efivars- mount-by- systemd. log, lsattr- efivars- mount-in- initrd. log
Log: lsattr-
Please find the test scripts and logs in the attached tarball. Thank you.