LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   accidentally overwrote 1TB partition... any way to recover data? :( (http://www.linuxquestions.org/questions/linux-newbie-8/accidentally-overwrote-1tb-partition-any-way-to-recover-data-754851/)

zuzoa 09-13-2009 12:19 PM

accidentally overwrote 1TB partition... any way to recover data? :(
 
I was going to install linux onto my flash drive, and forgot I had my external 1TB drive plugged in... I didnt bother looking at the numbers, and I saw it was a FAT partition, so I deleted the partition in cfdisk, and made a new ext3 partition over it.

AFAIK the data is still there, but the references to the files are gone? Is there any way to recover it?

Should I go back into cfdisk, delete the ext3 partition, make a fat32 one and go from there?

Please help, somebody :(

sploot 09-13-2009 12:35 PM

Did you overwrite (ie. replace all the data) or simply do something like a reformat or the filesystem?

If you have only changed the fs type in cfdisk, then you have only altered the MBR. If you change the type back to FAT then you should have all the data still present. If you have done subsequent writes to the disc, after having changed the fs type then you will encounter problems with data loss.

--Sploot

zuzoa 09-13-2009 12:43 PM

Thank you so much for replying. I am fairly certain I haven't replaced all the data, seeing as the process took only a second or two. I have not written anything to the partition since changing it.

Is there another way I should change it back, besides deleting the ext3 partition and creating a fat32 partition? Any certain command like mkfs or something?

sploot 09-13-2009 12:49 PM

Change it just like you did the first time. Delete the partition record, and replace it with the what was there to begin with.

Have you run mkfs.ext3 on it yet?

--Sploot

zuzoa 09-13-2009 12:59 PM

I haven't run mkfs.ext3 myself but cfdisk might have used it when I overwrote it originally.

I just booted up into the livecd and ran cfdisk again, deleted the partition and rewrote it as fat32, booted up my OS and the files are all still here :D

Thank you again for your help. I don't know what kind of crazy things I would have done to try to recover the data otherwise :X


All times are GMT -5. The time now is 07:44 AM.