I was fiddling around with parted command on a loopback disk and tried to create some partitions using gpt part table but I keep getting Error: Unable to satisfy all constraints on the partition. when trying to create a logical partition
$ sudo parted /dev/loop0
(parted) mktable gpt
(parted) mkpart primary 1MiB 201MiB
(parted) mkpart extended 201MiB -0MiB
(parted) unit MiB print
Model: Loopback device (loop)
Disk /dev/loop0: 102400MiB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 1.00MiB 201MiB 200MiB primary
2 201MiB 102400MiB 102199MiB extended
(parted) mkpart logical 202MiB 1024MiB
Error: Unable to satisfy all constraints on the partition.
Recreating the same partitions using msdos part table doesn't give such error, though. So any idea what's wrong?
% sudo parted /dev/loop0
GNU Parted 2.3
Using /dev/loop0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mktable msdos
(parted) mkpart primary 1MiB 201MiB
(parted) mkpart extended 201MiB -0MiB
(parted) mkpart logical 202MiB 1024MiB
(parted) unit MiB print
Model: Loopback device (loop)
Disk /dev/loop0: 102400MiB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 1.00MiB 201MiB 200MiB primary
2 201MiB 102400MiB 102199MiB extended lba
5 202MiB 1024MiB 822MiB logical
