[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#490396: initramfs-tools: fails to start md devices



Package: initramfs-tools
Version: 0.92b
Severity: normal
Tags: patch

I have started pulling in some Lenny packages onto my Etch machine.
After I installed the new initramfs-tools, the machine failed to boot.

The cause was that mdadm failed to make the root filesystem available,
due to a script which will run fine with the mkdir from coreutils, but
which will fail when used with busybox.

Patch follows:

---%<---snip---%<---snip---%<---snip---%<---snip---%<---snip---%<---

diff -Naur initramfs-tools/hooks/mdadm initramfs-tools.new/hooks/mdadm
--- initramfs-tools/hooks/mdadm	2007-02-24 15:47:39.000000000 +0000
+++ initramfs-tools.new/hooks/mdadm	2008-07-12 03:29:42.000000000 +0000
@@ -149,7 +149,7 @@
   fi
 
   if [ $use_temp -eq 1 ]; then
-    mkdir --parents ${DESTMDADMCONF%/*}
+    mkdir -p ${DESTMDADMCONF%/*}
     tmpfile="${DESTMDADMCONF}.tmp"
     if /usr/share/mdadm/mkconf > $tmpfile; then
       # all is well, we now have a temporary configuration file
diff -Naur initramfs-tools/scripts/local-top/mdadm initramfs-tools.new/scripts/local-top/mdadm
--- initramfs-tools/scripts/local-top/mdadm	2007-02-24 15:47:39.000000000 +0000
+++ initramfs-tools.new/scripts/local-top/mdadm	2008-07-12 03:30:13.000000000 +0000
@@ -62,7 +62,7 @@
 fi
 
 # handle /dev/md/X nodes
-mkdir --parent /dev/md
+mkdir -p /dev/md
 
 CONFIG=/etc/mdadm/mdadm.conf
 # in case the hook failed to install a configuration file, this is our last

---%<---snip---%<---snip---%<---snip---%<---snip---%<---snip---%<---

-- System Information:
Debian Release: lenny
Architecture: i386 (i686)
Kernel: Linux 2.6.18-6-k7
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
diff -Naur initramfs-tools/hooks/mdadm initramfs-tools.new/hooks/mdadm
--- initramfs-tools/hooks/mdadm	2007-02-24 15:47:39.000000000 +0000
+++ initramfs-tools.new/hooks/mdadm	2008-07-12 03:29:42.000000000 +0000
@@ -149,7 +149,7 @@
   fi
 
   if [ $use_temp -eq 1 ]; then
-    mkdir --parents ${DESTMDADMCONF%/*}
+    mkdir -p ${DESTMDADMCONF%/*}
     tmpfile="${DESTMDADMCONF}.tmp"
     if /usr/share/mdadm/mkconf > $tmpfile; then
       # all is well, we now have a temporary configuration file
diff -Naur initramfs-tools/scripts/local-top/mdadm initramfs-tools.new/scripts/local-top/mdadm
--- initramfs-tools/scripts/local-top/mdadm	2007-02-24 15:47:39.000000000 +0000
+++ initramfs-tools.new/scripts/local-top/mdadm	2008-07-12 03:30:13.000000000 +0000
@@ -62,7 +62,7 @@
 fi
 
 # handle /dev/md/X nodes
-mkdir --parent /dev/md
+mkdir -p /dev/md
 
 CONFIG=/etc/mdadm/mdadm.conf
 # in case the hook failed to install a configuration file, this is our last

Reply to: