March 6, 2008 · Security · Email This Post

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

This tutorial is for people who have encrypted their main volumes of their hard drives using the method offered by the Alternate CD installer.

First you need to Boot into a Live CD environment and open up a terminal window. (applications–>accessories—>terminal)

Install required packages using the following command

sudo apt-get install lvm2 cryptsetup

probe required module using the following command

sudo modprobe dm-crypt

setup the crypto module to recognise the partition

sudo cryptsetup luksOpen /dev/hda5 crypt1

Enter your passphrase. You should get the following message:

key slot 0 unlocked.
Command successful.
If not, something has gone wrong.

Scan for volume groups

sudo vgscan --mknodes
sudo vgchange -ay

REMEMBER the name of the volume group, as you will need it later.

Create a mount point

sudo mkdir /volume

mount the encrypted volume to the mountpoint you just created.

sudo mount /dev/paulb-desktop/root /volume

The volume is mounted, now you can chroot or whatever else you need to do. If you would like to open the gnome file manager for writing to it issue the following command:

sudo nautilus /volume

  • Share/Save/Bookmark

Related Articles

6 Comments to “Rescue an encrypted LUKS LVM volume”

  1. Ubuntu User says:

    Thanks!
    I’ve just installed Ubuntu 8.04 on a encrypted partition with lvm a few days ago and wondered how to do this, if something goes wrong.
    Never worked with lvm before…

  2. moebus says:

    Thanks a lot,
    I’ve just broke my fedora system and was unable to access my LUKS-LVM “/” partition untill I found you tutorial.

    you make me very happy!

  3. an0nym0use says:

    I have SATA(hda) hdd with Ubuntu 8.10 + lvm + encrypt
    /dev/sda1 * 1 60770 488134993+ 83 Linux
    /dev/sda2 60771 60801 249007+ 5 Extended
    /dev/sda5 60771 60801 248976 83 Linux

    On other Ubuntu 8.10
    andruffka@andruffka:~$ sudo cryptsetup luksOpen /dev/sda5 crypt1
    Command failed: Can not access device
    andruffka@andruffka:~$

    what’s wrong?

  4. an0nym0use says:

    wow, my encrypted volume is sda1, not sda5
    and mount command like “sudo mount /dev/mapper/LABEL-root /media/MOUNTPOINT”

  5. denali206 says:

    Unfortunately, I can’t get this to work from the live cd. Unknown command apt-get.

  6. jcypher says:

    denali206, use aptitude instead of apt-get, it’s the same functionality.

Leave a Reply