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
cmdas Administrator. - Start
diskpart. - In
diskpart, typeList Diskand 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 2and press Enter. - Type
Cleanand press Enter to completely remove all partitions for the selected drive - essentially doing a “complete reset”. - Type
Create Partition Primaryand press Enter. - Determine if you would like to format the drive as FAT32, exFAT or NTFS; type
format fs=ntfs(replacing thentfswith the desired file system format) and press Enter. - To set the drive letter, type
Assignand press Enter.
This post is licensed under
CC BY 4.0
by the author.