Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I had an Ubuntu installation on my laptop, on an encrypted LVM (this was /dev/sda1).

I was planning to write an Arch Linux image to my USB drive (/dev/sdc1), following this guide - https://wiki.archlinux.org/index.php/USB_Installation_Media#Overwrite_the_USB_drive. Instead, I accidentally overwrote my Ubuntu by using

dd if=archlinux.iso of=/dev/sda

Is there any hope of recovering my Ubuntu installation, or is it totally hopeless, and I rather recover as much data as possible?

share|improve this question
1  
I think the worst part is that it was an encrypted LVM, I have the feeling trying to recover this is nearly impossible, but lets see what others say. –  madmaze Sep 21 '11 at 15:40
    
D: Scary! I did dd if=/dev/sda of=justincase.bkup bs=512 c=1 so I won't mess up my MBR or partition table, or two byte signature. :D –  Rob Sep 21 '11 at 17:29

2 Answers 2

up vote 1 down vote accepted

I'm assuming this is dm-crypt/ LUKS. How late did you realize this mistake and terminate the dd? If you've overwritten the salt in the header, it's impossible to recover your data. Otherwise, there are some tools in the cryptsetup-luks package to perform surgeries by hand and recover data. For more, see the questions that follow "What happens if I overwrite the start of a LUKS partition or damage the LUKS header or key-slots?" in the official LUKS FAQ.

share|improve this answer
    
Ah, it's totally hopeless. It doesn't go past the POST screen, nor can I boot from a USB/CD/DVD. I'm guessing it has to do with some EFI/UEFI system. And since the Arch Linux image is about 375 MB, it must've wiped out the boot loader, LUKS header and more. Just handed it over to the Lenovo guys. –  NOLFXceptMe Sep 22 '11 at 7:13

You have no hope whatsoever I am afraid. You could send your HD to some top of the range data recovery company which would charge you a lot and not even grantee that they will get the data off.

Time to restore from backup.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.