I believe I've tracked this down to the /usr/share/initramfs-tools/scripts/local-top/md
script; in particular the sed at the top is very sensitive to the layout of the mdadm.conf
here is my mdadm.conf:
<---- 1st line ---->
DEVICE partitions
<---- 2nd line ---->
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=7238cf89:291793aa:feaab86f:16ec9d4a auto=yes
<---- 3rd line ---->
devices=/dev/hda4,/dev/hdg4
(added the <---- to show you where the breaks are)
at the top of the local-top/md is a line that says:
configureduuids=$(cat /etc/mdadm/mdadm.conf | grep "UUID" | sed -e 's/.*=//g')
but for me that sets configureduuids to:
yes
So problem 1: That sed assumes the UUID= is the last assignment on the line (and mdadm.conf suggests that is not required).
problem 2: This script provides absolutely no feedback (even when you remove the 'quiet' off your boot line); thats a real problem for a script that can take a few minutes to run if you have a lot of devices (i.e. each of those loops takes more than a second or so) - and when it is running for me you just see a black screen.
OK, now one reason I think this is showing for me is that during a previous ubuntu upgrade I hit the problem where there was a race condition where md didn't always start early enough, so I added the auto=yes.
How about replacing that cat/grep/sed with:
grep UUID /etc/mdadm/mdadm.conf | sed -e 's/.*UUID=//' -e 's/[ \t].*//'
(I'm not sure if that \t is valid there for a tab?)
I believe I've tracked this down to the /usr/share/ initramfs- tools/scripts/ local-top/ md
script; in particular the sed at the top is very sensitive to the layout of the mdadm.conf
here is my mdadm.conf:
<---- 1st line ----> 291793aa: feaab86f: 16ec9d4a auto=yes /dev/hda4, /dev/hdg4
DEVICE partitions
<---- 2nd line ---->
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=7238cf89:
<---- 3rd line ---->
devices=
(added the <---- to show you where the breaks are)
at the top of the local-top/md is a line that says:
configureduuids =$(cat /etc/mdadm/ mdadm.conf | grep "UUID" | sed -e 's/.*=//g')
but for me that sets configureduuids to:
yes
So problem 1: That sed assumes the UUID= is the last assignment on the line (and mdadm.conf suggests that is not required).
problem 2: This script provides absolutely no feedback (even when you remove the 'quiet' off your boot line); thats a real problem for a script that can take a few minutes to run if you have a lot of devices (i.e. each of those loops takes more than a second or so) - and when it is running for me you just see a black screen.
OK, now one reason I think this is showing for me is that during a previous ubuntu upgrade I hit the problem where there was a race condition where md didn't always start early enough, so I added the auto=yes.
How about replacing that cat/grep/sed with:
grep UUID /etc/mdadm/ mdadm.conf | sed -e 's/.*UUID=//' -e 's/[ \t].*//'
(I'm not sure if that \t is valid there for a tab?)
Dave