How to Install NVIDIA Drivers with Kickstart on Red Hat 8.3

Below is a partial example my kickstart.cfg that will install NVIDIA drivers on my Dell Precision laptops with integrated graphics from the Intel i7 CPU’s.

Works for RHEL 8.4 as well.


#version=RHEL8
# Use graphical install
graphical

#Repo For Network Installation
url --url="ftp://172.10.10.69/pub/rhel8_3/BaseOS"

#Additional Repo for Network Installation
repo --name="AppStream" --baseurl=ftp://172.10.10.69/pub/rhel8_3/AppStream

#Additional Repos for extra packages
repo --name="ePEL_8" --baseurl=https://172.10.10.69/repos/rhel8/epel_8 --noverifyssl
repo --name="elRepo_8" --baseurl=https://172.10.10.69/repos/rhel8/elrepo_8 --noverifyssl

#Offline Mirror Repository from NVIDIA for Graphics Drivers
repo --name="cudaNetwork" --baseurl=https://170.10.10.69/repos/rhel8/cudaNetwork/ --noverifyssl

#workaround for successful nvidia graphics driver installation
%pre-install
mkdir -p /mnt/sysimage/etc/default
touch /mnt/sysimage/etc/default/grub
%end

%packages
@^workstation-product-environment
@development
@dotnet-core
@gnome-apps
@graphical-admin-tools
@internet-applications
@office-suite
@security-tools
#Determined by nvidia documentation
@nvidia-driver:latest/ks
kexec-tools
%end


More Information

NVIDIA Documentation

As of October 8th, 2021 the method above has help me successfully deploy over 40 laptops, workstations, and servers with various Quadro cards, from Kepler through RTX.

https://developer.nvidia.com/blog/streamlining-nvidia-driver-deployment-on-rhel-8-with-modularity-streams/

I mostly followed the documentation above however there seems to be an issue either with Red Hat or with the installation instructions. I was forced to add the “pre-install” portion in order for kickstart to perform the network installation of Red Hat.

Does this survive kernel updates?

Yes, I have successfully upgraded systems from 8.3 to 8.4 with no issues so far.

Does this install CUDA drivers / support CUDA?

This method does not install CUDA packages, drivers only. You can add CUDA later or install it in your post script.

sudo dnf install -y cuda-11.4

There are steps you need to perform to setup the environment so CUDA support will actually work, details provided by NVIDIA.

Support USB-C Docks?

Sort of. There is either a bug with RedHat or the drivers, 2 displays + the built-in laptop display does not work. You can still use 1 monitor with a Dell USB-C dock + the built-in display. You can get 2 external displays to work if you use a built-in HDMI or Display Port and the USB-C Dock, the built-in laptop display will also still work.

Environment

This was done in a totally air-gapped environment and was the only way I found to successfully install the NVIDIA graphics drivers. There may be other solutions and if there are, I would love to hear them so drop a comment below!

Cheers!