35

How do I repartition an SDHC card (4 GB or more)? Do I need third-part tools or Linux (a live CD solution would be OK)?

In Windows' Disk Management the option Delete Partition is dimmed out:

Enter image description here

I can reformat the card as FAT32, copy files to and from the card and even change the file system to NTFS using the command line command CONVERT, but not repartition it.

The article How to Partition an SD Card in Windows XP talks about using "a Windows enabler program" which sound rather dubious to me.

I have tried to change from “Optimize for quick removal” to “Optimize for performance”. The option to format as NTFS appeared, but the Delete Partition option is still dimmed out.

Platform:

I have also tried on different versions of Windows and with different cards with the same result:

  • Kingston 4 GB SDHC card, speed class 4 (the one shown in the screenshot)
  • Transcend 2 GB (not marked as SDHC, but SD)
  • Windows 7 32-bit (albeit with a somewhat an older card reader) and Windows XP 32-bit on an EliteBook 8730w
Peter Mortensen
  • 12,090
  • 23
  • 70
  • 90
  • Why do you want to partition the SD cards? – James P Oct 10 '12 at 09:13
  • 3
    It is a limitation of Windows that only the first partition of a removable disk can be mounted. (USB HDDs report themselves as fixed disks.) While [it is possible](http://www.lancelhoff.com/partition-a-usb-flash-drive-in-windows-xp/) to format a removable disk with multiple partition using a third party tool, you would not be able to mount anything beyond the first partition. This is not SD card specific, but SD cards are typically considered removable disks (unless you change the driver). – Bob Oct 10 '12 at 09:24
  • 1
    James: I want to shrink the partition size in order to be able to format as FAT16 (FAT32). This is to do some testing on an embedded device that currently has reliability problems writing to an SDHC card. It may even turn out to be a work-around for the current problem. – Peter Mortensen Oct 10 '12 at 13:40
  • @PeterMortensen: There is a similar question here with a solution: http://superuser.com/a/202236/13459 - using the diskpart command-line tool in Windows you can clear the partition table and create a new partition under 2GB that can then be formatted as FAT16. However, please be careful to select the correct 'disk' so that you do not wipe the wrong drive. – James P Oct 10 '12 at 15:42
  • @PeterMortensen: did you have any luck? – James P Oct 12 '12 at 12:15

6 Answers6

50

Here's an article with working link archived version without images. And also a summary of how you do this:

Start DiskPart by opening Start menu and typing in diskpart in the search. After giving DiskPart permission to start with administrative privileges, you will be in a console window with DISKPART> prompt.

Deleting partitions

Type LIST DISK to find out what disk you need to change. Note that you are looking for a disk with the same number as in the Disk Management tool, so in OP's case, it's Disk 1.

Next you need to select the disk you wish to work on. Type SELECT DISK 1. Make sure the correct disk is selected by typing LIST DISK again.

Now, you need to select the partition you wish to remove. Type LIST PARTITION to see a list of all partitions. To select the first one, type SELECT PARTITION 1.

To remove the partition, type DELETE PARTITION.

Creating partitions

To create a partition, you can either proceed by using the Disk Management tool, or type CREATE PARTITION PRIMARY. This creates a partition that fills the free space. If you wish to create a partition of specific size, you need to type CREATE PARTITION PRIMARY SIZE=NNN where NNN is the partition size in MB.

You can get more information about the various options by typing HELP CREATE PARTITION and/or HELP CREATE PARTITION PRIMARY.

Exiting DiskPart

Either type EXIT or press Ctrl+C.

Additional notes

While this works for many SD cards (and other media), for SD cards specifcially, it is recommended to use SD formatter from SD Association. It will not remove all partitions, but will ensure that any content security-related parts of the card are left intact.

Although not being asked, this method may not work for USB sticks. I have 'bricked' USB sticks by partitioning them on Linux or writing ISO images to them, and to date, I haven't found a way to fix them.

  • 1
    If I could upvote your answer more than once I would, helped me format my micro sd card – Naeem Sarfraz Oct 09 '15 at 14:40
  • This helped me re-partition a SD micro card. – Eric Milliot-Martinez Apr 22 '17 at 20:26
  • On top of just looking like a shady site, the SD formatter tool does not appear to be working for me. After installing it, running it seems to do nothing. No window, no popup, no message. It just seems to do nothing. Hopefully it is not doing something malicious. – Evan de la Cruz Apr 03 '18 at 17:27
  • Hahaha, shady site. Sure looks that way. But it's supposedly an official website of the SD association. –  Apr 03 '18 at 18:09
  • @EvandelaCruz It doesn't seem like a shady site to me. The SD Formatter I downloaded wasn't found to be malware by Malwarebytes or Windows Defender, and it ran with no problem (I didn't actually go ahead and format an SD card). – Andrew Morton Apr 03 '18 at 20:16
  • @AndrewMorton my mistake. I just looked again and the site looks fine. I don't know what site I was at before, but it had misleading ads in tricky positions on it. I either went to the wrong place or my dns was compromised, I suppose. My apologies if I mislead anyone. Whats weird is, before I commented before, I actually edited the answer and updated the link to a working link. so the link I had matches the one currently in the answer. I wish I could remember what the page was that i saw when i downloaded it. Let me check my dl history and I will clarify if needed. – Evan de la Cruz Apr 09 '18 at 23:22
  • I checked my dl history. Here is the link I used: `https://www.sdcard.org/downloads/formatter_4/eula_windows/SD_CardFormatter0500SetupEN.exe` I retract my statement about the site looking shady. But I do maintain that the software I downloaded at the above location did not seem to do anything. – Evan de la Cruz Apr 09 '18 at 23:30
  • 1
    @EvandelaCruz I'm not sure what you are trying to accomplish, but as noted in my answer, it will specifically not do any partitioning on the SD card. It merely formats the card. The difference compared to Windows' built-in format utility is that it preserves some of the SD-card-specific features (mostly to do with DRM). It won't 'seem' to do anything other than just format your card for the most part. –  Apr 10 '18 at 06:18
  • Ok, I apologize, wording in my answer was wrong. I fixed it. –  Apr 10 '18 at 06:20
  • @hayavuk I'm not sure what "It won't 'seem' to do anything other than just format your card for the most part" means. "For the most part" implies that it seems to do *something*. In my case, it did *nothing* (as far as I can tell, which is why I used the word "seems"). The card was not formatted. There were no noises, windows, popups, dialogs, notifications, progress bars, ok buttons, or confirmations of any sort whatsoever. – Evan de la Cruz Apr 11 '18 at 04:36
  • To get help with that, you'd probably need to open a new question with more specifics on what exactly you tried. –  Apr 11 '18 at 13:29
  • FYI, the top link (to the ducky-pond article) is broken. It takes you to a page that tries to get you to install a "SafeSearch" browser extension, then takes you to the wikipedia page for an American athlete. – LarsH May 25 '18 at 18:09
5

@bvukelic's answer is correct.. but it's too long :)

If you are in Windows 7 or newer, just open command prompt run DISKPART

  • You might just need to delete volume - LIST VOLUME, SELECT VOLUME #, then finally DELETE VOLUME, <- Just be careful and read what you are deleting

Then just proceed to usual "Manage" disk afterwards.

Just read everything in there carefully :)

Peter Mortensen
  • 12,090
  • 23
  • 70
  • 90
fedmich
  • 337
  • 1
  • 5
  • 8
4

You can delete it with the DiskPart command line tool on windows. Read this http://www.winability.com/delete-protected-efi-disk-partition/

MitziMeow
  • 157
  • 3
1

You can also use the

MiniTool Partition Wizard

or the

EaseUS SD Card Partition Software.

The latter as of version 11.9 does not provide support for Ext 2 to 4 file systems.

The SD Formatter mentioned in a previous answer seems to erase all partitions on a SD card!

However, please note that Windows can only recognize the first partition on a removable disk, thus the second partition has no drive letter.

Frank Breitling
  • 635
  • 1
  • 11
  • 25
1

You can't delete a partition while it contains a filesystem that is currently set to be always mounted. Remove the drive letter (From the Change Drive Letter and Paths option) and then you should be able to delete the partition.

David Schwartz
  • 61,528
  • 7
  • 100
  • 149
  • 1
    On one of the computers, I removed the drive letter and tried with "Optimize for quick removal" and with "Optimize for performance" (though the NTFS formatting option did not appear for some reason for the "Optimize for performance" option). I also restarted the computer. The option is still dimmed. I will try it on another computer/setup later today. – Peter Mortensen Oct 10 '12 at 14:19
  • 3
    This only works if the partition is not protected. If the partition is protected (as in the case of the OP) then removing the drive letter does not help. You need to use the DISPART command to erase the drive in such a case and start over. – Andrei Belogortseff Jan 12 '15 at 03:42
0

The free tool "AOMEI Partition Assistant Standard" can do this easily.

http://www.disk-partition.com/download-home.html

Jamie Hanrahan
  • 23,140
  • 6
  • 63
  • 92