NitroPC Pro 2 met externe GPU¶
Notitie
Deze gids werkt alleen als je het Qubes OS OEM GPU image van Nitrokey gebruikt dat je hier kunt bouwen ``_.
Deze handleiding legt uit hoe je je NitroPC kunt gebruiken met een externe grafische kaart (GPU) met Qubes OS.
Waarschuwing
Het volgen van deze gids kan leiden tot veiligheidsproblemen binnen Qubes OS. Volg het op eigen risico.
Een Windows Qube maken¶
Notitie
This will install a Windows Qube from the official trial ISO. If you want a full Windows experience then you will need to add a license key.
Dit onderdeel maakt gebruik van ElliotKillick project.
Open een terminal in dom0 en zorg ervoor dat je internetverbinding hebt.
Installeer de Qubes Windows Tools, in dom0 :
sudo qubes-dom0-update qubes-windows-tools-4.1.69druk opyen enter.Notitie
Bekijk de beveiligingsimplicatie van het installeren van QWT.
Maak het installatiescript uitvoerbaar, in dom0 :
sudo chmod +x /install.shStart het installatiescript, in dom0 :
/install.shAls je dit bericht ziet :
[+] Installation complete!dan kun je doorgaan.At this point the script created a new Qube called windows-mgmt now we will download the ISO to create the Windows Qube.
Hiervoor moeten we het
~/qvm-create-windows-qube/windows/isos/mido.shscript van de windows-mgmt Qube kopiëren naar een wegwerp Qube met internetverbinding.Start een nieuwe DVM (wegwerp) Qube en geef deze minstens 10 GB aan privéopslag.
Start de windows-mgmt Qube en kopieer het script, in windows-mgmt Qube :
qvm-copy qvm-create-windows-qube/windows/isos/mido.shselecteer vervolgens de DVM Qube (dispXXXX).Once the script is copied launch it, in dispXXXX :
./QubesIncoming/windows-mgmt/mido.sh win10x64Notitie
In deze handleiding installeren we Windows 10, maar er zijn ook andere Windows-versies beschikbaar. Je kunt ze opnoemen met
./QubesIncoming/windows-mgmt/mido.sh.If you get a success message then you will need to copy the downloaded ISO from the DVM to the windows-mgmt Qube, in dispXXXX :
qvm-copy QubesIncoming/windows-mgmt/win10x64.isoand choose the windows-mgmt Qube.Eenmaal gekopieerd kunt u uw DVM Qube sluiten.
In de windows-mgmt Qube :
mv QubesIncoming/dispXXXX/win10x64.iso qvm-create-windows-qube/windows/isos/(vervang ‘dispXXXX’ door de naam van de wegwerp-Qube die je hebt gemaakt).Dan in dom0 :
qvm-create-windows-qube -n sys-firewall -oy -i win10x64.iso -a win10x64-pro.xml work-win10Notitie
Je kunt elk pakket vooraf installeren vanaf deze site. Bijvoorbeeld:
qvm-create-windows-qube -n sys-firewall -oyp firefox,notepadplusplus,office365proplus -i win10x64.iso -a win10x64-pro.xml work-win10Als het script stopt of vastloopt, probeer dan opnieuw totdat je dit bericht ziet: [+] Completed successfully!
Nu moet je je GPU koppelen aan de Windows Qube, om dit te doen ga je naar de Qube Manager en de Windows 10 Qube opties (zorg ervoor dat de Qube is uitgeschakeld), onder het tabblad Apparaten selecteer je je grafische kaart en geef deze door naar rechts klik dan op de
Configure strict reset for PCI devicesselecteer dan je kaart en klik opOK.Nu je grafische kaart is aangesloten op je Windows Qube moet je de stuurprogramma’s van je kaart installeren. Zoek naar
Check for updatesin de zoekbalk en klik dan opCheck for updates(je zult een paar keer opnieuw moeten opstarten).
Now Windows will install all the drivers you will need to use your external graphic card. If you’re experiencing some problems make sure that you have enough space in your Windows Qube while installing updates.
Eenmaal klaar kun je een secundair beeldscherm aansluiten op de grafische kaart.
Als je een speciale muis of toetsenbord wilt gebruiken voor de Windows Qube, dan moet je sys-usb gebruiken en het gewenste apparaat erop aansluiten.
Een Linux Qube maken¶
Debian¶
Ga naar de Qube manager en maak een nieuwe standalone Qube aan en start de instellingen na het aanmaken.
In the “Advanced” tab change the mode to HVM and disable memory balancing and choose the amount of RAM you want.
In the devices tab select the GPU and pass it to the right then click on the
Configure strict reset for PCI devicesthen select your card and clickOK.Sluit de instellingen en start de Qube.
Voeg non-free toe aan je bronnenlijst: sudo sed -i ‘1 s/.*/& non-free/’ /etc/apt/sources.list
sudo apt update
sudo apt install nvidia-driver dbus-x11
Now you will need to create 3 different files:
screen.conf:
Section "Device" Identifier "GPU" # name of the driver to use. Can be "amdgpu", "nvidia", or something else Driver "nvidia" # The BusID value will change after each qube reboot. BusID "PCI:0:8:0" EndSection Section "Screen" Identifier "GPU screen" Device "GPU" EndSection
xorgX1.sh:
#!/bin/bash binary=${1:?binary required} # Find the correct BusID of the AMD GPU, then set it in the Xorg configuration file pci=$(lspci | grep "VGA" | grep -E "NVIDIA|AMD/ATI" | cut -d " " -f 1 | cut -d ":" -f 2 | cut -d "." -f 1 | cut -d "0" -f 2) sed -i 's/"PCI:[^"]*"/"PCI:0:'$pci':0"/g' /home/user/screen.conf # Start the Xorg server for the X screen number 1. # The X screen n°0 is already used for QubesOS integration sudo startx "$binary" -- :1 -config /home/user/screen.confxfce.sh:
#!/bin/bash sleep 5 && sudo setxkbmap -display :1 fr & /bin/sudo -u user PULSE_SERVER=unix:/run/user/1000/pulse/native bash -c 'sudo xhost + local:;/usr/bin/startxfce4'
sudo chmod +x xorgX1.sh xfce.sh
sudo ./xorgX1.sh ./xfce.sh
Nu zou het secundaire scherm aan moeten gaan en een Debian XFCE bureaublad moeten tonen.
Als je een speciale muis of toetsenbord wilt gebruiken voor de Linux Qube, dan moet je sys-usb gebruiken en het gewenste apparaat erop aansluiten.