NitroPC Pro 2 con GPU externa¶
Nota
Esta guía sólo funciona si utilizas la imagen de GPU Qubes OS OEM de Nitrokey que puedes construir aquí.
Esta guía explica cómo utilizar tu NitroPC con una tarjeta gráfica externa (GPU) con Qubes OS.
Advertencia
Seguir esta guía puede crear algunos problemas de seguridad en Qubes OS. Sígala bajo su propia responsabilidad.
Crear un Windows Qube¶
Nota
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.
Esta parte está utilizando ElliotKillick proyecto.
Abre un terminal en dom0 y asegúrate de que tienes internet conectado.
Instala las herramientas de Windows de Qubes, en dom0 :
sudo qubes-dom0-update qubes-windows-tools-4.1.69cuando se te pregunte pulsayy enter.Nota
Consulte la implicación de seguridad de la instalación de QWT.
Hacer ejecutable el script de instalación, en dom0 :
sudo chmod +x /install.shLanza el script de instalación, en dom0 :
/install.shSi ve este mensaje :
[+] Installation complete!entonces puede continuar.At this point the script created a new Qube called windows-mgmt now we will download the ISO to create the Windows Qube.
Para ello necesitamos copiar el script
~/qvm-create-windows-qube/windows/isos/mido.shdel Qube windows-mgmt dentro de un Qube desechable con conectividad a internet.Inicie un nuevo DVM (desechable) Qube y dele al menos 10 GB de almacenamiento privado.
Inicie el windows-mgmt Qube y copie el script, en windows-mgmt Qube :
qvm-copy qvm-create-windows-qube/windows/isos/mido.shluego seleccione el DVM Qube (dispXXXX).Once the script is copied launch it, in dispXXXX :
./QubesIncoming/windows-mgmt/mido.sh win10x64Nota
En esta guía instalamos Windows 10 pero hay otras versiones de Windows disponibles que puedes listar usando
./QubesIncoming/windows-mgmt/mido.shIf 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.Una vez copiado puedes cerrar tu DVM Qube.
En el Qube windows-mgmt :
mv QubesIncoming/dispXXXX/win10x64.iso qvm-create-windows-qube/windows/isos/(sustituya “dispXXXX” por el nombre del Qube desechable que ha creado).Entonces en dom0 :
qvm-create-windows-qube -n sys-firewall -oy -i win10x64.iso -a win10x64-pro.xml work-win10Nota
Puede preinstalar cualquier paquete de este sitio. Por ejemplo:
qvm-create-windows-qube -n sys-firewall -oyp firefox,notepadplusplus,office365proplus -i win10x64.iso -a win10x64-pro.xml work-win10Si el script se detiene o si se queda atascado reinténtalo hasta que veas este mensaje:
[+] Completed successfully!Ahora tendrá que conectar su GPU al Qube de Windows, para ello vaya al Administrador de Qube y a las opciones de Qube de Windows 10 (asegúrese de que el Qube está apagado), en la pestaña Dispositivos seleccione su tarjeta gráfica y pásela a la derecha a continuación, haga clic en el
Configure strict reset for PCI devicesa continuación, seleccione su tarjeta y haga clic enOKAhora que tu tarjeta gráfica está conectada a tu Windows Qube necesitarás instalar los drivers de tu tarjeta. Busca
Check for updatesen la barra de búsqueda y luego haz clic enCheck for updates(tendrás que reiniciar varias veces).
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.
Una vez terminado puedes conectar una pantalla secundaria a la tarjeta gráfica.
Si desea utilizar un ratón o un teclado dedicado para Windows Qube, deberá utilizar sys-usb y conectarle el dispositivo deseado.
Crear un Qube Linux¶
Debian¶
Vaya al gestor de Qube y cree un nuevo Qube independiente e inicie la configuración después de la creación.
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.Cierra los ajustes e inicia el Qube.
Añade non-free a tu lista de fuentes:
sudo sed -i '1 s/.*/& non-free/' /etc/apt/sources.listsudo apt updatesudo apt install nvidia-driver dbus-x11Now 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.shsudo ./xorgX1.sh ./xfce.sh
Ahora la pantalla secundaria debería encenderse y mostrar un escritorio Debian XFCE.
Si desea utilizar un ratón o teclado dedicado para Linux Qube, entonces necesita utilizar sys-usb y conectar el dispositivo deseado a él.