-
Bug
-
Resolution: Done
-
Minor
-
rhel-7.9.z
-
leapp-repository-0.19.0-1.el7_9
-
None
-
Low
-
rhel-upgrades
-
0
-
False
-
False
-
-
None
-
None
-
None
-
None
-
Enhancement
-
-
All
-
None
-
57,005
Description of problem:
Using custom drivers is basically unsupported as it could be risky and in the worst case lead to a broken system.
That said, it would be a great feature and a customer requested how to do this. As they agreed to make some tests in their environment I suggested the below recipe.
Customer is using a NAS that uses arcmsr as a storage driver. This driver was present in the RHEL7 branch but has been removed from RHEL 8 and beyond.
The procedure worked for the customer.
Version-Release number of selected component (if applicable):
leapp-upgrade-el7toel8-0.17.0-1.el7_9
DISCLAIMER: it's not supported by Red Hat, play at your own risk!
0. Avoid the inhibitor and edit `/etc/leapp/files/device_driver_deprecation_data.json` to make Leapp believe it's still available and maintained:
,
1. Create an HTTP repo on another machine to share the RPM driver.
Ensure you can curl the metadata (repodata/repomd.xml) and the rpm from the target machine.
2. On the target machine, create an additional repo (replace 192.168.122.1 by the IP of the http server used above).
- cat << EOF > /etc/leapp/files/leapp_upgrade_repositories.repo
[drivers]
name=drivers
baseurl=http://192.168.122.1/drivers
EOF
3. Include the RPM in the el8 target userspace container used to create the UpgradeInitramfs (/var/lib/leapp/el8userspace). To do so, edit `/usr/share/leapp-repository/repositories/system_upgrade/common/actors/commonleappdracutmodules/libraries/modscan.py`, and add 'kmod-arcmsr' to the _REQUIRED_PACKAGES array.
15 _REQUIRED_PACKAGES = [
16 'binutils',
17 'cifs-utils',
18 'device-mapper-multipath',
19 'dracut',
20 'dracut-config-generic',
21 'dracut-config-rescue',
22 'dracut-network',
23 'dracut-tools',
24 'fcoe-utils',
25 'hostname',
26 'iscsi-initiator-utils',
27 'kbd',
28 'kernel',
29 'kernel-core',
30 'kernel-modules',
31 'keyutils',
32 'lldpad',
33 'lvm2',
34 'mdadm',
35 'nfs-utils',
36 'openssh-clients',
37 'plymouth',
38 'rpcbind',
39 'systemd-container',
40 'tar',
41 'kmod-arcmsr', # <<<<<
42 ]
4. Edit `/usr/share/leapp-repository/repositories/system_upgrade/common/actors/initramfs/upgradeinitramfsgenerator/files/generate-initram.sh` and insert the following line: --add-drivers arcmsr
81 stage "Building initram disk for kernel: $KERNEL_VERSION"
82 \dracut \
83 -vvvv \
84 --force \
85 --conf "$DRACUT_CONF" \
86 --confdir "$DRACUT_CONF_DIR" \
87 --install "$DRACUT_INSTALL" \
88 $DRACUT_MODULES_ADD \
89 "$DRACUT_MDADMCONF_ARG" \
90 "$DRACUT_LVMCONF_ARG" \
91 --no-hostonly \
92 --add-drivers arcmsr \ # <<<<<
93 --kver "$KERNEL_VERSION" \
94 --kernel-image "vmlinuz-upgrade.$KERNEL_ARCH" \
95 "initramfs-upgrade.${KERNEL_ARCH}.img"
5. Tell Leapp to add this RPM to be installed during the DNF transaction on the final target system
- echo kmod-arcmsr >> /etc/leapp/transaction/to_install
6. Run `leapp upgrade --debug --enablerepo drivers`