Bug 574780 - parted doesn't show filesystem type of partition
parted doesn't show filesystem type of partition
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: parted (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Hans de Goede
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-03-18 10:34 EDT by Ruben Kerkhof
Modified: 2010-03-18 16:02 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-03-18 11:01:43 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ruben Kerkhof 2010-03-18 10:34:28 EDT
Description of problem:

When creating a partition on a disk image, the File system field remains empty


Version-Release number of selected component (if applicable):
[ruben@slice ~]$ rpm -q parted
parted-2.1-5.fc14.x86_64

How reproducible:
[ruben@slice ~]$ truncate --size 128MB test.img
[ruben@slice ~]$ parted test.img -s mklabel msdos
[ruben@slice ~]$ parted test.img -s mkpart primary ext2 1 100%

Actual results:

[ruben@slice ~]$ parted test.img -s print
Model:  (file)
Disk /home/ruben/test.img: 128MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End    Size   Type     File system  Flags
 1      1049kB  128MB  127MB  primary


Expected results:

[ruben@slice ~]$ parted test.img -s print
Model:  (file)
Disk /home/ruben/test.img: 128MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End    Size   Type     File system  Flags
 1      1049kB  128MB  127MB  primary linux


Additional info:
The filesystem field is filled in:

[ruben@slice ~]$ fdisk -l test.img 
You must set cylinders.
You can do this from the extra functions menu.

Disk test.img: 0 MB, 0 bytes
4 heads, 32 sectors/track, 0 cylinders
Units = cylinders of 128 * 512 = 65536 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000abcd5

   Device Boot      Start         End      Blocks   Id  System
test.img1              17        1952      123904   83  Linux

I've also build parted from the git repo at git.debian.org. Same result.
Comment 1 Hans de Goede 2010-03-18 11:01:43 EDT
The "File system" column in parted's print output is not based on the Id field of the partition tabel entry, but on how the partition is actually formatted.

As the fdisk output shows parted has correctly set the Id field of the partition tabel entry when creating the partition.
Comment 2 Ruben Kerkhof 2010-03-18 15:49:46 EDT
Ah, I see, my mistake.

Is there another way to get the filesystem id from parted?
Comment 3 Hans de Goede 2010-03-18 16:02:08 EDT
(In reply to comment #2)
> Ah, I see, my mistake.
> 
> Is there another way to get the filesystem id from parted?    

I'm afraid not, this is because parted tries to have an interface which is disklabel type (IE sun, bsd, msdos, gpt, dasd) neutral, and not all
disklabel types have an Id concept.

Note You need to log in before you can comment on or make changes to this bug.