I have a Mandriva Linux system that was upgraded in-place using
urpmi from version 2010.0 to 2010.1 and then 2011.0. I did run into a few minor issues, but nothing I couldn't handle.
A few weeks back, the Mandriva updater informed me that in order to update
shorewall, I had to also replace
systemd-sysvinit. Naturally, I was reluctant to let the updater touch something as critical as the boot system for no reason, so I put it off. Naturally, the Mandriva updater applet kept bugging me. Naturally, I eventually gave up and agreed. And, naturally, it made enough of a mess that my system cannot boot on its own.
It starts-up normally, spouts of a few messages, and then I get a whole lot of messages in this format:
Starting XXXX aborted because a dependency failed.
where XXXX is something filesystem-related, either an
fsck call or a filesystem mount. It drops me into the root shell, where the dependency that failed soon becomes obvious: most MD arrays have not been started. Manually executing
# mdadm -As # mount -a # systemctl default
in this order allows the system to complete the booting process.
I have several physical drives split into partitions, which are then combined in a few RAID-1 (e.g.
/boot) and RAID-5 (
/, swap and pretty much everything else) arrays. The partitions and the arrays, as well as the filesystems they contain were created manually and then Mandriva Linux was installed. There where no problems of note and everything worked fine, till
systemd came along.
I think that I have tracked this issue down to a degree. The old
sysvinit system used to run
/etc/rc.d/rc.sysinit which, as provided by Mandriva, contains this line:
MDADM_RETURN=`/sbin/mdadm -As --auto=yes --run 2>&1`
which starts any MD array specified in
/etc/mdadm.conf that has not been started. As far as I can tell, this file is not used any more after
system was installed and the line above has been replaced by this line from
[ -r /proc/mdstat -a -r /dev/md/md-device-map ] && /sbin/mdadm -IRs
Unfortunately. my system seems to be missing the
/dev/md/md-device-map file, so
mdadm is not executed. I can think of a few ways to "fix" this issue, such as editing the
systemd scripts or modifying my
/boot/initrd.img to start all MD arrays, but I'd rather do it in a way that will not break with the next package upgrade.
What is the format of
/dev/md/md-device-mapand how do I create it? Is this file common, e.g. with newer
mdadmversions, or is it something Fedora/Mandriva-specific? I have seen a few samples in the Fedora forums, but nothing solid.
What is the "proper" way to fix this boot failure? I'd rather not resort to brain surgery if I can avoid it...
Why, why, why did I not stick with the "If it is not broken, don't fix it!" maxim? (Yes, this is a rhetorical one...)