Description of problem: parted 3.5 changed the way that flags are handled in order to support the ability to set arbitrary partition types and guids. In normal use there should be no issues, but if a user of the library calls ped_partition_set_system after the initial partition setup the partition type will be changed to the default for the filesystem, possibly removing the type set based on the flags. Version-Release number of selected component (if applicable): parted-3.5-1 Additional info: Currently working on a fix for this, will update when it is available.
Patches - https://alioth-lists.debian.net/pipermail/parted-devel/2022-August/005819.html
Created attachment 1904583 [details] reproducer source Here's a small C program to test for the problem. Install gcc and parted's header files: dnf install -y gcc parted-devel Create 2 disk image files: fallocate -l 10M disk-gpt.img fallocate -l 10M disk-msdos.img Build the test, linking to parted: gcc -lparted test-set_system.c -o run-test ./run-test On parted 3.5-1 the output will have all of the flags set to OFF. When the bug is fixed the output will have bios_grub ON for gpt and bls_boot ON for msdos.
[root@localhost ~]# rpm -q parted parted-3.5-2.el9.x86_64 [root@localhost ~]# gcc -lparted test-set_system.c -o run-test [root@localhost ~]# ./run-test == GPT fs_type = ext4 boot = OFF root = OFF swap = OFF hidden = OFF raid = OFF lvm = OFF lba = OFF hp-service = OFF palo = OFF prep = OFF msftres = OFF bios_grub = ON atvrecv = OFF diag = OFF legacy_boot = OFF msftdata = OFF irst = OFF esp = OFF chromeos_kernel = OFF bls_boot = OFF linux-home = OFF == MSDOS fs_type = ext4 boot = OFF root = OFF swap = OFF hidden = OFF raid = OFF lvm = OFF lba = OFF hp-service = OFF palo = OFF prep = OFF msftres = OFF bios_grub = OFF atvrecv = OFF diag = OFF legacy_boot = OFF msftdata = OFF irst = OFF esp = OFF chromeos_kernel = OFF bls_boot = ON linux-home = OFF [root@localhost ~]# Marking as Verified:Tested
Checked that parted-3.5-2.el9 is in nightly compose RHEL-9.1.0-20220817.6 Moving to VERIFIED
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (parted bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:8342