[gentoo-user] Re: unformat a partition
On Thu, 16 Mar 2006 14:54:33 -0800, Robert Persson wrote: On Thursday 16 March 2006 09:15 Nick Smith was like: i just accidentally blew away my ntfs partition with the gentoo install cd (formatted hda1 instead of hdb1) is there a way to unformat if it was just done? like undo the format information? i formatted with ext3. IMPORTANT: Please don't follow the following advice until you have had a second opinion from someone else—I think this will work, but I can't swear it will: Good advice... Reformat to NTFS and then use a recovery tool. If I remember right, windows fdisk is pretty insistent on doing a low level format, so you would be safer using the gnu tool for formatting. I don't know whether the gnu ntfs tools are up to the recovery job, or whether you need to use something proprietary. No. fdisk does not formatting at all. It just writes to the partition table. People run fdisk /mbr for example to rewrite the master partition table. I still think it may be better to edit the partition table directly and change the filetype of the partition to NTFS: type 0x07. Even if cfdisk you can change the type on the fly. Then reboot and see if you can mount it. fdisk is non-destructive to the partition's data. It's the format command where you have to make a choice to do a quick format or a complete one. A quick format does not erase data, but does clean out the fat tables. If that happens, you will have to extract the data manually. Try the cfdisk trick first. Then, experiment with some of the myriad Windows tools. Remember to make a full image of the partition in question and the partition table before trying these changes so you can go back to square 1 if need be. If you are lucky you may be able to read the old data on the newly created partition without needing to use a recovery tool (I was able to do that with a linux partition once—can't remember if it was reiserfs or ext3), but I would copy all the files somewhere safe in any case because even very minor corruption could come back to haunt you later (as many theologians never tire of reminding us). -- Robert Persson Conspiracy Bears: Once upon a time there were lots of conspiracy bears... -- Peter -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Re: unformat a partition
thanks for the replies, i was actually able to get the data off the drive with getdataback, i can rest easy now. thanks again Nick -- gentoo-user@gentoo.org mailing list
[gentoo-user] Re: unformat a partition
On Thu, 16 Mar 2006 12:15:24 -0500, Nick Smith wrote: i just accidentally blew away my ntfs partition with the gentoo install cd (formatted hda1 instead of hdb1) is there a way to unformat if it was just done? like undo the format information? i formatted with ext3. ordinarily i wouldnt mind, but i have some VERY important information on there and a ton of pictures i cannot lose (originals). i can probably use getdataback when i get home just wanted to know if there was another way since im still at the prompt on the install cd now. thanks (bangs head on wall) A definite MAYBE. If you did a quick format, not doing error checking, there is an excellent chance your data is intact. If you did error checking, then probably not, although badblock normally restores data as it checks each sector. If you know about partition editing, then go in and change the partition type back to ntfs and see if it can be mounted by Windows or linux. Now, first thing I would do is do an image backup of the partition just so you can save it and try again with a different approach if need be. Second, the sfdisk utility in Linux allows for low level partition editing, but it's not easy. Windows utilities are much better for this kind of thing. I remember the old Norton Disk Doctor for example. Nonetheless, the good news is if you did a quick format, you most likely will be fine. How fine depends on whether or not you can get the partition to mount again under the original partition type. Otherwise, there are services like Ontrack which, for mega $$$ get your stuff back. Good luck! -- Peter -- gentoo-user@gentoo.org mailing list