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.

Bug 2050246

Summary: Grub fails to boot the system when a disk renaming happens, due to tuned_initrd hardcoding the boot disk
Product: Red Hat Enterprise Linux 8 Reporter: Renaud Métrich <rmetrich>
Component: tunedAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED ERRATA QA Contact: Robin Hack <rhack>
Severity: high Docs Contact:
Priority: urgent    
Version: 8.5CC: fkrska, jeder, jskarvad, jzerdik, kfujii, ksugawar
Target Milestone: rcKeywords: Patch, TestCaseNotNeeded, Triaged, Upstream, ZStream
Target Release: ---Flags: pm-rhel: mirror+
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: tuned-2.18.0-3.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2084643 2084644 (view as bug list) Environment:
Last Closed: 2022-11-08 10:52:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2084643, 2084644    

Description Renaud Métrich 2022-02-03 14:26:57 UTC
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 4 Jaroslav Škarvada 2022-03-15 00:10:01 UTC
Upstream PR:
https://github.com/redhat-performance/tuned/pull/415

Comment 5 Ken Sugawara 2022-03-17 08:12:09 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.

Comment 33 errata-xmlrpc 2022-11-08 10:52:37 UTC
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