Bug#517072: MODULES=dep fails w/ luks over cciss devices
On Wed, 25 Feb 2009, François Delawarde wrote:
> Package: initramfs-tools
> Version: 0.92o
> Severity: important
> Tags: patch
>
> I needed to run update-initramfs w/ MODULES=dep (for some 15M BIOS size
> limitation w/ lilo on an HP server), turns out that I found the same bug
> as #507619 (please refer to it for details), except that I have a LUKS
> format over the cciss device.
>
>
> As bug #507619 describes:
> "dep_add_modules() expects to find a /sys/block/cciss/c0d0p file, but
> it should be trying /sys/block/cciss!c0d0"
>
>
> It also mentions:
> "fyi, I suspect this may also apply to old-style smart array devices,
> where device names are similar, but use 'ida' intead of 'cciss' -
> e.g. /dev/ida/c0d0p1."
>
>
>
> The following patch fixes it for me (on cciss) and should also fix it
> for ida devices:
>
> --- /usr/share/initramfs-tools/hook-functions.orig 2009-02-25
> 13:59:04.000000000 +0100
> +++ /usr/share/initramfs-tools/hook-functions 2009-02-25
> 14:00:50.000000000 +0100
> @@ -259,7 +259,13 @@
> block=$(awk "/^${block}/{print substr(\$5, 1, 4); exit}" \
> /proc/mdstat)
> fi
> - block=${block%[0-9]*}
> + # luks or lvm on cciss or ida
> + if [ "${block#cciss}" != "${block}" ] \
> + || [ "${block#ida}" != "${block}" ]; then
> + block="${block%p*}"
> + else
> + block=${block%[0-9]*}
> + fi
> # md root new naming scheme /dev/md/X
> elif [ "${root#/dev/md/}" != "${root}" ]; then
> root=${root#/dev/md/}
thanks for the feedback, although not certain aboves patch
fixes the error you saw. could you please repost the
error with unpatched mkinitramfs on MODULES=dep and the output
of ls /sys/block/
does belows patch help?
diff --git a/hook-functions b/hook-functions
index 4b69827..a40d711 100644
--- a/hook-functions
+++ b/hook-functions
@@ -259,7 +259,14 @@ dep_add_modules()
block=$(awk "/^${block}/{print substr(\$5, 1, 4); exit}" \
/proc/mdstat)
fi
- block=${block%%[0-9]*}
+ # luks or lvm on cciss or ida
+ if [ "${block#cciss}" != "${block}" ]; then
+ block="cciss!${block%p*}"
+ elif [ "${block#ida}" != "${block}" ]; then
+ block="ida!${block%p*}"
+ else
+ block=${block%%[0-9]*}
+ fi
# md root new naming scheme /dev/md/X
elif [ "${root#/dev/md/}" != "${root}" ]; then
root=${root#/dev/md/}
sorry for late reply, sunny greetings.
--
maks
Reply to: