1

I tried to create a bootable Ubuntu iso disk on a partition (sdc-2) of a usb stick, which had originally three partitions (sdc-1/2/3, of type ext3/fat32/ntfs). Following this thread, I ran:

sudo umount /dev/sdc2
sudo dd if=input.iso of=/dev/sdc

Now, I am not able to access the 3 partitions anymore. So first question, did I make a mistake? My feeling is that I should have used of=/dev/sdc2 instead, right?

Second question, how do I fix the problems:

  1. The partitions are not shown. Running testdisk, I see one "iso" partition, but then, the "quick search" option shows the three underlying partition. How can I get the three partitions system back?

  2. Previous partition sdc1 seems damaged. Testdisk detects it, but cannot list files. Did the dd operation irremediably damage it? Any change I could recover without using tools like photorecovery?

Thanks so much!!

  • If an answer was helpful to you, then please consider marking it as the accepted answer so others may more easily find it in the future. This is also a polite way to thank the person answering your question for helping you out. – Andrea Lazzarotto Aug 12 '16 at 21:17
1

did I make a mistake?

You overwrote the beginning of drive /dev/sdc with a ISO file. From the last part of your question, it seems it is not what you wanted to do. Hence yes, it was a mistake. A pretty bad one.

You should have used /dev/sdc2.

How can I get the three partitions system back?

As you have determined, you can easily restore the 2nd and the 3rd ones by using TestDisk.

TestDisk can create a partition table from the file systems it finds on your drive. The basic idea, however, is that you shoulde use TestDisk to copy the files on a different drive, then recreate your partitions from scratch.

You won't be able to do the same on the first one because it is damaged. You need to analyze /dev/sdc1 with an advanced recovery tool like R-Linux.

1

If you cannot access your files, choose "deeper search" which may take some time, but might be able to locate the proper sectors to recover the partition. Ensure the letter to the right of the partition type is not "D", as this means it's set for deletion. It can be changed to other partition types L,E or P (Logical, Extended, or Primary). Only duplicates that don't work should be marked for deletion after you've found all your working partitions.

Once you've located the partitions, and are able to access the files, choose the [Write] option to save the partition tables.

For complete instructions and detailed recovery options, please see this step by step guide : http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step

  • thanks a lot!!! The deeper search finds a ton of weird partitions, none of them seem to contain the files I wanted to recover :-( Also, I cannot choose the [write] as "partition table type "None" has been selected". Should I have selected another one? What is the default one? Thanks! – Matifou Jul 4 '16 at 20:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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