6 Comments

  1. For the command

    `mkpart primary 2048s 100%`

    an alternative command is

    `mkpart PARTITION_LABEL ext4 primary 2048s 100%`

    which makes a partition with label PARTITION_LABEL.

    The partition can be easily accessed later at path

    `/dev/disk/by-partlable/PARTITION_LABEL`

    which will be useful for writing `fstab` entry or other usages that need to directly use a partition block device.

  2. Number Start End Size File system Name Flags
    1 1049kB 6001GB 6001GB primary

    There is not file system showing at the end? How do I get something like ext4 or ntfs there?

  3. For GPT partitions, do NOT use “primary” in the mkpart command.

    # parted -s /dev/sd$d mkpart “$partlabel” ntfs primary 2048s 100%
    Error: Invalid number.

    This works:

    # parted -s /dev/sd$d mkpart “$partlabel” ntfs 2048s 100%

Leave a Reply

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