2

I had a Host with Ubuntu 12.10 installed, and the entire harddrive was encrypted (with LUKS it appears), I remember the passphrase, but I have trouble to "open it".

I am now on a beta version of Ubuntu 14.04, installed on a new harddrive. the old hard-drive is also still connected. the new drive is sda and the old drive is sdb

when I try to open the drive in "files" it ask for the passphrase, and when entered says that it does not find a filesystem.

I googled it and found this:

sudo cryptsetup luksOpen /dev/sdb5 myopen

and

sudo mount /mnt/open

with a fstab like this

/dev/mapper/myopen /mnt/open ext4 defaults,noauto 0 1

but I get this error:

mount: wrong fs type, bad option, bad superblock on /dev/mapper/myopen,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so
0

1 Answer 1

3

After some trial and error, and some more google, I came accross the solution. I think others might enjoy this, so I answer myself:

it turns out that the drive is a LVM (http://en.wikipedia.org/wiki/Logical_Volume_Manager_(Linux))

so, to fix this I do the following:

install LVM (this is for ubuntu)

apt-get install lvm2

modprobe dm-mod

scan the disks for volume groups

vgscan

change volume group to the one I just found above, in my case ubuntu-vg

vgchange -ay ubuntu-vg

find out about my locical volumes:

lvs

create a place to mount it:

mkdir /mnt/open

then use the above information to mount the volume

mount /dev/ubuntu-vg/root /mnt/open -o ro,user

then you can go to the open disk like this

cd /mnt/open

in my case I just want to recover some important files, then reformat. so case closed

2
  • thanks for the editing help, I will try to get it right one day :)
    – Sverre
    Mar 17, 2014 at 7:10
  • 1
    Thanks! Your answer helped me recover data from an encrypted Ubuntu 15.10 install that stopped booting. The LiveCD allowed me to mount the encrypted partition using the pass-phrase and see that the data was intact but when even that stopped working I thought I'd lost my chance at recovery. Ended up doing a parallel install on a fresh disk then used your guide for one last try. It worked saving me a lot of time and effort.
    – user336721
    Feb 10, 2016 at 5:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .