diff options
author | S. Sakar <serkan.sakar@gmx.net> | 2008-09-21 08:55:09 +0200 |
---|---|---|
committer | maximilian attems <maks@debian.org> | 2008-12-18 17:41:46 +0100 |
commit | ce1c64736aa741df012e93ca0bae5a9399c58909 (patch) | |
tree | 52ef8a797a55c7717e78f3f0d8bf82845adeb430 /hook-functions | |
parent | 3ad23cbea9da45fecb931b2fec9c79edc23004a1 (diff) | |
download | initramfs-tools-ce1c64736aa741df012e93ca0bae5a9399c58909.tar.gz initramfs-tools-ce1c64736aa741df012e93ca0bae5a9399c58909.zip |
hook-functions: MODULES=dep fix encrypted loop device
i've set up an encrypted loop-AES device as the root partition (boot
paramter dev=/dev/loopX) and update-initramfs fails with :
mkinitramfs: missing loop root /dev/loop2 /sys entry
Diffstat (limited to 'hook-functions')
-rw-r--r-- | hook-functions | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/hook-functions b/hook-functions index 0863122..6a68910 100644 --- a/hook-functions +++ b/hook-functions @@ -278,6 +278,11 @@ dep_add_modules() elif [ "${root#/dev/ida/}" != "${root}" ]; then block=${root#/dev/ida/*} block="ida!${block%p*}" + # loop root /dev/loopX + elif [ "${root#/dev/loop}" != "${root}" ]; then + root=${root#/dev/} + block=$(losetup -a \ + | awk "/${root}/{print substr(\$3, 7, 3); exit}") # classical root device else block=${root#/dev/} |