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:
When executing "tuned-adm profile cpu-partitioning" command, the command creates a new grubenv entry "tuned_initrd=(hd1,gpt2)/tuned-initrd.img" which hardcodes the root (i.e. boot partition) device.
This makes grub fail to boot the system if the boot disk gets reordered, e.g. the system is installed on disk 2 (as shown above) and disk 1 gets detacted from the system.
The change was introduced by commit 8442dabf544ca3f27635ef9f2331d36a6965e3a8 back in 2017.
I don't understand why this is needed, I would expect the grubenv entry to always be "tuned_initrd=/tuned-initrd.img" which will end up having grub load "($root)/tuned-initrd.img" with "$root" being the selected boot partition.
Version-Release number of selected component (if applicable):
tuned-2.16.0-1.el8.noarch
How reproducible:
Always
Steps to Reproduce:
1. Install a UEFI VM with 2 disks, but put the OS on the 2nd disk, have both disks selected for booting
2. Apply the tuned profile after installation
# yum -y install tuned-profiles-cpu-partitioning
# echo "isolated_cores=1" >> /etc/tuned/cpu-partitioning-variables.conf
# tuned-adm profile cpu-partitioning
3. Check tuned_initrd value is hardcoded in grubenv
# grep ^tuned_initrd /boot/efi/EFI/redhat/grubenv
tuned_initrd=(hd1,gpt2)/tuned-initrd.img
4. Poweroff the system and remove the first disk
5. Boot
Actual results:
Grub fails to load the initrd, which later creates a kernel panic due to not booting with initramfs files
Expected results:
Grub boots fine and loads tuned-initrd.img stored on /boot
Comment 4Jaroslav Škarvada
2022-03-15 00:10:01 UTC
(In reply to Jaroslav Škarvada from comment #4)
> Upstream PR:
> https://github.com/redhat-performance/tuned/pull/415
This PR addresses a similar problem only when /boot is not a separate partition.
The reproduction scenario described in the Description (which I believe is copied from Case 03139507) is not limited to such a configuration.
It also happens when there is a separate /boot partition.
I tried the scenario with the proposed fix applied but was still able to reproduce the problem (hardcoded device name in TUNED_BOOT_INITRD_ADD in /etc/tuned/bootcmdline).
Sorry to say this, but this is not enough to fix the problem for our customer.
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 (tuned 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:7747