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

Bug#388172: mkinitramfs indirectly invokes mdadm -Escpartitions; results can cause system to not boot

Package: initramfs-tools
Version: 0.79

The mkinitramfs script invokes the mdadm hook in /usr/share/initramfs-tools/hooks/. The hook, in turn, invokes the mdadm script called mkconf, located at /usr/share/mdadm/mkconf.

The mkconf script calls `mdadm -Escpartitions`, which can produce incorrect results in certain situations. These incorrect results, incorporated into an initramfs that needs to mount RAID, could cause the system to not boot. See Debian bug #386315 for more information.

If you're short on time, scroll down to my addendum to that bug report from Sat, 09 Sep 2006 14:32:31 -0400. It shows the output of `mdadm -Escpartitions` with two /dev/md0 devices and no /dev/md2 device.

My work-around was to run mkinitramfs with -k, which tells mkinitramfs to keep the temporary files. Then, I changed the mdadm.conf in the temporary directory to the correct configuration and recreated the initramfs image by following the cpio and gzip steps near the end of the mkinitramfs script.

This is certainly not something a novice would be able to do, so I advise finding an alternative to `mdadm -Escpartitions` soon.


Colin W. Wetherbee

Reply to: