summaryrefslogtreecommitdiff
path: root/mkinitramfs
diff options
context:
space:
mode:
authormaximilian attems <maks@debian.org>2006-08-23 09:22:54 +0200
committermaximilian attems <maks@debian.org>2006-08-23 09:22:54 +0200
commitfabe918dee7da26d177d67d4aa8fe3fd6e83e513 (patch)
tree5dee066c10e912f5328dba7de3032cd6058019dc /mkinitramfs
parentd1d6763409a1260708423e0092d7bc4182275773 (diff)
downloadinitramfs-tools-fabe918dee7da26d177d67d4aa8fe3fd6e83e513.tar.gz
initramfs-tools-fabe918dee7da26d177d67d4aa8fe3fd6e83e513.zip
- improved nfsroo parsing
- added rootdelay and rootfstype bootargs - document this changes - initrd-tools backward compatible mdadm assembe and then run mdrun - update-initramfs really checkout use_bootloader from /etc/kernel-img.conf - tighter klibc deps
Diffstat (limited to 'mkinitramfs')
-rwxr-xr-xmkinitramfs19
1 files changed, 17 insertions, 2 deletions
diff --git a/mkinitramfs b/mkinitramfs
index 67d9df0..759d6cb 100755
--- a/mkinitramfs
+++ b/mkinitramfs
@@ -209,7 +209,11 @@ for i in ${EXTRA_CONF}; do
copy_exec "/usr/share/initramfs-tools/conf.d/${i}" /conf/conf.d
fi
done
-echo "ROOT=${ROOT}" > ${DESTDIR}/conf/conf.d/root
+
+# ROOT hardcoding
+if [ -n "${ROOT}" ]; then
+ echo "ROOT=${ROOT}" > ${DESTDIR}/conf/conf.d/root
+fi
# Busybox
if [ "x${BUSYBOX}" = "xn" ]; then
@@ -233,7 +237,18 @@ run_scripts "${CONFDIR}"/hooks
# FIXME: Remove this Raid block after Etch releases
if [ -x /sbin/mdadm -a ! -f /usr/share/initramfs-tools/hooks/mdadm ]; then
- mdadm --examine --scan > $DESTDIR/conf/mdadm.conf
+ # use mkinitrd magic for Sarge backwards compat
+ rootraiddev="$(df / | sed -rne 's,^(/dev/[^[:space:]]+).*,\1,p')"
+ echo "rootraiddev=${rootraiddev}" > /conf/mdadm.conf
+ mdadm=$(mdadm --detail "${rootraiddev}")
+ echo "${mdadm}" | awk '
+ $1 == "Number" && $2 == "Major" { start = 1; next }
+ $1 == "UUID" { print "uuid=" $3; next }
+ !start { next }
+ $2 == 0 && $3 == 0 { next }
+ { devices = devices " " $NF }
+ END { print "devices='\''" devices "'\''" }' \
+ >> /conf/mdadm.conf
copy_exec /sbin/mdadm /sbin
copy_exec /sbin/mdrun /sbin
for x in md linear multipath raid0 raid1 raid456 raid5 raid6 raid10; do