SHOW:
|
|
- or go back to the newest paste.
1 | You will need to creat some files manualy. | |
2 | 1. Create vfio-pci-override.sh in /sbin with the following content: | |
3 | ||
4 | #!/bin/sh | |
5 | ||
6 | DEVS="0000:02:00.0 0000:02:00.1" | |
7 | ||
8 | for DEV in $DEVS; do | |
9 | echo "vfio-pci" > /sys/bus/pci/devices/$DEV/driver_override | |
10 | done | |
11 | ||
12 | modprobe -i vfio-pci | |
13 | modprobe -i nvidia | |
14 | ||
15 | 2. Create file vga_hook in /usr/share/initramfs-tools/hooks/ with the following content: | |
16 | ||
17 | #!/bin/sh | |
18 | PREREQ="" | |
19 | prereqs() | |
20 | { | |
21 | echo "$PREREQ" | |
22 | } | |
23 | ||
24 | case $1 in | |
25 | prereqs) | |
26 | prereqs | |
27 | exit 0 | |
28 | ;; | |
29 | esac | |
30 | . /usr/share/initramfs-tools/hook-functions | |
31 | copy_exec /sbin/vfio-pci-override.sh /sbin | |
32 | ||
33 | 3. Make both files executable: | |
34 | ||
35 | $ sudo chmod +x /sbin/vfio-pci-override.sh | |
36 | $ sudo chmod +x /usr/share/initramfs-tools/hooks/vga_hook | |
37 | ||
38 | 4. Add the following in modprobe.d/local.conf in place of the "options vfio-pci ids=xxx" line if present and remove the boot options from grub cmd line "vfio-pci.ids=10de:13c0,10de:0fbb". | |
39 | ||
40 | install vfio-pci /sbin/vfio-pci-override-vga.sh | |
41 | install nvidia /sbin/vfio-pci-override-vga.sh | |
42 | ||
43 | 5. Rebuild your initramfs: | |
44 | ||
45 | $ sudo update-initramfs -u | |
46 | ||
47 | 6. Reboot and proffit. | |
48 | ||
49 | P.S. The line DEVS in vfio-pci-override.sh is for your current setup from the lspci -vnk you posted before. You can check for success of the update-initramfs by: | |
50 | ||
51 | $ sudo lsinitramfs -l /boot/initrd.img-xxx |grep vfio-pci-override-vga.sh |