Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#47781 - [mdadm] cannot assemble an Intel Software RAID imsm array on an UEFI based computer

Attached to Project: Arch Linux
Opened by Luke Yelavich (TheMuso) - Saturday, 16 January 2016, 11:24 GMT
Last edited by Doug Newgard (Scimmia) - Saturday, 16 January 2016, 15:49 GMT
Task Type Bug Report
Category Packages: Core
Status Assigned
Assigned To Tobias Powalowski (tpowa)
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 1
Private No

Details

Description:
mdadm cannot assemble imsm software RAID on UEFI based system from the initramfs because efivarfs is not mounted.

Additional info:
* package version(s) mdadm 3.3.4-1
* config and/or log files etc.


Steps to reproduce:
1. Create any RAID array across any number of disks in the Intel Software RAID firmware interface of an UEFI based computer. If you do not have an interface for this available, you likely need to switch your intel controller from AHCI to RAID mode. Doing this is outside the scope of this report, given the various firmware interfaces available.
2. Either disable the legacy CSM module, or make sure you boot the ArchLinux install environment in UEFI mode.
3. Note the presence of your RAID array under /dev/md, using the name you gave it in the RAID configuration interface.
4. Partition, create filesystems, and install ArchLinux on the array as usual, ensuring you use an EFI system partition, either on the array, or another disk attached to your system.
NOTE: When creating the stab, make sure to add the efivarfs entry as per the UEFI page on the Arch wiki.
5. Also make sure the mdadm_udev hook has been added to the HOOKS variable in /etc/mkinitcpio.conf.
Unmount, and reboot the system, using the boot menu to make sure you boot into your newly installed ArchLinux system on your Intel RAID array, in UEFI mode.

At this point, you should get an error about the initramfs not finding a root filesystem. The system can be made to boot as normal by doing the following:
1. Mount efivarfs: mount -t efivarfs efivarfs /sys/firmware/efi/efivars
2. mdadm --assemble --scan
Your array should be assembled. You can now press Control D or type exit, and your install should boot normally.

Given that madam needs efivarfs mounted in the initramfs, it may make sense for the mdadm_udev hook to add a script to check for the presence of EFI, and mount efivarfs.
This task depends upon

Comment by Doug Newgard (Scimmia) - Saturday, 16 January 2016, 15:50 GMT
Related to  FS#46295 ?
Comment by Luke Yelavich (TheMuso) - Saturday, 16 January 2016, 19:05 GMT
I don't think  FS#46295  is related, because the ArchLinux pre-install live environment, i.e what you boot into when you first download Arch and put it onto a USB stick or optical media is able to assemble the created array without issue, and without any environment variables related to mdadm being set. Efivarfs is mounted in that environment, obviously prior to mdadm executing.
Comment by Tobias Powalowski (tpowa) - Tuesday, 19 January 2016, 20:30 GMT
Isn't efivarfs mounted by systemd? Have you tried using systemd in you initramfs?
Comment by Luke Yelavich (TheMuso) - Wednesday, 20 January 2016, 20:26 GMT
Yes, things work fine with systems in my initramfs.
Comment by George G. (GeorgeTG) - Sunday, 27 March 2016, 19:26 GMT
Same exact thing happens to me.
Same steps to reproduce also. (Legacy OPRom has to be disabled for disk devices through uefi menu)
Spent a whole day trying to figure it out.
Everything works as expected within the live usb, and windows boots normally, but my Arch installation would fail to assemble.
When I found out what was causing the problem (efivars not mounted),
I wrote an early hook that mounts efivarfs and everything works as expected.
Comment by tomas platz (tomplatz) - Thursday, 11 July 2019, 10:01 GMT
Also make sure the mdadm_udev hook has been added to the HOOKS variable in /etc/mkinitcpio.conf.
Unmount, and reboot the system, using the boot menu to make sure you boot into your newly installed ArchLinux system on your Intel RAID array, in UEFI mode.
   120.pdf (32.9 KiB)

Loading...