How can I mount an encrypted LVM under Windows?

7

0

I have a virtual machine with Ubuntu server with an encrypted LVM.

I set up a virtual drive using imdisk to access its virtual hard drive without running the virtual machine, but I can't find any way to access this encrypted lvm in Windows.

Is there any Windows program that allows mounting encrypted LVMs?

NotGaeL

Posted 2012-05-02T21:40:43.783

Reputation: 375

1

I am not sure about the LVM layer, but the dm-crypt seem to be usable using FreeOTFE. See http://en.wikipedia.org/wiki/Dm-crypt

– Zoredache – 2012-05-02T21:50:34.163

Only if the underlying filesystem is NTFS. – LawrenceC – 2012-05-02T22:31:47.933

FreeOTFE supports dm-crypt/LUKS. I installed it but now the problem is it can only open a file (no .vdi container compatible) or a partition on my physical disk, and I only have the virtual drive created by Imdisk. Any ideas? – NotGaeL – 2012-05-03T10:22:27.800

1Have you considered just rebuilding the virtual machine and setting up the system to not use LVM? – Zoredache – 2012-05-10T17:31:43.697

I've considered it and I've done it. I disabled LVM encryption on the volume inside the .vdi container to avoid redundant encryption and moved the .vdi to a TrueCrypt container. Seems the best alternative so far, but I still would like to know if there is a solution to allow me mount LVM LUKS encrypted volumes inside a variable size .vdi containers. – NotGaeL – 2012-05-12T10:04:04.333

Answers

4

From wikipedia dm-crypt :

dm-crypt and LUKS encrypted disks can be accessed and used under MS Windows using FreeOTFE, provided that the filesystem used is supported by Windows (e.g. FAT/FAT32/NTFS).

Encrypted Ext2, Ext3 and Ext4 filesystems are supported by use of Ext2Fsd (all ext* versions) or Ext2 Installable File System for Windows (ext2 and ext3 only) and with FreeOTFE.

See this article for how to use these products :
Mounting LUKS / dm-crypt Partitions in Microsoft Windows.

The described method works on a partition, so I wonder if it wouldn't also work on an lmdisk partition.

harrymc

Posted 2012-05-02T21:40:43.783

Reputation: 306 093

Sure about Explore2fs LVM2 support using this Virtual Volumes beta. Unfortunately it does not support dm-crypt/LUKS encryption, neither vdi virtual HDD container access or access to the virtual drive where imdisk mounts this vdi container, so it's nowhere close to a solution. Thanks anyway. – NotGaeL – 2012-05-06T16:43:53.660

dm-crypt does throw a spanner into the machinery. I rewrote my answer. – harrymc – 2012-05-06T17:14:04.900

1all of that I've already figured it out, but how can I get to see the virtual hardrive (VDI container) partitions on the list the same way I see the physical hard drive ones? I tried Imdisk with no luck (it's a variable size container and it only works with fixed sized VDI containers). I guess I need a virtual device driver for vdi containers or something like that... – NotGaeL – 2012-05-06T18:45:28.970

Do you mean to say that the problem is that FreeOTFE refuses to use the imdisk drive ? – harrymc – 2012-05-06T19:51:48.200

Another question : Might using TrueCrypt instead of dm-crypt make the job easier? Hmmm, you may run into the same problem with variable vdi. You might need to give up on the variable part. – harrymc – 2012-05-06T20:08:29.300

I've already tried truecrypt and freeOTFE to mount both the .vdi and the dm-crypt virtual drive mount of the .vdi (which was not properly mounted because it lacks support for non-fixed sized .vdi containers). No luck so far. – NotGaeL – 2012-05-12T09:59:58.067

You are running everywhere into the limitations of variable size vdi. – harrymc – 2012-05-12T11:14:44.173

I certainly am, but consider a fixed sized vdi didn't solve my problem either, since the imdisk hack to mount it doesn't seem to work with LVMs, encripted or not (In the article I read on how to the guy was mounting a FAT32 formatted virtual drive, that's why it doesn't work for me, I guess). – NotGaeL – 2012-05-14T21:34:04.510