#41 Loop aes and lvm2

closed
nobody
None
6
2011-10-28
2011-07-29
samuraiii
No

Hello,

I've got this setup and tried the advice form https://sourceforge.net/tracker/?func=detail&aid=3301954&group_id=28891&atid=394668 but I got error "USEPIVOT>0 but setup looks like USEPIVOT=0" - or something very similar.

I have old laptop with 160gb drive partitioned like this: first 20 GB for WinXP (using on it OCR), than 200MB for boot and than rest as a loop-AESed partition on top of which is LVM2, but I'm stuck at he boot time with that error (setup is made exactly as in the support request shown at the beginig of my post.
In attachemet is my zipped build-initrd.sh and build-initird.conf (which I edited as I thought to be edited in previous support request)

Thanks in advance for help

Discussion

1 2 3 > >> (Page 1 of 3)
  • samuraiii
    samuraiii
    2011-07-29

    build-initrd.sh and .conf

     
    Attachments
  • samuraiii
    samuraiii
    2011-07-29

    • priority: 5 --> 6
     
  • samuraiii
    samuraiii
    2011-07-29

    Im sorry I forgot to compress in attachment my rootsetup file.
    content of file is here:
    #!/lib/sh
    if [ "x$1" != "x-d" ] ; then
    /lib/mkdir -p /proc /dev/mapper
    /lib/mount -n -t proc proc /proc
    /lib/losetup -e AES256 -K /lib/gpg.key.gpg -G /lib /dev/loop1 /dev/sda3
    /lib/lvm vgscan --ignorelockingfailure
    /lib/lvm vgchange -ay --ignorelockingfailure
    /lib/umount -n /proc
    x=$?
    exit ${x} # exit with return status of losetup
    else
    /lib/losetup -d /dev/loop5
    x=$?
    exit ${x} # exit with return status of losetup
    fi

     
  • Jari Ruusu
    Jari Ruusu
    2011-07-30

    That sounds like a problem in bootloader
    configuration. Can you include your full
    bootloader config and full kernel config?
    Both in compressed form.

     
  • samuraiii
    samuraiii
    2011-07-30

    Hope this ones are the right ones :)

     
    Attachments
  • samuraiii
    samuraiii
    2011-07-30

    I uploaded configs you requested.
    Hope they are I right ones you wanted.

    Its kernel compile config
    a classic grub.conf from boot directory

     
  • Jari Ruusu
    Jari Ruusu
    2011-07-30

    Bootloader and kernel configs looked OK to me, so that is
    not where the problem is.

    The initrd.gz that you are trying to use is most likely not
    the one you believe you are using. That build-initrd.sh
    script with your config fails to create new initrd.gz, it
    stops with an error:

    # ./build-initrd.sh build-initrd.conf
    Loading config from 'build-initrd.conf'
    *****************************************************************
    *** Internal build-initrd.sh error condition detected. This ***
    *** script was supposed to create block device nodes for ***
    *** BOOTDEV=, CRYPTROOT= and possibly EXTERNALGPGDEV= but ***
    *** lacked knowledge of how to create at least one of them. ***
    *** Script aborted. ***
    *****************************************************************
    # echo $?
    1
    #

    That is because CRYPTROOT=/dev/dm-1 is a device name for
    which the script doesn't know how to create a block special
    device node.

    Your rootsetup script seems to use hardcoded /dev/sda3 as
    the backing device for /dev/loop1 . If you specify
    CRYPTROOT=/dev/sda3 in the build-initrd.sh config, then the
    script will work. Your rootsetup script seems to ignore most
    of the parameters passed to it, so it doesn't matter what
    CRYPTROOT= is as long as it is something that the script is
    able to create a block special device node for it.

    After changing CRYPTROOT=/dev/sda3 in the config, it works:

    # ./build-initrd.sh build-initrd.conf
    Loading config from 'build-initrd.conf'
    11 blocks
    -rw------- 1 root root 2382 Jul 30 15:01 /boot/initrd.gz
    Copying /sbin/losetup to /boot/losetup
    Copying /lib/libc.so.6 to /boot
    Copying /lib/ld-linux.so.2 to /boot
    Copying /sbin/insmod to /boot/insmod
    Copying /lib/libc.so.6 to /boot
    Copying /lib/ld-linux.so.2 to /boot
    Copying /bin/loadkeys to /boot/loadkeys
    Copying /lib/libcfont.so.0 to /boot
    Copying /lib/libctutils.so.0 to /boot
    Copying /lib/libconsole.so.0 to /boot
    Copying /lib/libc.so.6 to /boot
    Copying /lib/ld-linux.so.2 to /boot
    Copying /usr/bin/gpg to /boot/gpg
    Done.
    # echo $?
    0
    #

     
  • samuraiii
    samuraiii
    2011-07-30

    Yes we moved a bit:

    Now I get mountig /dev/sda2 as /lib failed

     
  • Jari Ruusu
    Jari Ruusu
    2011-07-30

    INITIALDELAY=3 in build-initrd.sh config may
    help if devices are detected slowly.

     
  • samuraiii
    samuraiii
    2011-07-30

    No help, still the same even with 10 sec delay.

     
1 2 3 > >> (Page 1 of 3)