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:
List 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.
Select Disk 2and press Enter.
Cleanand press Enter to completely remove all partitions for the selected drive - essentially doing a “complete reset”.
Create Partition Primaryand press Enter.
- Determine if you would like to format the drive as FAT32, exFAT or NTFS; type
format fs=ntfs(replacing the
ntfswith the desired file system format) and press Enter.
- To set the drive letter, type
Assignand press Enter.