PDA

View Full Version : [SOLVED] 8.04 -> 10.04 /dev/md0 not created during boot



rsteinmetz70112
July 8th, 2010, 06:46 AM
After an upgrade from 8.04 -> 10.04 my system is unable to boot. After a lot of work it seems that the blocking problem is that /dev/md0 is not being created in initramfs so the volume group containing the / file system is not being activated and therefore the boot fails at that point.

In /sbin both mdadm and lmv exist and the arrays and volume groups can be created manually using them. The system can then complete booting. Updating initramfs after booting has no apparent effect.

Based on posts I have found I have tried adding raid=noautodetect and rootdelay=240 to the GRUB kernel command line separately and together with no effect, except delaying the boot.

It seems that udev is not running correctly so I began digging through the udev rules but don't really understand how it actually works.

In /lib/udev/rules I found;

85_mdadm.rules
85_lmv2.rules

If I were guessing (and I am) I would expect 85_lvm2 to be run before 85_mdadm, which is the wrong order. I also found 56_lvm.rules which doesn't seem to do anything.

I would appreciate pointers of testing these rules to see what the problem is. It seems all of the pieces are there for this to wok correctly but there is something missing.

How can I run or test a single rule? Which udevadm options test these rules, so far I don't see udevadm test offering any help.

ronparent
July 8th, 2010, 04:15 PM
Unlikely but possible that at one time one of the disk was used in a fakeraid setup. Try a boot with the nodmraid option on the bootline. If that is the case, erasing the remaining fakeraid meta data would be your most usefule option.

rsteinmetz70112
July 8th, 2010, 05:53 PM
There is some indcation that there might have been a fake raid or an attempt at one once upon a time. Booting from the CD with the nodmraid option helps. HOwever that is not necessary when booting from the hard drive.

dmraid does not seem to be loaded in the initramfs.

I have worked around the problem by adding a script to Attach the Arrays and Enable the Volume Groups

#!/bin/sh

echo "Attaching Arrays ..."
/sbin/mdadm -A --scan
/bin/sleep 1
echo "Enabling LVM .."
/sbin/lvm vgchange -ay

I placed the script in /etc/initramfs-tools/scripts/local-top and updated initramfs. It boots now.

I still don't know why it wouldn't boot before. I really wish I could figure it out.