summaryrefslogtreecommitdiff
path: root/hook-functions
diff options
context:
space:
mode:
authorFrançois Delawarde <fdelawarde@wirelessmundi.com>2009-02-25 14:04:53 +0100
committermaximilian attems <maks@debian.org>2009-03-24 02:35:10 +0100
commit2a0fee1aa8aa8dabc69380f861e7d1c8d35ec5f4 (patch)
tree2069960d0622a636ade6b82f7c7efdaecda6a8e6 /hook-functions
parent055fa3e34ee5edda2e99aec8f265b0958475989a (diff)
hook-functions: MODULES=dep fix for luks over cciss devices
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. [ patch got checked and tested life on #debian-boot channel, see below -maks ] fixed warning: mkinitramfs: missing cciss!c0d0p2 root /dev/mapper/quakelive-root /sys entry of course, since the new value of block comes out of /sys/block/dm-${minor}/slaves, it makes sense that it would already be in sysfs syntax. Tested-by: Timothee Besset <ttimo@ttimo.net>
Diffstat (limited to 'hook-functions')
-rw-r--r--hook-functions8
1 files changed, 7 insertions, 1 deletions
diff --git a/hook-functions b/hook-functions
index 4b69827..2368b8d 100644
--- a/hook-functions
+++ b/hook-functions
@@ -259,7 +259,13 @@ 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}" ] \
+ || [ "${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/}