Is there a tool that can be used to partition a disk (SD card in particular) from the command line? The purpose of this is for batch processing and customized GUI.


I doubt it will work on an SD card, but here is the command: diskpart



KCotreau is right. You can use DiskPart, which is more powerful as a graphical disk management tool.

But there is a problem for some USB sticks and SD cards: They usually don't have a Master Boot Record (MBR).

In such case you have to delete the existing partition and create a MBR. After this, you can create more than one partitions. But sometimes you have to assign drive letter manually, because Windows recognizes just the first partition.

BTW: A advantage of an existing MBR is, that you can boot from such a media.


Perhaps an unusual solution, but you could just boot Linux (even off an SD card!) and use the excellent cfdisk. Or fdisk.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.