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:
-
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?
-
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!!
Best Answer
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
.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.