Posts Format Drive via CMD
Post
Cancel

Format Drive via CMD

After working with several Micro-SD card corruptions due to RasPi improper shutdowns, I’ve become familiar with having to resort to the command-line in an effort to try to clean things up. Since I’m already in command-line mode, it made sense to figure out how to do the whole thing so I’m not having to task-switch between different interfaces/tools/UI interfaces. The basic process for resetting and formatting a drive via command-line is:

  • Launch cmd as Administrator.
  • Start diskpart.
  • In diskpart, type List Disk and press Enter.

This will list the drives available on your system; determine the correct drive - in our example, we will want to work with the 2nd (hypothetical) drive.

  • Type Select Disk 2 and press Enter.
  • Type Clean and press Enter to completely remove all partitions for the selected drive - essentially doing a “complete reset”.
  • Type Create Partition Primary and press Enter.
  • Determine if you would like to format the drive as FAT32, exFAT or NTFS; type format fs=ntfs (replacing the ntfs with the desired file system format) and press Enter.
  • To set the drive letter, type Assign and press Enter.
This post is licensed under CC BY 4.0 by the author.