Thursday, 8 March 2018

Resetting an SD card after writing a Linux Image from Windows

After writing the Rasbian image to my SD card for a new Raspberry Pi project I found myself wanting to reset the SD card to be used as normal storage so I could install NOOBS, but I got stuck when I couldn't work out how to delete the partitions made by writing the image on the device from Windows.

I found a Windows solution in the way of DISKPART that got the job done.

How to use DISKPART

  1. Open a new command window by either searching for "cmd" from the windows menu or pressing the windows key and 'r' and running the command "cmd" and hit enter
  2. Enter the command "DISKPART" and another command window will be opened
  3. In the new window type "LIST DISK" and hit enter
  4. Select the correct disk from the list with the command "SELECT DISK #" replacing the # with the drive number of the SD card. Make sure you get this right or you could ruin your windows installation!
  5. Enter the command "CLEAN" to clear the partition table
  6. Enter the command "CREATE PARTITION PRIMARY" to reallocate the cleaned space as the primary partition
  7. Enter the command "FORMAT FS=FAT32 QUICK" to reformat the SD card

Optionally you can use the command "ASSIGN" to reassign a drive letter to the SD card.

No comments:

Post a Comment