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 1782321

Summary: zipl: BOOT_IMAGE=0 should not be added to /boot/loader/entries
Product: Red Hat Enterprise Linux 8 Reporter: Thomas Huth <thuth>
Component: s390utilsAssignee: Dan Horák <dhorak>
Status: CLOSED ERRATA QA Contact: Vilém Maršík <vmarsik>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.2CC: dhorak, fmartine, javierm, jhlavac, rvr
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.2   
Hardware: s390x   
OS: Linux   
Whiteboard:
Fixed In Version: s390utils-2.6.0-25.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-28 16:49: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:
Attachments:
Description Flags
PATCH] - skip BOOT_IMAGE param when copying the cmdline to BLS snippets none

Description Thomas Huth 2019-12-11 14:19:43 UTC
Description of problem:
I'm facing an issue how zipl handles the BOOT_IMAGE=... parameters on my LPAR in RHEL8 (btw, this did not used to be a problem in RHEL7): zipl apparently adds a BOOT_IMAGE=0 to the kernel command line, as you can see in /proc/cmdline. Now when installing a new kernel, zipl adds this BOOT_IMAGE=0 to the new entry in /boot/loader/entries/. After the next reboot, zipl adds an additional BOOT_IMAGE=0 to the kernel command line, so that there are now two "BOOT_IMAGE=0" strings in /proc/cmdline. If you now install another kernel, its entry in /boot/loader/entries/ has two "BOOT_IMAGE=0" strings, too. And then, after the next reboot, you have three "BOOT_IMAGE=0" in /proc/cmdline, i.e. each time you reboot and install a new kernel afterwards, you have one additional "BOOT_IMAGE=0" in your kernel parameters.
When I noticed the problem for the first time, I had already lots of these in my boot loader entries:

# cd /boot/loader/entries/
# grep BOOT_IMAGE *
f6d92c23a77d4d3994e45865208f28af-4.18.0-160.el8.s390x.conf:options root=/dev/mapper/rhel_kerneldev9-root crashkernel=auto rd.dasd=0.0.7000 rd.dasd=0.0.7100 rd.dasd=0.0.7200 rd.dasd=0.0.7300 rd.lvm.lv=rhel_kerneldev9/root rd.lvm.lv=rhel_kerneldev9/swap cio_ignore=all,!condev,!0.0.7008-0.0.700f rd.znet=qeth,0.0.0900,0.0.0901,0.0.0902,layer2=1,portno=0 LANG=en_DK.UTF-8 BOOT_IMAGE=0 BOOT_IMAGE=0 $tuned_params BOOT_IMAGE=0 BOOT_IMAGE=0 BOOT_IMAGE=0 BOOT_IMAGE=0 BOOT_IMAGE=0 BOOT_IMAGE=0 BOOT_IMAGE=0 BOOT_IMAGE=0 BOOT_IMAGE=0 BOOT_IMAGE=0 BOOT_IMAGE=0 BOOT_IMAGE=0 BOOT_IMAGE=0 BOOT_IMAGE=0 BOOT_IMAGE=0 BOOT_IMAGE=0 BOOT_IMAGE=0 BOOT_IMAGE=0 BOOT_IMAGE=0 BOOT_IMAGE=0 BOOT_IMAGE=0 BOOT_IMAGE=0 BOOT_IMAGE=0 BOOT_IMAGE=0 BOOT_IMAGE=0 BOOT_IMAGE=0 BOOT_IMAGE=0 BOOT_IMAGE=0

Version-Release number of selected component (if applicable):
s390utils-base-2.6.0-23.el8.s390x

How reproducible:
100%

Steps to Reproduce:
1. Start with a clean system: "grep BOOT_IMAGE /boot/loader/entries/*" does not show any occurances.
2. Note that there is a "BOOT_IMAGE=0" in /proc/cmdline (likely added by zipl during boot)
3. Install a new kernel: yum install kernel*.rpm
4. The BOOT_IMAGE=0 got added to the new entry:

# grep BOOT_IMAGE /boot/loader/entries/*
/boot/loader/entries/f6d92c23a77d4d3994e45865208f28af-4.18.0-163.el8.s390x.conf:options root=/dev/mapper/rhel_kerneldev9-root crashkernel=auto rd.dasd=0.0.7000 rd.dasd=0.0.7100 rd.dasd=0.0.7200 rd.dasd=0.0.7300 rd.lvm.lv=rhel_kerneldev9/root rd.lvm.lv=rhel_kerneldev9/swap cio_ignore=all,!condev,!0.0.7008-0.0.700f rd.znet=qeth,0.0.0900,0.0.0901,0.0.0902,layer2=1,portno=0 LANG=en_DK.UTF-8 $tuned_params BOOT_IMAGE=0

5. Reboot, and you can now see two "BOOT_IMAGE=0" strings in /proc/cmdline, e.g.:

# cat /proc/cmdline 
root=/dev/mapper/rhel_kerneldev9-root crashkernel=auto rd.dasd=0.0.7000 rd.dasd=0.0.7100 rd.dasd=0.0.7200 rd.dasd=0.0.7300 rd.lvm.lv=rhel_kerneldev9/root rd.lvm.lv=rhel_kerneldev9/swap cio_ignore=all,!condev,!0.0.7008-0.0.700f rd.znet=qeth,0.0.0900,0.0.0901,0.0.0902,layer2=1,portno=0 LANG=en_DK.UTF-8 $tuned_params BOOT_IMAGE=0 BOOT_IMAGE=0

6. Go back to step 3 if you want to see yet another occurance of the string in your kernel command line.


Actual results:
"BOOT_IMAGE=0" shows up in the files in /boot/loader/entries/

Expected results:
"BOOT_IMAGE=..." should not be added to the files in /boot/loader/entries/

Comment 1 Dan Horák 2019-12-11 14:53:46 UTC
Thomas, thanks for the report, I noticed this behaviour as well, but haven't filed a bug yet.

Javier, I think this one is for you too. I guess the kernel-install scripts will need fixing.

Comment 2 Javier Martinez Canillas 2019-12-12 14:06:00 UTC
(In reply to Dan Horák from comment #1)
> Thomas, thanks for the report, I noticed this behaviour as well, but haven't
> filed a bug yet.
> 
> Javier, I think this one is for you too. I guess the kernel-install scripts
> will need fixing.

That's correct. Since the BOOT_IMAGE parameter is added by the bootloader, the kernel-install plugins should skip this when setting the kernel command line in the BLS snippets.

I'll attach a fix for this.

Comment 3 Javier Martinez Canillas 2019-12-12 14:12:07 UTC
Created attachment 1644429 [details]
PATCH] - skip BOOT_IMAGE param when copying the cmdline to BLS  snippets

Comment 4 Dan Horák 2019-12-12 15:52:09 UTC
Javier, thanks for the patch. I'll work on getting it into the rpm.

Comment 6 Vilém Maršík 2020-03-12 01:16:10 UTC
Reproduced:
===========
# rpm -U --oldpackage s390utils-base-2.6.0-23.el8.s390x.rpm
# grep BOOT_IMAGE /boot/loader/entries/*
# cat /proc/cmdline
root=/dev/mapper/rhel_ibm--z--101-root crashkernel=auto rd.dasd=0.0.0120 rd.dasd=0.0.0121 rd.dasd=0.0.0122 rd.dasd=0.0.0123 rd.lvm.lv=rhel_ibm-z-101/root rd.lvm.lv=rhel_ibm-z-101/swap rd.znet=qeth,0.0.8000,0.0.8001,0.0.8002,layer2=1,portname=z-101,portno=0 BOOT_IMAGE=0
# yum install kernel*.rpm
(...)
# grep BOOT_IMAGE /boot/loader/entries/*
/boot/loader/entries/36129a31b4224825b8658cedbc52dd07-4.18.0-187.1.el8.s390x.conf:options root=/dev/mapper/rhel_ibm--z--101-root crashkernel=auto rd.dasd=0.0.0120 rd.dasd=0.0.0121 rd.dasd=0.0.0122 rd.dasd=0.0.0123 rd.lvm.lv=rhel_ibm-z-101/root rd.lvm.lv=rhel_ibm-z-101/swap rd.znet=qeth,0.0.8000,0.0.8001,0.0.8002,layer2=1,portname=z-101,portno=0 BOOT_IMAGE=0 $tuned_params

And verified:
=============
# rpm -e kernel-4.18.0-187.1.el8.s390x kernel-modules-4.18.0-187.1.el8.s390x kernel-core-4.18.0-187.1.el8.s390x
# dnf upgrade s390utils-base
(...)
Upgraded:
  s390utils-base-2:2.6.0-28.el8.s390x
Complete!
# grep BOOT_IMAGE /boot/loader/entries/*
# cat /proc/cmdline
root=/dev/mapper/rhel_ibm--z--101-root crashkernel=auto rd.dasd=0.0.0120 rd.dasd=0.0.0121 rd.dasd=0.0.0122 rd.dasd=0.0.0123 rd.lvm.lv=rhel_ibm-z-101/root rd.lvm.lv=rhel_ibm-z-101/swap rd.znet=qeth,0.0.8000,0.0.8001,0.0.8002,layer2=1,portname=z-101,portno=0 BOOT_IMAGE=0
# yum install kernel*.rpm
(...)
Complete!
# grep BOOT_IMAGE /boot/loader/entries/*
# rpm -q s390utils-base
s390utils-base-2.6.0-28.el8.s390x

Comment 8 errata-xmlrpc 2020-04-28 16:49: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, 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-2020:1826