[Top][All Lists]

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

bug#19836: Missing partition type in machine parseable output

From: Johan Oudinet
Subject: bug#19836: Missing partition type in machine parseable output
Date: Wed, 11 Feb 2015 17:32:06 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0


I'd like to use parted in a script to list primary and logical
partitions only (i.e., without extended partitions).
I do see the partition type if I use the following command:
# parted -s /dev/sdc print
Model: Generic STORAGE DEVICE (scsi)
Disk /dev/sdc: 3965MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start   End     Size    Type      File system  Flags
 1      4194kB  71,3MB  67,1MB  primary   fat16        boot, lba
 2      71,3MB  3965MB  3894MB  extended               lba
 5      75,5MB  344MB   268MB   logical
 6      344MB   612MB   268MB   logical
 7      612MB   621MB   8388kB  logical   ext4
 8      621MB   3965MB  3344MB  logical   ext4

However, if I run the same command with the --machine option, I get the
following output:
# parted -sm /dev/sdc print
/dev/sdc:3965MB:scsi:512:512:msdos:Generic STORAGE DEVICE:;
1:4194kB:71,3MB:67,1MB:fat16::boot, lba;

where the partition type is missing. This is unfortunate :-\

$ parted --version
parted (GNU parted) 3.2
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by

Best regards,
Johan Oudinet
R&D Engineer - Green Communications

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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