View previous topic :: View next topic |
Author |
Message |
TiccTech n00b
Joined: 13 Jun 2004 Posts: 42 Location: Oregon, US
|
Posted: Fri Nov 30, 2018 3:49 am Post subject: [solved] Initramfs built with stable mdadm can't boot RAID1 |
|
|
tl;dr: Initramfs built with mdadm 4.1 and genkernel-next 69 can't find a RAID1 root volume, using mdadm 3.4 and genkernel-next 68 works.
The system in question has:
* systemd
* EFI boot directly from kernel (no grub)
* Root filesystem is RAID1
* initramfs built into kernel.
I build the initramfs with Code: | genkernel --mdadm initramfs |
This setup has worked reliably for a year. However, it has now stopped working. I've narrowed the cause down a bit, but am a bit stuck on where to go next. Hints would be appreciated.
Building the initramfs with mdadm 3.4 (now back-level) and genkernel-next 68 (stable) produces a system that works fine.
Building the initramfs with mdadm 4.1 (stable) and genkernel-next 69 (testing) produces a system that fails to find the root filesystem at boot. The messages on the screen seem to indicate that mdadm scanned for RAID volumes, but did not find any. I'm using genkernel-next 69 because stable genkernel-next doesn't work with stable mdadm (See https://forums.gentoo.org/viewtopic-t-1089218.html and https://bugs.gentoo.org/669792).
This doesn't seem to be *quite* the same as that bug, and other people (possibly with different boot setups) seem to be getting the newer combination to work, but it's not making my system happy.
Thanks for reading,
-TiccTech
Last edited by TiccTech on Sat Dec 01, 2018 1:10 am; edited 1 time in total |
|
Back to top |
|
|
TiccTech n00b
Joined: 13 Jun 2004 Posts: 42 Location: Oregon, US
|
Posted: Sat Dec 01, 2018 1:08 am Post subject: |
|
|
Figured it out!
And as is so often the case, the origin was a silly configuration error.
The message that no RAID volumes were found was a red herring. It actually *had* found my two RAID1 volumes, and they were active. However, the newer genkernel-next found them in a way that reversed the device names. What had been /dev/md127 was now /dev/md126, and vice versa.
And I had put root=/dev/md126 on the command line compiled into the kernel.
So it tried to mount the wrong RAID1 device. This could not work because *that* pair is a bcache backing device.
Once I figured this out, I built a new kernel using the symbolic name for the root partition (in this case root=/dev/md/hey:root), which is what I should have been doing all along, and now it works fine with either the old or new versions.
-TiccTech |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|