<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>franta.us</title>
    <subtitle>Franta&#x27;s blog</subtitle>
    <link rel="self" type="application/atom+xml" href="https://franta.us/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://franta.us"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2026-03-29T00:00:00+00:00</updated>
    <id>https://franta.us/atom.xml</id>
    <entry xml:lang="en">
        <title>GPG in TPM on NixOS</title>
        <published>2026-03-29T00:00:00+00:00</published>
        <updated>2026-03-29T00:00:00+00:00</updated>
        
        <author>
          <name>
            Franta Bartik
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://franta.us/blog/setting-up-gpg-in-tpm-on-nixos/"/>
        <id>https://franta.us/blog/setting-up-gpg-in-tpm-on-nixos/</id>
        
        <content type="html" xml:base="https://franta.us/blog/setting-up-gpg-in-tpm-on-nixos/">&lt;h2 id=&quot;motivation&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#motivation&quot; aria-label=&quot;Anchor link for: motivation&quot;&gt;Motivation&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;I have 3 YubiKeys set up with GPG keys. I wanted to try to have a key inside of the TPM of the NixOS laptop that I use at home.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;sources&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#sources&quot; aria-label=&quot;Anchor link for: sources&quot;&gt;Sources&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;I&#x27;ve mainly used 2 resources to get all the necessary commands to generate a GPG key in a TPM:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;blog.wrouesnel.com&#x2F;posts&#x2F;tpm-secured-gpg-keys&#x2F;&quot;&gt;https:&#x2F;&#x2F;blog.wrouesnel.com&#x2F;posts&#x2F;tpm-secured-gpg-keys&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;blog.dan.drown.org&#x2F;gpg-key-in-tpm&#x2F;&quot;&gt;https:&#x2F;&#x2F;blog.dan.drown.org&#x2F;gpg-key-in-tpm&#x2F;&lt;&#x2F;a&gt; (this is an update on the above blog with important fixes)&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;steps&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#steps&quot; aria-label=&quot;Anchor link for: steps&quot;&gt;Steps&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;initial-nix-config&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#initial-nix-config&quot; aria-label=&quot;Anchor link for: initial-nix-config&quot;&gt;Initial Nix config&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;These are the basic &lt;code&gt;nix&lt;&#x2F;code&gt; toggles you need to make to make sure TPM works (and your user can interact with it).&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;nix&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-variable z-variable z-parameter&quot;&gt;  security&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-variable z-parameter&quot;&gt;tpm2&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-variable z-parameter&quot;&gt;enable&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-language&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-variable z-variable z-parameter&quot;&gt;  security&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-variable z-parameter&quot;&gt;tpm2&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-variable z-parameter&quot;&gt;pkcs11&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-variable z-parameter&quot;&gt;enable&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-language&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; #&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; expose &#x2F;run&#x2F;current-system&#x2F;sw&#x2F;lib&#x2F;libtpm2_pkcs11.so&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-variable z-variable z-parameter&quot;&gt;  security&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-variable z-parameter&quot;&gt;tpm2&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-variable z-parameter&quot;&gt;tctiEnvironment&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-variable z-parameter&quot;&gt;enable&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-language&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; #&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; TPM2TOOLS_TCTI and TPM2_PKCS11_TCTI env variables&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-variable z-variable z-parameter&quot;&gt;  users&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-variable z-parameter&quot;&gt;users&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;&amp;lt;user&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-variable z-parameter&quot;&gt;extraGroups&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt; [&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;tss&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt; ]&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; #&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; tss group has access to TPM devices&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;shell-commands&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#shell-commands&quot; aria-label=&quot;Anchor link for: shell-commands&quot;&gt;Shell commands&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Used variables:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;userpin&lt;&#x2F;code&gt; = PIN code that gets used to unlock the GPG key&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;adminpin&lt;&#x2F;code&gt; = master PIN (unsure about the use, but I set it to about twice as long as &lt;code&gt;userpin&lt;&#x2F;code&gt;)&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; tpm2_ptool&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; init&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; tpm2_ptool&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; addtoken&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-pid=1&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-label=&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell z-punctuation&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell z-string&quot;&gt;gpg&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell z-punctuation&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-userpin=&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell z-punctuation&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell z-punctuation&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell z-punctuation&quot;&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other z-normal z-shell z-variable&quot;&gt;userpin&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell z-punctuation&quot;&gt;}&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell z-punctuation&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-sopin=&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell z-punctuation&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell z-punctuation&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell z-punctuation&quot;&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other z-normal z-shell z-variable&quot;&gt;adminpin&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell z-punctuation&quot;&gt;}&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell z-punctuation&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; tpm2_ptool&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; addkey&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-label=&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell z-punctuation&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell z-string&quot;&gt;gpg&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell z-punctuation&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-key-label=&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell z-punctuation&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell z-string&quot;&gt;gpg&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell z-punctuation&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-userpin=&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell z-punctuation&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell z-punctuation&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell z-punctuation&quot;&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other z-normal z-shell z-variable&quot;&gt;userpin&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell z-punctuation&quot;&gt;}&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell z-punctuation&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-algorithm=rsa2048&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;using-p11-tools&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#using-p11-tools&quot; aria-label=&quot;Anchor link for: using-p11-tools&quot;&gt;Using &lt;code&gt;p11&lt;&#x2F;code&gt; tools&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Now, this is where my approach differs from the above sources. AFAICT they have installed the necessary PKCS#11 dependencies on Ubuntu&#x2F;Fedora, which set up the config files for immediate use. However on NixOS that&#x27;s not the case (as of March 2026, could change in the future). This is the tweak I had to make:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;nix&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-comment&quot;&gt;#&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; &#x2F;etc&#x2F;pkcs11&#x2F;modules&#x2F;tpm_pkcs11 has to exist:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-variable z-variable z-parameter&quot;&gt;  environment&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-variable z-parameter&quot;&gt;etc&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;pkcs11&#x2F;modules&#x2F;tpm2_pkcs11&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-variable z-parameter&quot;&gt;text&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt; &amp;#39;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-string&quot;&gt;    module: &lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-section z-embedded z-punctuation&quot;&gt;${&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-variable z-parameter&quot;&gt;pkgs&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-variable z-parameter&quot;&gt;tpm2-pkcs11&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-section z-embedded z-punctuation&quot;&gt;}&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;&#x2F;lib&#x2F;libtpm2_pkcs11.so&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-string&quot;&gt;    critical: yes&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation&quot;&gt;  &amp;#39;&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This file will ensure that &lt;code&gt;p11-kit list-modules&lt;&#x2F;code&gt; actually works. Without the module loaded, the subsequent commands will fail.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;extract-the-token-uri&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#extract-the-token-uri&quot; aria-label=&quot;Anchor link for: extract-the-token-uri&quot;&gt;Extract the token URI&lt;&#x2F;a&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;Run &lt;code&gt;p11tool --list-token-urls | grep token=gpg&lt;&#x2F;code&gt; to get a URI that will look similar to this: &lt;code&gt;pkcs11:manufacturer=STMicro;serial=0123456789012345;token=gpg&lt;&#x2F;code&gt;. Then use that URI in another &lt;code&gt;p11tool&lt;&#x2F;code&gt; command:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;p11tool&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-list-privkeys&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-login&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-only-urls&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-set-pin=&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell z-punctuation&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell z-punctuation&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell z-punctuation&quot;&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other z-normal z-shell z-variable&quot;&gt;userpin&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell z-punctuation&quot;&gt;}&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell z-punctuation&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell z-punctuation&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell z-punctuation&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell z-punctuation&quot;&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other z-normal z-shell z-variable&quot;&gt;tokenURI&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell z-punctuation&quot;&gt;}&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell z-punctuation&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Finally, you can test whether the key works (&lt;code&gt;${privateURI}&lt;&#x2F;code&gt; is the output of the above command):&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;p11tool&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-test-sign&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-login&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-set-pin=&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell z-punctuation&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell z-punctuation&quot;&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other z-normal z-shell z-variable&quot;&gt;userpin&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell z-punctuation&quot;&gt;}&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell z-punctuation&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell z-punctuation&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell z-punctuation&quot;&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other z-normal z-shell z-variable&quot;&gt;privateURI&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell z-punctuation&quot;&gt;}&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell z-punctuation&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment&quot;&gt;#&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; Output should look like this:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;Signing&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; using&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; RSA-SHA256...&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; ok&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;Verifying&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; against&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; private&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; key&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; parameters...&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; ok&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;Verifying&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; against&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; public&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; key&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; in&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; the&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; token...&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; ok&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;creating-a-certificate&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#creating-a-certificate&quot; aria-label=&quot;Anchor link for: creating-a-certificate&quot;&gt;Creating a certificate&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Create a file &lt;code&gt;template.ini&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;${name}&lt;&#x2F;code&gt; = Your name&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;${email}&lt;&#x2F;code&gt; = Your email&lt;&#x2F;li&gt;
&lt;li&gt;For the serial, you can use this date command: &lt;code&gt;$(date --utc +%Y%m%d%H%M%S)&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;ini&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword z-other z-definition z-ini&quot;&gt;cn&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-key-value z-ini z-punctuation&quot;&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-ini z-punctuation&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-quoted z-double z-ini z-string&quot;&gt;${name}&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-ini z-punctuation&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword z-other z-definition z-ini&quot;&gt;serial&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-key-value z-ini z-punctuation&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; 20260330032616&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword z-other z-definition z-ini&quot;&gt;expiration_days&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-key-value z-ini z-punctuation&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; 3650&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword z-other z-definition z-ini&quot;&gt;email&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-key-value z-ini z-punctuation&quot;&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-ini z-punctuation&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-quoted z-double z-ini z-string&quot;&gt;${email}&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-ini z-punctuation&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;signing_key&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;encryption_key&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;cert_signing_key&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Use the template to export a certificate:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-variable&quot;&gt;GNUTLS_PIN&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell z-punctuation&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell z-punctuation&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell z-punctuation&quot;&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other z-normal z-shell z-variable&quot;&gt;userpin&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell z-punctuation&quot;&gt;}&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell z-punctuation&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt; certtool&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-generate-self-signed&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-template&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell z-punctuation&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell z-string&quot;&gt;template.ini&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell z-punctuation&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-character z-escape&quot;&gt; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-string&quot;&gt;    -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-load-privkey&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell z-punctuation&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell z-punctuation&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell z-punctuation&quot;&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other z-normal z-shell z-variable&quot;&gt;privateURI&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell z-punctuation&quot;&gt;}&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell z-punctuation&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-outfile&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell z-punctuation&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell z-punctuation&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell z-punctuation&quot;&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other z-normal z-shell z-variable&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell z-punctuation&quot;&gt;}&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell z-string&quot;&gt;.crt&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell z-punctuation&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Import the certificate to the TPM (or at least I think that&#x27;s what&#x27;s happening):&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;tpm2_ptool&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; addcert&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-label=gpg&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-key-label=gpg&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell z-punctuation&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell z-punctuation&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell z-punctuation&quot;&gt;{&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other z-normal z-shell z-variable&quot;&gt;name&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell z-punctuation&quot;&gt;}&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell z-string&quot;&gt;.crt&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell z-punctuation&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;home-manager-additions&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#home-manager-additions&quot; aria-label=&quot;Anchor link for: home-manager-additions&quot;&gt;&lt;code&gt;home-manager&lt;&#x2F;code&gt; additions&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;This is a barebones GPG configuration in &lt;code&gt;home-manager&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;nix&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-variable z-variable z-parameter&quot;&gt;  services&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-variable z-parameter&quot;&gt;gpg-agent&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-other z-attribute-name&quot;&gt;    enable&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-language&quot;&gt; true&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-other z-attribute-name&quot;&gt;    enableExtraSocket&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-language&quot;&gt; true&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-other z-attribute-name&quot;&gt;    enableScDaemon&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-language&quot;&gt; true&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-other z-attribute-name&quot;&gt;    extraConfig&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt; &amp;#39;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-string&quot;&gt;      scdaemon-program &lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-section z-embedded z-punctuation&quot;&gt;${&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-variable z-parameter&quot;&gt;pkgs&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-variable z-parameter&quot;&gt;gnupg-pkcs11-scd&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-section z-embedded z-punctuation&quot;&gt;}&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;&#x2F;bin&#x2F;gnupg-pkcs11-scd&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation&quot;&gt;    &amp;#39;&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-other z-attribute-name&quot;&gt;    pinentry&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-other z-attribute-name&quot;&gt;package&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-variable z-parameter&quot;&gt; pkgs&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-variable z-parameter&quot;&gt;pinentry-tty&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; #&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; Or your pinentry of choice&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-variable z-variable z-parameter&quot;&gt;  programs&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-variable z-parameter&quot;&gt;gpg&lt;&#x2F;span&gt;&lt;span&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-other z-attribute-name&quot;&gt;    enable&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-language&quot;&gt; true&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-other z-attribute-name&quot;&gt;    settings&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-other z-attribute-name&quot;&gt;        trust-model&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;tofu+pgp&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation&quot;&gt;    }&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation&quot;&gt;  }&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-other z-attribute-name&quot;&gt;  home&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-other z-attribute-name&quot;&gt;file&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;.gnupg&#x2F;gnupg-pkcs11-scd.conf&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-other z-attribute-name&quot;&gt;    text&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt; &amp;#39;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-string&quot;&gt;      providers tpm&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-string&quot;&gt;      provider-tpm-library &#x2F;run&#x2F;current-system&#x2F;sw&#x2F;lib&#x2F;libtpm2_pkcs11.so&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation&quot;&gt;    &amp;#39;&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation&quot;&gt;  }&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Install your new &lt;code&gt;nix&lt;&#x2F;code&gt; config, restart the &lt;code&gt;gpg-agent&lt;&#x2F;code&gt; and then check whether you can see the TPM &quot;card&quot;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; gpg&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-card-status&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;gpg:&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; WARNING:&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; server&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell z-punctuation&quot;&gt; &amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-quoted z-single z-shell z-string&quot;&gt;scdaemon&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell z-punctuation&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; is&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; older&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; than&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; us&lt;&#x2F;span&gt;&lt;span&gt; (0.11.0&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt; &amp;lt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt; 2.4.9&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;gpg:&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; Note:&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; Outdated&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; servers&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; may&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; lack&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; important&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; security&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; fixes.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;gpg:&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; Note:&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; Use&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; the&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; command&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell z-punctuation&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell z-string&quot;&gt;gpgconf --kill all&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell z-punctuation&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; to&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; restart&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; them.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;Application&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; ID&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; ...:&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt; &amp;lt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;sni&lt;&#x2F;span&gt;&lt;span&gt;p&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;Application&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; type&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; .:&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; OpenPGP&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;Version&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; ..........:&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt; 11.50&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;Manufacturer&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; .....:&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; ?&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;Serial&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; number&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; ....:&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; 06E5165C&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;Signature&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; PIN&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; ....:&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; forced&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;Key&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; attributes&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; ...:&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; rsa48&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; rsa48&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; rsa48&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;Please&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; try&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; command&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell z-punctuation&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell z-string&quot;&gt;openpgp&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell z-punctuation&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; if&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; the&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; listing&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; does&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; not&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; look&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; correct&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;(this output is severely abridged). If you are seeing something like &lt;code&gt;gpg: selecting card failed: No such device&lt;&#x2F;code&gt; and&#x2F;or &lt;code&gt;gpg: OpenPGP card not available: No such device&lt;&#x2F;code&gt;, make sure your &lt;code&gt;$GNUPGHOME&#x2F;.gnupg&#x2F;gnupg-pkcs11-scd.conf&lt;&#x2F;code&gt; is correctly formatted and has the right filename.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;import-the-key-in-keyring&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#import-the-key-in-keyring&quot; aria-label=&quot;Anchor link for: import-the-key-in-keyring&quot;&gt;Import the key in keyring&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;You&#x27;ll need to run &lt;code&gt;gpg --expert --full-generate-key&lt;&#x2F;code&gt; to make the key show up in your keyring. The serial is the same as the &lt;strong&gt;Application ID&lt;&#x2F;strong&gt; in &lt;code&gt;gpg --card-status&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; gpg&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-expert&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-full-generate-key&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;    Your&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; selection?&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt; 14&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;    Serial&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; number&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; of&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; the&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; card:&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt; &amp;lt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;sni&lt;&#x2F;span&gt;&lt;span&gt;p&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;    Available&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; keys:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation&quot;&gt;    (&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;1&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt; &amp;lt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;snip&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;    Your&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; selection?&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt; 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;    Possible&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; actions&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; for&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; this&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; RSA&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; key:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;    Current&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; allowed&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; actions:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation&quot;&gt;    (&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;Q&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt; Finished&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;    Your&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; selection?&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; Q&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;    Please&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; specify&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; how&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; long&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; the&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; key&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; should&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; be&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; valid.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;            0&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; key&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; does&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; not&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; expire&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt;        &amp;lt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;n&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;  =&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; key&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; expires&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; in&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; n&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; days&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt;        &amp;lt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;n&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;w&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; key&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; expires&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; in&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; n&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; weeks&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt;        &amp;lt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;n&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;m&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; key&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; expires&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; in&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; n&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; months&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt;        &amp;lt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;n&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;y&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; =&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; key&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; expires&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; in&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; n&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; years&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;    Key&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; is&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; valid&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; for?&lt;&#x2F;span&gt;&lt;span&gt; (0&lt;&#x2F;span&gt;&lt;span&gt;) 0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;    Key&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; does&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; not&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; expire&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; at&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; all&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;    Is&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; this&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; correct?&lt;&#x2F;span&gt;&lt;span&gt; (y&#x2F;N&lt;&#x2F;span&gt;&lt;span&gt;) y&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;    GnuPG&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; needs&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; to&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; construct&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; a&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; user&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; ID&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; to&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; identify&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; your&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; key.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;    Real&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; name:&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; Franta&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; Bartik&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;    Email&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; address:&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; fb@franta.us&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;    Comment:&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; TPM&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;    You&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; selected&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; this&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; USER-ID:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;        &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;Franta Bartik (TPM) &amp;lt;fb@franta.us&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;    Change&lt;&#x2F;span&gt;&lt;span&gt; (N&lt;&#x2F;span&gt;&lt;span&gt;)ame, (&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;C&lt;&#x2F;span&gt;&lt;span&gt;)omment, (&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;E&lt;&#x2F;span&gt;&lt;span&gt;)mail or (&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;O&lt;&#x2F;span&gt;&lt;span&gt;)kay&#x2F;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;Q&lt;&#x2F;span&gt;&lt;span&gt;)uit&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt;?&lt;&#x2F;span&gt;&lt;span&gt; O&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;After this is done, you can use your key for anything you&#x27;d use a normal GPG key for.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Building ONIE</title>
        <published>2026-03-17T00:00:00+00:00</published>
        <updated>2026-03-17T00:00:00+00:00</updated>
        
        <author>
          <name>
            Franta Bartik
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://franta.us/blog/building-onie/"/>
        <id>https://franta.us/blog/building-onie/</id>
        
        <content type="html" xml:base="https://franta.us/blog/building-onie/">&lt;h2 id=&quot;building-onie&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#building-onie&quot; aria-label=&quot;Anchor link for: building-onie&quot;&gt;Building ONIE&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;I was trying to help someone install Cumulus Linux on their &lt;strong&gt;DNI 3048UP&lt;&#x2F;strong&gt; switch. However it seems that their ONIE version was too old to install a more recent version of Cumulus than 3.7.16. I used these resources to build an image:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;opencomputeproject.github.io&#x2F;onie&#x2F;developers&#x2F;building.html#preparing-an-onie-build-environment&quot;&gt;Preparing an ONIE Build Environment&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;CumulusNetworks&#x2F;DUE&#x2F;blob&#x2F;master&#x2F;templates&#x2F;onie&#x2F;README.md&quot;&gt;DUE ONIE README.md&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.lucaswilliams.net&#x2F;index.php&#x2F;2024&#x2F;06&#x2F;12&#x2F;building-onie-with-due&#x2F;&quot;&gt;Building ONIE with DUE&lt;&#x2F;a&gt; (this one was the most useful as it’s more recent and deals with EOL’d Debian issues)&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;I chose to set up an &lt;code&gt;incus&lt;&#x2F;code&gt; Ubuntu VM, as I have it installed on my NixOS laptop already. In the VM, I built a &lt;code&gt;due&lt;&#x2F;code&gt; container for building ONIE images.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;incus-specifics&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#incus-specifics&quot; aria-label=&quot;Anchor link for: incus-specifics&quot;&gt;incus specifics&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;I ran into issues with limited resources (Linux OOM-killer will kill the &lt;code&gt;genautomata&lt;&#x2F;code&gt; process). These settings worked for me:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Increase memory to &lt;strong&gt;8 GiB&lt;&#x2F;strong&gt; (from 1 GiB)&lt;&#x2F;li&gt;
&lt;li&gt;Increase storage to &lt;strong&gt;25 GiB&lt;&#x2F;strong&gt; (from 10 GiB)&lt;&#x2F;li&gt;
&lt;li&gt;Increase CPU cores to &lt;strong&gt;4&lt;&#x2F;strong&gt; (from 1)&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;I chose &lt;code&gt;ubuntu&#x2F;noble&lt;&#x2F;code&gt; arbitrarily, since it was in my shell history. Anything that can use &lt;code&gt;.deb&lt;&#x2F;code&gt; or &lt;code&gt;.rpm&lt;&#x2F;code&gt; packages should work fine.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment&quot;&gt;#&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; I named the VM onie-build&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;incus&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; launch&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; images:ubuntu&#x2F;noble&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-vm&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; onie-build&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;incus&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; config&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; set&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; onie-build&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; limits.memory=8GiB&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;incus&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; config&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; device&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; override&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; onie-build&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; root&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; size=25GiB&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;incus&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; config&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; set&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; onie-build&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; limits.cpu&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt; 4&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;incus&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; exec&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; onie-build&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; bash&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;setting-up-an-admin-user&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#setting-up-an-admin-user&quot; aria-label=&quot;Anchor link for: setting-up-an-admin-user&quot;&gt;Setting up an admin user&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;code&gt;due&lt;&#x2F;code&gt; freaks out if you run it as root, it expects a normal user with &lt;code&gt;docker&lt;&#x2F;code&gt; privileges.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;useradd&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;m&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;G&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; docker&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;s&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; &#x2F;bin&#x2F;bash&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; admin&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;setting-up-due&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#setting-up-due&quot; aria-label=&quot;Anchor link for: setting-up-due&quot;&gt;Setting up &lt;code&gt;due&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;I first installed due from the Ubuntu repo to resolve dependencies (docker, etc...), then I downloaded the &lt;code&gt;.deb&lt;&#x2F;code&gt; from the &lt;strong&gt;CumulusNetworks&#x2F;DUE&lt;&#x2F;strong&gt; repo because the &lt;code&gt;ubuntu&#x2F;noble&lt;&#x2F;code&gt; version is too old and can&#x27;t deal with filesystem patches.&lt;&#x2F;p&gt;
&lt;p&gt;As &lt;code&gt;root&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;apt&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; update&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt; &amp;amp;&amp;amp;&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt; apt&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; install&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; due&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;wget&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; https:&#x2F;&#x2F;github.com&#x2F;CumulusNetworks&#x2F;DUE&#x2F;releases&#x2F;download&#x2F;v4.1.0&#x2F;due_4.1.0-1_all.deb&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;dpkg&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;i&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; .&#x2F;due_4.1.0-1_all.deb&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment&quot;&gt;#&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; The .deb didn&amp;#39;t come with image-patches, so I took them from the repo&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;git&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; clone&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; https:&#x2F;&#x2F;github.com&#x2F;CumulusNetworks&#x2F;DUE.git&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt; &amp;amp;&amp;amp;&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt; cp&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;r&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; DUE&#x2F;image-patches&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; &#x2F;usr&#x2F;share&#x2F;due&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;working-with-due&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#working-with-due&quot; aria-label=&quot;Anchor link for: working-with-due&quot;&gt;Working with &lt;code&gt;due&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Creating a Debian 9 build container.&lt;&#x2F;p&gt;
&lt;p&gt;As the &lt;code&gt;admin&lt;&#x2F;code&gt; user:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;due&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-create&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-platform&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; linux&#x2F;amd64&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-name&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; onie-build-debian-9&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-prompt&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; ONIE-9&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-tag&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; onie-9&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-use-template&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; onie&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-from&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; debian:9&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-description&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell z-punctuation&quot;&gt; &amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-quoted z-single z-shell z-string&quot;&gt;ONIE Build Debian 9&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell z-punctuation&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-image-patch&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; debian&#x2F;9&#x2F;filesystem&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;due&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-run&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;i&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; due-onie-build-debian-9:onie-9&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-dockerarg&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-privileged&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;optional-setting-up-a-local-cache&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#optional-setting-up-a-local-cache&quot; aria-label=&quot;Anchor link for: optional-setting-up-a-local-cache&quot;&gt;(optional) Setting up a local cache&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;As &lt;code&gt;root&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;mkdir&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;p&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; &#x2F;var&#x2F;cache&#x2F;onie&#x2F;download&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support z-function z-builtin z-shell z-support z-function&quot;&gt;cd&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; &#x2F;var&#x2F;cache&#x2F;onie&#x2F;download&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt; &amp;amp;&amp;amp;&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt; wget&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-recursive&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-cut-dirs=2&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-no-host-directories&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-no-parent&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-reject=&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell z-punctuation&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell z-string&quot;&gt;index.html&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell z-punctuation&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell z-punctuation&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell z-string&quot;&gt;http:&#x2F;&#x2F;mirror.opencompute.org&#x2F;onie&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell z-punctuation&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Then open &lt;code&gt;due --run&lt;&#x2F;code&gt; with the &lt;code&gt;--mount-dir &#x2F;var&#x2F;cache&#x2F;onie&#x2F;download&#x2F;:&#x2F;var&#x2F;cache&#x2F;onie&#x2F;download&#x2F;&lt;&#x2F;code&gt; option.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;make&lt;&#x2F;code&gt; commands should be executed with &lt;code&gt;ONIE_USE_SYSTEM_DOWNLOAD_CACHE=TRUE&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;building-onie-1&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#building-onie-1&quot; aria-label=&quot;Anchor link for: building-onie-1&quot;&gt;Building ONIE&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Switch I was targeting needed the &lt;strong&gt;2020.05br&lt;&#x2F;strong&gt; branch (you can figure this out from &lt;code&gt;build-config&#x2F;scripts&#x2F;onie-build-targets.json&lt;&#x2F;code&gt; in the ONIE git repo).&lt;&#x2F;p&gt;
&lt;p&gt;Execute these commands either as &lt;code&gt;admin&lt;&#x2F;code&gt; or in the &lt;code&gt;due&lt;&#x2F;code&gt; container:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;git&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; clone&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; https:&#x2F;&#x2F;github.com&#x2F;opencomputeproject&#x2F;onie.git&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support z-function z-builtin z-shell z-support z-function&quot;&gt;cd&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; onie&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;git&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; checkout&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; 2020.05br&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment&quot;&gt;#&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; The builder expects these gitconfig values&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;git&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; config&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-global&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; user.email&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell z-punctuation&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell z-string&quot;&gt;&amp;lt;email&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell z-punctuation&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;git&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; config&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-global&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; user.name&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell z-punctuation&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell z-string&quot;&gt;&amp;lt;name&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell z-punctuation&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;You&#x27;ll know if you need to change the branch if you run into this error when building the image:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;make:&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-language z-special z-variable z-language&quot;&gt; *&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-language z-special z-variable z-language&quot;&gt;*&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-language z-special z-variable z-language&quot;&gt;*&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; No&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; rule&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; to&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; make&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; target&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell z-punctuation&quot;&gt; &amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-quoted z-single z-shell z-string&quot;&gt;conf&#x2F;crosstool&#x2F;gcc-4.9.2&#x2F;uClibc-ng-1.0.38&#x2F;crosstool.x86_64.config&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell z-punctuation&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;,&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; needed&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; by&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell z-punctuation&quot;&gt; &amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-quoted z-single z-shell z-string&quot;&gt;&#x2F;home&#x2F;build&#x2F;src&#x2F;onie&#x2F;build&#x2F;x-tools&#x2F;x86_64-g4.9.2-lnx4.9.95-uClibc-ng-1.0.38&#x2F;build&#x2F;.config&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell z-punctuation&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; Stop.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Finally, build ONIE:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-support z-function z-builtin z-shell z-support z-function&quot;&gt;cd&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; build-config&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment&quot;&gt;#&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; This will use 4 cores to build the image&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;make&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;j4&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; MACHINEROOT=..&#x2F;machine&#x2F;dni&#x2F;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; MACHINE=dni_3048up&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; all&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The resulting files will be in &lt;code&gt;build&#x2F;images&#x2F;&lt;&#x2F;code&gt;. How to install them on the switch is out of the scope of this post, but most switches have instructions in the &lt;strong&gt;INSTALL&lt;&#x2F;strong&gt; file in their directory in the ONIE repo.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Dumping BGP MRT in Cumulus Linux</title>
        <published>2026-03-13T00:00:00+00:00</published>
        <updated>2026-03-13T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://franta.us/blog/cumulus-frr-bgp-dump/"/>
        <id>https://franta.us/blog/cumulus-frr-bgp-dump/</id>
        
        <content type="html" xml:base="https://franta.us/blog/cumulus-frr-bgp-dump/">&lt;h2 id=&quot;motivation&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#motivation&quot; aria-label=&quot;Anchor link for: motivation&quot;&gt;Motivation&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;I wanted to import some real routes from a &lt;strong&gt;PE&lt;&#x2F;strong&gt; router (for an Nvidia AIR simulation) and this seemed like the easiest way about it. I heard about &lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;Exa-Networks&#x2F;exabgp&#x2F;wiki&#x2F;MRT-Format#what-is-mrt&quot;&gt;MRT&lt;&#x2F;a&gt; before, so I searched Cumulus documentation to see if there was an &lt;code&gt;NVUE&lt;&#x2F;code&gt; command for this, but it seems like there is not (as of version &lt;strong&gt;5.16&lt;&#x2F;strong&gt;). Cumulus allows you to just use the &lt;code&gt;vtysh&lt;&#x2F;code&gt; shell so I did that.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;procedure&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#procedure&quot; aria-label=&quot;Anchor link for: procedure&quot;&gt;Procedure&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;This outlines steps to use a Cumulus router for gathering a BGP table and then using the BGP table in further Cumulus configuration.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;extracting-an-mrt-file-from-frr&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#extracting-an-mrt-file-from-frr&quot; aria-label=&quot;Anchor link for: extracting-an-mrt-file-from-frr&quot;&gt;Extracting an MRT file from FRR&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;I initially used the &lt;code&gt;vtysh&lt;&#x2F;code&gt; method because I couldn&#x27;t find how to do this using &lt;code&gt;NVUE&lt;&#x2F;code&gt; CLI. Turns out, there is a way to do it using &lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.nvidia.com&#x2F;networking-ethernet-software&#x2F;cumulus-linux-516&#x2F;System-Configuration&#x2F;NVIDIA-User-Experience-NVUE&#x2F;NVUE-Snippets&quot;&gt;&lt;em&gt;&quot;snippets&quot;&lt;&#x2F;em&gt;&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;correct-method&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#correct-method&quot; aria-label=&quot;Anchor link for: correct-method&quot;&gt;Correct method&lt;&#x2F;a&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;An example snippet that dumps the MRT looks like this:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-block z-sequence z-item z-yaml z-punctuation&quot;&gt;-&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag z-entity z-name z-tag z-yaml&quot;&gt; s&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag z-entity z-name z-tag z-yaml&quot;&gt;et&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-key-value z-mapping z-yaml z-punctuation&quot;&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag z-entity z-name z-tag z-yaml&quot;&gt;    s&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag z-entity z-name z-tag z-yaml&quot;&gt;ystem&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-key-value z-mapping z-yaml z-punctuation&quot;&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag z-entity z-name z-tag z-yaml&quot;&gt;      c&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag z-entity z-name z-tag z-yaml&quot;&gt;onfig&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-key-value z-mapping z-yaml z-punctuation&quot;&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag z-entity z-name z-tag z-yaml&quot;&gt;        s&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag z-entity z-name z-tag z-yaml&quot;&gt;nippet&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-key-value z-mapping z-yaml z-punctuation&quot;&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-tag z-entity z-name z-tag z-yaml&quot;&gt;          f&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-tag z-entity z-name z-tag z-yaml&quot;&gt;rr.conf&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-key-value z-mapping z-yaml z-punctuation&quot;&gt;:&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-keyword z-control&quot;&gt; |&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-string z-unquoted z-block z-yaml z-string&quot;&gt;            dump bgp routes-mrt &#x2F;tmp&#x2F;routes-mrt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;You&#x27;ll then use this as a file in the CLI:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;nv&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; config&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; patch&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; snippet.yaml&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;nv&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; config&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; apply&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h4 id=&quot;most-likely-incorrect-method&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#most-likely-incorrect-method&quot; aria-label=&quot;Anchor link for: most-likely-incorrect-method&quot;&gt;(most likely) Incorrect method&lt;&#x2F;a&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;&lt;strong&gt;USE THE METHOD ABOVE&lt;&#x2F;strong&gt;
This does require entering &lt;code&gt;configure&lt;&#x2F;code&gt; mode in &lt;strong&gt;FRR&lt;&#x2F;strong&gt;, but AFAIK it doesn&#x27;t make any changes in routing behavior (nor should it).&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;fbartik@cumulus:mgmt:~$&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; sudo&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; vtysh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;cumulus#&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; configure&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;cumulus(config&lt;&#x2F;span&gt;&lt;span&gt;)# dump bgp routes-mrt &#x2F;tmp&#x2F;routes-mrt &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The &lt;code&gt;dump&lt;&#x2F;code&gt; command requires a path, which needs to be somewhere &lt;strong&gt;FRR&lt;&#x2F;strong&gt; can write into (so either &lt;code&gt;&#x2F;tmp&lt;&#x2F;code&gt; or &lt;code&gt;&#x2F;etc&#x2F;frr&lt;&#x2F;code&gt;). Optionally you can specify an interval (after the path argument, using &lt;code&gt;strftime&lt;&#x2F;code&gt; format) for continuous creation of the BGP table output.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;parsing-the-mrt-file&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#parsing-the-mrt-file&quot; aria-label=&quot;Anchor link for: parsing-the-mrt-file&quot;&gt;Parsing the MRT file&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;The first tool that comes up in search is &lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;RIPE-NCC&#x2F;bgpdump&quot;&gt;RIPENCC&#x2F;bgpdump&lt;&#x2F;a&gt; (however the version in &lt;code&gt;nixpkgs&lt;&#x2F;code&gt; was not built for &lt;code&gt;aarch64-darwin&lt;&#x2F;code&gt; at the time).&lt;&#x2F;p&gt;
&lt;p&gt;I ran into &lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;bgpkit&#x2F;monocle&quot;&gt;bgpkit&#x2F;monocle&lt;&#x2F;a&gt; as well, so I used that.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;example-usage&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#example-usage&quot; aria-label=&quot;Anchor link for: example-usage&quot;&gt;Example usage&lt;&#x2F;a&gt;&lt;&#x2F;h4&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;monocle&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; parse&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; .&#x2F;routes-mrt&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-comment&quot;&gt; #&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; Prints all routes&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;monocle&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; parse&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;j&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt; &amp;lt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;peer_I&lt;&#x2F;span&gt;&lt;span&gt;P&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; .&#x2F;routes-mrt&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-comment&quot;&gt; #&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; Prints routes from a chosen peer&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;monocle&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; parse&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;o&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt; 13335&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; .&#x2F;routes-mrt&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-comment&quot;&gt; #&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; Prints routes from a chosen origin ASN&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;monocle&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; parse&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;C&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell z-punctuation&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell z-string&quot;&gt;13335:*&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell z-punctuation&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; .&#x2F;routes-mrt&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-comment&quot;&gt; #&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment&quot;&gt; Prints routes containing BGP communities starting with 13335&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h4 id=&quot;useful-flags&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#useful-flags&quot; aria-label=&quot;Anchor link for: useful-flags&quot;&gt;Useful flags&lt;&#x2F;a&gt;&lt;&#x2F;h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;--format=json&lt;&#x2F;code&gt; will print the data in JSON, as the default is a pipe (&lt;code&gt;|&lt;&#x2F;code&gt;) separated table.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h4 id=&quot;creating-an-nvue-configuration-from-mrt-file&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#creating-an-nvue-configuration-from-mrt-file&quot; aria-label=&quot;Anchor link for: creating-an-nvue-configuration-from-mrt-file&quot;&gt;Creating an NVUE configuration from MRT file&lt;&#x2F;a&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;This command will print routes from  peer &lt;code&gt;192.0.2.1&lt;&#x2F;code&gt; and then turn them into an &lt;code&gt;nv&lt;&#x2F;code&gt; command that will add the routes as static in the routing table of VRF &lt;code&gt;TEST&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;monocle&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; parse&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;j&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt; 192.0.2.1&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; routes-mrt&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-format&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; json&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt; |&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt; jq&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;-raw-output&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell z-punctuation&quot;&gt; &amp;#39;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-quoted z-single z-shell z-string&quot;&gt;&amp;quot;nv set vrf TEST router static \(.prefix) via blackhole&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell z-punctuation&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;code&gt;--raw-output&lt;&#x2F;code&gt; is used because &lt;code&gt;jq&lt;&#x2F;code&gt; prints results with double quotes by default, which is not recognized as a command in Cumulus.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Figuring out APC NMC2 DHCP issues</title>
        <published>2026-03-01T00:00:00+00:00</published>
        <updated>2026-03-01T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://franta.us/blog/apc-nmc2-dhcp-issues/"/>
        <id>https://franta.us/blog/apc-nmc2-dhcp-issues/</id>
        
        <content type="html" xml:base="https://franta.us/blog/apc-nmc2-dhcp-issues/">&lt;p&gt;&lt;strong&gt;TL;DR:&lt;&#x2F;strong&gt; &lt;mark&gt;Make sure the UPS&#x27;s own firewall is not interfering.&lt;&#x2F;mark&gt;&lt;&#x2F;p&gt;
&lt;p&gt;I&#x27;ve recently obtained an &lt;strong&gt;APC SMT1000RM2U&lt;&#x2F;strong&gt; UPS with an NMC2 card. The issue I&#x27;ve ran into was that plugging the NMC2 card in my network quickly resulted in depleted DHCP leases in any subnet I tried. First I suspected the problem was caused by settings from the previous owner (sort of right), so I attempted to factory reset the card&#x2F;UPS using the front panel. Sadly that did not work as it only seems to have reset some things, but not actually any important information from the card&#x2F;UPS.&lt;&#x2F;p&gt;
&lt;p&gt;Another reason I thought that the DHCP issues were happening was because some &lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20260113191146&#x2F;https:&#x2F;&#x2F;www.se.com&#x2F;us&#x2F;en&#x2F;faqs&#x2F;FA156064&#x2F;&quot;&gt;APC guides say you need to set a special cookie&lt;&#x2F;a&gt; when sending &lt;code&gt;DHCP OFFER&lt;&#x2F;code&gt; messages. However when I added that option in my KEA DHCP server, it still showed same behavior. Also my UPS was on firmware 6.x.x which seems to not need the cookie anyways, but wanted to try it just in case.&lt;&#x2F;p&gt;
&lt;p&gt;At this point I realized I needed to connect to the serial console port on the NMC2. This is a 2.5mm &quot;jack&quot; that you may recognize from balanced audio outputs. After obtaining first a cable that had a 3.5mm jack on the end, then getting one with a 2.5mm jack and a USB-A port with a built-in serial converter (and them both not working), I caved and got the APC OEM cable (model 940-0299A). This one worked immediately and I could finally log-in over console and see what was up.&lt;&#x2F;p&gt;
&lt;p&gt;I first tried to set a static IP on the UPS using the &lt;code&gt;tcpip&lt;&#x2F;code&gt; command (which is something I&#x27;ve done from the front panel as well and the following behavior should have tipped me off) and tried to ping the IP. It did not work and after digging through the available commands, I realized why. It seems that the previous owner set a firewall on the NMC2 card in such a way that &lt;code&gt;DHCP OFFER&lt;&#x2F;code&gt; messages couldn&#x27;t be &lt;code&gt;ACK&lt;&#x2F;code&gt;&#x27;d. I remedied that by turning the firewall off using &lt;code&gt;firewall -S disable&lt;&#x2F;code&gt;. After that, I could ping the IP of the UPS and it could finally receive a DHCP lease correctly.
I&#x27;m wondering if this UPS had a public IP at any point in its life and that was the only way for it to be &lt;em&gt;&quot;safe&quot;&lt;&#x2F;em&gt;. My plans for the management for this UPS are to be completely local, which I&#x27;ll probably achieve by just not giving it a gateway (and by extension the IPv6 router in its subnet won&#x27;t advertise a default route to it either).&lt;&#x2F;p&gt;
&lt;h2 id=&quot;additional-notes-about-the-ups&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#additional-notes-about-the-ups&quot; aria-label=&quot;Anchor link for: additional-notes-about-the-ups&quot;&gt;Additional notes about the UPS&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;setting-an-ip-using-the-arp-method&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#setting-an-ip-using-the-arp-method&quot; aria-label=&quot;Anchor link for: setting-an-ip-using-the-arp-method&quot;&gt;Setting an IP using the ARP method&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Apparently you can set an IP using an &lt;code&gt;arp&lt;&#x2F;code&gt; command. First use it to set a static IP on your host, then ping the IP with a byte-specific &lt;code&gt;ping&lt;&#x2F;code&gt; command to set it on the NMC2. This did not work, most likely due to the firewall.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;password-reset&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#password-reset&quot; aria-label=&quot;Anchor link for: password-reset&quot;&gt;Password reset&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;ol&gt;
&lt;li&gt;Open a serial console to the NMC2 card.&lt;&#x2F;li&gt;
&lt;li&gt;Press the reset button on the NMC2. The flashing light on the RJ45 port will stop flashing.&lt;&#x2F;li&gt;
&lt;li&gt;After 5-7 seconds the light on the RJ45 port will start flashing rapidly, press the reset button again when it happens.&lt;&#x2F;li&gt;
&lt;li&gt;You now have 30 seconds to log-in over the serial console connection using &lt;code&gt;apc:apc&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h3 id=&quot;ssh-connection-settings&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#ssh-connection-settings&quot; aria-label=&quot;Anchor link for: ssh-connection-settings&quot;&gt;ssh connection settings&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;The &lt;code&gt;ssh&lt;&#x2F;code&gt; server version on the NMC2 is obviously ancient, so these settings need to be passed when connecting (using an OpenSSH client version 10.2):&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;ssh&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; apc@apc-pdu01&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;o&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; HostKeyAlgorithms=+ssh-rsa&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;o&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; Ciphers=+aes256-cbc&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>PXE Boot Talos Linux</title>
        <published>2024-04-22T00:00:00+00:00</published>
        <updated>2024-04-22T00:00:00+00:00</updated>
        
        <author>
          <name>
            Franta Bartik
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://franta.us/blog/pxe-boot-talos/"/>
        <id>https://franta.us/blog/pxe-boot-talos/</id>
        
        <content type="html" xml:base="https://franta.us/blog/pxe-boot-talos/">&lt;p&gt;This assumes you are using an OPNSense firewall&#x2F;router.
Procedure taken from &lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;forum.opnsense.org&#x2F;index.php?PHPSESSID=56j44inj9mdmeblhnbmcatnvkk&amp;amp;topic=25003.0&quot;&gt;the OPNSense forum&lt;&#x2F;a&gt; and &lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;title&#x2F;syslinux&quot;&gt;syslinux Arch wiki page&lt;&#x2F;a&gt;.
Use this for smaller ISOs (100 MB or less), if you don&#x27;t want to wait for a long time at each boot.
I&#x27;m sure a better and more efficient way to boot Talos over network works with &lt;code&gt;syslinux&lt;&#x2F;code&gt;, but this is my first try that has worked. I still need to streamline it for booting it automatically without a prompt.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;opnsense-setup&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#opnsense-setup&quot; aria-label=&quot;Anchor link for: opnsense-setup&quot;&gt;OPNSense setup&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;ol&gt;
&lt;li&gt;Install &lt;code&gt;os-tftp&lt;&#x2F;code&gt; package. Start TFTP server and bind it to an IP. In the WebGUI, it&#x27;s in &lt;strong&gt;Services &amp;gt; TFTP.&lt;&#x2F;strong&gt;&lt;&#x2F;li&gt;
&lt;li&gt;SSH into OPNSense and create directory &lt;code&gt;&#x2F;usr&#x2F;local&#x2F;tftp&lt;&#x2F;code&gt; (will need sudo privileges).&lt;&#x2F;li&gt;
&lt;li&gt;Create directory &lt;code&gt;pxelinux.cfg&lt;&#x2F;code&gt; and a file &lt;code&gt;pxelinux.cfg&#x2F;default.&lt;&#x2F;code&gt;&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;DEFAULT vesamenu.c32&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;PROMPT 0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;MENU TITLE PXE Boot Menu (Main)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;LABEL linux&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   MENU LABEL Linux&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   KERNEL vesamenu.c32&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   APPEND pxelinux.cfg&#x2F;linux&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Create file &lt;code&gt;pxelinux.cfg&#x2F;linux&lt;&#x2F;code&gt;.
(NOTE: I wanted to boot Talos Linux, so I put the &lt;code&gt;.iso&lt;&#x2F;code&gt; in the &lt;code&gt;&#x2F;usr&#x2F;local&#x2F;tftp&lt;&#x2F;code&gt; directory.)&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;MENU TITLE PXE Boot Menu (Linux)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;LABEL main-menu&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   MENU LABEL Main Menu&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   KERNEL vesamenu.c32&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   APPEND pxelinux.cfg&#x2F;default&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;LABEL talos-iso&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   MENU LABEL Boot Talos 1.7 ISO (PXE)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   KERNEL memdisk&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   INITRD ..&#x2F;talos.iso&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   APPEND iso&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;code&gt;memdisk&lt;&#x2F;code&gt; is what allows booting ISOs.&lt;&#x2F;li&gt;
&lt;li&gt;For OPNSense 24.x (which is based on FreeBSD 13), you&#x27;ll need to manually download the syslinux binary.
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;cd&lt;&#x2F;code&gt; to &lt;code&gt;&#x2F;tmp&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Download the binary:&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;wget&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; https:&#x2F;&#x2F;pkg.freebsd.org&#x2F;FreeBSD:13:amd64&#x2F;latest&#x2F;All&#x2F;syslinux-6.03_1.pkg&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Extract it:&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; tar&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;C&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; &#x2F;tmp&#x2F;syslinux&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;xvf&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; syslinux-6.03_1.pkg&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Move the necessary files to &lt;code&gt;&#x2F;usr&#x2F;local&#x2F;tftp&lt;&#x2F;code&gt; directory:&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; cp&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; &#x2F;tmp&#x2F;syslinux&#x2F;usr&#x2F;local&#x2F;share&#x2F;syslinux&#x2F;bios&#x2F;core&#x2F;lpxelinux.0&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; &#x2F;usr&#x2F;local&#x2F;tftp&#x2F;pxelinux.0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; cp&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; &#x2F;tmp&#x2F;syslinux&#x2F;usr&#x2F;local&#x2F;share&#x2F;syslinux&#x2F;bios&#x2F;com32&#x2F;elflink&#x2F;ldlinux&#x2F;ldlinux.c32&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; &#x2F;usr&#x2F;local&#x2F;tftp&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; cp&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; &#x2F;tmp&#x2F;syslinux&#x2F;usr&#x2F;local&#x2F;share&#x2F;syslinux&#x2F;bios&#x2F;com32&#x2F;menu&#x2F;vesamenu.c32&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; &#x2F;usr&#x2F;local&#x2F;tftp&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; cp&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; &#x2F;tmp&#x2F;syslinux&#x2F;usr&#x2F;local&#x2F;share&#x2F;syslinux&#x2F;bios&#x2F;com32&#x2F;lib&#x2F;libcom32.c32&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; &#x2F;usr&#x2F;local&#x2F;tftp&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; cp&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; &#x2F;tmp&#x2F;syslinux&#x2F;usr&#x2F;local&#x2F;share&#x2F;syslinux&#x2F;bios&#x2F;com32&#x2F;libutil&#x2F;libutil.c32&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; &#x2F;usr&#x2F;local&#x2F;tftp&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; cp&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; &#x2F;tmp&#x2F;syslinux&#x2F;usr&#x2F;local&#x2F;share&#x2F;syslinux&#x2F;bios&#x2F;com32&#x2F;modules&#x2F;pxechn.c32&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; &#x2F;usr&#x2F;local&#x2F;tftp&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; cp&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; &#x2F;tmp&#x2F;syslinux&#x2F;usr&#x2F;local&#x2F;share&#x2F;syslinux&#x2F;bios&#x2F;memdisk&#x2F;memdisk&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; &#x2F;usr&#x2F;local&#x2F;tftp&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;In the same subnet as you bound the TFTP to, set up the DHCP settings. You will need the TFTP server address and the bootfile (&lt;code&gt;pxelinux.0&lt;&#x2F;code&gt; for syslinux).&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Proxmox Console Redirect with systemd-boot bootloader</title>
        <published>2024-03-27T00:00:00+00:00</published>
        <updated>2024-03-27T00:00:00+00:00</updated>
        
        <author>
          <name>
            Franta Bartik
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://franta.us/blog/proxmox-console-redirect/"/>
        <id>https://franta.us/blog/proxmox-console-redirect/</id>
        
        <content type="html" xml:base="https://franta.us/blog/proxmox-console-redirect/">&lt;h2 id=&quot;how-to-setup-proxmox-to-redirect-console&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#how-to-setup-proxmox-to-redirect-console&quot; aria-label=&quot;Anchor link for: how-to-setup-proxmox-to-redirect-console&quot;&gt;How to setup Proxmox to redirect console&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;This is an example that works on my Dell Poweredge R630 and will probably work on many other servers (provided they use the same serial settings, like baud rate 115200).&lt;&#x2F;p&gt;
&lt;h3 id=&quot;prerequisites&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#prerequisites&quot; aria-label=&quot;Anchor link for: prerequisites&quot;&gt;Prerequisites&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;ol&gt;
&lt;li&gt;Your server is using &lt;code&gt;systemd-boot&lt;&#x2F;code&gt; (and not GRUB).
&lt;ul&gt;
&lt;li&gt;This is easy to check in the OS, like this:&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;!--listend--&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; efibootmgr&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; -&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;v&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;BootCurrent:&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; 000A&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;BootOrder:&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; 000A,0008,0007,0009,0005&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-punctuation&quot;&gt;[&lt;&#x2F;span&gt;&lt;span&gt;SNIP&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;Boot0007*&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; EFI&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; DVD&#x2F;CDROM&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;       PciRoot&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;0x0&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;&#x2F;Pci&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;0x1f,0x2&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;&#x2F;Sata&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;5,0,0&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;Boot0008*&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; Linux&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; Boot&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; Manager&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;    HD&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;2,GPT,&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;SNIP&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;&#x2F;File&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;\EFI\systemd\systemd-bootx64.efi&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;Boot0009*&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; Integrated&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; NIC&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; Port&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; Partition&lt;&#x2F;span&gt;&lt;span class=&quot;z-constant z-numeric&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;   VenHw&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span&gt;SNIP&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-keyword&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;Boot000A*&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; Linux&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; Boot&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; Manager&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;    HD&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;2,GPT,&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;SNIP&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt;)&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt;&#x2F;File&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;\EFI\systemd\systemd-bootx64.efi&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;You can see that the system is using the &lt;code&gt;\EFI\systemd\systemd-bootx64.efi&lt;&#x2F;code&gt; file to boot the system. My system is using UEFI but it should not matter for this setup, Legacy BIOS should work as well.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;procedure&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#procedure&quot; aria-label=&quot;Anchor link for: procedure&quot;&gt;Procedure&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;ol&gt;
&lt;li&gt;Find the file to edit for &lt;code&gt;systemd-boot&lt;&#x2F;code&gt; options. On Proxmox, it&#x27;s in &lt;code&gt;&#x2F;etc&#x2F;kernel&#x2F;cmdline&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Insert &lt;code&gt;console=ttyS0,115200n8&lt;&#x2F;code&gt; into the file, keeping it a one-line if you already have options in there. My example:&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;!--listend--&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;root=ZFS=rpool&#x2F;ROOT&#x2F;pve-1 boot=zfs console=ttyS0,115200n8&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ol&gt;
&lt;li&gt;Update the bootloader settings. You will need root privilege for this.&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; proxmox-boot-tool&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; refresh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Reboot the system.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h3 id=&quot;result&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#result&quot; aria-label=&quot;Anchor link for: result&quot;&gt;Result&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;You can see if this has worked by opening the serial console on the server. On Dell servers you can &lt;code&gt;ssh&lt;&#x2F;code&gt; into the iDRAC and run this command:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo z-code&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-entity z-name z-function z-entity z-name&quot;&gt;&#x2F;admin1-&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; console&lt;&#x2F;span&gt;&lt;span class=&quot;z-string&quot;&gt; com2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;After the reboot and the kernel selection screen, you should see your OS boot and get you to the login prompt.&lt;&#x2F;p&gt;
</content>
        
    </entry>
</feed>
