+if [ -n "$INITRD" ] ; then
+ ## get partition number the initrd lives on, and the OF device= name
+ ## of the whole disk.
+ IRDDEV="$(v=`df "$INITRD" 2> /dev/null | grep ^/dev/` ; echo ${v%%[ ]*})"
+ IRDDIR="$(v=`df "$INITRD" 2> /dev/null | grep ^/dev/` ; echo ${v##*[ ]})"
+ IRDLINKDEV="$(v=`df "${INITRD%/*}/" 2>/dev/null | grep ^/dev/` ; echo ${v%%[ ]*})"
+ IRDPARTITION="${KERNDEV##*[a-z]}"
+
+ if ckdevfs "$IRDDEV" ; then
+ INITRDDISK="${IRDDEV%/*}/disc"
+ else
+ INITRDDISK="${IRDDEV%%[0-9]*}"
+ fi
+fi
+
+debug "KERNEL=$KERNEL\nKERNDEV=$KERNDEV\nKERNDIR=$KERNDIR\nLINKDEV=$LINKDEV\nPARTITION=$PARTITION\nKERNELDISK=$KERNELDISK\n"
+
+if [ -n "$INITRD" ] ; then
+ debug "INITRD=$INITRD\nIRDDEV=$IRDDEV\nIRDDIR=$IRDDIR\nIRDLINKDEV=$IRDLINKDEV\nIRDPARTITION=$IRDPARTITION\nINITRDDISK=$INITRDDISK\n"
+fi
+