[parted-devel] Discussion: Allow empty name for GPT partitions to fix systemd errors
Sebastian Parschauer
sparschauer at suse.de
Fri Apr 21 11:34:37 UTC 2017
On 20.04.2017 14:55, Phil Susi wrote:
[snip]
>> We should be able to provide GPT partitions without a name. The UEFI
>> spec doesn't define if that name may be empty. It just has to be NULL
>> terminated. Or can you point to a document stating explicitly that the
>> name may not be empty?
>
> Parted leaves it empty by default.
Thanks, but parted only allows to leave it empty in interactive mode.
The name is a required argument in script mode.
> The name is also optional; just omit it and you get no name.
The name can't be optional as otherwise you can't detect if a name or
fs-type is provided.
>From the man page:
> mkpart [part-type name fs-type] start end
> ... part-type may be specified only with msdos and dvh
> partition tables, name is required for GPT partition tables
> and fs-type is optional.
So this comes down to
mkpart name [fs-type] start end
To say it with shell code:
# dd if=/dev/zero of=test bs=1M count=20
# losetup /dev/loop0 test
# parted -s /dev/loop0 mklabel gpt
# parted /dev/loop0 mkpart 0M 20M
End?
More information about the parted-devel
mailing list