install nvidia driver 375.39 on linux without nvidia graphics card

Hi Everyone

I am building a custom livecd which will be used by machines with the nvidia graphics card GTX1070.
The build process for the custom debian / ubuntu livecd is executed on headless server nodes (livecd is created via debootstrap, chroot and squashfs).

I can start the installation process bit it breaks down after a while due to the issue that the build server does not have any nvidia graphics card installed.

Here the last few lines from the nvidia build log

-> done.
-> Kernel module compilation complete.
-> Unable to determine if Secure Boot is enabled: No such file or directory
ERROR: Unable to load the kernel module 'nvidia.ko'.  This happens most frequently when this kernel module was built against the wrong or improperly configured kernel sources, with a version of gcc that differs from the one used to build the target kernel, or if a driver such as rivafb, nvidiafb, or nouveau is present and prevents the NVIDIA kernel module from obtaining ownership of the NVIDIA graphics device(s), or no NVIDIA GPU installed in this system is supported by this NVIDIA Linux graphics driver release.

Please see the log entries 'Kernel module load error' and 'Kernel messages' at the end of the file '/var/log/nvidia-installer.log' for more information.
-> Kernel module load error: No such device
-> Kernel messages:
[    4.779583] sd 0:0:0:0: Attached scsi generic sg0 type 0
[    4.779612] sr 1:0:0:0: Attached scsi generic sg1 type 5
[    4.861261] ppdev: user-space parallel port driver
[    4.958272] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[    5.576601] ISO 9660 Extensions: Microsoft Joliet Level 3
[    5.579146] ISO 9660 Extensions: RRIP_1991A
[    5.607634] ISO 9660 Extensions: Microsoft Joliet Level 3
[    5.608133] ISO 9660 Extensions: RRIP_1991A
[    5.621516] ISO 9660 Extensions: Microsoft Joliet Level 3
[    5.622296] ISO 9660 Extensions: RRIP_1991A
[    5.817203] IPv6: ADDRCONF(NETDEV_UP): enp0s3: link is not ready
[    5.821604] e1000: enp0s3 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
[    5.821922] IPv6: ADDRCONF(NETDEV_CHANGE): enp0s3: link becomes ready
[    7.241921] random: crng init done
[    7.813217] floppy0: no floppy controllers found
[    7.813264] work still pending
[  509.590622] [drm] Initialized
[  509.612281] nvidia: loading out-of-tree module taints kernel.
[  509.612287] nvidia: module license 'NVIDIA' taints kernel.
[  509.612287] Disabling lock debugging due to kernel taint
[  509.622323] NVRM: No NVIDIA graphics adapter found!
[ 1798.101755] e1000: enp0s3 NIC Link is Down
[ 1804.150348] e1000: enp0s3 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
[ 2776.865983] [drm] Initialized
[ 2776.896363] NVRM: No NVIDIA graphics adapter found!
ERROR: Installation has failed.  Please see the file '/var/log/nvidia-installer.log' for details.  You may find suggestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.com.

Is there a way of enforcing installation without an installed card?

Thank you for your help.

I know the package for Arch is done by first making the NVIDIA installer only extract its files, then doing the rest of the work without the NVIDIA installer. The script that creates the package compiles the kernel module by itself. The script then copies the resulting files and the rest of the needed files from the NVIDIA installer into the correct spots in /usr. This makes it possible to build the package without having NVIDIA hardware.

Looking at those scripts, it looks to me as if the decision what files to copy and where to copy them was done by hand.

There should be a Debian package for the NVIDIA drivers somewhere. You could reuse that work by running the build scripts for that Debian package on your server, then installing the resulting package.

EDIT: There’s a parameter ‘-A’ for the installer that shows the full list of options that are available for it. Perhaps see if you can find something that makes it continue installing.

Hi Ropid

Thanks a lot for the pointer with ARCH.

A quick google search revealed that there is a nvidia-driver package in debians non-free repository. The package can be installed into a chroot environment. Will so some more tests with the installation but I am one step closter to a working solution!

Will report back if this works as expected.

Thanks

@sebastianhutter

how’d it go?

I’m doing something similar, but in my case it is with PXE boot. So my current challenge is to get together a script that runs in a VM that can build the PXE boot artifacts (kernel “vmlinuz” and init ram disk / initrd (in cpio format…)).

Oh, and -A didn’t yield any goodness in my situation.