- missing module are not critical (but write big warning about this)
- add cryptofs on rootfs
- finish dmraid support
-- use blkid to resolve UUID and LABEL
- support UUID and LABEL for root= kernel commandline option from initrd
- tmpfs /dev hints from: https://wiki.ubuntu.com/ReplacementInit
eval `awk '/^[\t ]*#/ {next} {if ( $2 == "/" ) {print "rootdev=\"" $1 "\"\nrootFs=\"" $3 "\""}}' $fstab`
case $rootdev in
LABEL=*)
+ # new way, using blkid
+ if [ -x /sbin/blkid ]; then
+ label=${rootdev#"LABEL="}
+ dev=$(/sbin/blkid -t LABEL="$label" -o device)
+
+ if [ "$dev" -a -r "$dev" ]; then
+ debug "Using $dev as device for rootfs"
+ rootdev=$dev
+ rootdev_found=1
+ rootdev1=${rootdev} # XXX neccessary?
+ return
+ fi
+ echo >&2 "geninitrd can't find real device for LABEL=$label"
+ exit 1
+ fi
+
+ # old way, using various tools
if [ -x /sbin/findfs -a \( "$rootFs." = "ext2." -o "$rootFs." = "ext3." \) ] ; then
rootdev2="`/sbin/findfs $rootdev 2>/dev/null`"
if [ -n "$rootdev2" ] ; then
fi
;;
UUID=*)
+ # new way, using blkid
+ if [ -x /sbin/blkid ]; then
+ uuid=${rootdev#"UUID="}
+ dev=$(/sbin/blkid -t UUID="$uuid" -o device)
+
+ if [ "$dev" -a -r "$dev" ]; then
+ debug "Using $dev as device for rootfs"
+ rootdev=$dev
+ rootdev_found=1
+ rootdev1=${rootdev} # XXX neccessary?
+ return
+ fi
+ echo >&2 "geninitrd can't find real device for UUID=$uuid"
+ exit 1
+ fi
+
+ # old way, using various tools
if [ -x /sbin/findfs -a \( "$rootFs." = "ext2." -o "$rootFs." = "ext3." \) ] ; then
rootdev2="`/sbin/findfs $rootdev 2>/dev/null`"
if [ -n "$rootdev2" ] ; then