Page 4 of 4 FirstFirst ... 234
Results 31 to 32 of 32

Thread: Can't access luks-encrypted system partition anymore

  1. #31
    Join Date
    Jan 2007
    Location
    Ann Arbor, MI, USA
    Beans
    55
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Can't access luks-encrypted system partition anymore

    Have you tried sudo modprobe dm-mod ?

    Here's my cheatsheet for off-the-live-cd LUKS/LVM decryption:

    # RESCUE ENCRYPTED PARTITION

    # download and copy cryptsetup and lvm2 .deb files to /boot/rescue
    # apt-get -d install cryptsetup lvm2
    # see package files in /var/cache/apt/archives

    # /dev/sda1 is my /boot. /dev/sda2 is my crypto partition, containing
    # volume group vg1 with logical partitions lvswap, lvroot, lvdata

    # need packages cryptsetup (encrypted partition tools) and lvm2 (logical
    # volume manager); install from internet (apt-get) or from local .deb files

    # either use direct package installation (I pre-downloaded into /boot/rescue)...
    sudo mkdir /media/boot
    sudo mount /dev/sda1 /media/boot
    sudo dpkg -i /media/boot/rescue/cryptsetup*.deb /media/boot/rescue/lvm2*.deb

    # or use network-based package download/installation
    sudo apt-get install cryptsetup lvm2

    # insert kernel modules that we will need
    sudo modprobe dm-crypt
    sudo modprobe dm-mod

    # unlock the sda2 partition and call it MYTAG
    sudo cryptsetup luksOpen /dev/sda2 MYTAG
    Enter LUKS passphrase:
    key slot 0 unlocked.
    Command successful.

    # now that we have unlocked the encryption, deal with the lvm

    sudo vgscan # scan for all volume groups
    Reading all physical volumes. This may take a while...
    Found volume group "vg1" using metadata type lvm2

    # make the vg1 volume group active; if you don't give it a volume group as
    # an argument it'll make them all active
    sudo vgchange -ay [vg1]

    sudo lvscan # list logical volumes and their /dev path
    ACTIVE '/dev/vg1/lvswap' [2.00 GB] inherit
    ACTIVE '/dev/vg1/lvroot' [10.00 GB] inherit
    ACTIVE '/dev/vg1/lvdata' [60.00 GB] inherit

    # mount a logical volume; don't do this if you need to run fsck on it
    sudo mkdir /media/root
    sudo mount /dev/vg1/lvroot /media/root

    # to reverse the process and unmount everything, do the following

    sudo umount /media/root

    # the following command will issue a somewhat confusing message
    sudo vgchange -an [vg1]
    0 logical volume(s) in volume group "vg1" now active

    sudo cryptsetup luksClose MYTAG

  2. #32
    Join Date
    Oct 2007
    Beans
    88
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Can't access luks-encrypted system partition anymore

    Hi John,

    I solved my #30 problem. As expected I felt a bit ridiculous.

    Symtoms:
    Boot up as normal, enter the password and get in.
    Boot up from CD, not able to get access.

    Solution:
    There was an "@" sign in the password, and I am in the UK. These two things together caused the problem. It seems that on the main system this was fine, I'm not sure at what stage the kb was set up as a uk one. Anyway it was never a problem.

    Booting from the CD at no stage is the kb changed to uk ( of course ). When I typed the @ it came out as ", I couldn't see it on the screen so didn't realise. This means I was always entering the wrong password even when hitting the right keys. Big relief now, I can get to change things from the CD now.

    Your list looks useful, I'll take a copy, thanks.
    regards,
    ubuntu 14.04 with full encryption, an SSD and dual monitors

Page 4 of 4 FirstFirst ... 234

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •