Bug 2050878

Summary: [lorax-templates-rhel] Do not remove the nvram kernel module from install.img
Product: Red Hat Enterprise Linux 9 Reporter: Jan Stodola <jstodola>
Component: lorax-templates-rhelAssignee: Brian Lane <bcl>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.0CC: jwboyer
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: lorax-templates-rhel-9.0-33.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-17 12:38:16 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:15:06 UTC
This bug was initially created as a copy of Bug #2050877


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-05 10:54:47 UTC
lorax-templates-rhel-9.0-33.el9 works as expected, the nvram kernel module is included in install.img and bootlist succeeds now:

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:sda
DEBUG:program:Return code: 0

Comment 2 Jan Stodola 2022-02-07 16:51:55 UTC
Setting Verified:Tested based on comment 1.

Comment 5 Jan Stodola 2022-02-16 17:13:55 UTC
./usr/lib/modules/5.14.0-58.el9.ppc64le/kernel/drivers/char/nvram.ko.xz is present in install.img of compose RHEL-9.0.0-20220215.4.
lorax-templates-rhel-9.0-33.el9 is included in RHEL-9.0.0-20220215.4.

Moving to VERIFIED.

Comment 7 errata-xmlrpc 2022-05-17 12:38:16 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-templates-rhel), 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:2364