I tried some experimenting with a 10MB file, using cryptsetup to "luksFormat" and "luksOpen" it (then used gparted
on the /dev/mapper/xxxx device to create a MBR & partition & format it - I'm not sure if that's how a standard disk encryption works, or if it just formats the /dev/mapper/xxxx device & mounts it).
Then I can use dmsetup ls
to see the "/dev/mapper/xxxx" file, and dmsetup is for "low level logical volume management". So you might want to try the sudo dmsetup ls
command and see what it says, there might be a "partition" device like /dev/mapper/securediskp1
that you should try mounting...
Or, this very helpful archwiki page has info on using LVM on LUKS, mainly how to set it up though.
This very brief webpage indicates "Mount LVM partitions from an external hard drive" should be pretty easy, I think it should work after the device has been luksOpen
-ed:
As root (sudo), run
vgscan
vgchange -a y
and all the partitions should have devices created in the form /dev/volumegroup/logicalvolume,
which you can then mount in the usual way:
mount /dev/volumegroup/logicalvolume /mnt/somewhere
This link "How to mount Linux LVM volume partitions on Linux" has some slightly different info:
[root]# pvs
This will list the volume groups to which our physical volume /dev/sda2 belonged. It would be of the form
PV VG Fmt Attr PSize PFree
/dev/hda2 VolGroup01 lvm2 a- 148.94G 32.00M
The second field, VG, shows the Volume group. The above output is just an example, showing that we are concerned with the Volume group "VolGroup01". The next step is to list the information about this volume group.
[root]# lvdisplay /dev/VolGroup01
It will throw a bunch of ouput, but the one we are concerned with is LV Name. It will look something like this
LV Name /dev/VolGroup01/LogVol00
In our case, there were two entries of type LV Name, the other being LogVol01, the swap. The whole output along with it will help you to identify the target logical volume you are looking for. Assuming that the above one is the partition that we need to mount, just use the usual method to mount it.
[root]# mount /dev/VolGroup01/LogVol00 /mnt
Now, you can to find the data you were looking for in the /mnt folder.
Other helpful looking questions:
man lvm
and the accompanying tools pages? Or web search for "how to mount lvm ubuntu"? (I don't know how either, but that's what I'd try, they usually work) --- Or maybe the encrypted drive is only one part of a larger LVM "set"?lvm2
toolkit from locating the drive, even after decrypted. An explanation of how the Ubuntu 13.10 bootstrapper would mount the drive would probably be sufficient for me to replicate the process.lvs
orlvdisplay
look potentially useful, maybe evenpvscan
but I'm not sure either. I thought that usually an encrypted device would just be decrypted and mounted like a regular partition, whether at boot or later, but this one seems different. Could trycryptsetup isLuks -v <device>
to verify it is a LUKS device, but then luksOpen should fail if it weren't...