parted command line rant

Long time pet peeve of mine:

1. parted help states, that mkpart command syntax is:

# parted /dev/sdb help mkpart
mkpart PART-TYPE [FS-TYPE] START END make a partition

But, PART-TYPE is actually only supported for msdos and dvh partition tables. For gpt, it’s silently changed to:


There are so many examples around the internet, where people keep typing:

mkpart primary ext4 1024kb 2tb

and they just end up with partition named “primary” usually without even noticing.

2. I cannot find a way to omit partition name from command line. From parted interactive mode one can just hit Enter when prompted for partition name:

(parted) mkpart
Partition name? []?
File system type? [ext2]?

but apparently I can’t find a way to skip it in script mode:

# parted /dev/sdb mkpart "" 0% 300G
End? ^C

Rant done 🙂

This entry was posted in Misc. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *