Reformat a Disk/USB Drive in Windows w/ cmd
¶
Check for System File Corruption¶
sfc
: System File Checker/Corruption
- Open
cmd
as administrator. - Run the following command to check for, and repair, system file corruption: Once the scan is done, follow any prompts to repair corrupted files.
chkdsk
: Check Disk
<drive_letter>
with the drive letter of the USB drive. This command will schedule a disk check at the next system restart.
Reformat using diskpart
¶
Use DiskPart:
- Open Command Prompt as an administrator.
- Type
diskpart
and press Enter to open the DiskPart utility. - Type
list disk
to display a list of all connected disks. - Identify the USB drive by its size. Note its disk number.
- Type
select disk <disk_number>
- Replace
<disk_number>
with the actual disk number of your USB drive.
- Replace
- Type
list partition
to display a list of partitions on the selected disk. - Type
select partition <partition_number>
- Replace
<partition_number>
with the partition number of the unwanted partitions.
- Replace
- Type
delete partition override
to forcibly delete the selected partition. - Repeat the above steps for each unwanted partition you want to remove.
-
To format the drive, reselect it and run the following
format
on it: -
If that doesn't work, once the partition is deleted, open
Computer Management
- Select
Disk Management
- Select the drive, and right click the
Volume
area (to the right of the disk number) - Select
New Volume
and follow the wizard.
The default allocation unit size (cluster size) for the FAT32 file system is typically used in this scenario, and it's the recommended choice for creating bootable media.
If you want to choose a different allocation size, add unit=64k
where 64k
is the allocation unit
size. The filesystem can also be changed to other formats.