<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://www.svensemmler.org/feed.xml" rel="self" type="application/atom+xml" /><link href="https://www.svensemmler.org/" rel="alternate" type="text/html" /><updated>2026-01-17T09:46:50+00:00</updated><id>https://www.svensemmler.org/feed.xml</id><title type="html">/Sven</title><subtitle></subtitle><author><name>Sven Semmler</name></author><entry><title type="html">New public key</title><link href="https://www.svensemmler.org/blog/2023/08/24/new-public-key.html" rel="alternate" type="text/html" title="New public key" /><published>2023-08-24T00:00:00+00:00</published><updated>2023-08-24T00:00:00+00:00</updated><id>https://www.svensemmler.org/blog/2023/08/24/new-public-key</id><content type="html" xml:base="https://www.svensemmler.org/blog/2023/08/24/new-public-key.html"><![CDATA[<p>I use a <a href="https://www.nitrokey.com/" target="_blank">Nitrokey</a> to generate and store my private key. The key never leaves the device and no other copy exists. Usage of the key is protected by a rate-limited PIN code. The only way it could get compromised is someone taking the Nitrokey and <a href="https://xkcd.com/538/" target="_blank">beating the PIN out of me</a>.</p>

<p>This private key is also used to sign the boot files on my computer. When re-flashing my <a href="https://osresearch.net/" target="_blank">Heads</a> install, I answered some of the prompts without fully comprehending my actions and accidentally wiped my private key.</p>

<p>I no longer have access to it and needed to generate <a href="https://keys.openpgp.org/vks/v1/by-fingerprint/0C276715E93D4CE54007BDBF54EB584E8668B05F" target="_blank">a new one</a>. This new key is signed by an <a href="https://keys.openpgp.org/vks/v1/by-fingerprint/D7CAF2DB658D89BC08D6A7AADA6E167B8F541FB6" target="_blank">older key</a>, which is known to several of my contacts. It is also signed using my <a href="https://github.com/QubesOS/qubes-secpack/blob/main/keys/doc-signing/sven-qubes-doc-signing-keys.asc" target="_blank">Qubes Documentation Signing Key</a>, which in turn was previously signed by <a href="https://keys.openpgp.org/vks/v1/by-fingerprint/DA5975C9ABC40C833B2F620B2A632C537D744BC7" target="_blank">the lost key</a>.</p>]]></content><author><name>Sven Semmler</name></author><summary type="html"><![CDATA[I use a Nitrokey to generate and store my private key. The key never leaves the device and no other copy exists. Usage of the key is protected by a rate-limited PIN code. The only way it could get compromised is someone taking the Nitrokey and beating the PIN out of me.]]></summary></entry><entry><title type="html">automate debian-minimal based template creation on Qubes OS</title><link href="https://www.svensemmler.org/blog/2022/05/15/deb-min-guide.html" rel="alternate" type="text/html" title="automate debian-minimal based template creation on Qubes OS" /><published>2022-05-15T00:00:00+00:00</published><updated>2022-05-15T00:00:00+00:00</updated><id>https://www.svensemmler.org/blog/2022/05/15/deb-min-guide</id><content type="html" xml:base="https://www.svensemmler.org/blog/2022/05/15/deb-min-guide.html"><![CDATA[<blockquote>
  <p>I never got around to finish the draft, but others have continued and build upon it. See <a href="https://forum.qubes-os.org/t/11421">this thread</a>.</p>
</blockquote>

<p>About a year ago I <a href="https://forum.qubes-os.org/t/2603/39" target="_blank">promised</a> in a Qubes OS Forum thread to write a guide on how to automate debian-minimal based template creation. Today I publish a <a href="/notes/deb-min-templates">first rough and incomplete draft</a>, that nevertheless should be useful.</p>

<p>I will keep fleshing it out. Please post all feedback, question or corrections you have into <a href="https://forum.qubes-os.org/t/11421" target="_blank">this thread</a> and I will answer there and update the guide as we go along.</p>]]></content><author><name>Sven Semmler</name></author><summary type="html"><![CDATA[I never got around to finish the draft, but others have continued and build upon it. See this thread.]]></summary></entry><entry><title type="html">Qubes OS R3.2 on a ThinkPad P51</title><link href="https://www.svensemmler.org/blog/2017/12/17/qubes-on-thinkpad-p51.html" rel="alternate" type="text/html" title="Qubes OS R3.2 on a ThinkPad P51" /><published>2017-12-17T00:00:00+00:00</published><updated>2017-12-17T00:00:00+00:00</updated><id>https://www.svensemmler.org/blog/2017/12/17/qubes-on-thinkpad-p51</id><content type="html" xml:base="https://www.svensemmler.org/blog/2017/12/17/qubes-on-thinkpad-p51.html"><![CDATA[<blockquote>
  <p>Since Qubes OS R4.0.3 no workarounds or troubleshooting are required anymore and the ThinkPad P51 is now listed as one of the <a href="https://forum.qubes-os.org/t/5560" target="_blank">community-recommended computers</a>.</p>
</blockquote>

<p>With significant help from members of the <a href="https://groups.google.com/forum/#!forum/qubes-users" target="_blank">qubes-users</a> mailing list, I was able to install <a href="https://www.qubes-os.org/" target="_blank">Qubes OS</a> R3.2 on my new ThinkPad P51 (model 20HJS0BX00). The starting point was the Qubes OS <a href="https://www.qubes-os.org/hcl/" target="_blank">Hardware Compatibility List</a> linking to <a href="https://groups.google.com/d/msg/qubes-users/ZFZT7mQNeWY/xZ1AiCYOAwAJ" target="_blank">swami’s post</a> on qubes-users, which describes or links all the steps below except for the use of the USB-to-Ethernet adapter to run the initial update.</p>

<p><em>A little twist that distinguishes my ThinkPad from his is that my networking hardware requires kernel version 4.9 to run, while after the install Qubes OS runs version 4.4.</em> Therefore some extra steps and hardware are required to run the initial update to kernel 4.9 to make everything work:</p>

<ul>
  <li>another computer running Fedora or Qubes OS with a Fedora qube (to create the USB sticks)</li>
  <li>Qubes installer USB stick prepared using Fedora’s <a href="https://fedoraproject.org/wiki/How_to_create_and_use_Live_USB#Command_line_method:_Using_the_livecd-iso-to-disk_tool_.28Fedora_only.2C_non-graphical.2C_both_non-destructive_and_destructive_methods_available.29" target="_blank">livecd-tools</a></li>
  <li><a href="http://www.rodsbooks.com/refind/getting.html" target="_blank">rEFInd</a> live USB stick</li>
  <li><a href="https://www.google.com/search?q=Linux-friendly+Ethernet-to-USB+adapter" target="_blank">Linux-friendly Ethernet-to-USB adapter</a> (e.g. <a href="https://www.apple.com/shop/product/MC704LL/A/apple-usb-ethernet-adapter" target="_blank">the one from Apple</a>)</li>
</ul>

<h2 id="create-qubes-installer-usb-stick">Create Qubes installer USB stick</h2>

<p>This step was described by <a href="https://groups.google.com/d/msg/qubes-users/4VsKdxnKHBk/mEb1VIImBAAJ" target="_blank">Dave C.’s post</a> with additional important <a href="https://groups.google.com/d/msg/qubes-users/4VsKdxnKHBk/Sf9vtED-BgAJ" target="_blank">input from Stephan Marwedel</a>.</p>

<ol>
  <li>Get the ISO, signature and signing key from the <a href="https://www.qubes-os.org/downloads/" target="_blank">Qubes OS Download</a> page.</li>
  <li>Follow the instructions <a href="https://www.qubes-os.org/security/verifying-signatures/" target="_blank">on digital signatures and key verification</a>.</li>
  <li>Install the ‘livecd-tools’ package.</li>
  <li>Run <code class="language-plaintext highlighter-rouge">sudo livecd-iso-to-disk --efi --format Qubes-R3.2-x86_64.iso /dev/sda</code> (assuming /dev/sda is the USB stick).</li>
  <li>Mount the newly created USB stick and edit /EFI/BOOT/xen.cfg. In this file, replace every occurrence of ‘LABEL=Qubes-R3.2-x86_64’ with ‘LABEL=BOOT’.</li>
  <li>Unmount and run <code class="language-plaintext highlighter-rouge">sudo dosfslabel /dev/sda BOOT</code> (assuming /dev/sda is the USB stick).</li>
</ol>

<h2 id="create-refind-live-usb-stick">Create rEFInd live USB stick</h2>

<ol>
  <li>Download the <a href="http://sourceforge.net/projects/refind/files/0.11.2/refind-flashdrive-0.11.2.zip/download" target="_blank">USB flash drive image</a> from Roderick W. Smith’s <a href="http://www.rodsbooks.com/refind/getting.html" target="_blank">rEFInd Boot Manager</a> page.</li>
  <li>Run <code class="language-plaintext highlighter-rouge">sudo dd if=refind-flashdrive-0.11.2.img of=/dev/sda bs=1M</code> (assuming /dev/sda is the USB stick).</li>
</ol>

<h2 id="bios-settings">BIOS settings</h2>

<ul>
  <li>boot in UEFI mode (not legacy)</li>
  <li>disable secure boot</li>
  <li>set graphics to discrete</li>
  <li>enable all virtualization features including VT-d</li>
</ul>

<h2 id="install-qubes">Install Qubes</h2>

<ol>
  <li>Boot the ThinkPad with the Qubes installer USB stick and run through the normal setup routine.</li>
  <li>When it is time to reboot, remove the Qubes installer USB stick and insert the rEFInd live USB instead.</li>
  <li>Once in the rEFInd boot manager, select the /EFI/BOOT/xen.cfg entry to boot.</li>
  <li>On the Qubes OS configuration screen, <em>do not create the sys-usb qube yet!</em></li>
  <li>Finish configuration and log into Qubes OS.</li>
</ol>

<h2 id="using-usb-to-ethernet-adapter-to-run-initial-update">Using USB-to-Ethernet adapter to run initial update</h2>

<p>Both <a href="https://groups.google.com/d/msg/qubes-users/xUXez7OOqXM/S-lVCaE1CQAJ" target="_blank">Taiidan</a> and an earlier comment from <a href="https://groups.google.com/d/msg/qubes-users/t-Ot9ZqeBYA/_2Iy8_IODAAJ" target="_blank">Yethal</a> helped me figure out this sequence:</p>

<ol>
  <li>connect the USB-to-Ethernet adapter and shutdown all qubes</li>
  <li>in dom0 run <code class="language-plaintext highlighter-rouge">qvm-prefs -s sys-net pci_strictreset false</code></li>
  <li>add your USB controller to sys-net using the qubes manager</li>
  <li>start sys-net and sys-firewall - you should now be online!</li>
  <li>update the fedora-23 template</li>
  <li>update dom0</li>
  <li>reboot with rEFInd USB stick</li>
  <li>use <code class="language-plaintext highlighter-rouge">uname -r</code> to make sure you are running kernel 4.9 in both dom0 and sys-net. In my case sys-net was now running kernel 4.9 but dom0 was still on 4.4. It took the extra step of running <code class="language-plaintext highlighter-rouge">sudo qubes-dom0-update --enablerepo=qubes-dom0-unstable kernel kernel-qubes-vm --best --allowerasing</code> to upgrade dom0 to kernel 4.9.</li>
  <li>shutdown all qubes and remove the USB controller from sys-net</li>
  <li>in dom0 run <code class="language-plaintext highlighter-rouge">qvm-prefs -s sys-net pci_strictreset true</code></li>
  <li>reboot with rEFInd USB stick</li>
</ol>

<h2 id="fix-efi-boot-configuration">Fix EFI boot configuration</h2>

<p>For some reason the EFI entry generated by the Qubes installer doesn’t work, which is why we had to use the rEFInd live USB stick until now to boot the machine. This can be fixed, by downloading the following packets via <a href="https://rpmfind.net/linux/rpm2html/search.php?query=efibootmgr&amp;submit=Search+...&amp;system=fedora&amp;arch=x86_64" target="_blank">rpmfind.net</a>:</p>

<ul>
  <li>efibootmgr-15-1.fc26.x86_64.rpm</li>
  <li>efivar-31-1.fc26.x86_64.rpm</li>
  <li>efivar-libs-31-1.fc26.x86_64.rpm</li>
</ul>

<p><em>Obviously those packets are not signed by the Qubes OS team and represent a security risk. Unfortunately the version of efibootmgr delivered with Qubes OS doesn’t fix the issue (it might actually be the cause of it). So you have to decide whether you want to keep booting with the rEFInd live USB stick or if you take the risk of installing those packets in dom0.</em></p>

<ol>
  <li><a href="https://www.qubes-os.org/doc/copy-from-dom0/" target="_blank">copy the files to dom0</a> and install them via <code class="language-plaintext highlighter-rouge">sudo dnf install efibootmgr-15-1.fc26.x86_64.rpm efivar-31-1.fc26.x86_64.rpm efivar-libs-31-1.fc26.x86_64.rpm</code>.</li>
  <li>delete the old entry via <code class="language-plaintext highlighter-rouge">sudo efibootmgr -b 0000 -B</code></li>
  <li>create a new entry via <code class="language-plaintext highlighter-rouge">sudo efibootmgr -v -c -u -L Qubes -l /EFI/qubes/xen.efi -d /dev/nvme0n1
-p 1</code></li>
  <li>reboot <em>without</em> the rEFInd live USB stick</li>
</ol>

<p>Done!</p>

<hr />

<p>Now the ThinkPad boots straight into Qubes OS R3.2 and all the hardware should work. During the installation we skipped <a href="https://www.qubes-os.org/doc/usb/" target="_blank">creating sys-usb</a>, which one might want to enable now that everything works. After successfully upgrading to kernel 4.9 one may switch the graphics BIOS setting back to hybrid. Finally I’d like to thank <a href="https://groups.google.com/d/msg/qubes-users/fXxHKv7CdSM/4AI5_tTXBwAJ" target="_blank">Unman</a> and <a href="https://groups.google.com/d/msg/qubes-users/fXxHKv7CdSM/U1fi-jbfBQAJ" target="_blank">Rory</a> for their help with approaches that ultimately didn’t work out but were definitely worth pursuing.</p>]]></content><author><name>Sven Semmler</name></author><summary type="html"><![CDATA[Since Qubes OS R4.0.3 no workarounds or troubleshooting are required anymore and the ThinkPad P51 is now listed as one of the community-recommended computers.]]></summary></entry></feed>