HOWTO: Unlock A LUKS Encrypted Root Partition Via SSH On Ubuntu

Discussion in 'HOWTO-Related Questions' started by peter7, Jun 26, 2008.

  1. peter7

    peter7 New Member

    I am trying to apply the Howto indicated in the title to a fully encrypted (by alternative
    install) Kubuntu 8.04. I can login over ssh after the boot but the
    "unlock" command is just hanging there with the message:

    Code:
    Setting up cryptographic volume sda2_crypt (based on /dev/disk/by-uuid/...
    It never prompts for the pass phrase or does anything.

    I was wondering if anybody has some idea how to proceed. I tried to do
    manually what unlock does with the same result.
     
  2. sjau

    sjau Local Meanie Moderator HowtoForge Supporter

    you do have a fully encrypted system?
     
  3. peter7

    peter7 New Member

    Yes I do, except the /boot partition of course.
     
  4. sjau

    sjau Local Meanie Moderator HowtoForge Supporter

    Post your /etc/initramfs-tools/scripts/local-top/cryptroot script
     
  5. peter7

    peter7 New Member

    This directory is empty.

    If you mean the file /scripts/local-top/cryptroot in the netboot initrd image then it is the same as what is in the original initrd. Which in turn comes from /usr/share/initramfs-tools/scripts/local-top/cryptroot unmodified. These files are part of the cryptsetup package and are the same over all ubuntu based distros. My cryptsetup is version 2:1.0.5-2ubuntu12

    What I noticed that the prompt asking for the pass phrase showed up on the console instead of in my ssh session but took no input.
     
  6. sjau

    sjau Local Meanie Moderator HowtoForge Supporter

    are you using LVM?
     
  7. peter7

    peter7 New Member

    Yes, but the encryption is on the underlying (single) physical partition.
    The failed netboot procedure does not get to the lvm phase at all.
     
  8. sjau

    sjau Local Meanie Moderator HowtoForge Supporter

    there has been an issue with kernel and lvm... I don't recall the exact specifics right now....
     
  9. sjau

    sjau Local Meanie Moderator HowtoForge Supporter

    I just re-set it up according to my howto in a vm... it works great... the only problem I had (in the beginning) that I did copy a single/recovery user grub entry.... once I realized that it worked again...

    So, try it on your computer in a vmware or so with a non-lvm install....
     

Share This Page