Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
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.
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
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