Ubuntu – Recover data from formatted LVM (Luks, Ext3) after Ubuntu installed over it

data-recoveryencryptionlvmpartitioning

I have a 1TB HDD and some days ago I did a mess

That disk had:

  • One EXT3 partition ( / )
  • One EXT3 partition ( /boot )
  • One LUKS LVM which had a EXT3 partition of about 200 GB

I wanted to replace Linux Mint 14 with Ubuntu 14.04, so I booted Ubuntu 14.04 from USB and did the installation wizard.
The wizard asked me "Replace Linux Mint 14 with Ubuntu 14.04", so I did, I also checked to add LVM and to crypt user directory. I set up a password and I installed it.

The installation blocked itself almost at end, and by rebooting via USB i noticed that the HDD was formatted and there was just the /boot and the / (my LUKS LVM was formatted and replaced with those two partitions)

I have

  • The disk itself
  • The dd image of the disk after the disaster (a 1TB img)
  • The passphrase to unlock both the LVM: the oldest one (which I want to recover) and the newest one (to unlock the root partition)

Question
How can I recover my precious data?

Best Answer

Unfortunately, per man cryptsetup

LUKS header: If the header of a LUKS volume gets damaged, all data is permanently lost unless you have a header-backup. If a key-slot is damaged, it can only be restored from a header-backup or if another active key-slot with known passphrase is undamaged. Damaging the LUKS header is something people manage to do with surprising frequency. This risk is the result of a trade-off between security and safety, as LUKS is designed for fast and secure wiping by just overwriting header and key-slot area.”

And per your comment (11 hours ago),

Thanks for your answer! Unfortunatly no, I haven't. I don't have a back-up of the key nor the one of the LUKS header.

I think your disks have been (effectively) securely erased; that is the sectors are (at least in theory) indistinguishable from random data.