From ce1c64736aa741df012e93ca0bae5a9399c58909 Mon Sep 17 00:00:00 2001 From: "S. Sakar" Date: Sun, 21 Sep 2008 08:55:09 +0200 Subject: 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 --- hook-functions | 5 +++++ 1 file changed, 5 insertions(+) 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/} -- cgit v1.2.3