PDA

View Full Version : [ubuntu] Accidental Format



JoE oH
November 29th, 2010, 02:48 AM
Hey. I was putting ubuntu onto another computer and it asked for a swap partition. I assumed this meant it wanted some space on a partition to use for swap. Instead it formatted the entire partition (The windows one O.o) So all the documents and the OS are gone. But for 40gb-ish of space it appeared to format quickly. So I assume something might be recoverable. But its in the swap format now instead of windows. I would appreciate some help on how to recover some of my files :)

Joe

Rubi1200
November 29th, 2010, 05:26 PM
Hi and welcome to the forums :)

Sorry to hear about your troubles.

Whatever you try, do not write to the disk!

Instead using a LiveCD, boot the computer then download and install Testdisk on the CD.

Run it and try and recover the partition and/or data:
http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step

Good luck!

JoE oH
November 30th, 2010, 12:44 AM
Thanks. Ill give it a shot :)

endotherm
November 30th, 2010, 12:58 AM
for this kind of problem, testdisk is the best bet for unformatting. just make sure that you have a second hard disk, capable of storing the entirety of the formatted disk. do not attempt to recover data to the disk that it was lost off.

if you need to look into other recovery methods, this page is very comprehensive:
https://help.ubuntu.com/community/DataRecovery

is the disk in question healthy? if so, the data should be reasonably easy to recover, (if it has not been overwritten too much), but if the disk is of questionable health, then the best bet is to make an image of it immediately, before attempting any type of recovery. otherwise the recovery operation might push the drive over the edge into full mechanical failure. had that happen myself last week. wouldn't want you to make the same mistake.

JoE oH
December 1st, 2010, 01:19 AM
Thanks. Another issue is that TestDisk has no Swap partition option to restore. What should I do at this point?
Thanks

endotherm
December 1st, 2010, 04:22 PM
Thanks. Another issue is that TestDisk has no Swap partition option to restore. What should I do at this point?
Thanks
are you saying you would like to recover teh swap? why would you want to do that? swap never has any data to be persistently stored, so you shouldn't miss anything there.

JoE oH
December 1st, 2010, 06:23 PM
are you saying you would like to recover teh swap? why would you want to do that? swap never has any data to be persistently stored, so you shouldn't miss anything there.

Im trying to recover a NTFS which got formatted to Swap.

endotherm
December 1st, 2010, 06:32 PM
Im trying to recover a NTFS which got formatted to Swap.
just use gparted to remove the partition table (do not format anything, or create volumes within the drive). then tell testdisk to operate on the whole disk.

JoE oH
December 1st, 2010, 06:43 PM
just use gparted to remove the partition table (do not format anything, or create volumes within the drive). then tell testdisk to operate on the whole disk.

Sorry, could you tell me how to remove the partition table, i dont see an option :KS
Thanks