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.
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.
Ah, I see, my mistake. Is there another way to get the filesystem id from parted?
(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.