You install your Raspberry Pi SD card. After a while you decide to re-install Raspberry or just that you need the SD card for other purposes. You plug it back to the card reader and … Argh!!! Seems as if Raspberry installation damaged your SD card. The SD card is only 813 MB in size. Where are all the Gigabytes have gone!?
You need to format SD card on which Raspberry Pi software is installed.
We are going to use Windows command line utility called DISKPART.
- Start the DISKPART utility
- List Disks (Command:
- Select the work disk (Command:
- List the partitions on the SD Card (Command:
- Remove all partitions from the SD Card
- Create a primary partition on the SD Card
- Exit DISKPART (Command:
- Format the SD Card
Task 1: Start DISKPART the Utility
- Open a Windows Command Prompt.
- At the command prompt type DISKPART and press Enter.
- Windows asks for permission to run DISPART.
- Press the Yes button to accept..
The DISKPART utility starts in a new window. Displaying information about your computer and waiting for your input at the DISKPART prompt.
Microsoft DiskPart version 6.3.9600 Copyright (C) 1999-2013 Microsoft Corporation. On computer: YOGA DISKPART> _
Task 2: List Disks
DISKPART>LIST DISK Disk ### Status Size Free Dyn Gpt -------- ------------- ------- ------- --- --- Disk 0 Online 238 GB 0 B * Disk 1 Online 14 GB 4096 KB
The SD car is mounted as a disk. Remember the number of the disk. In this case it is number 1
Task 3: Select the Work Disk
DISKPART>SELECT DISK 1 Disk 1 is now the selected disk.
Task 4: List the Partitions on the SD Card
To inspect partitions defined on the SD card.
DISKPART> LIST PARTITION Partition ### Type Size Offset ------------- ---------------- ------- ------- Partition 1 Primary 814 MB 4096 KB Partition 0 Primary 14 GB 820 MB Partition 0 Primary 32 MB 14 GB
Task 5: Remove All Partitions from the SD Card
DISKPART> SELECT PARTITION 1 Partition 1 is now the selected partition. DISKPART> DELETE PARTITION DiskPart successfully deleted the selected partition. DISKPART> _
Repeat as many times as necessary to remove all the partitions. In our case we need to remove two additional partitions:
DISKPART> SELECT PARTITION 1 Partition 1 is now the selected partition. DISKPART> DELETE PARTITION DiskPart successfully deleted the selected partition. DISKPART> SELECT PARTITION 1 Partition 1 is now the selected partition. DISKPART> DELETE PARTITION DiskPart successfully deleted the selected partition. DISKPART> _
Task 6: Create a Primary Partition on the SD Card
DISKPART> CREATE PART PRI DiskPart succeeded in creating the specified partition. DISKPART> _
Task 7: Exit the DISKPART Utility
At the DISKPART utility prompt, type the EXIT command and press Enter. DISKPART exits and the window is closed.
Task 8: Format the SD Card
Remove and insert again the SD card. Windows detects that the card is not formatted and asks to format.
- Click the Format… button.
- Windows displays the format SD card dialog.
- Leave the default settings. Click the Start button.
- When format is complete close the format dialog.
Your SD card now is formatted.