Remove Raspberry Pi Partitions from SD Card in Windows 7/8

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!?

Problem

You need to format SD card on which Raspberry Pi software is installed.

Solution

We are going to use Windows command line utility called DISKPART.

Tasks:

  1. Start the DISKPART utility
  2. List Disks (Command: LIST DISK)
  3. Select the work disk (Command: SELECT DISK)
  4. List the partitions on the SD Card (Command: LIST PARTITION)
  5. Remove all partitions from the SD Card
  6. Create a primary partition on the SD Card
  7. Exit DISKPART (Command: EXIT)
  8. Format the SD Card

Task 1: Start DISKPART the Utility

  1. Open a Windows Command Prompt.
  2. At the command prompt type DISKPART and press Enter.
  3. Windows asks for permission to run DISPART.
  4. 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.

  1. Click the Format… button.
  2. Windows displays the format SD card dialog.
  3. Leave the default settings. Click the Start button.
  4. When format is complete close the format dialog.

Your SD card now is formatted.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s