Super User is a question and answer site for computer enthusiasts and power users. 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 am trying to reuse a USB boot drive (Mac) for regular file storage on Windows ... when Windows detects it, it won't let me reformat to anything greater than a 40 MB or so - and this is an 8 GB drive... How do you format the drive back to its original factory state?

share|improve this question
up vote 6 down vote accepted

You did not provide any information about which version of Windows you are using or about what sort of partitioning this USB drive is using.

If you are using Windows 7 then perhaps it cannot delete the partitions because your USB drive was GPT formatted by your Mac? If that is the case, then run DISKPART from an (elevated) command prompt. If a partition is READ ONLY or HIDDEN I don't think it can be deleted unless you force it. For example, use DELETE PARTITION OVERRIDE.

See the HELP for DISKPART for more info if you need it.

Of course, using dd from a Linux Live CD boot is also a way to clear the drive. FWIW, you don't have to write zeros to the entire USB drive. Just clearing the first MiB or so would do it. Adding count=2 to the example in hotei's answer should accomplish this.
dd if=/dev/zero of=/dev/usb_device_name_goes_here bs=1024k count=2

Unless I've screwed it up the above should write 2 blocks of 1024k (1MiB) zero bytes to the device you specify as the outfile (of=). This will wipe out the partition table whether it is GPT or MBR and then Windows can partition it as you wish.

share|improve this answer
john: You're right about the count=2 being quicker - BUT - I'd probably let it zap the entire drive just to insure that the drive doesn't have any problems with writing to all "sectors". While rare, flash does go bad on some occasions and I'd want to rule that out while I had it on the Linux system. – hotei Aug 8 '10 at 16:12
The problem with this is that the USB I want to format is the one with Linux.... I guess I'll install it on a partition.... but then I run into the same problem again when I want to remove it? -_- EDIT: Problem solved incase others run into this problem too - Virtual Machines. Can't believe I didn't think of that, but there's the solution. – Anton8000 Mar 3 '13 at 20:57

Easiest way is to boot up a Unix/Linux live CD and then use dd to write zeroes to drive:

Insert drive into the USB port but do NOT mount it.

dd if=/dev/zero of=/dev/usb_device_name_goes_here bs=1024k

This will zap it back to it's original state. When Windows or Unix tries to use it later it will recognise that it needs to be "partitioned" and "formatted" and you can go from there.

Edited: If you're not familiar with Unix/Linux you should probably disconnect your hard drives before doing this just to be safe. Just connect the CD and the USB drive you want to format.

share|improve this answer

If you have access to a Linux box, using the dd command to copy zeroes to the device itself, not the partition, could make your disk restart from fresh.

When using the command, make sure you use the right device. If you mount your disk on the USB port, its name should be something like /dev/sdb, or /dev/sdc. The third letter is sequential and indicates the physical device as detected. Since you likely have one internal hard disk, you should not ever touch /dev/sda.

If you're paranoiac (as I am sometime), disconnect all your internal hard disks, just leaving a cdrom drive, and boot from it, using knoppix or Ubuntu Live CD. From there, connect your drive to repartition, and either use the dd utility as stated previously, or use gparted to manage the partitions on the device. If gparted does not work, this would be because it would not recognize the partition table. Doing this dd command first should clear the problem.

share|improve this answer
good catch on disconnect hard drives - but internal AND EXTERNAL if you're truly paranoid. Just connect CD and USB drive of interest. – hotei Aug 8 '10 at 16:17
Trust me, I accidentally deleted installations of Linux on my main hard disk with this, especially, when installing Ubuntu on an external device, without going to the advanced options at the end of the installation "wizard", where by default it will override the boot record on /dev/sda, regardless of the actually installation location of the operating system. – jfmessier Aug 9 '10 at 11:57

If it is split into multiple partition, you should delete all partitions. Then create a new one, and format that.

share|improve this answer
partition tools do not seem to be detecting the USB. Windows / Computer Management / Disk Man - detects the extra unformatted space but is not able to shrink or expand it – ina Aug 7 '10 at 23:15
Does disk management see all of the partitions? The whole 8gb? – Moab Aug 7 '10 at 23:43
yes but other than the initial 40 mb which i tried formatting on windows, the 7.x GB are not accessible. there is no way for disk management to shrink or access it :( – ina Aug 8 '10 at 0:16
Don't worry about shrinking or expanding - delete it – bryan Aug 8 '10 at 0:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .