initramfs support
Bryan Kadzban
bryan at kadzban.is-a-geek.net
Fri Jul 20 05:09:42 MDT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160
Alexander E. Patrakov wrote:
>> The one sticking point is the same sticking point I had with dmraid
>> -- how do you get the /dev/md/* named device nodes to be recreated
>> once the initramfs is finished, from the system bootscripts?
>
> I think that it cannot be supported. I will test now to see whether
> Debian can be installed on such /dev/md/meaningful_name array.
Not sure what the testing came up with, but I figured out a way to get
it to work:
mkdir /dev/md
for array in /dev/md[0-9]* ; do
# subshell so the $MD_* variables don't carry between arrays
(
eval `mdadm --detail --export $array`
[ -z "$MD_NAME" ] && exit 0 # v0.9 metadata has no name
real_name=`echo "$MD_NAME" | cut -d: -f2`
# if there's no host field (no colon), use the full name
[ -z "$real_name" ] && real_name="$MD_NAME"
cp -a $array "/dev/md/$real_name"
cp -a $array "/dev/md_$real_name"
# might or might not be needed; my setup works without:
rm $array
)
done
I have not tested this on a metadata=0.9 array, but as long as those
don't provide an MD_NAME in --detail --export, it should work fine.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGoJf1S5vET1Wea5wRAyejAJ0c58ar6LwzStC0umrDfZWvxyA8rQCgmQnO
p6kc5EHd5IYHE9VZ2ktTEjs=
=70fD
-----END PGP SIGNATURE-----
More information about the lfs-dev
mailing list