Skip to content

Instantly share code, notes, and snippets.

@NicolaiSoeborg
Last active September 5, 2019 20:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NicolaiSoeborg/6fd3ab4044b48a5ddec8bb1d77eeda4c to your computer and use it in GitHub Desktop.
Save NicolaiSoeborg/6fd3ab4044b48a5ddec8bb1d77eeda4c to your computer and use it in GitHub Desktop.
Install Qubes OS 4.0.1
In dom0:
$ sudo vim /etc/yum.repos.d/qubes-dom0.repo
$ sudo vim /etc/yum.repos.d/qubes-templates.repo
Change to "Enabled=1" for the *-testing repos
Update dom0 packages
$ sudo qubes-dom0-update
Install Debian 10 (buster) template
$ sudo qubes-dom0-update qubes-templates-buster
To see all templates
$ sudo qubes-dom0-update --action='search qubes-templates-'
In fedora-template:
$ sudo vim /etc/yum.repos.d/*.repo
Change to "Enabled=1" for needed repos
$ sudo dnf update
In debian-template:
$ sudo vim /etc/apt/sources.list.d/*.list
Uncomment needed repos
$ sudo apt update && sudo apt upgrade
# TPM stuff:
In BIOS use "TPM 1.2" / "Discrete TPM", not "TPM 2.0"
$ sudo qubes-dom0-update rng-tools # feed kernel random data from TPM
# Windows 10:
[If you have an 'windowsX.iso', then follow this guide instead: https://www.qubes-os.org/doc/windows-vm/ ]
Create a new debian qube ("win10temp") make sure it has >=40GiB space!
Download "VirtualBox image" from https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/
$ sudo apt install qemu-utils unzip
Unzip VirtualBox zip file and convert to "raw"
$ unzip *.zip && tar -xvf *.ova
$ qemu-img convert -O raw *.vmdk win10.raw
Copy the root image file to a temporary location in Dom0
$ qvm-run --pass-io win10temp 'cat "/home/user/win10.raw"' > win10-root.img
Delete win10temp.
Create a Win10 HVM (change the amount of RAM in MB as you wish)
$ qvm-create --standalone --label red --property virt_mode=hvm --root-move-from ./win10-root.img Windows10
In "Qube Manager" set initial memory to "4096 MB" and "Kernel: None"
**Take a backup before starting the box** s.t. when license expires, you can just recover the backup and get another 90 days
$ qvm-start win10
Password is "Passw0rd!"
# Install Windows tools
$ sudo qubes-dom0-update qubes-windows-tools
$ rpm -ql qubes-windows-tools
> /usr/lib/qubes/qubes-windows-tools.iso
$ qvm-start win10 --cdrom=/usr/lib/qubes/qubes-windows-tools.iso
Install the tools (ignore warnings) and set windows settings:
$ qvm-prefs --set win10 qrexec_timeout 300
$ qvm-prefs --set win10 default_user IEUser
Use powercfg -H off and disk cleanup to save some disk space.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment