diff options
-rw-r--r-- | platforms/n1sdp/ubuntu/init | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/platforms/n1sdp/ubuntu/init b/platforms/n1sdp/ubuntu/init index 96ca8a5..022d92e 100644 --- a/platforms/n1sdp/ubuntu/init +++ b/platforms/n1sdp/ubuntu/init @@ -22,7 +22,7 @@ mkdir /boot/efi mount /boot/efi grub-install [ -e /linux-image-n1sdp.deb ] && dpkg -i /linux-image-n1sdp.deb -sed -ie 's/^GRUB_TIMEOUT_STYLE=.*$/GRUB_TIMEOUT_STYLE=menu/; s/^GRUB_TIMEOUT=.*$/GRUB_TIMEOUT=2/; s/GRUB_CMDLINE_LINUX_DEFAULT=.*$/GRUB_CMDLINE_LINUX_DEFAULT="earlycon"/' /etc/default/grub +sed -ie 's/^GRUB_TIMEOUT_STYLE=.*$/GRUB_TIMEOUT_STYLE=menu/; s/^GRUB_TIMEOUT=.*$/GRUB_TIMEOUT=2/; s/GRUB_CMDLINE_LINUX_DEFAULT=.*$/GRUB_CMDLINE_LINUX_DEFAULT="earlycon vfio-pci.ids=10ee:9038"/' /etc/default/grub update-grub sync # change root password @@ -31,5 +31,19 @@ echo "root:root" | chpasswd adduser ubuntu --gecos "ubuntu" --disabled-password echo "ubuntu:ubuntu" | chpasswd usermod -aG sudo ubuntu +cat <<EOF >/etc/modprobe.d/vfio.conf +# cat /etc/modprobe.d/vfio.conf +options vfio-pci ids=10ee:9038 +softdep radeon pre: vfio-pci +softdep amdgpu pre: vfio-pci +softdep nouveau pre: vfio-pci +softdep drm pre: vfio-pci +options kvm_amd avic=1 +EOF +update-initramfs -u +cat <<EOF >/etc/modules-load.d/vfio-pci.conf +# cat /etc/modules-load.d/vfio-pci.conf +vfio-pci +EOF sync bash |