Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I accidentally deleted the primary partition on my USB flash disk.

Is there a way of undoing that? I can't even seem to see the drive anymore in windows? It's not available in the disk utility.

If I can even format it again (as msdosfs) that would be great.

share|improve this question
up vote 1 down vote accepted

If you don't care about the data, re-run the FreeBSD installer, select a "custom" installation type, select option 3 ("Partition") and create a new partition (you can press A to have the partitioning tool grab the whole disk, then just change the type to something Windows will like (7 = NTFS) and Windows should be able to see it & format it).
Remember to write the new partition table (W) before exiting.
Obviously be extra careful, since a mistake here (like selecting the wrong drive to re-partition) could really ruin your whole day...

Obviously you should be able to do the same thing with the Windows partitioning tools (but I don't have any of those handy).

If you want to actually get your data back the answer is somewhat more involved (You'd need to re-create the partition table as it was before, which presupposes you know the old layout. If not you start getting into disk exploration or recovery tools).

share|improve this answer
Ok, so the windows PC didn't see my flash disk because the USB port on the front of the computer (not my normal one) doesn't work. Plugged it into the back and it's fine. Your procedure also works. – Matt Mar 3 '10 at 19:56
Yeah, a dead USB port would make the system not recognize the flash disk :-) Out of curiousity have you ever tried a thumb drive with a scrambled partition table on a Windows host? Curious how it reacts... – voretaq7 Mar 3 '10 at 20:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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