Article 6H84T Help Needed: LUKS Unable to Read md1 Partition in RAID 1 on Slackware Current

Help Needed: LUKS Unable to Read md1 Partition in RAID 1 on Slackware Current

by
Panagiotis Nik
from LinuxQuestions.org on (#6H84T)
I've been setting up a new system on Slackware Current with two SSDs configured in software RAID 1, combined with LUKS and LVM. I followed the Slackware Crypt readme for the configuration. Hereis a brief overview of my setup:

RAID Arrays: Created two partitions using mdadm.
  • mdadm --create /dev/md1 --level=1 --metadata=0.90 --raid-devices=2 /dev/sda1 missing
  • mdadm --create /dev/md1 --level=1 --metadata=0.90 --raid-devices=2 /dev/sda2 missing
Mount Points:
  • /dev/md1 for /boot
  • /dev/md2 for / with LUKS and LVM
Initrd Configuration: mkinitrd -c -k 6.x.x -f ext4 -r /dev/cryptvg/root -m modules -C /dev/md1 -L -R -u -o /boot/initrd.gz

After completing the setup, during the first boot, the system dropped into a shell, indicating that LUKS couldn't read the md1 partition. The second RAID array with LUKS was missing, though the first array was accessible.

By running these commands from the shell I was able to decrypt my root partition and boot to the new system successfully:
  • mdadm --assemble --scan
  • ./init
  • Unlock the RAID md device.
  • exit
By modifying the init script to include mdadm --assemble --scan at the beginning, it resolved the booting issue.

My question is that while this solution seems to work, I'm looking for insights or suggestions to understand what might have gone wrong initially. Is there a more optimal approach, or any potential issues with my current solution?

Any advice or alternative solutions would be greatly appreciated.
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments