bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#26464: Can not use mklabel filesystem specification feature


From: mazeinp
Subject: bug#26464: Can not use mklabel filesystem specification feature
Date: Wed, 12 Apr 2017 12:43:43 +0200 (CEST)

I'm trying to use the possibility of mkpart to specify the file system type, 
with the non interactive interface (--script)

First point is pure documentary : 
https://www.gnu.org/software/parted/manual/parted.html#mkpart indicates :
mkpart [part-type fs-type name] start end

man mkpart indicates:
mkpart [part-type name fs-type] start end

name and fstype have been switched between the two docs.
All versions 3.2 !??
Anyways, it seems that using the name always fail

Second point :
I expect this line 
#parted --script /dev/sda unit s  mkpart primary ext4   2048    208896

to create a partition with a file system set as ext4.

I don't expect it to be initialized, but just to have the display like :
Number  Start  End      Size     Type     File system  Flags
 1      2048s  208896s  206849s  primary  ext4         lba

Instead I get this :
Number  Start   End    Size   Type     File system  Flags
 1      1049kB  107MB  106MB  primary

Now using the commdand console interface everything is ok :
# parted /dev/sda
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) unit s  mkpart primary ext4   2048    208896                     
(parted) p                                                                
Model: ATA ST32000641AS (scsi)
Disk /dev/sda: 3907029168s
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start  End      Size     Type     File system  Flags
 1      2048s  208896s  206849s  primary  ext4         lba


This should be part of an automated workflow.

I've also tested things like
echo "unit s  mkpart primary ext4   2048    208896 q" | parted --script /dev/sda
and
parted --script /dev/sda <<< "unit s  mkpart primary ext4   2048    208896 q"
without success.

It also fails without --script.

What am I missing ?

Regards,

Pierre





reply via email to

[Prev in Thread] Current Thread [Next in Thread]