Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 2509

Graphical Environments & Desktops • Installing nvidia drivers on a QEMU instance running bullsye with a custom linux kernel

$
0
0
Configuration

So, I am trying to get the nvidia drivers running on my Qemu instance running bullseye built with a specific configuration file, which is running according by the following command

Code:

sudo qemu-system-x86_64 \-m 4G \-smp 2 \-kernel /home/pawbud/syzkaller_files/syz_linux/arch/x86/boot/bzImage \-device vfio-pci,host=65:00.0 \-append "console=ttyS0 root=/dev/sda earlyprintk=serial net.ifnames=0" \-drive file=/home/pawbud/syzkaller_files/syz_image/bullseye.img,format=raw \-net user,host=10.0.2.10,hostfwd=tcp:127.0.0.1:10021-:22 \-net nic,model=e1000 \-enable-kvm \-nographic \-pidfile vm.pid \2>&1 | tee vm.log
and as the heading says it is running on a customized linux kernel with some configurations set.

The kernel was installed on the host (also running debian), and the commit id 830b3c68c1fb1e9176028d02ef86f3cf76aa2476 was checked out to get linux 6.1.0.

Moreoever, I also copied the source into QEMU with the exact same commit ID, the reason described in the next section of this post. My nvidia card shows up on the QEMU instance, as shown with the attachment.

Installing the Nvidia Drivers

Nvidia drivers need the linux-headers installed, so I came across a similar post which aimed at resolving the issue of installing linux headers for customized kernels. Since i don't have storage concerns, I simply copied the source code, with the same configurations and the same commit ID to align the versions that qemu is running on, and continued as the post says.

I already ran

Code:

 make headers_install INSTALL_HDR_PATH=/usr/src/6.1.0
and

Code:

make modules_install
I also needed to install dkms, which I did using

Code:

sudo apt install dkms
dkms status returns nvidia-current, 470.256.02: added, which was installed using

Code:

sudo apt install nvidia-driver firmware-misc-nonfree
which is when the error pops up.

The Error
The error is in the attachments
modprobe error pt 2

modprobe error pt1

Actual Error when installing nvidia drivers

Nvidia Driver Detected on QEMU

Statistics: Posted by PawBud — 2024-07-07 19:41 — Replies 0 — Views 37



Viewing all articles
Browse latest Browse all 2509

Trending Articles