I'm installing Nvidia drivers and have to click through screens like this (not this specific screen, but this is the installer and has some OK and some Yes/No questions during install):

Install questions

Is there a way to automate this? (my goal is to eventually do this via puppet)


Yes, I've done this before. Took me a few days to get it to work.
NVIDIA.....run -s for silent mode.
I found this option by using the Advanced help feature:
./NVIDIA....run -A

Note: Run it manually and choose all of the defaults to be sure that this is what you want (usually, that will be the case).

Caveat: The machine NOT be running in graphical mode for this to run. Then, reboot into graphical mode! (i.e. 2 reboots for this method to work).

There are some options that can be specified on the command line to over ride the default values.
NVIDIA...run -A > /tmp/NVIDIA_Help.txt is what I ran to find them.
-X or --run-nvidia-xconfig will run the x-config utility.
--x-sysconfig-path= is the path where the X config files will be installed. Check here for other options you may be interested in.

My .run files is named NVIDIA-Linux-x86_64-390.67.run. The firs part of this file is a script. The remaining is an imbedded tarball (on Linux).
When I look at this file, in the first 10 lines or so is an entry that reads skip_decompress=1082 \n size_decompress=42. The first 1081 lines of this file are the script that decompresses the tarball and executes the installation script called ./nvidia_installer.

You should also see a function (mine is called catDecompress) that reads the file from line 1082 through the end and untar's it. On my .run file, it looks like this:
tail -n +${skip_decompress} $0 | head -n ${size_decompress} Later, when this function is called, it is directed to an output file.

There is an option to uncompress this for you. I'm including it here so that you will understand what it does so that you can re-do it later.
Once you have this decompressed, you can change the install options in nvidia-installer to suit your needs (change the defaults to what ever you want), then re-compress the file and append it at the end of the .run script.
NOTE: There is an MD5 checksum in the header of the .run file. You will have to update that as well.

|improve this answer|||||
  • I'm on a closed RHEL network. I can post pseudo code if you need help. – Scottie H Oct 8 '19 at 23:19
  • Thanks! Is there anyway to choose a non default value? For example, the option that's given to create a new xorg config file (or whatever that file is called) – 43Tesseracts Oct 10 '19 at 6:00
  • Let me look. You may need to modify the install script or create a new .run file. Are you familiar with how to add a binary to a shell script? – Scottie H Oct 10 '19 at 17:20
  • No i'm not.. =( – 43Tesseracts Oct 11 '19 at 19:31
  • Check the edits I just added. – Scottie H Oct 11 '19 at 21:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.