Bug 2050877

Summary: [lorax] Do not remove the nvram kernel module from install.img
Product: Red Hat Enterprise Linux 9 Reporter: Jan Stodola <jstodola>
Component: loraxAssignee: Brian Lane <bcl>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.0Keywords: Triaged
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: lorax-34.9.14-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-17 12:34:03 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:

Description Jan Stodola 2022-02-04 20:13:32 UTC
Description of problem:
The nvram kernel module is not included in install.img on ppc64le.
The bootlist command then prints errors during the installation (ignore the printf messages):

INFO:program:Running... bootlist -m normal -o /dev/mapper/mpatha1
INFO:program:/sbin/bootlist: line 277: printf: 0x: invalid hex number
INFO:program:/sbin/bootlist: line 277: printf: 0x: invalid hex number
INFO:program:/sbin/bootlist: line 277: printf: 0x: invalid hex number
INFO:program:/sbin/bootlist: line 277: printf: 0x: invalid hex number
INFO:program:/sbin/bootlist: line 277: printf: 0x: invalid hex number
INFO:program:/sbin/bootlist: line 277: printf: 0x: invalid hex number
INFO:program:/sbin/bootlist: line 277: printf: 0x: invalid hex number
INFO:program:/sbin/bootlist: line 277: printf: 0x: invalid hex number
INFO:program:/sbin/bootlist: line 277: printf: 0x: invalid hex number
INFO:program:/sbin/bootlist: line 277: printf: 0x: invalid hex number
INFO:program:/sbin/bootlist: line 277: printf: 0x: invalid hex number
INFO:program:/sbin/bootlist: line 277: printf: 0x: invalid hex number
INFO:program:/usr/sbin/nvram: ERROR: cannot open "/dev/nvram": No such device
INFO:program:/usr/sbin/nvram: ERROR: cannot open "/dev/misc/nvram": No such file or directory
INFO:program:Could not update bootlist!

In the lorax build log from compose RHEL-9.0.0-20220203.0 I can see that all except of a few modules are being removed:
...
template line 42: removekmod drivers/char --allbut virtio_console hw_random virtio-rng ipmi hmcdrv
...

Location and size of the kernel module on the installed system:
[root@ibm-p9z-20-lp14 ~]# ls -lh /lib/modules/5.14.0-52.el9.ppc64le/kernel/drivers/char/nvram.ko.xz
-rw-r--r--. 1 root root 3.7K Feb  1 12:58 /lib/modules/5.14.0-52.el9.ppc64le/kernel/drivers/char/nvram.ko.xz
[root@ibm-p9z-20-lp14 ~]#

Version-Release number of selected component (if applicable):
RHEL-9.0.0-20220203.0
lorax-34.9.11-1.el9
lorax-templates-rhel-9.0-32.el9

How reproducible:
always

Steps to Reproduce:
1. run "modprobe nvram" in the installation environment

Actual results:
The nvram kernel module is not loaded.

Expected results:
The module is loaded successfully.

Additional info:
This problem was originally noticed in bug 2017652.

Comment 1 Jan Stodola 2022-02-21 10:49:21 UTC
runtime-cleanup.tmpl from lorax-templates-generic-34.9.14-1.el9 keeps the nvram module:

removekmod drivers/char --allbut virtio_console hw_random \
                                  virtio-rng ipmi hmcdrv nvram

Marking as Verified:Tested

Comment 5 Jan Stodola 2022-02-23 13:51:24 UTC
Checked that lorax-34.9.14-1.el9 is in nightly compose RHEL-9.0.0-20220223.1

Moving to VERIFIED.

Comment 7 errata-xmlrpc 2022-05-17 12:34:03 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 (new packages: lorax), 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:2345