Bug#402106: mdadm: Error in initramfs hook: last /dev/ of DEVICE line is treated as md device

martin f krafft madduck at debian.org
Fri Dec 8 09:11:12 CET 2006


also sprach Daniel Dehennin <dad at baby-gnu.org> [2006.12.08.1032 +0400]:
> I have errors messages when generating the initramfs with md devices.
> 
> As I can see, the problem comes from the while loop line 186 of 
> /usr/share/initramfs-tools/hooks/mdadm.
> 
> the last argument of the DEVICE line is treated as md devices.
> 
[...]
> 
> Maybe the loop should check if the line begins with 'ARRAY' ?

Great analysis of the problem. You are absolutely right, this is
a bug in the hook I wrote, and checking for /^ARRAY/ should fix
that.

It seems like a non-critical problem as it's just an error message,
but the actual operation is not affected. Thus, it will be unlikely
to have this fixed in etch, but I am not ruling it out either.

Could you try if the following patch against the hook script fixes
the problem?

--- debian/initramfs/hook (revision 278)
+++ debian/initramfs/hook (working copy)
@@ -184,6 +184,10 @@
   # obtain dev:level pairs from config file, honouring multiline entries
   devpairs="$(
     while read line; do
+      case "$line" in
+        (ARRAY*) :;;
+        (*) continue;;
+      esac
       for atom in $line; do
         case "$atom" in
           (/dev*) dev=$atom;;

-- 
 .''`.   martin f. krafft <madduck at debian.org>
: :'  :  proud Debian developer, author, administrator, and user
`. `'`   http://people.debian.org/~madduck - http://debiansystem.info
  `-  Debian - when you have better things to do than fixing systems
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature (GPG/PGP)
Url : http://lists.alioth.debian.org/pipermail/pkg-mdadm-devel/attachments/20061208/431ded80/attachment.pgp


More information about the pkg-mdadm-devel mailing list