bug#58393: parted ignores "fs-type" in mkpart when it specified in command line

"Brian C. Lane" <[email protected]> Mon, 10 Oct 2022 08:48:37 -0700
Newsgroups gmane.comp.gnu.parted.bugs
Message-ID <[email protected]>
On Sun, Oct 09, 2022 at 12:34:37AM +0300, rva via Bug reports for the GNU Parted disk partition editor wrote:
> 
> When running in command prompt (gpt disk with no partitions)
> mkpart PartName ext4 1M 500M
> partition is created and "print" command shows file system ext4
>  
> When running
> parted /dev/sda mkpart PartName ext4 1M 500M
> parted creates partition but "print" does show file system.
>  
> So "mkpart" works different in interactive mode and non-interactive (file system is ignored)

I assume you mean that a separate print 'does not' show the filesystem.
This is normal, and it is because parted doesn't actually create the
filesystem, you need to do that yourself.

When creating a partition the filesystem you enter is used to determine
the UUID to use for the partition type (eg. linux data or swap or
whatever). When you rerun parted without actually creating that
filesystem it doesn't show anything because it hasn't detected a
filesystem on the partition. If you create an ext4 filesystem on that
partition it will show ext4.

Note that in the current master version of parted it can show the actual
partition type UUID in the --json output.

Brian

-- 
Brian C. Lane (PST8PDT) - weldr.io - lorax - parted - pykickstart