summaryrefslogtreecommitdiffstats
path: root/templates/post-arcmsr
diff options
context:
space:
mode:
Diffstat (limited to 'templates/post-arcmsr')
-rw-r--r--templates/post-arcmsr12
1 files changed, 12 insertions, 0 deletions
diff --git a/templates/post-arcmsr b/templates/post-arcmsr
new file mode 100644
index 0000000..be04566
--- /dev/null
+++ b/templates/post-arcmsr
@@ -0,0 +1,12 @@
+yum -y install https://www.elrepo.org/elrepo-release-8.0-2.el8.elrepo.noarch.rpm
+yum -y install kmod-arcmsr
+
+# But there is already a newer kernel.
+# weak-modules does not work automatically, add-kernel does not help
+# by default dracut copies module for old kernel (good), but does not load it. -I copies module, but depmod is not executed.
+kver=$(rpm -qv kernel | cut -d '-' -f 2-)
+/sbin/weak-modules --add-kernel $kver
+cp -r /lib/modules/4.18.0-80.el8.x86_64/extra/ /lib/modules/$kver
+depmod -a
+cp /boot/initramfs-$kver.img /boot/initramfs-$kver.img.orig
+dracut -f /boot/initramfs-$kver.img -I /lib/modules/$kver/extra/arcmsr/arcmsr.ko --force-drivers arcmsr $kver