<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/default.xsl"?>
<fr:tree xmlns:fr="http://www.forester-notes.org" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:xml="http://www.w3.org/XML/1998/namespace" root="true" base-url="/">
  <fr:frontmatter>
    <fr:authors>
      <fr:author>
        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
      </fr:author>
    </fr:authors>
    <fr:uri>https://xw.is/index/</fr:uri>
    <fr:display-uri>index</fr:display-uri>
    <fr:route>/index/</fr:route>
    <fr:title text="xw.is">xw.is</fr:title>
  </fr:frontmatter>
  <fr:mainmatter>
    <html:p>These are my technical notes.</html:p>
    <fr:tree show-metadata="false">
      <fr:frontmatter>
        <fr:authors>
          <fr:author>
            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
          </fr:author>
        </fr:authors>
        <fr:uri>https://xw.is/toolchain-index/</fr:uri>
        <fr:display-uri>toolchain-index</fr:display-uri>
        <fr:route>/toolchain-index/</fr:route>
        <fr:title text="Toolchains">Toolchains</fr:title>
      </fr:frontmatter>
      <fr:mainmatter>
        <html:p>Tips and tricks for building <fr:link href="https://en.wikipedia.org/wiki/Cross_compiler" type="external">cross</fr:link>-toolchains.</html:p>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
              </fr:author>
            </fr:authors>
            <fr:date>
              <fr:year>2019</fr:year>
              <fr:month>11</fr:month>
              <fr:day>28</fr:day>
            </fr:date>
            <fr:date>
              <fr:year>2025</fr:year>
              <fr:month>8</fr:month>
              <fr:day>13</fr:day>
            </fr:date>
            <fr:uri>https://xw.is/debian-sysroot/</fr:uri>
            <fr:display-uri>debian-sysroot</fr:display-uri>
            <fr:route>/debian-sysroot/</fr:route>
            <fr:title text="Create Debian sysroots">Create Debian sysroots</fr:title>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>We'll create Debian sysroots suitable for a GCC cross compiler.</html:p>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>11</fr:month>
                  <fr:day>28</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>13</fr:day>
                </fr:date>
                <fr:title text="Debootstrap machine">Debootstrap machine</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>Everything below runs on the <html:em>debootstrap machine</html:em> as root:</html:p>
                <html:pre>sudo -i</html:pre>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>28</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>13</fr:day>
                    </fr:date>
                    <fr:title text="Prerequisites">Prerequisites</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Debian or Ubuntu or any system that can run <fr:link href="/mmdebstrap.1" title="mmdebstrap(1)" uri="https://xw.is/mmdebstrap.1" display-uri="mmdebstrap.1" type="local">mmdebstrap(1)</fr:link> (modern alternative to <fr:link href="/debootstrap.8" title="debootstrap(8)" uri="https://xw.is/debootstrap.8" display-uri="debootstrap.8" type="local">debootstrap(8)</fr:link>), with a configured QEMU user emulator.</html:p>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>28</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>13</fr:day>
                    </fr:date>
                    <fr:title text="Install debootstrap and associated tools">Install debootstrap and associated tools</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:pre>apt install -y binfmt-support qemu-user-static mmdebstrap</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>28</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>13</fr:day>
                    </fr:date>
                    <fr:title text="Run debootstrap">Run debootstrap</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>We're going to create sysroots for <html:em>riscv64</html:em> and <html:em>s390x</html:em> (see the list of <fr:link href="https://www.debian.org/ports/" type="external">supported Debian ports</fr:link>.). Add more packages to <html:code>--include</html:code>, if needed.</html:p>
                    <html:pre>archs="riscv64 s390x"
for arch in ${archs}; do
    mmdebstrap --variant=buildd --include="zlib1g-dev libgmp-dev libmpfr-dev" --architectures=${arch} stable /tmp/sysroot-${arch}.tar.xz
done
</html:pre>
                    <html:p>Note that Debian images are <fr:link href="https://wiki.debian.org/Multiarch" type="external">multiarch</fr:link>, which means that libraries and header files <fr:link href="https://wiki.debian.org/Multiarch/LibraryPathOverview" type="external">are in a different location</fr:link> than the usual one. <fr:link href="/gcc/" title="GNU Compiler Collection" uri="https://xw.is/gcc/" display-uri="gcc" type="local">GCC</fr:link> must be made aware of this via <html:code>--enable-multiarch</html:code> when running the top-level <fr:link href="https://gcc.gnu.org/install/configure.html" type="external"><html:em>configure</html:em></fr:link> script. <html:mark>Failure to set <html:code>--enable-multiarch</html:code> will result in a failed build.</html:mark> Additionally, <fr:link href="/gcc/" title="GNU Compiler Collection" uri="https://xw.is/gcc/" display-uri="gcc" type="local">GCC</fr:link> for the <html:em>host</html:em> should be configured just as the the <fr:link href="/gcc/" title="GNU Compiler Collection" uri="https://xw.is/gcc/" display-uri="gcc" type="local">GCC</fr:link> on the <html:em>target</html:em> (in the sysroot). For example, some platforms do not make use of multilib (even though <fr:link href="/gcc/" title="GNU Compiler Collection" uri="https://xw.is/gcc/" display-uri="gcc" type="local">GCC</fr:link> might support it), so <html:mark>in those cases multilib should be <html:em>explicitly</html:em> disabled on the <html:em>build</html:em> machine with <html:code>--disable-multilib</html:code></html:mark>, because otherwise it might default to being enabled leading to build failure.</html:p>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>11</fr:month>
                  <fr:day>28</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>13</fr:day>
                </fr:date>
                <fr:title text="Host machine">Host machine</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>The following runs on the <html:em>host machine</html:em> (the machine where you'll compile and run your cross compiler). It can be the same machine as the <html:em>debootstrap machine</html:em>.</html:p>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>28</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>13</fr:day>
                    </fr:date>
                    <fr:title text="Create directories">Create directories</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:pre>targets="riscv64-linux-gnu s390x-linux-gnu"
for target in ${targets}; do
    mkdir -p $HOME/cross/${target}/sys-root
done</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <html:p>Note that when we created the sysroots we used the Debian architecture names <html:em>(riscv64, s390x)</html:em>, but here we use the <fr:link href="/gcc/" title="GNU Compiler Collection" uri="https://xw.is/gcc/" display-uri="gcc" type="local">GCC</fr:link> <fr:link href="https://gcc.gnu.org/install/configure.html#Host_002c-Build-and-Target-specification" type="external">target triple</fr:link> <html:em>(riscv64-linux-gnu, s390x-linux-gnu)</html:em>.</html:p>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>28</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>13</fr:day>
                    </fr:date>
                    <fr:title text="Copy sysroots">Copy sysroots</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Copy the sysroots from the <html:em>debootstrap machine</html:em> (here <html:code>debian@194.182.186.188</html:code>) to the <html:em>host machine</html:em>.</html:p>
                    <html:pre>targets="riscv64-linux-gnu s390x-linux-gnu"
for target in ${targets}; do
    arch=$(echo ${target} | cut -d '-' -f 1)
    ssh debian@194.182.186.230 "cat /tmp/sysroot-${arch}.tar.xz" | tar -C ${HOME}/cross/${target}/sys-root -xJf -
done</html:pre>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>11</fr:month>
                  <fr:day>28</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>13</fr:day>
                </fr:date>
                <fr:title text="Debootstrap machine (again)">Debootstrap machine (again)</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>28</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>13</fr:day>
                    </fr:date>
                    <fr:title text="Cleanup">Cleanup</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Still as <html:em>root</html:em>:</html:p>
                    <html:pre>rm -rf /tmp/sysroot-*.tar.xz</html:pre>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
          </fr:mainmatter>
        </fr:tree>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
              </fr:author>
            </fr:authors>
            <fr:date>
              <fr:year>2025</fr:year>
              <fr:month>8</fr:month>
              <fr:day>12</fr:day>
            </fr:date>
            <fr:uri>https://xw.is/gdb-build/</fr:uri>
            <fr:display-uri>gdb-build</fr:display-uri>
            <fr:route>/gdb-build/</fr:route>
            <fr:title text="Build GDB and gdbserver(1)">Build <fr:link href="/gdb/" title="GNU Project Debugger" uri="https://xw.is/gdb/" display-uri="gdb" type="local">GDB</fr:link> and <fr:link href="/gdbserver.1" title="gdbserver(1)" uri="https://xw.is/gdbserver.1" display-uri="gdbserver.1" type="local">gdbserver(1)</fr:link></fr:title>
          </fr:frontmatter>
          <fr:mainmatter>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>12</fr:day>
                </fr:date>
                <fr:title text="Create source and build directories">Create source and build directories</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>We use a suffix for the build directories so we can build for multiple targets at the same time. The name is arbitrary, we just choose the target name for convenience.</html:p>
                <html:pre>
mkdir -p ${HOME}/src
mkdir -p ${HOME}/obj/gdb-16.3
mkdir -p ${HOME}/obj/gdb-16.3-riscv64-unknown-elf
mkdir -p ${HOME}/obj/gdbserver-16.3-riscv64-linux-gnu</html:pre>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>12</fr:day>
                </fr:date>
                <fr:title text="Download the source code">Download the source code</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:pre>curl https://sourceware.org/pub/gdb/releases/gdb-16.3.tar.xz | tar -C $HOME/src -xJf -</html:pre>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>12</fr:day>
                </fr:date>
                <fr:title text="Build and install">Build and install</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>12</fr:day>
                    </fr:date>
                    <fr:title text="GDB">
                      <fr:link href="/gdb/" title="GNU Project Debugger" uri="https://xw.is/gdb/" display-uri="gdb" type="local">GDB</fr:link>
                    </fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Make sure you have <fr:link href="https://gmplib.org/" type="external">GMP</fr:link> 4.2+ and <fr:link href="https://www.mpfr.org/" type="external">GNU MPFR</fr:link> 3.1.0+ installed. Set the path in <html:code>--with-gmp</html:code> and/or <html:code>--with-mpfr</html:code>, if needed.</html:p>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>8</fr:month>
                          <fr:day>12</fr:day>
                        </fr:date>
                        <fr:title text="Native debugging">Native debugging</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>As we are building, running, and debugging binaries for the same architecture, we do not need to set <html:em>host</html:em> or <html:em>target</html:em>. Also note that we install it in a different prefix than the cross-debugging case below (<html:code>${HOME}</html:code> vs. <html:code>${HOME}/xgcc</html:code>).</html:p>
                        <html:pre>
cd ${HOME}/obj/gdb-16.3
../../src/gdb-16.3/configure --prefix ${HOME} 
make -j12 &amp;&amp; make install
</html:pre>
                      </fr:mainmatter>
                    </fr:tree>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>8</fr:month>
                          <fr:day>12</fr:day>
                        </fr:date>
                        <fr:title text="Cross-debugging">Cross-debugging</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>Set <html:code>--target</html:code> to your desired platform, here we use <html:code>riscv64-unknown-elf</html:code> representing bare-metal 64-bit <fr:link href="https://riscv.org/" type="external">RISC-V</fr:link>. It is fine for multiple cross toolchains to share the same <html:code>--prefix</html:code> and <html:code>--bindir</html:code>.</html:p>
                        <html:pre>
cd ${HOME}/obj/gdb-16.3-riscv64-unknown-elf
../../src/gdb-16.3/configure --prefix ${HOME}/cross --with-system-zlib --target riscv64-unknown-elf --with-gmp=/opt/homebrew
make -j12 &amp;&amp; make install</html:pre>
                      </fr:mainmatter>
                    </fr:tree>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>12</fr:day>
                    </fr:date>
                    <fr:title text="gdbserver(1)">
                      <fr:link href="/gdbserver.1" title="gdbserver(1)" uri="https://xw.is/gdbserver.1" display-uri="gdbserver.1" type="local">gdbserver(1)</fr:link>
                    </fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p><fr:link href="/gdbserver.1" title="gdbserver(1)" uri="https://xw.is/gdbserver.1" display-uri="gdbserver.1" type="local">gdbserver(1)</fr:link> is a program that runs on the same machine as the binaries you are debugging (the <html:em>target</html:em> machine above). You have two options, either compile <fr:link href="/gdbserver.1" title="gdbserver(1)" uri="https://xw.is/gdbserver.1" display-uri="gdbserver.1" type="local">gdbserver(1)</fr:link> <html:em>natively</html:em> on the target machine, or cross-compile it on the <html:em>build</html:em> machine and move it to the <html:em>host</html:em> machine (which for <fr:link href="/gdbserver.1" title="gdbserver(1)" uri="https://xw.is/gdbserver.1" display-uri="gdbserver.1" type="local">gdbserver(1)</fr:link> means the <html:em>target</html:em> machine). Of course if you can compile it natively you might as well compile <fr:link href="/gdb/" title="GNU Project Debugger" uri="https://xw.is/gdb/" display-uri="gdb" type="local">GDB</fr:link> itself on the target machine and use that directly. Consult the <fr:link href="https://gcc.gnu.org/onlinedocs/gccint/Configure-Terms.html" type="external">GCC documentation</fr:link> if you are confused by this paragraph.</html:p>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>8</fr:month>
                          <fr:day>12</fr:day>
                        </fr:date>
                        <fr:title text="Native compilation">Native compilation</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p><fr:link href="/gdbserver.1" title="gdbserver(1)" uri="https://xw.is/gdbserver.1" display-uri="gdbserver.1" type="local">gdbserver(1)</fr:link> is part of <fr:link href="/gdb/" title="GNU Project Debugger" uri="https://xw.is/gdb/" display-uri="gdb" type="local">GDB</fr:link>, so just install <fr:link href="/gdb/" title="GNU Project Debugger" uri="https://xw.is/gdb/" display-uri="gdb" type="local">GDB</fr:link> on the <html:em>host</html:em> as described above.</html:p>
                      </fr:mainmatter>
                    </fr:tree>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>8</fr:month>
                          <fr:day>12</fr:day>
                        </fr:date>
                        <fr:title text="Cross compilation">Cross compilation</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>You need a <fr:link href="/gcc-sysroot-build/" title="Toolchains › Build GCC targeting user space" uri="https://xw.is/gcc-sysroot-build/" display-uri="gcc-sysroot-build" type="local">GCC cross compiler</fr:link> targetting the <html:em>host</html:em> system (the one running <html:em>gdbserver</html:em>, here <html:code>riscv64-linux-gnu</html:code>).</html:p>
                        <html:pre>
cd ${HOME}/obj/gdbserver-16.3-riscv64-linux-gnu
../../src/gdbserver-16.3/configure --prefix=/ --disable-gdb --disable-nls --host riscv64-linux-gnu LDFLAGS="-static"
make -j12 all-gdbserver
make DESTDIR=/tmp install-gdbserver
</html:pre>
                        <html:p>We're building a statically-linked <html:em>gdbserver</html:em> so that it works on every system. For example, we might run <html:em>gdbserver</html:em> on a <fr:link href="https://www.musl-libc.org/" type="external">musl</fr:link>-based system, even though our Debian sysroot is based on <fr:link href="https://www.gnu.org/software/libc/" type="external">GNU libc</fr:link>. The binary is available in <html:code>/tmp/bin/gdbserver</html:code> and can be moved to the <html:em>host</html:em> system.</html:p>
                      </fr:mainmatter>
                    </fr:tree>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
          </fr:mainmatter>
        </fr:tree>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
              </fr:author>
            </fr:authors>
            <fr:date>
              <fr:year>2019</fr:year>
              <fr:month>11</fr:month>
              <fr:day>10</fr:day>
            </fr:date>
            <fr:date>
              <fr:year>2025</fr:year>
              <fr:month>8</fr:month>
              <fr:day>11</fr:day>
            </fr:date>
            <fr:uri>https://xw.is/gcc-sysroot-build/</fr:uri>
            <fr:display-uri>gcc-sysroot-build</fr:display-uri>
            <fr:route>/gcc-sysroot-build/</fr:route>
            <fr:title text="Build GCC targeting user space">Build <fr:link href="/gcc/" title="GNU Compiler Collection" uri="https://xw.is/gcc/" display-uri="gcc" type="local">GCC</fr:link> targeting user space</fr:title>
          </fr:frontmatter>
          <fr:mainmatter>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>11</fr:month>
                  <fr:day>10</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>11</fr:day>
                </fr:date>
                <fr:title text="Create source and build directories">Create source and build directories</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>We use a suffix for the build directories so we can build for multiple targets at the same time. The name is arbitrary, we just choose the target name for convenience.</html:p>
                <html:pre>
mkdir -p ${HOME}/src
mkdir -p ${HOME}/obj/binutils-2.45-s390x-linux-gnu
mkdir -p ${HOME}/obj/gcc-15.2.0-s390x-linux-gnu</html:pre>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>11</fr:month>
                  <fr:day>10</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>11</fr:day>
                </fr:date>
                <fr:title text="Download the source code">Download the source code</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:pre>
curl https://sourceware.org/pub/binutils/releases/binutils-2.45.tar.xz | tar -C $HOME/src -xJf -
curl https://sourceware.org/pub/gcc/releases/gcc-15.2.0/gcc-15.2.0.tar.xz | tar -C $HOME/src -xJf -</html:pre>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>11</fr:month>
                  <fr:day>10</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>11</fr:day>
                </fr:date>
                <fr:title text="Download GCC prerequisites">Download <fr:link href="/gcc/" title="GNU Compiler Collection" uri="https://xw.is/gcc/" display-uri="gcc" type="local">GCC</fr:link> prerequisites</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
  
  <html:pre>
cd ${HOME}/src/gcc-15.2.0
./contrib/download_prerequisites
</html:pre>
</fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>11</fr:month>
                  <fr:day>10</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>11</fr:day>
                </fr:date>
                <fr:title text="Prepare the sysroot">Prepare the sysroot</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>You will need header files and libraries for the target system (here <html:code>s390x-linux-gnu</html:code>). You can either obtain those files from an existing system, or <fr:link href="/debian-sysroot/" title="Toolchains › Create Debian sysroots" uri="https://xw.is/debian-sysroot/" display-uri="debian-sysroot" type="local">you can prepare a sysroot</fr:link> on an unrelated system. We will assume the sysroot is installed in <html:code>${HOME}/cross/s390x-linux-gnu/sys-root</html:code>, which is the <fr:link href="https://gcc.gnu.org/install/configure.html#Cross-Compiler-Specific-Options" type="external">default location</fr:link> for <fr:link href="/gcc/" title="GNU Compiler Collection" uri="https://xw.is/gcc/" display-uri="gcc" type="local">GCC</fr:link> sysroots.</html:p>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>11</fr:month>
                  <fr:day>10</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>11</fr:day>
                </fr:date>
                <fr:title text="Build and install">Build and install</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>10</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>11</fr:day>
                    </fr:date>
                    <fr:title text="Binutils">
                      <fr:link href="/binutils/" title="GNU Binutils" uri="https://xw.is/binutils/" display-uri="binutils" type="local">Binutils</fr:link>
                    </fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Build and install <fr:link href="/binutils/" title="GNU Binutils" uri="https://xw.is/binutils/" display-uri="binutils" type="local">GNU Binutils</fr:link>.</html:p>
                    <html:pre>
cd ${HOME}/obj/binutils-2.45-s390x-linux-gnu
../../src/binutils-2.45/configure --prefix ${HOME}/cross --with-system-zlib --target s390x-linux-gnu --enable-multiarch --disable-multilib --with-sysroot
make -j12 &amp;&amp; make install</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>10</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>11</fr:day>
                    </fr:date>
                    <fr:title text="GCC">
                      <fr:link href="/gcc/" title="GNU Compiler Collection" uri="https://xw.is/gcc/" display-uri="gcc" type="local">GCC</fr:link>
                    </fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Build and install <fr:link href="/gcc/" title="GNU Compiler Collection" uri="https://xw.is/gcc/" display-uri="gcc" type="local">GNU GCC</fr:link>. If we use <fr:link href="https://wiki.debian.org/Multiarch" type="external">multiarch</fr:link> sysroot (such as from Debian), we must pass <html:code>--enable-multiarch</html:code> otherwise <fr:link href="/gcc/" title="GNU Compiler Collection" uri="https://xw.is/gcc/" display-uri="gcc" type="local">GCC</fr:link> will not find the target headers and libraries. Additionally, if the sysroot doesn't make use of multilib, we must <html:em>explicitly</html:em> disable via <html:code>--disable-multilib</html:code> as otherwise <fr:link href="/gcc/" title="GNU Compiler Collection" uri="https://xw.is/gcc/" display-uri="gcc" type="local">GCC</fr:link> might default to enabling it. <html:mark>Failure to set <html:code>--enable-multiarch --disable-multilib</html:code> will result in a failed build.</html:mark></html:p>
                    <html:pre>
cd ${HOME}/obj/gcc-15.2.0-s390x-linux-gnu
../../src/gcc-15.2.0/configure --prefix ${HOME}/cross --with-system-zlib --target s390x-linux-gnu --enable-languages=c,c++ --enable-multiarch --disable-multilib --with-sysroot
make -j12 &amp;&amp; make install</html:pre>
                    <html:p>Note that don't pass a specific directory to <html:code>--with-sysroot</html:code> because we placed out sysroot in the default location where <fr:link href="/gcc/" title="GNU Compiler Collection" uri="https://xw.is/gcc/" display-uri="gcc" type="local">GCC</fr:link> expects it.</html:p>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
          </fr:mainmatter>
        </fr:tree>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
              </fr:author>
            </fr:authors>
            <fr:date>
              <fr:year>2019</fr:year>
              <fr:month>11</fr:month>
              <fr:day>10</fr:day>
            </fr:date>
            <fr:date>
              <fr:year>2025</fr:year>
              <fr:month>8</fr:month>
              <fr:day>11</fr:day>
            </fr:date>
            <fr:uri>https://xw.is/gcc-newlib-build/</fr:uri>
            <fr:display-uri>gcc-newlib-build</fr:display-uri>
            <fr:route>/gcc-newlib-build/</fr:route>
            <fr:title text="Build GCC with Newlib support">Build <fr:link href="/gcc/" title="GNU Compiler Collection" uri="https://xw.is/gcc/" display-uri="gcc" type="local">GCC</fr:link> with <fr:link href="/newlib/" title="Newlib" uri="https://xw.is/newlib/" display-uri="newlib" type="local">Newlib</fr:link> support</fr:title>
          </fr:frontmatter>
          <fr:mainmatter>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>11</fr:month>
                  <fr:day>10</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>11</fr:day>
                </fr:date>
                <fr:title text="Create source and build directories">Create source and build directories</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>We use a suffix for the build directories so we can build for multiple targets at the same time. The name is arbitrary, we just choose the target name for convenience.</html:p>
                <html:pre>
mkdir -p ${HOME}/src
mkdir -p ${HOME}/obj/binutils-2.45-riscv64-unknown-elf
mkdir -p ${HOME}/obj/gcc-15.2.0-riscv64-unknown-elf
mkdir -p ${HOME}/obj/gcc-15.2.0-riscv64-unknown-elf-newlib
mkdir -p ${HOME}/obj/newlib-4.5.0.20241231-riscv64-unknown-elf</html:pre>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>11</fr:month>
                  <fr:day>10</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>11</fr:day>
                </fr:date>
                <fr:title text="Download the source code">Download the source code</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:pre>
curl https://sourceware.org/pub/binutils/releases/binutils-2.45.tar.xz | tar -C $HOME/src -xJf -
curl https://sourceware.org/pub/gcc/releases/gcc-15.2.0/gcc-15.2.0.tar.xz | tar -C $HOME/src -xJf -
curl https://sourceware.org/pub/newlib/newlib-4.5.0.20241231.tar.gz | tar -C $HOME/src -xJf -</html:pre>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>11</fr:month>
                  <fr:day>10</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>11</fr:day>
                </fr:date>
                <fr:title text="Download GCC prerequisites">Download <fr:link href="/gcc/" title="GNU Compiler Collection" uri="https://xw.is/gcc/" display-uri="gcc" type="local">GCC</fr:link> prerequisites</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
  
  <html:pre>
cd ${HOME}/src/gcc-15.2.0
./contrib/download_prerequisites
</html:pre>
</fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>11</fr:month>
                  <fr:day>10</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>11</fr:day>
                </fr:date>
                <fr:title text="Build and install">Build and install</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>Set <html:code>--target</html:code> to your desired platform, here we use <html:code>riscv64-unknown-elf</html:code> representing bare-metal 64-bit <fr:link href="https://riscv.org/" type="external">RISC-V</fr:link>. It is fine for multiple cross toolchains to share the same <html:code>--prefix</html:code> and <html:code>--bindir</html:code>.</html:p>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>10</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>11</fr:day>
                    </fr:date>
                    <fr:title text="Binutils">
                      <fr:link href="/binutils/" title="GNU Binutils" uri="https://xw.is/binutils/" display-uri="binutils" type="local">Binutils</fr:link>
                    </fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Build and install <fr:link href="/binutils/" title="GNU Binutils" uri="https://xw.is/binutils/" display-uri="binutils" type="local">GNU Binutils</fr:link>.</html:p>
                    <html:pre>
cd ${HOME}/obj/binutils-2.45-riscv64-unknown-elf
../../src/binutils-2.45/configure --prefix ${HOME}/cross --with-system-zlib --target riscv64-unknown-elf 
make -j12 &amp;&amp; make install</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>10</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>11</fr:day>
                    </fr:date>
                    <fr:title text="Bare-metal GCC">Bare-metal <fr:link href="/gcc/" title="GNU Compiler Collection" uri="https://xw.is/gcc/" display-uri="gcc" type="local">GCC</fr:link></fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Build and install <fr:link href="/gcc/" title="GNU Compiler Collection" uri="https://xw.is/gcc/" display-uri="gcc" type="local">GNU GCC</fr:link>. Note that we're only building the C compiler (<html:code>--enable-languages=c</html:code>). Additionally, <html:code>--without-headers</html:code> is crucial, at this point this is just a <fr:link href="https://www.iso-9899.info/n1570.html#5.1.2" type="external">bare-metal compiler</fr:link> and we do not have the <fr:link href="https://www.iso-9899.info/n1570.html#7." type="external">C standard library</fr:link> available.</html:p>
                    <html:pre>
cd ${HOME}/obj/gcc-15.2.0-riscv64-unknown-elf
../../src/gcc-15.2.0/configure --prefix ${HOME}/cross --with-system-zlib --target riscv64-unknown-elf --disable-libssp --enable-languages=c --without-headers
make -j12 &amp;&amp; make install</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>10</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>11</fr:day>
                    </fr:date>
                    <fr:title text="Newlib">
                      <fr:link href="/newlib/" title="Newlib" uri="https://xw.is/newlib/" display-uri="newlib" type="local">Newlib</fr:link>
                    </fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Using the bare-metal toolchain we just built, build <fr:link href="/newlib/" title="Newlib" uri="https://xw.is/newlib/" display-uri="newlib" type="local">Newlib</fr:link>. This will be our <fr:link href="https://www.iso-9899.info/n1570.html#7." type="external">C standard library</fr:link>. Make sure the binaries from the toolchain built above are in <html:code>PATH</html:code>. You also need <fr:link href="/texinfo/" title="GNU Texinfo" uri="https://xw.is/texinfo/" display-uri="texinfo" type="local">GNU Texinfo</fr:link> installed. Of course, only a subset of targets are supported by <fr:link href="/newlib/" title="Newlib" uri="https://xw.is/newlib/" display-uri="newlib" type="local">Newlib</fr:link>.</html:p>
                    <html:pre>
cd ${HOME}/obj/newlib-4.5.0.20241231-riscv64-unknown-elf
../../src/newlib-4.5.0.20241231/configure --prefix ${HOME}/cross --with-system-zlib --target riscv64-unknown-elf 
make -j12 &amp;&amp; make install</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>10</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>11</fr:day>
                    </fr:date>
                    <fr:title text="Embedded GCC with Newlib support">Embedded <fr:link href="/gcc/" title="GNU Compiler Collection" uri="https://xw.is/gcc/" display-uri="gcc" type="local">GCC</fr:link> with <fr:link href="/newlib/" title="Newlib" uri="https://xw.is/newlib/" display-uri="newlib" type="local">Newlib</fr:link> support</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Build and install <fr:link href="/gcc/" title="GNU Compiler Collection" uri="https://xw.is/gcc/" display-uri="gcc" type="local">GNU GCC</fr:link> <html:em>again</html:em>, this time with <fr:link href="/newlib/" title="Newlib" uri="https://xw.is/newlib/" display-uri="newlib" type="local">Newlib</fr:link> support.</html:p>
                    <html:pre>
cd ${HOME}/obj/gcc-15.2.0-riscv64-unknown-elf-newlib
../../src/gcc-15.2.0/configure --prefix ${HOME}/cross --with-system-zlib --target riscv64-unknown-elf --enable-languages=c --with-newlib
make -j12 &amp;&amp; make install</html:pre>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
          </fr:mainmatter>
        </fr:tree>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
              </fr:author>
            </fr:authors>
            <fr:date>
              <fr:year>2019</fr:year>
              <fr:month>11</fr:month>
              <fr:day>10</fr:day>
            </fr:date>
            <fr:date>
              <fr:year>2025</fr:year>
              <fr:month>8</fr:month>
              <fr:day>11</fr:day>
            </fr:date>
            <fr:uri>https://xw.is/binutils-build/</fr:uri>
            <fr:display-uri>binutils-build</fr:display-uri>
            <fr:route>/binutils-build/</fr:route>
            <fr:title text="Build GNU Binutils">Build <fr:link href="/binutils/" title="GNU Binutils" uri="https://xw.is/binutils/" display-uri="binutils" type="local">GNU Binutils</fr:link></fr:title>
          </fr:frontmatter>
          <fr:mainmatter>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>11</fr:month>
                  <fr:day>10</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>11</fr:day>
                </fr:date>
                <fr:title text="Create source and build directories">Create source and build directories</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>We use a suffix for the build directories so we can build for multiple targets at the same time. The name is arbitrary, we just choose the target name for convenience.</html:p>
                <html:pre>
mkdir -p ${HOME}/src
mkdir -p ${HOME}/obj/binutils-2.45-riscv64-unknown-elf</html:pre>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>11</fr:month>
                  <fr:day>10</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>11</fr:day>
                </fr:date>
                <fr:title text="Download the source code">Download the source code</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:pre>curl https://sourceware.org/pub/binutils/releases/binutils-2.45.tar.xz | tar -C $HOME/src -xJf -</html:pre>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>11</fr:month>
                  <fr:day>10</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>11</fr:day>
                </fr:date>
                <fr:title text="Build and install">Build and install</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>Set <html:code>--target</html:code> to your desired platform, here we use <html:code>riscv64-unknown-elf</html:code> representing bare-metal 64-bit <fr:link href="https://riscv.org/" type="external">RISC-V</fr:link>. It is fine for multiple cross toolchains to share the same <html:code>--prefix</html:code> and <html:code>--bindir</html:code>.</html:p>
                <html:pre>
cd ${HOME}/obj/binutils-2.45-riscv64-unknown-elf
../../src/binutils-2.45/configure --prefix ${HOME}/cross --with-system-zlib --target riscv64-unknown-elf 
make -j12 &amp;&amp; make install</html:pre>
              </fr:mainmatter>
            </fr:tree>
          </fr:mainmatter>
        </fr:tree>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
              </fr:author>
            </fr:authors>
            <fr:date>
              <fr:year>2019</fr:year>
              <fr:month>11</fr:month>
              <fr:day>10</fr:day>
            </fr:date>
            <fr:date>
              <fr:year>2025</fr:year>
              <fr:month>8</fr:month>
              <fr:day>11</fr:day>
            </fr:date>
            <fr:uri>https://xw.is/gcc-build/</fr:uri>
            <fr:display-uri>gcc-build</fr:display-uri>
            <fr:route>/gcc-build/</fr:route>
            <fr:title text="Build bare-metal GCC">Build bare-metal <fr:link href="/gcc/" title="GNU Compiler Collection" uri="https://xw.is/gcc/" display-uri="gcc" type="local">GCC</fr:link></fr:title>
          </fr:frontmatter>
          <fr:mainmatter>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>11</fr:month>
                  <fr:day>10</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>11</fr:day>
                </fr:date>
                <fr:title text="Create source and build directories">Create source and build directories</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>We use a suffix for the build directories so we can build for multiple targets at the same time. The name is arbitrary, we just choose the target name for convenience.</html:p>
                <html:pre>
mkdir -p ${HOME}/src
mkdir -p ${HOME}/obj/binutils-2.45-riscv64-unknown-elf
mkdir -p ${HOME}/obj/gcc-15.2.0-riscv64-unknown-elf</html:pre>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>11</fr:month>
                  <fr:day>10</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>11</fr:day>
                </fr:date>
                <fr:title text="Download the source code">Download the source code</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:pre>
curl https://sourceware.org/pub/binutils/releases/binutils-2.45.tar.xz | tar -C $HOME/src -xJf -
curl https://sourceware.org/pub/gcc/releases/gcc-15.2.0/gcc-15.2.0.tar.xz | tar -C $HOME/src -xJf -</html:pre>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>11</fr:month>
                  <fr:day>10</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>11</fr:day>
                </fr:date>
                <fr:title text="Download GCC prerequisites">Download <fr:link href="/gcc/" title="GNU Compiler Collection" uri="https://xw.is/gcc/" display-uri="gcc" type="local">GCC</fr:link> prerequisites</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
  
  <html:pre>
cd ${HOME}/src/gcc-15.2.0
./contrib/download_prerequisites
</html:pre>
</fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>11</fr:month>
                  <fr:day>10</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>11</fr:day>
                </fr:date>
                <fr:title text="Build and install">Build and install</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>Set <html:code>--target</html:code> to your desired platform, here we use <html:code>riscv64-unknown-elf</html:code> representing bare-metal 64-bit <fr:link href="https://riscv.org/" type="external">RISC-V</fr:link>. It is fine for multiple cross toolchains to share the same <html:code>--prefix</html:code> and <html:code>--bindir</html:code>.</html:p>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>10</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>11</fr:day>
                    </fr:date>
                    <fr:title text="Binutils">
                      <fr:link href="/binutils/" title="GNU Binutils" uri="https://xw.is/binutils/" display-uri="binutils" type="local">Binutils</fr:link>
                    </fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Build and install <fr:link href="/binutils/" title="GNU Binutils" uri="https://xw.is/binutils/" display-uri="binutils" type="local">GNU Binutils</fr:link>.</html:p>
                    <html:pre>
cd ${HOME}/obj/binutils-2.45-riscv64-unknown-elf
../../src/binutils-2.45/configure --prefix ${HOME}/cross --with-system-zlib --target riscv64-unknown-elf 
make -j12 &amp;&amp; make install</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>10</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>11</fr:day>
                    </fr:date>
                    <fr:title text="GCC">
                      <fr:link href="/gcc/" title="GNU Compiler Collection" uri="https://xw.is/gcc/" display-uri="gcc" type="local">GCC</fr:link>
                    </fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Build and install <fr:link href="/gcc/" title="GNU Compiler Collection" uri="https://xw.is/gcc/" display-uri="gcc" type="local">GNU GCC</fr:link>. Note that we're only building the C compiler (<html:code>--enable-languages=c</html:code>). Additionally, <html:code>--without-headers</html:code> is crucial—since this is a <fr:link href="https://www.iso-9899.info/n1570.html#5.1.2" type="external">bare-metal compiler</fr:link> we do not have the <fr:link href="https://www.iso-9899.info/n1570.html#7." type="external">C standard library</fr:link> available.</html:p>
                    <html:pre>
cd ${HOME}/obj/gcc-15.2.0-riscv64-unknown-elf
../../src/gcc-15.2.0/configure --prefix ${HOME}/cross --with-system-zlib --target riscv64-unknown-elf --disable-libssp --enable-languages=c --without-headers
make -j12 &amp;&amp; make install</html:pre>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
          </fr:mainmatter>
        </fr:tree>
      </fr:mainmatter>
    </fr:tree>
    <fr:tree show-metadata="false">
      <fr:frontmatter>
        <fr:authors>
          <fr:author>
            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
          </fr:author>
        </fr:authors>
        <fr:uri>https://xw.is/os-index/</fr:uri>
        <fr:display-uri>os-index</fr:display-uri>
        <fr:route>/os-index/</fr:route>
        <fr:title text="Operating systems">Operating systems</fr:title>
      </fr:frontmatter>
      <fr:mainmatter>
        <html:p>Tips and tricks for using various operating systems.</html:p>
        <fr:tree show-metadata="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
              </fr:author>
            </fr:authors>
            <fr:uri>https://xw.is/freebsd-index/</fr:uri>
            <fr:display-uri>freebsd-index</fr:display-uri>
            <fr:route>/freebsd-index/</fr:route>
            <fr:title text="FreeBSD">FreeBSD</fr:title>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>Tips and tricks for using <fr:link href="/freebsd/" title="FreeBSD" uri="https://xw.is/freebsd/" display-uri="freebsd" type="local">FreeBSD</fr:link>.</html:p>
            <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2021</fr:year>
                  <fr:month>4</fr:month>
                  <fr:day>15</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2022</fr:year>
                  <fr:month>5</fr:month>
                  <fr:day>18</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>27</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2026</fr:year>
                  <fr:month>4</fr:month>
                  <fr:day>28</fr:day>
                </fr:date>
                <fr:uri>https://xw.is/001J/</fr:uri>
                <fr:display-uri>001J</fr:display-uri>
                <fr:route>/001J/</fr:route>
                <fr:title text="Upgrade FreeBSD 14.3 to 15.0">Upgrade <fr:link href="/freebsd/" title="FreeBSD" uri="https://xw.is/freebsd/" display-uri="freebsd" type="local">FreeBSD</fr:link> 14.3 to 15.0</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2021</fr:year>
                      <fr:month>4</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2022</fr:year>
                      <fr:month>5</fr:month>
                      <fr:day>18</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>27</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2026</fr:year>
                      <fr:month>4</fr:month>
                      <fr:day>28</fr:day>
                    </fr:date>
                    <fr:title text="Introduction">Introduction</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Everything on this page needs to be done as root unless otherwise specified, so <fr:link href="https://man.freebsd.org/cgi/man.cgi?su(1)" type="external">su(1)</fr:link> to root.</html:p>
                    <html:pre>su -</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2021</fr:year>
                      <fr:month>4</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2022</fr:year>
                      <fr:month>5</fr:month>
                      <fr:day>18</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>27</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2026</fr:year>
                      <fr:month>4</fr:month>
                      <fr:day>28</fr:day>
                    </fr:date>
                    <fr:title text="Upgrade the base system">Upgrade the base system</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>We will do the upgrade offline (in a new <fr:link href="/freebsd-be/" title="FreeBSD Boot Environments" uri="https://xw.is/freebsd-be/" display-uri="freebsd-be" type="local">boot environment</fr:link>) so first create the BE using <fr:link href="/bectl.8" title="bectl(8)" uri="https://xw.is/bectl.8" display-uri="bectl.8" type="local">bectl(8)</fr:link> and mount it.</html:p>
                    <html:pre>
bectl create 15.0-RELEASE
bectl mount 15.0-RELEASE /mnt</html:pre>
                    <html:p>Then run <fr:link href="/freebsd-update.8" title="freebsd-update(8)" uri="https://xw.is/freebsd-update.8" display-uri="freebsd-update.8" type="local">freebsd-update(8)</fr:link>:</html:p>
                    <html:pre>
freebsd-update -b /mnt -d /mnt/var/db/freebsd-update -r 15.0-RELEASE upgrade
freebsd-update -b /mnt -d /mnt/var/db/freebsd-update install
freebsd-update -b /mnt -d /mnt/var/db/freebsd-update install
freebsd-update -b /mnt -d /mnt/var/db/freebsd-update install</html:pre>
                    <html:p>
                      <html:mark>Yes, you really need to run it that many times.</html:mark>
                    </html:p>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2021</fr:year>
                      <fr:month>4</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2022</fr:year>
                      <fr:month>5</fr:month>
                      <fr:day>18</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>27</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2026</fr:year>
                      <fr:month>4</fr:month>
                      <fr:day>28</fr:day>
                    </fr:date>
                    <fr:title text="Upgrade the bootloader">Upgrade the bootloader</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p><html:mark>You need to update the bootloader</html:mark>, otherwise the system <fr:link href="https://lwn.net/Articles/852586" type="external">will stop booting eventually</fr:link> (but not immediately). I think this is only necessary after <html:code>zpool upgrade</html:code>, and <html:code>zpool upgrade</html:code> used to warn us about this, but apparently not anymore? (Maybe it's related to the switch to OpenZFS — unclear.) Presumably you can do this after booting into the new system, but before <html:code>zpool upgrade</html:code>.</html:p>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2021</fr:year>
                          <fr:month>4</fr:month>
                          <fr:day>15</fr:day>
                        </fr:date>
                        <fr:date>
                          <fr:year>2022</fr:year>
                          <fr:month>5</fr:month>
                          <fr:day>18</fr:day>
                        </fr:date>
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>8</fr:month>
                          <fr:day>27</fr:day>
                        </fr:date>
                        <fr:date>
                          <fr:year>2026</fr:year>
                          <fr:month>4</fr:month>
                          <fr:day>28</fr:day>
                        </fr:date>
                        <fr:title text="BIOS">BIOS</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>First, determine your boot devices.</html:p>
                        <html:pre>
z800:aram$ zpool status zroot
  pool: zroot
 state: ONLINE
  scan: scrub repaired 0B in 00:01:46 with 0 errors on Mon Feb  5 17:48:15 2018
config:

	NAME          STATE     READ WRITE CKSUM
	zroot         ONLINE       0     0     0
	  mirror-0    ONLINE       0     0     0
	    <html:strong>gpt/zfs0</html:strong>  ONLINE       0     0     0
	    <html:strong>gpt/zfs1</html:strong>  ONLINE       0     0     0

errors: No known data errors</html:pre>
                        <html:p>Look for the <fr:link href="/geom/" title="GEOM: Modular Disk Transformation Framework" uri="https://xw.is/geom/" display-uri="geom" type="local">GEOM</fr:link> devices in the <fr:link href="/geom.8" title="geom(8)" uri="https://xw.is/geom.8" display-uri="geom.8" type="local">geom(8)</fr:link> output.</html:p>
                        <html:pre>
z800:aram$ geom -t
...
  da0                               PART       da0p3
   da0p3                           DEV
   <html:strong>da0</html:strong>p3                           LABEL      <html:strong>gpt/zfs0</html:strong>
     gpt/zfs0                      DEV
     zfs::vdev                     ZFS::VDEV
...
  da2                               PART       da2p3
   da2p3                           DEV
   <html:strong>da2</html:strong>p3                           LABEL      <html:strong>gpt/zfs1</html:strong>
     gpt/zfs1                      DEV
     zfs::vdev                     ZFS::VDEV
...</html:pre>
                        <html:p>In our case, we need to install the new bootloader on <html:code>da0</html:code> and <html:code>da2</html:code> using <fr:link href="/gpart.8" title="gpart(8)" uri="https://xw.is/gpart.8" display-uri="gpart.8" type="local">gpart(8)</fr:link>.</html:p>
                        <html:pre>
gpart bootcode -b /mnt/boot/pmbr -p /mnt/boot/gptzfsboot -i 1 <html:strong>da0</html:strong>
gpart bootcode -b /mnt/boot/pmbr -p /mnt/boot/gptzfsboot -i 1 <html:strong>da2</html:strong></html:pre>
                        <html:p>Of course, if you already booted into the new system, these become:</html:p>
                        <html:pre>
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 <html:strong>da0</html:strong>
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 <html:strong>da2</html:strong></html:pre>
                      </fr:mainmatter>
                    </fr:tree>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2021</fr:year>
                          <fr:month>4</fr:month>
                          <fr:day>15</fr:day>
                        </fr:date>
                        <fr:date>
                          <fr:year>2022</fr:year>
                          <fr:month>5</fr:month>
                          <fr:day>18</fr:day>
                        </fr:date>
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>8</fr:month>
                          <fr:day>27</fr:day>
                        </fr:date>
                        <fr:date>
                          <fr:year>2026</fr:year>
                          <fr:month>4</fr:month>
                          <fr:day>28</fr:day>
                        </fr:date>
                        <fr:title text="EFI">EFI</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>
                          <html:em>TODO.</html:em>
                        </html:p>
                      </fr:mainmatter>
                    </fr:tree>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2021</fr:year>
                      <fr:month>4</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2022</fr:year>
                      <fr:month>5</fr:month>
                      <fr:day>18</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>27</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2026</fr:year>
                      <fr:month>4</fr:month>
                      <fr:day>28</fr:day>
                    </fr:date>
                    <fr:title text="Upgrade the packages">Upgrade the packages</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>It is unclear why we need <fr:link href="https://man.freebsd.org/cgi/man.cgi?devfs(5)" type="external">devfs</fr:link>, but we need it.</html:p>
                    <html:pre>
mount -t devfs devfs /mnt/dev/
pkg -c /mnt update
pkg -c /mnt upgrade
umount /mnt/dev/</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2021</fr:year>
                      <fr:month>4</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2022</fr:year>
                      <fr:month>5</fr:month>
                      <fr:day>18</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>27</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2026</fr:year>
                      <fr:month>4</fr:month>
                      <fr:day>28</fr:day>
                    </fr:date>
                    <fr:title text="Activate the new boot environment">Activate the new <fr:link href="/freebsd-be/" title="FreeBSD Boot Environments" uri="https://xw.is/freebsd-be/" display-uri="freebsd-be" type="local">boot environment</fr:link></fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Activate the new <fr:link href="/freebsd-be/" title="FreeBSD Boot Environments" uri="https://xw.is/freebsd-be/" display-uri="freebsd-be" type="local">boot environment</fr:link>, then reboot.</html:p>
                    <html:pre>
bectl umount 15.0-RELEASE
bectl activate 15.0-RELEASE</html:pre>
                    <html:p>If it doesn't work, you can revert to another BE in the bootloader.</html:p>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2018</fr:year>
                  <fr:month>11</fr:month>
                  <fr:day>7</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>28</fr:day>
                </fr:date>
                <fr:uri>https://xw.is/001K/</fr:uri>
                <fr:display-uri>001K</fr:display-uri>
                <fr:route>/001K/</fr:route>
                <fr:title text="FreeBSD fiber channel target"><fr:link href="/freebsd/" title="FreeBSD" uri="https://xw.is/freebsd/" display-uri="freebsd" type="local">FreeBSD</fr:link> fiber channel target</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2018</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>7</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>28</fr:day>
                    </fr:date>
                    <fr:title text="Prerequisites">Prerequisites</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>You need: <html:ul><html:li>A fiber channel card that supports target mode, e.g. QLogic QLE2462.</html:li>
    <html:li><fr:link href="/freebsd/" title="FreeBSD" uri="https://xw.is/freebsd/" display-uri="freebsd" type="local">FreeBSD</fr:link> with a kernel that supports your card, e.g <fr:link href="/freebsd-isp.4" title="isp(4)" uri="https://xw.is/freebsd-isp.4" display-uri="freebsd-isp.4" type="local">isp(4)</fr:link>.</html:li>
    <html:li>a ZFS zvol.</html:li></html:ul></html:p>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2018</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>7</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>28</fr:day>
                    </fr:date>
                    <fr:title text="Create a ZFS zvol">Create a ZFS zvol</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>This will create a sparse 850GB ZFS zvol.</html:p>
                    <html:pre>sudo zfs create -p -s -V 850g tank1/export/fc</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2018</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>7</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>28</fr:day>
                    </fr:date>
                    <fr:title text="Enable ctld(8)">Enable <fr:link href="/ctld.8" title="ctld(8)" uri="https://xw.is/ctld.8" display-uri="ctld.8" type="local">ctld(8)</fr:link></fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:pre>sudo sysrc ctld_enable=YES</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2018</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>7</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>28</fr:day>
                    </fr:date>
                    <fr:title text="Bring the device online">Bring the device online</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Use <fr:link href="/ctladm.8" title="ctladm(8)" uri="https://xw.is/ctladm.8" display-uri="ctladm.8" type="local">ctladm(8)</fr:link> to bring the devices online.</html:p>
                    <html:pre>
sudo ctladm port -o on isp0
sudo ctladm port -o on isp1</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2018</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>7</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>28</fr:day>
                    </fr:date>
                    <fr:title text="Check the WWN address">Check the WWN address</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>You'll get output like:</html:p>
                    <html:pre>
z800:aram$ sudo ctladm port -l
Port Online Frontend Name     pp vp
0    YES    camsim   camsim   0  0  naa.50000009e370df01
1    YES    ioctl    ioctl    0  0
2    YES    tpc      tpc      0  0
3    YES    camtgt   isp0     0  0  naa.2100001b321cd5b6
4    YES    camtgt   isp1     0  0  naa.2101001b323cd5b6</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2018</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>7</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>28</fr:day>
                    </fr:date>
                    <fr:title text="Configure ctl.conf(5)">Configure <fr:link href="/ctl.conf.5" title="ctl.conf(5)" uri="https://xw.is/ctl.conf.5" display-uri="ctl.conf.5" type="local">ctl.conf(5)</fr:link></fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Use this config for <fr:link href="/ctl.conf.5" title="ctl.conf(5)" uri="https://xw.is/ctl.conf.5" display-uri="ctl.conf.5" type="local">ctl.conf(5)</fr:link>:</html:p>
                    <html:pre>
lun fibre-channel {
	backend block
	device-id "5000c5001d5ba30b"
	serial "MGKSERIAL0001"
	option vendor "MGK"
	option product "FC Disk"
	option naa "600A0B80002682A8000067D95897A544"
	option removable "on"
	path /dev/zvol/tank1/export/fc
}

target naa.100000062b1b88c8 {
	auth-group no-authentication
	port mpt0
	port mpt1
	lun 0 fibre-channel
}</html:pre>
                    <html:p>Make sure the WWN matches. Next, start the ctld daemon. The device-id is from a real Seagate FC disk, and the naa is from a real array. I think both are required by macOS to make multipathing work.</html:p>
                    <html:pre>sudo service ctld start</html:pre>
                    <html:p>Query the status, to see if everything is working correctly:</html:p>
                    <html:pre>
z800:aram$ sudo ctladm devlist -v
LUN Backend       Size (Blocks)   BS Serial Number    Device ID
  0 block            1782579200  512 MYSERIAL   0     MYDEVID   0
      lun_type=0
      num_threads=14
      file=/dev/zvol/tank1/export/fc
      ctld_name=naa.2100001b321cd5b6,lun,0
      scsiname=naa.2100001b321cd5b6,lun,0</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2018</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>7</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>28</fr:day>
                    </fr:date>
                    <fr:title text="Initiator side">Initiator side</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>If using macOS, the mac should just "see" the target, no configuration required.</html:p>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2018</fr:year>
                  <fr:month>6</fr:month>
                  <fr:day>7</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>7</fr:month>
                  <fr:day>15</fr:day>
                </fr:date>
                <fr:uri>https://xw.is/001A/</fr:uri>
                <fr:display-uri>001A</fr:display-uri>
                <fr:route>/001A/</fr:route>
                <fr:title text="FreeBSD Post Install Steps"><fr:link href="/freebsd/" title="FreeBSD" uri="https://xw.is/freebsd/" display-uri="freebsd" type="local">FreeBSD</fr:link> Post Install Steps</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2018</fr:year>
                      <fr:month>6</fr:month>
                      <fr:day>7</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:title text="Introduction">Introduction</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Everything on this page needs to be done as root unless otherwise specified, so <fr:link href="https://man.freebsd.org/cgi/man.cgi?su(1)" type="external">su(1)</fr:link> to root.</html:p>
                    <html:pre>su -</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2018</fr:year>
                      <fr:month>6</fr:month>
                      <fr:day>7</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:title text="Set the hostname">Set the hostname</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:pre>echo 'hostname="phoenix.xw.is"' &gt;&gt; /etc/rc.conf</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2018</fr:year>
                      <fr:month>6</fr:month>
                      <fr:day>7</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:title text="Update the software">Update the software</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:pre>freebsd-update fetch
freebsd-update install</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2018</fr:year>
                      <fr:month>6</fr:month>
                      <fr:day>7</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:title text="Install basic software">Install basic software</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:pre>pkg install -y bash sudo rsync tmux</html:pre>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2018</fr:year>
                          <fr:month>6</fr:month>
                          <fr:day>7</fr:day>
                        </fr:date>
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>7</fr:month>
                          <fr:day>15</fr:day>
                        </fr:date>
                        <fr:title text="ZFS">ZFS</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>If you don't have ZFS root, for example in a pre-made cloud computing image, you might want to create a separate ZFS pool.</html:p>
                        <html:pre>echo 'zfs_enable="YES"' &gt;&gt;/etc/rc.conf
service zfs start
zpool create -m /tank tank xbd1
zfs set compression=on tank</html:pre>
                      </fr:mainmatter>
                    </fr:tree>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2018</fr:year>
                      <fr:month>6</fr:month>
                      <fr:day>7</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:title text="Create a user">Create a user</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Create a user with a random password that can then do passwordless <fr:link href="https://www.sudo.ws/docs/man/1.8.15/sudo.man" type="external">sudo(8)</fr:link>:</html:p>
                    <html:pre>pw useradd -n aram -c 'Aram Hăvărneanu' -g staff -G wheel -m -s /usr/local/bin/bash -L staff -w random</html:pre>
                    <html:p>Enable passwordless sudo for the staff group:</html:p>
                    <html:pre><![CDATA[echo '%staff ALL=(ALL) NOPASSWD:ALL' > /usr/local/etc/sudoers.d/91-staff-no-password]]></html:pre>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2018</fr:year>
                          <fr:month>6</fr:month>
                          <fr:day>7</fr:day>
                        </fr:date>
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>7</fr:month>
                          <fr:day>15</fr:day>
                        </fr:date>
                        <fr:title text="SSH">SSH</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter><html:p>For <fr:link href="/ssh.1" title="ssh(1)" uri="https://xw.is/ssh.1" display-uri="ssh.1" type="local">ssh(1)</fr:link> access, first use <fr:link href="https://man.freebsd.org/cgi/man.cgi?su(1)" type="external">su(1)</fr:link> to switch from root to the user:</html:p><html:pre>su - aram</html:pre><html:p>And then populate the <fr:link href="/ssh-keys/" title="OpenSSH › Public SSH Keys" uri="https://xw.is/ssh-keys/" display-uri="ssh-keys" type="local">ssh keys</fr:link>:</html:p>
  <html:pre>
mkdir -p $HOME/.ssh
chmod 700 $HOME/.ssh
cat &lt;&lt;EOF &gt;&gt;$HOME/.ssh/authorized_keys
<![CDATA[ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHRJsbKlE9QWIQnC1YQPHV8C6cIx32Fjju7VQaKI67TPPm+FySrbJPsM6j4zm9IobTCQ0YOtVmlvXYlRtKdHm0I= pkcs11:id=%62%31%39%32%66%32%33%31%32%66%65%36%66%33%64%37;token=ssh;manufacturer=STMicro;serial=0000000000000000%0D%04?module-path=/usr/lib64/pkcs11/libtpm2_pkcs11.so aram@silverleaf.local
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHwq6SeyHhRRtiMmsBABHYgwqaOwwgBZEMgrRfoSpvzz aram@horizon.local
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMRc0UWKrFpCv/EOUo2jpEQt+C/pa0tc1rUWKgjbKTp7 aram@edengate.local
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPsg+utDc9GRb/n91r0j5vFsn+gVYPawpEbaNCuIhYmE aram@z800.mgk.ro]]>
EOF
chmod 644 $HOME/.ssh/authorized_keys
sort -u -o $HOME/.ssh/authorized_keys $HOME/.ssh/authorized_keys</html:pre>
</fr:mainmatter>
                    </fr:tree>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
          </fr:mainmatter>
        </fr:tree>
        <fr:tree show-metadata="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
              </fr:author>
            </fr:authors>
            <fr:uri>https://xw.is/openbsd-index/</fr:uri>
            <fr:display-uri>openbsd-index</fr:display-uri>
            <fr:route>/openbsd-index/</fr:route>
            <fr:title text="OpenBSD">OpenBSD</fr:title>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>Tips and tricks for using <fr:link href="/openbsd/" title="OpenBSD" uri="https://xw.is/openbsd/" display-uri="openbsd" type="local">OpenBSD</fr:link>.</html:p>
            <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>1</fr:month>
                  <fr:day>2</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>7</fr:month>
                  <fr:day>16</fr:day>
                </fr:date>
                <fr:uri>https://xw.is/001F/</fr:uri>
                <fr:display-uri>001F</fr:display-uri>
                <fr:route>/001F/</fr:route>
                <fr:title text="OpenBSD Post Install Steps"><fr:link href="/openbsd/" title="OpenBSD" uri="https://xw.is/openbsd/" display-uri="openbsd" type="local">OpenBSD</fr:link> Post Install Steps</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>1</fr:month>
                      <fr:day>2</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>16</fr:day>
                    </fr:date>
                    <fr:title text="Introduction">Introduction</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Everything on this page needs to be done as root unless otherwise specified, so <fr:link href="https://man.openbsd.org/su" type="external">su(1)</fr:link> to root.</html:p>
                    <html:pre>su -</html:pre>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2019</fr:year>
                          <fr:month>1</fr:month>
                          <fr:day>2</fr:day>
                        </fr:date>
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>7</fr:month>
                          <fr:day>16</fr:day>
                        </fr:date>
                        <fr:title text="Vultr">Vultr</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter><html:p><fr:link href="https://www.vultr.com/" type="external">Vultr</fr:link> doesn't install ssh keys, if you want to permit direct SSH root login you need to populate <html:code>.ssh/authorized_keys</html:code> manually.</html:p>
  <html:pre>
mkdir -p $HOME/.ssh
chmod 700 $HOME/.ssh
cat &lt;&lt;EOF &gt;&gt;$HOME/.ssh/authorized_keys
<![CDATA[ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHRJsbKlE9QWIQnC1YQPHV8C6cIx32Fjju7VQaKI67TPPm+FySrbJPsM6j4zm9IobTCQ0YOtVmlvXYlRtKdHm0I= pkcs11:id=%62%31%39%32%66%32%33%31%32%66%65%36%66%33%64%37;token=ssh;manufacturer=STMicro;serial=0000000000000000%0D%04?module-path=/usr/lib64/pkcs11/libtpm2_pkcs11.so aram@silverleaf.local
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHwq6SeyHhRRtiMmsBABHYgwqaOwwgBZEMgrRfoSpvzz aram@horizon.local
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMRc0UWKrFpCv/EOUo2jpEQt+C/pa0tc1rUWKgjbKTp7 aram@edengate.local
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPsg+utDc9GRb/n91r0j5vFsn+gVYPawpEbaNCuIhYmE aram@z800.mgk.ro]]>
EOF
chmod 644 $HOME/.ssh/authorized_keys
sort -u -o $HOME/.ssh/authorized_keys $HOME/.ssh/authorized_keys</html:pre>
<html:p>Change the autogenerated password:</html:p><html:pre>usermod -p `jot -r -c 30 a z | rs -g0 0 30 | encrypt -b a` root</html:pre></fr:mainmatter>
                    </fr:tree>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>1</fr:month>
                      <fr:day>2</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>16</fr:day>
                    </fr:date>
                    <fr:title text="Set the hostname">Set the hostname</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:pre>echo 'freedom.mgk.ro' &gt; /etc/myname</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>1</fr:month>
                      <fr:day>2</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>16</fr:day>
                    </fr:date>
                    <fr:title text="Update the software">Update the software</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:pre>echo 'https://cdn.openbsd.org/pub/OpenBSD' &gt; /etc/installurl
syspatch</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>1</fr:month>
                      <fr:day>2</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>16</fr:day>
                    </fr:date>
                    <fr:title text="Install basic software">Install basic software</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:pre>pkg_add bash rsync</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>1</fr:month>
                      <fr:day>2</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>16</fr:day>
                    </fr:date>
                    <fr:title text="Create a user">Create a user</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Create a user with a random password that can then do passwordless <fr:link href="https://man.openbsd.org/doas" type="external">doas(8)</fr:link>:</html:p>
                    <html:pre>useradd -m -g staff -L staff -G wheel -c 'Aram Hăvărneanu' -s /bin/ksh -p `jot -r -c 30 a z | rs -g0 0 30 | encrypt -b a` aram</html:pre>
                    <html:p>Enable passwordless doas for the staff group:</html:p>
                    <html:pre><![CDATA[cat <<EOF > /etc/doas.conf
permit nopass :staff
permit nopass keepenv root
EOF]]></html:pre>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2019</fr:year>
                          <fr:month>1</fr:month>
                          <fr:day>2</fr:day>
                        </fr:date>
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>7</fr:month>
                          <fr:day>16</fr:day>
                        </fr:date>
                        <fr:title text="SSH">SSH</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter><html:p>For <fr:link href="/ssh.1" title="ssh(1)" uri="https://xw.is/ssh.1" display-uri="ssh.1" type="local">ssh(1)</fr:link> access, first use <fr:link href="https://man.openbsd.org/su" type="external">su(1)</fr:link> to switch from root to the user:</html:p><html:pre>su - aram</html:pre><html:p>And then populate the <fr:link href="/ssh-keys/" title="OpenSSH › Public SSH Keys" uri="https://xw.is/ssh-keys/" display-uri="ssh-keys" type="local">ssh keys</fr:link>:</html:p>
  <html:pre>
mkdir -p $HOME/.ssh
chmod 700 $HOME/.ssh
cat &lt;&lt;EOF &gt;&gt;$HOME/.ssh/authorized_keys
<![CDATA[ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHRJsbKlE9QWIQnC1YQPHV8C6cIx32Fjju7VQaKI67TPPm+FySrbJPsM6j4zm9IobTCQ0YOtVmlvXYlRtKdHm0I= pkcs11:id=%62%31%39%32%66%32%33%31%32%66%65%36%66%33%64%37;token=ssh;manufacturer=STMicro;serial=0000000000000000%0D%04?module-path=/usr/lib64/pkcs11/libtpm2_pkcs11.so aram@silverleaf.local
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHwq6SeyHhRRtiMmsBABHYgwqaOwwgBZEMgrRfoSpvzz aram@horizon.local
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMRc0UWKrFpCv/EOUo2jpEQt+C/pa0tc1rUWKgjbKTp7 aram@edengate.local
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPsg+utDc9GRb/n91r0j5vFsn+gVYPawpEbaNCuIhYmE aram@z800.mgk.ro]]>
EOF
chmod 644 $HOME/.ssh/authorized_keys
sort -u -o $HOME/.ssh/authorized_keys $HOME/.ssh/authorized_keys</html:pre>
</fr:mainmatter>
                    </fr:tree>
                    <html:p>After you've done this, you might want to disable root user login.</html:p>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>2</fr:month>
                  <fr:day>11</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>2</fr:month>
                  <fr:day>22</fr:day>
                </fr:date>
                <fr:uri>https://xw.is/001G/</fr:uri>
                <fr:display-uri>001G</fr:display-uri>
                <fr:route>/001G/</fr:route>
                <fr:title text="OpenBSD HE IPv6 tunnel"><fr:link href="/openbsd/" title="OpenBSD" uri="https://xw.is/openbsd/" display-uri="openbsd" type="local">OpenBSD</fr:link> HE IPv6 tunnel</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>2</fr:month>
                      <fr:day>11</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>2</fr:month>
                      <fr:day>22</fr:day>
                    </fr:date>
                    <fr:title text="Introduction">Introduction</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>We will create an IPv6 tunnel (provided by <fr:link href="https://he.net/" type="external">Hurricane Electric</fr:link>) suitable for subnetting (<html:code>/48</html:code>).</html:p>
                    <html:pre />
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>2</fr:month>
                      <fr:day>11</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>2</fr:month>
                      <fr:day>22</fr:day>
                    </fr:date>
                    <fr:title text="Configuration">Configuration</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>In <html:code>/etc/hostname.gif0</html:code>:</html:p>
                    <html:pre>tunnel 207.246.122.61 209.51.161.14
!ifconfig gif0 inet6 alias 2001:470:1f06:95f::2 2001:470:1f06:95f::1 prefixlen 128
!route -n add -inet6 default 2001:470:1f06:95f::1</html:pre>
                    <html:p>Enable it (as root):</html:p>
                    <html:pre>sh /etc/netstart gif0</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>2</fr:month>
                      <fr:day>11</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>2</fr:month>
                      <fr:day>22</fr:day>
                    </fr:date>
                    <fr:title text="Test">Test</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Check that it works:</html:p>
                    <html:pre><![CDATA[freedom# route show -inet6
Routing tables

Internet6:
Destination        Gateway            Flags   Refs      Use   Mtu  Prio Iface
default            tunnel521973.tunne UGS        0       44     -     8 gif0
default            fe80::fc00:1ff:fed UGS        0        0     -    56 vio0
::/96              localhost          UGRS       0        0 32768     8 lo0
localhost          localhost          UHhl      10       20 32768     1 lo0
::ffff:0.0.0.0/96  localhost          UGRS       0        0 32768     8 lo0
tunnel521973.tunne tunnel521973-pt.tu UHh        1        1     -     8 gif0
tunnel521973-pt.tu tunnel521973-pt.tu UHl        0       59     -     1 gif0
2001:19f0:5:11d4:: freedom.mgk.ro     UCn        0        0     -     4 vio0
freedom.mgk.ro     56:00:01:d3:aa:bd  UHLl       0        0     -     1 vio0
2002::/24          localhost          UGRS       0        0 32768     8 lo0
2002:7f00::/24     localhost          UGRS       0        0 32768     8 lo0
2002:e000::/20     localhost          UGRS       0        0 32768     8 lo0
2002:ff00::/24     localhost          UGRS       0        0 32768     8 lo0
fe80::/10          localhost          UGRS       0        3 32768     8 lo0
fec0::/10          localhost          UGRS       0        0 32768     8 lo0
fe80::%vio0/64     fe80::5400:1ff:fed UCn        1        1     -     4 vio0
fe80::5400:1ff:fed 56:00:01:d3:aa:bd  UHLl       0        0     -     1 vio0
fe80::fc00:1ff:fed fe:00:01:d3:aa:bd  UHLch      1        5     -     3 vio0
fe80::1%lo0        fe80::1%lo0        UHl        0        0 32768     1 lo0
fe80::%gif0/64     fe80::42bc:4cfd:63 Un         0        0     -     4 gif0
fe80::42bc:4cfd:63 fe80::42bc:4cfd:63 UHl        0        0     -     1 gif0
ff01::/16          localhost          UGRS       0        3 32768     8 lo0
ff01::%vio0/32     fe80::5400:1ff:fed Um         0        1     -     4 vio0
ff01::%lo0/32      fe80::1%lo0        Um         0        1 32768     4 lo0
ff01::%gif0/32     fe80::42bc:4cfd:63 Um         0        1     -     4 gif0
ff02::/16          localhost          UGRS       0        3 32768     8 lo0
ff02::%vio0/32     fe80::5400:1ff:fed Um         0        1     -     4 vio0
ff02::%lo0/32      fe80::1%lo0        Um         0        1 32768     4 lo0
ff02::%gif0/32     fe80::42bc:4cfd:63 Um         0        1     -     4 gif0
freedom#
freedom#
freedom# ping6 google.com
PING google.com (2607:f8b0:4006:810::200e): 56 data bytes
64 bytes from 2607:f8b0:4006:810::200e: icmp_seq=0 hlim=57 time=2.307 ms
64 bytes from 2607:f8b0:4006:810::200e: icmp_seq=1 hlim=57 time=2.892 ms
^C
--- google.com ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/std-dev = 2.307/2.599/2.892/0.292 ms
freedom# traceroute6 google.com
traceroute6 to google.com (2607:f8b0:4006:810::200e), 64 hops max, 60 byte packets
 1  tunnel521973.tunnel.tserv4.nyc4.ipv6.he.net (2001:470:1f06:95f::1)  9.294 ms  6.861 ms  6.119 ms
 2  ve422.core1.nyc4.he.net (2001:470:0:5d::1)  2.155 ms  2.158 ms  2.876 ms
 3  core1-0-0-8.lga.net.google.com (2001:504:f::27)  1.798 ms  1.815 ms  2.393 ms
 4  2001:4860:0:1126::1 (2001:4860:0:1126::1)  3.032 ms  3.619 ms 2001:4860:0:1128::1 (2001:4860:0:1128::1)  2.576 ms
 5  2001:4860:0:1::2105 (2001:4860:0:1::2105)  2.89 ms  2.362 ms 2001:4860:0:1::2107 (2001:4860:0:1::2107)  2.052 ms
 6  lga34s14-in-x0e.1e100.net (2607:f8b0:4006:810::200e)  2.167 ms  2.114 ms  2.193 ms
freedom#]]></html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>2</fr:month>
                      <fr:day>11</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>2</fr:month>
                      <fr:day>22</fr:day>
                    </fr:date>
                    <fr:title text="Routing">Routing</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Assign IPs to the interface you wish to route to:</html:p>
                    <html:pre>freedom# cat /etc/hostname.enc0
inet 172.24.24.1 255.255.255.0 172.24.24.255
<html:strong>inet6 2001:470:8c78:a0::1 64</html:strong>
up</html:pre>
                    <html:p>Reconfigure it:</html:p>
                    <html:pre>sh /etc/netstart enc0</html:pre>
                    <html:p>Enable IPv6 forwarding:</html:p>
                    <html:pre>freedom# cat /etc/sysctl.conf
hw.smt=1
net.inet.ip.forwarding=1
<html:strong>net.inet6.ip6.forwarding=1</html:strong></html:pre>
                    <html:p>Same thing with sysctl (as root):</html:p>
                    <html:pre>sysctl net.inet6.ip6.forwarding=1</html:pre>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>2</fr:month>
                  <fr:day>22</fr:day>
                </fr:date>
                <fr:uri>https://xw.is/001H/</fr:uri>
                <fr:display-uri>001H</fr:display-uri>
                <fr:route>/001H/</fr:route>
                <fr:title text="OpenSMTPD forward to Google">OpenSMTPD forward to Google</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>2</fr:month>
                      <fr:day>22</fr:day>
                    </fr:date>
                    <fr:title text="Introduction">Introduction</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>We'll use <fr:link href="/opensmtpd/" title="OpenSMTPD" uri="https://xw.is/opensmtpd/" display-uri="opensmtpd" type="local">OpenSMTPD</fr:link> to forward to Google.</html:p>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>2</fr:month>
                      <fr:day>22</fr:day>
                    </fr:date>
                    <fr:title text="Prerequistes">Prerequistes</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>A Gmail or Google Workspace account. <fr:link href="https://www.opensmtpd.org/" type="external">OpenSMTPD</fr:link> is already installed and running on <fr:link href="/openbsd/" title="OpenBSD" uri="https://xw.is/openbsd/" display-uri="openbsd" type="local">OpenBSD</fr:link>.</html:p>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>2</fr:month>
                      <fr:day>22</fr:day>
                    </fr:date>
                    <fr:title text="How">How</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Enable access to what Google calls <fr:link href="https://myaccount.google.com/lesssecureapps" type="external">less secure apps</fr:link>. Then as root:</html:p>
                    <html:pre>echo "<html:strong>googlemail</html:strong> user@gmail.com:<html:em>password</html:em>" &gt; /etc/mail/secrets</html:pre>
                    <html:p>You can use your Google Apps username instead of gmail, and <html:strong>googlemail</html:strong> is just a label that we will use later.</html:p>
                    <html:p>In <html:code>/etc/mail/smtpd.conf</html:code>:</html:p>
                    <html:pre>
table aliases file:/etc/mail/aliases
table secrets db:/etc/mail/secrets.db

listen on lo0

action "local" mbox alias &lt;aliases&gt;
action "relay" relay host smtp+tls://<html:strong>googlemail</html:strong>@smtp.googlemail.com:587 auth &lt;secrets&gt;

match for local action "local"
match for any action "relay"
  </html:pre>
                    <html:p>Notice the <html:strong>googlemail</html:strong> label. After this, just restart <fr:link href="https://man.openbsd.org/smtpd.8" type="external">smtpd</fr:link>:</html:p>
                    <html:pre>rcctl restart smtpd</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>2</fr:month>
                      <fr:day>22</fr:day>
                    </fr:date>
                    <fr:title text="Test">Test</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:pre>echo "Does it work?" | mail -s "Mail test from OpenBSD" spam@mgk.ro</html:pre>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
          </fr:mainmatter>
        </fr:tree>
        <fr:tree show-metadata="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
              </fr:author>
            </fr:authors>
            <fr:uri>https://xw.is/linux-index/</fr:uri>
            <fr:display-uri>linux-index</fr:display-uri>
            <fr:route>/linux-index/</fr:route>
            <fr:title text="Linux">Linux</fr:title>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>Tips and tricks for using Linux.</html:p>
            <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>9</fr:month>
                  <fr:day>10</fr:day>
                </fr:date>
                <fr:uri>https://xw.is/001M/</fr:uri>
                <fr:display-uri>001M</fr:display-uri>
                <fr:route>/001M/</fr:route>
                <fr:title text="Red Hat Enterprise Linux Post Install Steps">Red Hat Enterprise Linux Post Install Steps</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>9</fr:month>
                      <fr:day>10</fr:day>
                    </fr:date>
                    <fr:title text="Introduction">Introduction</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Everything on this page needs to be done as root unless otherwise specified, so <fr:link href="https://www.sudo.ws/docs/man/1.8.15/sudo.man/" type="external">sudo(8)</fr:link> to root.</html:p>
                    <html:pre>sudo -i</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>9</fr:month>
                      <fr:day>10</fr:day>
                    </fr:date>
                    <fr:title text="Register your system.">Register your system.</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p><fr:link href="https://docs.redhat.com/en/documentation/subscription_central/1-latest/html-single/getting_started_with_activation_keys_on_the_hybrid_cloud_console/index" type="external">Generate a new activation key</fr:link> in the <fr:link href="https://console.redhat.com/insights/connector/activation-keys" type="external">Red Hat Hybrid Cloud Console</fr:link> and <fr:link href="https://docs.redhat.com/en/documentation/red_hat_insights/1-latest/html/remote_host_configuration_and_management/rhc-configuring_intro-rhc" type="external">register your system</fr:link>.</html:p>
                    <html:pre>rhc connect --activation-key &lt;key&gt; --organization 7877846 --disable-feature analytics --disable-feature remote-management</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>9</fr:month>
                      <fr:day>10</fr:day>
                    </fr:date>
                    <fr:title text="Update the software">Update the software</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:pre>dnf -y upgrade-minimal
reboot</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>9</fr:month>
                      <fr:day>10</fr:day>
                    </fr:date>
                    <fr:title text="Create a user">Create a user</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Create a user with a locked password that can then do passwordless <fr:link href="https://www.sudo.ws/docs/man/1.8.15/sudo.man" type="external">sudo(8)</fr:link>:</html:p>
                    <html:pre>useradd -c 'Aram Hăvărneanu' -G wheel,users -m -s /bin/bash -U aram
passwd -l aram</html:pre>
                    <html:p>Enable passwordless sudo for the wheel group:</html:p>
                    <html:pre><![CDATA[echo '%wheel ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/91-wheel-no-password]]></html:pre>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>9</fr:month>
                          <fr:day>10</fr:day>
                        </fr:date>
                        <fr:title text="SSH">SSH</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter><html:p>For <fr:link href="/ssh.1" title="ssh(1)" uri="https://xw.is/ssh.1" display-uri="ssh.1" type="local">ssh(1)</fr:link> access, first use <fr:link href="https://man7.org/linux/man-pages/man1/su.1.html" type="external">su(1)</fr:link> to switch from root to the user:</html:p><html:pre>su - aram</html:pre><html:p>And then populate the <fr:link href="/ssh-keys/" title="OpenSSH › Public SSH Keys" uri="https://xw.is/ssh-keys/" display-uri="ssh-keys" type="local">ssh keys</fr:link>:</html:p>
  <html:pre>
mkdir -p $HOME/.ssh
chmod 700 $HOME/.ssh
cat &lt;&lt;EOF &gt;&gt;$HOME/.ssh/authorized_keys
<![CDATA[ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHRJsbKlE9QWIQnC1YQPHV8C6cIx32Fjju7VQaKI67TPPm+FySrbJPsM6j4zm9IobTCQ0YOtVmlvXYlRtKdHm0I= pkcs11:id=%62%31%39%32%66%32%33%31%32%66%65%36%66%33%64%37;token=ssh;manufacturer=STMicro;serial=0000000000000000%0D%04?module-path=/usr/lib64/pkcs11/libtpm2_pkcs11.so aram@silverleaf.local
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHwq6SeyHhRRtiMmsBABHYgwqaOwwgBZEMgrRfoSpvzz aram@horizon.local
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMRc0UWKrFpCv/EOUo2jpEQt+C/pa0tc1rUWKgjbKTp7 aram@edengate.local
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPsg+utDc9GRb/n91r0j5vFsn+gVYPawpEbaNCuIhYmE aram@z800.mgk.ro]]>
EOF
chmod 644 $HOME/.ssh/authorized_keys
sort -u -o $HOME/.ssh/authorized_keys $HOME/.ssh/authorized_keys</html:pre>
</fr:mainmatter>
                    </fr:tree>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>9</fr:month>
                      <fr:day>10</fr:day>
                    </fr:date>
                    <fr:title text="Enable kpatch">Enable <fr:link href="https://github.com/dynup/kpatch" type="external">kpatch</fr:link></fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Install <fr:link href="https://github.com/dynup/kpatch" type="external">kpatch</fr:link> and enable it.</html:p>
                    <html:pre>
dnf -y install kpatch kpatch-dnf
dnf kpatch auto</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>9</fr:month>
                      <fr:day>10</fr:day>
                    </fr:date>
                    <fr:title text="Unregister your system">Unregister your system</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>When you retire your system, don't forget to unregister.</html:p>
                    <html:pre>rhc disconnect</html:pre>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>11</fr:month>
                  <fr:day>28</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>13</fr:day>
                </fr:date>
                <fr:uri>https://xw.is/debian-sysroot/</fr:uri>
                <fr:display-uri>debian-sysroot</fr:display-uri>
                <fr:route>/debian-sysroot/</fr:route>
                <fr:title text="Toolchains › Create Debian sysroots"><fr:link href="/toolchain-index/" title="Toolchains" uri="https://xw.is/toolchain-index/" display-uri="toolchain-index" type="local">Toolchains</fr:link> › Create Debian sysroots</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>We'll create Debian sysroots suitable for a GCC cross compiler.</html:p>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>28</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>13</fr:day>
                    </fr:date>
                    <fr:title text="Debootstrap machine">Debootstrap machine</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Everything below runs on the <html:em>debootstrap machine</html:em> as root:</html:p>
                    <html:pre>sudo -i</html:pre>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2019</fr:year>
                          <fr:month>11</fr:month>
                          <fr:day>28</fr:day>
                        </fr:date>
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>8</fr:month>
                          <fr:day>13</fr:day>
                        </fr:date>
                        <fr:title text="Prerequisites">Prerequisites</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>Debian or Ubuntu or any system that can run <fr:link href="/mmdebstrap.1" title="mmdebstrap(1)" uri="https://xw.is/mmdebstrap.1" display-uri="mmdebstrap.1" type="local">mmdebstrap(1)</fr:link> (modern alternative to <fr:link href="/debootstrap.8" title="debootstrap(8)" uri="https://xw.is/debootstrap.8" display-uri="debootstrap.8" type="local">debootstrap(8)</fr:link>), with a configured QEMU user emulator.</html:p>
                      </fr:mainmatter>
                    </fr:tree>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2019</fr:year>
                          <fr:month>11</fr:month>
                          <fr:day>28</fr:day>
                        </fr:date>
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>8</fr:month>
                          <fr:day>13</fr:day>
                        </fr:date>
                        <fr:title text="Install debootstrap and associated tools">Install debootstrap and associated tools</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:pre>apt install -y binfmt-support qemu-user-static mmdebstrap</html:pre>
                      </fr:mainmatter>
                    </fr:tree>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2019</fr:year>
                          <fr:month>11</fr:month>
                          <fr:day>28</fr:day>
                        </fr:date>
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>8</fr:month>
                          <fr:day>13</fr:day>
                        </fr:date>
                        <fr:title text="Run debootstrap">Run debootstrap</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>We're going to create sysroots for <html:em>riscv64</html:em> and <html:em>s390x</html:em> (see the list of <fr:link href="https://www.debian.org/ports/" type="external">supported Debian ports</fr:link>.). Add more packages to <html:code>--include</html:code>, if needed.</html:p>
                        <html:pre>archs="riscv64 s390x"
for arch in ${archs}; do
    mmdebstrap --variant=buildd --include="zlib1g-dev libgmp-dev libmpfr-dev" --architectures=${arch} stable /tmp/sysroot-${arch}.tar.xz
done
</html:pre>
                        <html:p>Note that Debian images are <fr:link href="https://wiki.debian.org/Multiarch" type="external">multiarch</fr:link>, which means that libraries and header files <fr:link href="https://wiki.debian.org/Multiarch/LibraryPathOverview" type="external">are in a different location</fr:link> than the usual one. <fr:link href="/gcc/" title="GNU Compiler Collection" uri="https://xw.is/gcc/" display-uri="gcc" type="local">GCC</fr:link> must be made aware of this via <html:code>--enable-multiarch</html:code> when running the top-level <fr:link href="https://gcc.gnu.org/install/configure.html" type="external"><html:em>configure</html:em></fr:link> script. <html:mark>Failure to set <html:code>--enable-multiarch</html:code> will result in a failed build.</html:mark> Additionally, <fr:link href="/gcc/" title="GNU Compiler Collection" uri="https://xw.is/gcc/" display-uri="gcc" type="local">GCC</fr:link> for the <html:em>host</html:em> should be configured just as the the <fr:link href="/gcc/" title="GNU Compiler Collection" uri="https://xw.is/gcc/" display-uri="gcc" type="local">GCC</fr:link> on the <html:em>target</html:em> (in the sysroot). For example, some platforms do not make use of multilib (even though <fr:link href="/gcc/" title="GNU Compiler Collection" uri="https://xw.is/gcc/" display-uri="gcc" type="local">GCC</fr:link> might support it), so <html:mark>in those cases multilib should be <html:em>explicitly</html:em> disabled on the <html:em>build</html:em> machine with <html:code>--disable-multilib</html:code></html:mark>, because otherwise it might default to being enabled leading to build failure.</html:p>
                      </fr:mainmatter>
                    </fr:tree>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>28</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>13</fr:day>
                    </fr:date>
                    <fr:title text="Host machine">Host machine</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>The following runs on the <html:em>host machine</html:em> (the machine where you'll compile and run your cross compiler). It can be the same machine as the <html:em>debootstrap machine</html:em>.</html:p>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2019</fr:year>
                          <fr:month>11</fr:month>
                          <fr:day>28</fr:day>
                        </fr:date>
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>8</fr:month>
                          <fr:day>13</fr:day>
                        </fr:date>
                        <fr:title text="Create directories">Create directories</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:pre>targets="riscv64-linux-gnu s390x-linux-gnu"
for target in ${targets}; do
    mkdir -p $HOME/cross/${target}/sys-root
done</html:pre>
                      </fr:mainmatter>
                    </fr:tree>
                    <html:p>Note that when we created the sysroots we used the Debian architecture names <html:em>(riscv64, s390x)</html:em>, but here we use the <fr:link href="/gcc/" title="GNU Compiler Collection" uri="https://xw.is/gcc/" display-uri="gcc" type="local">GCC</fr:link> <fr:link href="https://gcc.gnu.org/install/configure.html#Host_002c-Build-and-Target-specification" type="external">target triple</fr:link> <html:em>(riscv64-linux-gnu, s390x-linux-gnu)</html:em>.</html:p>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2019</fr:year>
                          <fr:month>11</fr:month>
                          <fr:day>28</fr:day>
                        </fr:date>
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>8</fr:month>
                          <fr:day>13</fr:day>
                        </fr:date>
                        <fr:title text="Copy sysroots">Copy sysroots</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>Copy the sysroots from the <html:em>debootstrap machine</html:em> (here <html:code>debian@194.182.186.188</html:code>) to the <html:em>host machine</html:em>.</html:p>
                        <html:pre>targets="riscv64-linux-gnu s390x-linux-gnu"
for target in ${targets}; do
    arch=$(echo ${target} | cut -d '-' -f 1)
    ssh debian@194.182.186.230 "cat /tmp/sysroot-${arch}.tar.xz" | tar -C ${HOME}/cross/${target}/sys-root -xJf -
done</html:pre>
                      </fr:mainmatter>
                    </fr:tree>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>11</fr:month>
                      <fr:day>28</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>13</fr:day>
                    </fr:date>
                    <fr:title text="Debootstrap machine (again)">Debootstrap machine (again)</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2019</fr:year>
                          <fr:month>11</fr:month>
                          <fr:day>28</fr:day>
                        </fr:date>
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>8</fr:month>
                          <fr:day>13</fr:day>
                        </fr:date>
                        <fr:title text="Cleanup">Cleanup</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>Still as <html:em>root</html:em>:</html:p>
                        <html:pre>rm -rf /tmp/sysroot-*.tar.xz</html:pre>
                      </fr:mainmatter>
                    </fr:tree>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>9</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>7</fr:month>
                  <fr:day>15</fr:day>
                </fr:date>
                <fr:uri>https://xw.is/001E/</fr:uri>
                <fr:display-uri>001E</fr:display-uri>
                <fr:route>/001E/</fr:route>
                <fr:title text="Ubuntu Linux Post Install Steps">Ubuntu Linux Post Install Steps</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>9</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:title text="Introduction">Introduction</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Everything on this page needs to be done as root unless otherwise specified, so <fr:link href="https://www.sudo.ws/docs/man/1.8.15/sudo.man/" type="external">sudo(8)</fr:link> to root.</html:p>
                    <html:pre>sudo -i</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>9</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:title text="Set hostname">Set hostname</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:pre>hostnamectl set-hostname test0.mgk.ro
reboot</html:pre>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2019</fr:year>
                          <fr:month>8</fr:month>
                          <fr:day>9</fr:day>
                        </fr:date>
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>7</fr:month>
                          <fr:day>15</fr:day>
                        </fr:date>
                        <fr:title text="Scaleway">Scaleway</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>If you're on a braindead platform like <fr:link href="https://www.scaleway.com/" type="external">Scaleway</fr:link>, you might also need to disable this:</html:p>
                        <html:pre>systemctl disable scw-set-hostname</html:pre>
                      </fr:mainmatter>
                    </fr:tree>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>9</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:title text="Package management">Package management</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2019</fr:year>
                          <fr:month>8</fr:month>
                          <fr:day>9</fr:day>
                        </fr:date>
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>7</fr:month>
                          <fr:day>15</fr:day>
                        </fr:date>
                        <fr:title text="Do not install recommended and suggested packages">Do not install recommended and suggested packages</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>Seriusly, who wants this? Disable it:</html:p>
                        <html:pre>cat &lt;&lt;EOT &gt;/etc/apt/apt.conf.d/61norecommends
APT::Install-Recommends "false";
APT::Install-Suggests "false";
EOT</html:pre>
                      </fr:mainmatter>
                    </fr:tree>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>9</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:title text="Update the software">Update the software</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:pre>apt update &amp;&amp; apt -y upgrade
reboot</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>9</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:title text="User management">User management</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2019</fr:year>
                          <fr:month>8</fr:month>
                          <fr:day>9</fr:day>
                        </fr:date>
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>7</fr:month>
                          <fr:day>15</fr:day>
                        </fr:date>
                        <fr:title text="Create a user (cloud computing)">Create a user (cloud computing)</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>Create a user with a locked password that can then do passwordless <fr:link href="https://www.sudo.ws/docs/man/1.8.15/sudo.man" type="external">sudo(8)</fr:link>:</html:p>
                        <html:pre>useradd -c 'Aram Hăvărneanu' -G users -m -s /bin/bash -g staff aram
passwd -l aram</html:pre>
                        <html:p>Enable passwordless sudo for the staff group:</html:p>
                        <html:pre><![CDATA[echo '%staff ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/91-staff-no-password]]></html:pre>
                      </fr:mainmatter>
                    </fr:tree>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2019</fr:year>
                          <fr:month>8</fr:month>
                          <fr:day>9</fr:day>
                        </fr:date>
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>7</fr:month>
                          <fr:day>15</fr:day>
                        </fr:date>
                        <fr:title text="Fix the user created during installation (non-cloud)">Fix the user created during installation (non-cloud)</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:pre>usermod -a -G staff aram
passwd -l aram</html:pre>
                        <html:p>Enable passwordless sudo for the staff group:</html:p>
                        <html:pre><![CDATA[echo '%staff ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/91-staff-no-password]]></html:pre>
                      </fr:mainmatter>
                    </fr:tree>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2019</fr:year>
                          <fr:month>8</fr:month>
                          <fr:day>9</fr:day>
                        </fr:date>
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>7</fr:month>
                          <fr:day>15</fr:day>
                        </fr:date>
                        <fr:title text="SSH">SSH</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter><html:p>For <fr:link href="/ssh.1" title="ssh(1)" uri="https://xw.is/ssh.1" display-uri="ssh.1" type="local">ssh(1)</fr:link> access, first use <fr:link href="https://man7.org/linux/man-pages/man1/su.1.html" type="external">su(1)</fr:link> to switch from root to the user:</html:p><html:pre>su - aram</html:pre><html:p>And then populate the <fr:link href="/ssh-keys/" title="OpenSSH › Public SSH Keys" uri="https://xw.is/ssh-keys/" display-uri="ssh-keys" type="local">ssh keys</fr:link>:</html:p>
  <html:pre>
mkdir -p $HOME/.ssh
chmod 700 $HOME/.ssh
cat &lt;&lt;EOF &gt;&gt;$HOME/.ssh/authorized_keys
<![CDATA[ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHRJsbKlE9QWIQnC1YQPHV8C6cIx32Fjju7VQaKI67TPPm+FySrbJPsM6j4zm9IobTCQ0YOtVmlvXYlRtKdHm0I= pkcs11:id=%62%31%39%32%66%32%33%31%32%66%65%36%66%33%64%37;token=ssh;manufacturer=STMicro;serial=0000000000000000%0D%04?module-path=/usr/lib64/pkcs11/libtpm2_pkcs11.so aram@silverleaf.local
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHwq6SeyHhRRtiMmsBABHYgwqaOwwgBZEMgrRfoSpvzz aram@horizon.local
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMRc0UWKrFpCv/EOUo2jpEQt+C/pa0tc1rUWKgjbKTp7 aram@edengate.local
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPsg+utDc9GRb/n91r0j5vFsn+gVYPawpEbaNCuIhYmE aram@z800.mgk.ro]]>
EOF
chmod 644 $HOME/.ssh/authorized_keys
sort -u -o $HOME/.ssh/authorized_keys $HOME/.ssh/authorized_keys</html:pre>
</fr:mainmatter>
                    </fr:tree>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>9</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:title text="Install packages">Install packages</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>For home installations you might want to install avahi:</html:p>
                    <html:pre>apt install avahi-daemon</html:pre>
                    <html:p>For development systems you might want to install:</html:p>
                    <html:pre>apt install -y git build-essential clang clang-format clang-tidy</html:pre>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>3</fr:month>
                  <fr:day>13</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>7</fr:month>
                  <fr:day>15</fr:day>
                </fr:date>
                <fr:uri>https://xw.is/001D/</fr:uri>
                <fr:display-uri>001D</fr:display-uri>
                <fr:route>/001D/</fr:route>
                <fr:title text="Install newer kernels in Debian stable">Install newer kernels in Debian stable</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>3</fr:month>
                      <fr:day>13</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:title text="Prerequisites">Prerequisites</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p><fr:link href="/001C/" title="Linux › Debian Linux Post Install Steps" uri="https://xw.is/001C/" display-uri="001C" type="local">Install Debian</fr:link>. Everything on this page needs to be done as root, so <fr:link href="https://www.sudo.ws/docs/man/1.8.15/sudo.man/" type="external">sudo(8)</fr:link> to root.</html:p>
                    <html:pre>sudo -i</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>3</fr:month>
                      <fr:day>13</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:title text="Enable backports">Enable backports</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:pre>cat &lt;&lt;EOT &gt;&gt;/etc/apt/sources.list

deb http://deb.debian.org/debian/ stretch-backports main contrib non-free
deb-src http://deb.debian.org/debian/ stretch-backports main contrib non-free
EOT</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>3</fr:month>
                      <fr:day>13</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:title text="Upgrade some packages">Upgrade some packages</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>It's unclear why we need this or whether we need it at all:</html:p>
                    <html:pre>sudo apt-get -t stretch-backports upgrade</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>3</fr:month>
                      <fr:day>13</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:title text="Search for a new kernel">Search for a new kernel</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:pre>apt search linux-image</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>3</fr:month>
                      <fr:day>13</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:title text="Install new kernel">Install new kernel</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:pre>apt-get -t stretch-backports install linux-image-4.19.0-0.bpo.2-amd64 linux-headers-4.19.0-0.bpo.2-amd64 firmware-linux-free</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>3</fr:month>
                      <fr:day>13</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:title text="Reboot">Reboot</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:pre>reboot</html:pre>
                    <html:p>After reboot, check for the new kernel:</html:p>
                    <html:pre>aram@debian:~$ uname -a
Linux debian 4.19.0-0.bpo.2-amd64 1 SMP Debian 4.19.16-1~bpo9+1 (2019-02-07) x86_64 GNU/Linux
aram@debian:~$</html:pre>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2018</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>31</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>7</fr:month>
                  <fr:day>15</fr:day>
                </fr:date>
                <fr:uri>https://xw.is/001C/</fr:uri>
                <fr:display-uri>001C</fr:display-uri>
                <fr:route>/001C/</fr:route>
                <fr:title text="Debian Linux Post Install Steps">Debian Linux Post Install Steps</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2018</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>31</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:title text="Introduction">Introduction</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Everything on this page needs to be done as root unless otherwise specified, so <fr:link href="https://www.sudo.ws/docs/man/1.8.15/sudo.man/" type="external">sudo(8)</fr:link> to root.</html:p>
                    <html:pre>sudo -i</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2018</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>31</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:title text="Set hostname">Set hostname</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:pre>hostnamectl set-hostname sky.mgk.ro
reboot</html:pre>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2018</fr:year>
                          <fr:month>8</fr:month>
                          <fr:day>31</fr:day>
                        </fr:date>
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>7</fr:month>
                          <fr:day>15</fr:day>
                        </fr:date>
                        <fr:title text="Scaleway">Scaleway</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>If you're on a braindead platform like <fr:link href="https://www.scaleway.com/" type="external">Scaleway</fr:link>, you might also need to disable this:</html:p>
                        <html:pre>systemctl disable scw-set-hostname</html:pre>
                      </fr:mainmatter>
                    </fr:tree>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2018</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>31</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:title text="Package management">Package management</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2018</fr:year>
                          <fr:month>8</fr:month>
                          <fr:day>31</fr:day>
                        </fr:date>
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>7</fr:month>
                          <fr:day>15</fr:day>
                        </fr:date>
                        <fr:title text="Enable more repositories">Enable more repositories</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>Debian doesn't enable the contrib and non-free repositories by default. Do it:</html:p>
                        <html:pre>
cat &lt;&lt;EOT &gt;/etc/apt/sources.list
deb http://deb.debian.org/debian/ stretch main contrib non-free
deb-src http://deb.debian.org/debian/ stretch main contrib non-free

deb http://security.debian.org/debian-security stretch/updates main contrib non-free
deb-src http://security.debian.org/debian-security stretch/updates main contrib non-free

deb http://deb.debian.org/debian/ stretch-updates main contrib non-free
deb-src http://deb.debian.org/debian/ stretch-updates main contrib non-free
EOT</html:pre>
                      </fr:mainmatter>
                    </fr:tree>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2018</fr:year>
                          <fr:month>8</fr:month>
                          <fr:day>31</fr:day>
                        </fr:date>
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>7</fr:month>
                          <fr:day>15</fr:day>
                        </fr:date>
                        <fr:title text="Do not install recommended and suggested packages">Do not install recommended and suggested packages</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>Seriusly, who wants this? Disable it:</html:p>
                        <html:pre>cat &lt;&lt;EOT &gt;/etc/apt/apt.conf.d/50norecommends
APT::Install-Recommends "false";
APT::Install-Suggests "false";
EOT</html:pre>
                      </fr:mainmatter>
                    </fr:tree>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2018</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>31</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:title text="Update the software">Update the software</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:pre>apt update &amp;&amp; apt -y upgrade
reboot</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2018</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>31</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:title text="User management">User management</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2018</fr:year>
                          <fr:month>8</fr:month>
                          <fr:day>31</fr:day>
                        </fr:date>
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>7</fr:month>
                          <fr:day>15</fr:day>
                        </fr:date>
                        <fr:title text="Create a user (cloud computing)">Create a user (cloud computing)</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>Create a user with a locked password that can then do passwordless <fr:link href="https://www.sudo.ws/docs/man/1.8.15/sudo.man" type="external">sudo(8)</fr:link>:</html:p>
                        <html:pre>useradd -c 'Aram Hăvărneanu' -G users -m -s /bin/bash -g staff aram
passwd -l aram</html:pre>
                        <html:p>Enable passwordless sudo for the staff group:</html:p>
                        <html:pre><![CDATA[echo '%staff ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/91-staff-no-password]]></html:pre>
                      </fr:mainmatter>
                    </fr:tree>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2018</fr:year>
                          <fr:month>8</fr:month>
                          <fr:day>31</fr:day>
                        </fr:date>
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>7</fr:month>
                          <fr:day>15</fr:day>
                        </fr:date>
                        <fr:title text="Fix the user created during installation (non-cloud)">Fix the user created during installation (non-cloud)</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:pre>usermod -a -G staff aram
passwd -l aram</html:pre>
                        <html:p>Enable passwordless sudo for the staff group:</html:p>
                        <html:pre><![CDATA[echo '%staff ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/91-staff-no-password]]></html:pre>
                      </fr:mainmatter>
                    </fr:tree>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2018</fr:year>
                          <fr:month>8</fr:month>
                          <fr:day>31</fr:day>
                        </fr:date>
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>7</fr:month>
                          <fr:day>15</fr:day>
                        </fr:date>
                        <fr:title text="SSH">SSH</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter><html:p>For <fr:link href="/ssh.1" title="ssh(1)" uri="https://xw.is/ssh.1" display-uri="ssh.1" type="local">ssh(1)</fr:link> access, first use <fr:link href="https://man7.org/linux/man-pages/man1/su.1.html" type="external">su(1)</fr:link> to switch from root to the user:</html:p><html:pre>su - aram</html:pre><html:p>And then populate the <fr:link href="/ssh-keys/" title="OpenSSH › Public SSH Keys" uri="https://xw.is/ssh-keys/" display-uri="ssh-keys" type="local">ssh keys</fr:link>:</html:p>
  <html:pre>
mkdir -p $HOME/.ssh
chmod 700 $HOME/.ssh
cat &lt;&lt;EOF &gt;&gt;$HOME/.ssh/authorized_keys
<![CDATA[ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHRJsbKlE9QWIQnC1YQPHV8C6cIx32Fjju7VQaKI67TPPm+FySrbJPsM6j4zm9IobTCQ0YOtVmlvXYlRtKdHm0I= pkcs11:id=%62%31%39%32%66%32%33%31%32%66%65%36%66%33%64%37;token=ssh;manufacturer=STMicro;serial=0000000000000000%0D%04?module-path=/usr/lib64/pkcs11/libtpm2_pkcs11.so aram@silverleaf.local
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHwq6SeyHhRRtiMmsBABHYgwqaOwwgBZEMgrRfoSpvzz aram@horizon.local
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMRc0UWKrFpCv/EOUo2jpEQt+C/pa0tc1rUWKgjbKTp7 aram@edengate.local
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPsg+utDc9GRb/n91r0j5vFsn+gVYPawpEbaNCuIhYmE aram@z800.mgk.ro]]>
EOF
chmod 644 $HOME/.ssh/authorized_keys
sort -u -o $HOME/.ssh/authorized_keys $HOME/.ssh/authorized_keys</html:pre>
</fr:mainmatter>
                    </fr:tree>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2018</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>31</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:title text="Install packages">Install packages</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>For home installations you might want to install avahi:</html:p>
                    <html:pre>apt install avahi-daemon</html:pre>
                    <html:p>For development systems you might want to install:</html:p>
                    <html:pre>apt install rsync git build-essential linux-headers-amd64 gccgo gccgo-go golang-go clang clang-format clang-tidy</html:pre>
                    <html:p>And if you set up <fr:link href="/001D/" title="Linux › Install newer kernels in Debian stable" uri="https://xw.is/001D/" display-uri="001D" type="local">backports</fr:link>:</html:p>
                    <html:pre>apt -t stretch-backports install clang-6.0 golang-go
apt autoremove</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2018</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>31</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:title text="Newer kernel">Newer kernel</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>If it's a testing or development system, perhaps you might want a <fr:link href="/001D/" title="Linux › Install newer kernels in Debian stable" uri="https://xw.is/001D/" display-uri="001D" type="local">newer kernel</fr:link>.</html:p>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2018</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>31</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>7</fr:month>
                  <fr:day>15</fr:day>
                </fr:date>
                <fr:uri>https://xw.is/001B/</fr:uri>
                <fr:display-uri>001B</fr:display-uri>
                <fr:route>/001B/</fr:route>
                <fr:title text="Fedora Linux Post Install Steps">Fedora Linux Post Install Steps</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2018</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>31</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:title text="Introduction">Introduction</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Everything on this page needs to be done as root unless otherwise specified, so <fr:link href="https://www.sudo.ws/docs/man/1.8.15/sudo.man/" type="external">sudo(8)</fr:link> to root.</html:p>
                    <html:pre>sudo -i</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2018</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>31</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:title text="Cloud Init">Cloud Init</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>If your install uses cloud-init (e.g. Amazon EC2) do the following:</html:p>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2018</fr:year>
                          <fr:month>8</fr:month>
                          <fr:day>31</fr:day>
                        </fr:date>
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>7</fr:month>
                          <fr:day>15</fr:day>
                        </fr:date>
                        <fr:title text="Set hostname">Set hostname</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:pre>
echo 'preserve_hostname: yes' &gt;/etc/cloud/cloud.cfg.d/55-preseve-hostname.cfg
echo 'eden.mgk.ro' &gt;/etc/hostname
reboot</html:pre>
                      </fr:mainmatter>
                    </fr:tree>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2018</fr:year>
                          <fr:month>8</fr:month>
                          <fr:day>31</fr:day>
                        </fr:date>
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>7</fr:month>
                          <fr:day>15</fr:day>
                        </fr:date>
                        <fr:title text="Enable IPv6">Enable IPv6</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:pre>
cat &lt;&lt;EOF &gt;/etc/cloud/cloud.cfg.d/56-custom-networking.cfg
network:
  version: 1
  config:
  - type: physical
    name: eth0
    subnets:
      - type: dhcp
      - type: dhcp6
EOF
reboot</html:pre>
                      </fr:mainmatter>
                    </fr:tree>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2018</fr:year>
                          <fr:month>8</fr:month>
                          <fr:day>31</fr:day>
                        </fr:date>
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>7</fr:month>
                          <fr:day>15</fr:day>
                        </fr:date>
                        <fr:title text="Scaleway">Scaleway</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>If you're on a braindead platform like <fr:link href="https://www.scaleway.com/" type="external">Scaleway</fr:link>, you might also need to disable this:</html:p>
                        <html:pre>systemctl disable scw-set-hostname</html:pre>
                      </fr:mainmatter>
                    </fr:tree>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2018</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>31</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:title text="Update the software">Update the software</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:pre>dnf -y upgrade-minimal
reboot</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2018</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>31</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:title text="Create a user">Create a user</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Create a user with a locked password that can then do passwordless <fr:link href="https://www.sudo.ws/docs/man/1.8.15/sudo.man" type="external">sudo(8)</fr:link>:</html:p>
                    <html:pre>useradd -c 'Aram Hăvărneanu' -G wheel,users -m -s /bin/bash -U aram
passwd -l aram</html:pre>
                    <html:p>Enable passwordless sudo for the wheel group:</html:p>
                    <html:pre><![CDATA[echo '%wheel ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/91-wheel-no-password]]></html:pre>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2018</fr:year>
                          <fr:month>8</fr:month>
                          <fr:day>31</fr:day>
                        </fr:date>
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>7</fr:month>
                          <fr:day>15</fr:day>
                        </fr:date>
                        <fr:title text="SSH">SSH</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter><html:p>For <fr:link href="/ssh.1" title="ssh(1)" uri="https://xw.is/ssh.1" display-uri="ssh.1" type="local">ssh(1)</fr:link> access, first use <fr:link href="https://man7.org/linux/man-pages/man1/su.1.html" type="external">su(1)</fr:link> to switch from root to the user:</html:p><html:pre>su - aram</html:pre><html:p>And then populate the <fr:link href="/ssh-keys/" title="OpenSSH › Public SSH Keys" uri="https://xw.is/ssh-keys/" display-uri="ssh-keys" type="local">ssh keys</fr:link>:</html:p>
  <html:pre>
mkdir -p $HOME/.ssh
chmod 700 $HOME/.ssh
cat &lt;&lt;EOF &gt;&gt;$HOME/.ssh/authorized_keys
<![CDATA[ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHRJsbKlE9QWIQnC1YQPHV8C6cIx32Fjju7VQaKI67TPPm+FySrbJPsM6j4zm9IobTCQ0YOtVmlvXYlRtKdHm0I= pkcs11:id=%62%31%39%32%66%32%33%31%32%66%65%36%66%33%64%37;token=ssh;manufacturer=STMicro;serial=0000000000000000%0D%04?module-path=/usr/lib64/pkcs11/libtpm2_pkcs11.so aram@silverleaf.local
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHwq6SeyHhRRtiMmsBABHYgwqaOwwgBZEMgrRfoSpvzz aram@horizon.local
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMRc0UWKrFpCv/EOUo2jpEQt+C/pa0tc1rUWKgjbKTp7 aram@edengate.local
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPsg+utDc9GRb/n91r0j5vFsn+gVYPawpEbaNCuIhYmE aram@z800.mgk.ro]]>
EOF
chmod 644 $HOME/.ssh/authorized_keys
sort -u -o $HOME/.ssh/authorized_keys $HOME/.ssh/authorized_keys</html:pre>
</fr:mainmatter>
                    </fr:tree>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2018</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>31</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:title text="Enable NTP service">Enable NTP service</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>If not already enabled, enable NTP:</html:p>
                    <html:pre>systemctl enable --now ntpd.service</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2018</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>31</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:title text="Install packages">Install packages</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>For home installations you might want to install avahi:</html:p>
                    <html:pre>dnf install nss-mdns avahi
systemctl enable --now avahi-daemon.service</html:pre>
                    <html:p>For development systems you might want to install:</html:p>
                    <html:pre>dnf -y groupinstall 'Development Tools'
dnf -y install rsync clang clang-tools-extra gcc-go golang</html:pre>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>3</fr:month>
                  <fr:day>20</fr:day>
                </fr:date>
                <fr:uri>https://xw.is/0017/</fr:uri>
                <fr:display-uri>0017</fr:display-uri>
                <fr:route>/0017/</fr:route>
                <fr:title text="Use local time for RTC on systemd-based Linux distributions">Use local time for RTC on systemd-based Linux distributions</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>This is not recommended, but if you need to use local time for whatever reason, you can do this:</html:p>
                <html:pre>timedatectl set-local-rtc 1</html:pre>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>2</fr:month>
                  <fr:day>22</fr:day>
                </fr:date>
                <fr:uri>https://xw.is/0018/</fr:uri>
                <fr:display-uri>0018</fr:display-uri>
                <fr:route>/0018/</fr:route>
                <fr:title text="Upgrade Debian Linux to Testing">Upgrade <fr:link href="/debian/" title="Debian" uri="https://xw.is/debian/" display-uri="debian" type="local">Debian Linux</fr:link> to Testing</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>See the <fr:link href="https://wiki.debian.org/DebianTesting" type="external">Debian wiki</fr:link> for more information.</html:p>
                <html:p>Everything on this page must be ran as <html:code>root</html:code>. Switch to <html:code>root</html:code> with <html:code>su -</html:code>.</html:p>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>2</fr:month>
                      <fr:day>22</fr:day>
                    </fr:date>
                    <fr:title text="Upgrade to testing">Upgrade to testing</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Run the following commands</html:p>
                    <html:pre>apt-get update &amp;&amp; apt-get upgrade -y
cat &lt;&lt;EOF &gt;/etc/apt/sources.list
deb https://deb.debian.org/debian testing main contrib non-free
deb https://deb.debian.org/debian-security testing/updates main contrib non-free
EOF
apt-get update
apt-get dist-upgrade -y
apt autoremove -y</html:pre>
                    <html:p>Answer the questions. If you enable extra architectures (see below), you might want to limit the architectures of the main repositories to amd64 (assuming you use that). In this case do this instead:</html:p>
                    <html:pre>apt-get update &amp;&amp; apt-get upgrade -y
cat &lt;&lt;EOF &gt;/etc/apt/sources.list
deb [arch=amd64] https://deb.debian.org/debian testing main contrib non-free
deb [arch=amd64] https://deb.debian.org/debian-security testing/updates main contrib non-free
EOF
apt-get update
apt-get dist-upgrade -y
apt autoremove -y</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>2</fr:month>
                      <fr:day>22</fr:day>
                    </fr:date>
                    <fr:title text="Make apt prefer testing by default">Make <fr:link href="/apt/" title="Advanced Package Tool" uri="https://xw.is/apt/" display-uri="apt" type="local">apt</fr:link> prefer testing by default</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>If you are going to use multiple repos (e.g. debian-ports below), make testing the default like so:</html:p>
                    <html:pre>echo 'APT::Default-Release "testing";' &gt;/etc/apt/apt.conf.d/91prefertesting</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>2</fr:month>
                      <fr:day>22</fr:day>
                    </fr:date>
                    <fr:title text="Add support for new (hardware) ports">Add support for new (hardware) ports</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>If you want to add support for new ports (e.g. RISC-V), do this:</html:p>
                    <html:pre>apt-get install -y debian-ports-archive-keyring
cat &lt;&lt;EOF &gt;&gt;/etc/apt/sources.list
deb https://deb.debian.org/debian-ports unstable main
deb https://deb.debian.org/debian-ports unreleased main
deb https://deb.debian.org/debian-ports experimental main
EOF
apt-get update</html:pre>
                    <html:p>Consider limiting the new ports to a specific architecture. Also consider limiting the main repositories to amd64 (if you use amd64). So do this instead:</html:p>
                    <html:pre>apt-get install -y debian-ports-archive-keyring
cat &lt;&lt;EOF &gt;&gt;/etc/apt/sources.list
deb [arch=riscv64] https://deb.debian.org/debian-ports unstable main
deb [arch=riscv64] https://deb.debian.org/debian-ports unreleased main
deb [arch=riscv64] https://deb.debian.org/debian-ports experimental main
EOF
apt-get update</html:pre>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>2</fr:month>
                  <fr:day>22</fr:day>
                </fr:date>
                <fr:uri>https://xw.is/0019/</fr:uri>
                <fr:display-uri>0019</fr:display-uri>
                <fr:route>/0019/</fr:route>
                <fr:title text="Upgrade Debian Linux to Unstable">Upgrade <fr:link href="/debian/" title="Debian" uri="https://xw.is/debian/" display-uri="debian" type="local">Debian Linux</fr:link> to Unstable</fr:title>
              </fr:frontmatter>
              <fr:mainmatter><html:p>See the <fr:link href="https://wiki.debian.org/DebianUnstable" type="external">Debian wiki</fr:link> for more information.</html:p><html:p>Everything on this page must be ran as <html:code>root</html:code>. Switch to <html:code>root</html:code> with <html:code>su -</html:code>.</html:p><html:p>Before upgrading to Debian Unstable, you must first upgrade to Debian Testing.</html:p>
  
  <fr:tree show-metadata="false" expanded="false"><fr:frontmatter><fr:authors><fr:author><fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link></fr:author></fr:authors><fr:date><fr:year>2019</fr:year><fr:month>2</fr:month><fr:day>22</fr:day></fr:date><fr:uri>https://xw.is/0018/</fr:uri><fr:display-uri>0018</fr:display-uri><fr:route>/0018/</fr:route><fr:title text="Linux › Upgrade Debian Linux to Testing"><fr:link href="/linux-index/" title="Linux" uri="https://xw.is/linux-index/" display-uri="linux-index" type="local">Linux</fr:link> › Upgrade <fr:link href="/debian/" title="Debian" uri="https://xw.is/debian/" display-uri="debian" type="local">Debian Linux</fr:link> to Testing</fr:title></fr:frontmatter><fr:mainmatter><html:p>See the <fr:link href="https://wiki.debian.org/DebianTesting" type="external">Debian wiki</fr:link> for more information.</html:p><html:p>Everything on this page must be ran as <html:code>root</html:code>. Switch to <html:code>root</html:code> with <html:code>su -</html:code>.</html:p><fr:tree show-metadata="false"><fr:frontmatter><fr:authors><fr:author><fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link></fr:author></fr:authors><fr:date><fr:year>2019</fr:year><fr:month>2</fr:month><fr:day>22</fr:day></fr:date><fr:title text="Upgrade to testing">Upgrade to testing</fr:title></fr:frontmatter><fr:mainmatter><html:p>Run the following commands</html:p><html:pre>apt-get update &amp;&amp; apt-get upgrade -y
cat &lt;&lt;EOF &gt;/etc/apt/sources.list
deb https://deb.debian.org/debian testing main contrib non-free
deb https://deb.debian.org/debian-security testing/updates main contrib non-free
EOF
apt-get update
apt-get dist-upgrade -y
apt autoremove -y</html:pre><html:p>Answer the questions. If you enable extra architectures (see below), you might want to limit the architectures of the main repositories to amd64 (assuming you use that). In this case do this instead:</html:p><html:pre>apt-get update &amp;&amp; apt-get upgrade -y
cat &lt;&lt;EOF &gt;/etc/apt/sources.list
deb [arch=amd64] https://deb.debian.org/debian testing main contrib non-free
deb [arch=amd64] https://deb.debian.org/debian-security testing/updates main contrib non-free
EOF
apt-get update
apt-get dist-upgrade -y
apt autoremove -y</html:pre></fr:mainmatter></fr:tree><fr:tree show-metadata="false"><fr:frontmatter><fr:authors><fr:author><fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link></fr:author></fr:authors><fr:date><fr:year>2019</fr:year><fr:month>2</fr:month><fr:day>22</fr:day></fr:date><fr:title text="Make apt prefer testing by default">Make <fr:link href="/apt/" title="Advanced Package Tool" uri="https://xw.is/apt/" display-uri="apt" type="local">apt</fr:link> prefer testing by default</fr:title></fr:frontmatter><fr:mainmatter><html:p>If you are going to use multiple repos (e.g. debian-ports below), make testing the default like so:</html:p><html:pre>echo 'APT::Default-Release "testing";' &gt;/etc/apt/apt.conf.d/91prefertesting</html:pre></fr:mainmatter></fr:tree><fr:tree show-metadata="false"><fr:frontmatter><fr:authors><fr:author><fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link></fr:author></fr:authors><fr:date><fr:year>2019</fr:year><fr:month>2</fr:month><fr:day>22</fr:day></fr:date><fr:title text="Add support for new (hardware) ports">Add support for new (hardware) ports</fr:title></fr:frontmatter><fr:mainmatter><html:p>If you want to add support for new ports (e.g. RISC-V), do this:</html:p><html:pre>apt-get install -y debian-ports-archive-keyring
cat &lt;&lt;EOF &gt;&gt;/etc/apt/sources.list
deb https://deb.debian.org/debian-ports unstable main
deb https://deb.debian.org/debian-ports unreleased main
deb https://deb.debian.org/debian-ports experimental main
EOF
apt-get update</html:pre><html:p>Consider limiting the new ports to a specific architecture. Also consider limiting the main repositories to amd64 (if you use amd64). So do this instead:</html:p><html:pre>apt-get install -y debian-ports-archive-keyring
cat &lt;&lt;EOF &gt;&gt;/etc/apt/sources.list
deb [arch=riscv64] https://deb.debian.org/debian-ports unstable main
deb [arch=riscv64] https://deb.debian.org/debian-ports unreleased main
deb [arch=riscv64] https://deb.debian.org/debian-ports experimental main
EOF
apt-get update</html:pre></fr:mainmatter></fr:tree></fr:mainmatter></fr:tree>
<fr:tree show-metadata="false"><fr:frontmatter><fr:authors><fr:author><fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link></fr:author></fr:authors><fr:date><fr:year>2019</fr:year><fr:month>2</fr:month><fr:day>22</fr:day></fr:date><fr:title text="Upgrade to unstable">Upgrade to unstable</fr:title></fr:frontmatter><fr:mainmatter><html:p>Run the following commands:</html:p><html:pre>cat &lt;&lt;EOF &gt;/etc/apt/sources.list
deb http://deb.debian.org/debian unstable main
deb http://deb.debian.org/debian-debug unstable-debug main
deb http://deb.debian.org/debian-ports unstable main
EOF
apt-get update
apt-get dist-upgrade -y
apt autoremove -y</html:pre><html:p>Then answer the questions. Consider limiting the architecture to amd64 (if that's what you use):</html:p><html:pre>cat &lt;&lt;EOF &gt;/etc/apt/sources.list
deb [arch=amd64] http://deb.debian.org/debian unstable main
deb [arch=amd64] http://deb.debian.org/debian-debug unstable-debug main
deb [arch=amd64] http://deb.debian.org/debian-ports unstable main
EOF
apt-get update
apt-get dist-upgrade -y
apt autoremove -y</html:pre></fr:mainmatter></fr:tree></fr:mainmatter>
            </fr:tree>
          </fr:mainmatter>
        </fr:tree>
        <fr:tree show-metadata="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
              </fr:author>
            </fr:authors>
            <fr:uri>https://xw.is/solaris-index/</fr:uri>
            <fr:display-uri>solaris-index</fr:display-uri>
            <fr:route>/solaris-index/</fr:route>
            <fr:title text="Solaris">Solaris</fr:title>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>Tips and tricks for using <fr:link href="/solaris/" title="Solaris" uri="https://xw.is/solaris/" display-uri="solaris" type="local">Solaris</fr:link>.</html:p>
            <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2018</fr:year>
                  <fr:month>6</fr:month>
                  <fr:day>7</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>7</fr:month>
                  <fr:day>8</fr:day>
                </fr:date>
                <fr:uri>https://xw.is/0008/</fr:uri>
                <fr:display-uri>0008</fr:display-uri>
                <fr:route>/0008/</fr:route>
                <fr:title text="Generate SPARC sysroot on amd64 Solaris 11">Generate SPARC sysroot on amd64 <fr:link href="/solaris11/" title="Oracle Solaris 11" uri="https://xw.is/solaris11/" display-uri="solaris11" type="local">Solaris 11</fr:link></fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>If you need libraries and headers for producing a <fr:link href="/solaris/" title="Solaris" uri="https://xw.is/solaris/" display-uri="solaris" type="local">Solaris</fr:link>/SPARC GCC cross compiler you can obtain them from a regular amd64 <fr:link href="/solaris11/" title="Oracle Solaris 11" uri="https://xw.is/solaris11/" display-uri="solaris11" type="local">Solaris 11</fr:link> installation. The following commands will install libraries suitable for Solaris gcc cross compiler in <html:code>$PKG_IMAGE</html:code>:</html:p>
                <html:pre>TRIPLET=sparc64-sun-solaris2.11
export PKG_IMAGE=/export/$TRIPLET-sysroot
zfs create rpool$PKG_IMAGE
pkg image-create -F -p solaris=http://pkg.oracle.com/solaris/release $PKG_IMAGE
pkg change-variant variant.arch=sparc
pkg install --accept entire@latest solaris-minimal-server system/header gcc</html:pre>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2018</fr:year>
                  <fr:month>6</fr:month>
                  <fr:day>7</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>7</fr:month>
                  <fr:day>8</fr:day>
                </fr:date>
                <fr:uri>https://xw.is/0007/</fr:uri>
                <fr:display-uri>0007</fr:display-uri>
                <fr:route>/0007/</fr:route>
                <fr:title text="Re-add &quot;Primary Administrator&quot; in Solaris 11">Re-add "Primary Administrator" in <fr:link href="/solaris11/" title="Oracle Solaris 11" uri="https://xw.is/solaris11/" display-uri="solaris11" type="local">Solaris 11</fr:link></fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p><fr:link href="/solaris/" title="Solaris" uri="https://xw.is/solaris/" display-uri="solaris" type="local">Solaris</fr:link> used to ship with a <html:code>Primary Administrator</html:code> <fr:link href="/solaris-rbac/" title="Solaris Roles, Rights Profiles, and Privileges" uri="https://xw.is/solaris-rbac/" display-uri="solaris-rbac" type="local">RBAC</fr:link> <fr:link href="https://docs.oracle.com/cd/E23824_01/html/821-1456/rbac-1.html#rbac-33" type="external">profile</fr:link>, but it was removed some time in <fr:link href="/solaris11/" title="Oracle Solaris 11" uri="https://xw.is/solaris11/" display-uri="solaris11" type="local">Solaris 11</fr:link>. We can easily add it back to the <fr:link href="/prof_attr.5" title="prof_attr(5)" uri="https://xw.is/prof_attr.5" display-uri="prof_attr.5" type="local">profile description</fr:link> and to the <fr:link href="/exec_attr.5" title="exec_attr(5)" uri="https://xw.is/exec_attr.5" display-uri="exec_attr.5" type="local">execution profile</fr:link> databases. After this, we can run <fr:link href="/pfexec.1" title="pfexec(1)" uri="https://xw.is/pfexec.1" display-uri="pfexec.1" type="local">pfexec(1)</fr:link> without a password.</html:p>
                <html:p>Run the following as <html:code>root</html:code>:</html:p>
                <html:pre>echo 'Primary Administrator:suser:cmd:::*:uid=0;gid=0' &gt;&gt; /etc/security/exec_attr
echo 'Primary Administrator:::All administrative tasks:auths=solaris.*;solaris.grant;help=RtPriAdmin.html' &gt;&gt; /etc/security/prof_attr
usermod -P "Primary Administrator" aram</html:pre>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>2</fr:month>
                  <fr:day>22</fr:day>
                </fr:date>
                <fr:uri>https://xw.is/0013/</fr:uri>
                <fr:display-uri>0013</fr:display-uri>
                <fr:route>/0013/</fr:route>
                <fr:title text="Boot SPARC server behind NAT over the Internet from Solaris 11 VM also behind NAT">Boot SPARC server behind NAT over the Internet from <fr:link href="/solaris11/" title="Oracle Solaris 11" uri="https://xw.is/solaris11/" display-uri="solaris11" type="local">Solaris 11</fr:link> VM also behind NAT</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>2</fr:month>
                      <fr:day>22</fr:day>
                    </fr:date>
                    <fr:title text="Network topology">Network topology</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>We have two sites, both connected to the Internet, <html:em>Vienna</html:em>, and <html:em>Sibiu</html:em>. We wish to <fr:link href="/sparc-netboot/" title="Booting a SPARC Based System From the Network" uri="https://xw.is/sparc-netboot/" display-uri="sparc-netboot" type="local">network boot</fr:link> the <html:em>SPARC server</html:em> (located in <html:em>Vienna</html:em>), while we're working on the <html:em>laptop</html:em> in <html:em>Sibiu</html:em>. We have access to <fr:link href="/vmware/" title="VMware Fusion and Workstation" uri="https://xw.is/vmware/" display-uri="vmware" type="local">VMware Fusion</fr:link>, and we can install a <fr:link href="/solaris/" title="Solaris" uri="https://xw.is/solaris/" display-uri="solaris" type="local">Solaris</fr:link> network boot server in a virtual machine.</html:p>
                    <fr:resource hash="22ac83c15fb1dfcfce1b27e87ad7e35e">
                      <fr:resource-content>
                        <html:img src="/22ac83c15fb1dfcfce1b27e87ad7e35e.svg" />
                      </fr:resource-content>
                      <fr:resource-source type="latex" part="preamble"><![CDATA[
    \usepackage {tikz}
    \usetikzlibrary {positioning,shapes.symbols,calc,arrows.meta}
    \tikzset {
      device/.style  = {draw, rectangle, rounded corners, minimum width=2.8cm, minimum height=1cm, align=center},
      router/.style  = {device, minimum width=4cm},
      switch/.style  = {device, minimum width=2cm},
      host/.style    = {draw, circle, minimum size=1.6cm, align=center},
      cloudnode/.style = {draw, shape=cloud, cloud puffs=10, aspect=2, minimum width=3.2cm, minimum height=1.2cm, align=center}
    }
  ]]></fr:resource-source>
                      <fr:resource-source type="latex" part="body"><![CDATA[
    \begin {tikzpicture}[>=latex, font=\footnotesize ]

    \node [router] (r1) {Router \#1\\(NAT)};
    \node [switch,  above=1.2cm of r1] (sw1) {Switch};
    \node [host, line width=1pt, left =2.4cm of sw1] (sparc) {SPARC\\server};
    \node [host,             right=2.4cm of sw1] (z800)  {z800};

    \node [cloudnode, below=1.2cm of r1] (internet) {Internet};

    \node [router, below=1.2cm of internet] (r2) {Router \#2\\(NAT)};
    \node [switch, below=1.2cm of r2]   (sw2) {Switch};
    \node [router, right=2cm of sw2]  (r3) {Router \#3\\(VMware)};
    \node [host,             left =2.4cm of sw2]  (laptop) {Laptop};
    \node [host, line width=1pt, below=1.2cm of r3]   (solaris) {Solaris\\VM};

    \draw [thick] (sparc.west |- internet) -- ($(internet.west)+(-0.6cm,0)$);
    \draw [thick] ($(internet.east)+(0.6cm,0)$) -- ([xshift=0.5cm]z800.east |- internet);

    \node [anchor=south west,yshift=2pt] at (sparc.west |- internet) {Site \#1 (Vienna)};
    \node [anchor=north west,yshift=-2pt] at (sparc.west |- internet) {Site \#2 (Sibiu)};

    \draw  (sparc.east) --  node[pos=.37,above]  {192.168.0.60}  (sw1.west);
    \draw  (sw1.east)   --  node[pos=.60,above]  {192.168.0.100} (z800.west);
    \draw  (sw1.south)  --  node[pos=.85,left]  {192.160.0.1/24}(r1.north);
    \draw  (r1.south)   --  node[pos=.15,left]   {84.112.126.72} (internet.north);

    \draw  (internet.south) -- node[pos=.85,left]  {xx.xx.xx.xx} (r2.north);
    \draw  (r2.south)       -- node[pos=.20,left]  {172.20/20}   (sw2.north);

    \draw  (sw2.east)  --  node[pos=.58,above] {172.20.8.xx} (r3.west);
    \draw  (sw2.west)  --  node[pos=.65,above] {172.20.8.yy} (laptop.east);

    \draw  (r3.south) --  node[pos=.20,right] {172.16.24/24}
                      node[pos=.85,right]  {172.16.24.128} (solaris.north);

    \end {tikzpicture}
  ]]></fr:resource-source>
                    </fr:resource>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>2</fr:month>
                      <fr:day>22</fr:day>
                    </fr:date>
                    <fr:title text="Strategy">Strategy</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>The idea is that we have access through <fr:link href="/openssh/" title="OpenSSH" uri="https://xw.is/openssh/" display-uri="openssh" type="local">ssh</fr:link> to a machine in the same LAN as the server (<html:code>z800</html:code> in the diagram above). We want to make the SPARC server think it's booting from this machine while we're in fact using ssh <fr:link href="https://www.openssh.com/features.html" type="external">port forwarding</fr:link> to forward the inbound connection to that machine <html:em>to our VM</html:em>.</html:p>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>2</fr:month>
                      <fr:day>22</fr:day>
                    </fr:date>
                    <fr:title text="Instructions">Instructions</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Install <fr:link href="/solaris11/" title="Oracle Solaris 11" uri="https://xw.is/solaris11/" display-uri="solaris11" type="local">Solaris 11</fr:link> (amd64) in VMware, on laptop. Then set-up a SPARC <fr:link href="/solaris-ai/" title="Setting Up a Solaris 11 Install Server" uri="https://xw.is/solaris-ai/" display-uri="solaris-ai" type="local">Automated Installer (AI) server</fr:link>:</html:p>
                    <html:pre>vm# pfexec installadm create-service -a sparc</html:pre>
                    <html:p>Make a client-specific AI config:</html:p>
                    <html:pre>cp /etc/netboot/{system,webboot}.conf /etc/netboot/cl.ie.nt.ip</html:pre>
                    <html:p>Edit <html:code>/etc/netboot/client-ip/webboot.conf</html:code> to reference client (e.g. behind NAT) IPs. Set-up remote port forwarding:</html:p>
                    <html:pre>laptop$ ssh -S none -NT -R 5555:172.16.24.128:5555 -L 8080:192.168.0.1:80 vienna.mgk.ro</html:pre>
                    <html:p>Set-up the SPARC machine to netboot using static IP:</html:p>
                    <html:pre>ok setenv network-boot-arguments host-ip=192.168.0.60,router-ip=192.168.0.1,subnet-mask=255.255.255.0,file=http://192.168.0.100:5555/cgi-bin/wanboot-cgi
ok boot net</html:pre>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>2</fr:month>
                  <fr:day>22</fr:day>
                </fr:date>
                <fr:uri>https://xw.is/0010/</fr:uri>
                <fr:display-uri>0010</fr:display-uri>
                <fr:route>/0010/</fr:route>
                <fr:title text="Solaris 11 zones virtual networking with NAT"><fr:link href="/solaris11/" title="Oracle Solaris 11" uri="https://xw.is/solaris11/" display-uri="solaris11" type="local">Solaris 11</fr:link> zones virtual networking with NAT</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>2</fr:month>
                      <fr:day>22</fr:day>
                    </fr:date>
                    <fr:title text="Prepare the Solaris global zone">Prepare the <fr:link href="/solaris/" title="Solaris" uri="https://xw.is/solaris/" display-uri="solaris" type="local">Solaris</fr:link> global zone</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Prepare the global zone; <html:code>net2</html:code> is the interface connected to the Internet.</html:p>
                    <html:pre>dladm create-etherstub ether0
dladm create-vnic -l ether0 vnic0
ipadm create-ip vnic0
ipadm create-addr -T static -a 10.0.0.1/8 vnic0/v4
routeadm -u -e ipv4-forwarding
ipadm set-ifprop -p forwarding=on -m ipv4 net2
ipadm set-ifprop -p forwarding=on -m ipv4 vnic0
echo "map net2 10.0.0.0/8 -&gt; 0/32 portmap tcp/udp auto" &gt; /etc/ipf/ipnat.conf
echo "map net2 10.0.0.0/8 -&gt; 0/32" &gt;&gt; /etc/ipf/ipnat.conf
svcadm enable network/ipfilter </html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>2</fr:month>
                      <fr:day>22</fr:day>
                    </fr:date>
                    <fr:title text="Prepare the non-global zones">Prepare the non-global zones</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Prepare the zone; <html:code>for-sysroot</html:code> is the zone name.</html:p>
                    <html:pre>dladm create-vnic -l ether0 vnic1
zonecfg -z for-sysroot "create; set ip-type=exclusive; add net; set physical=vnic1; end; commit"
zoneadm -z for-sysroot install
zoneadm -z for-sysroot boot
zlogin -C for-sysroot</html:pre>
                    <html:p>In <fr:link href="/sysconfig.1M" title="sysconfig(1M)" uri="https://xw.is/sysconfig.1M" display-uri="sysconfig.1M" type="local">sysconfig(1M)</fr:link> set up <html:code>vnic1/v4 10.0.0.2/8</html:code> with <html:code>10.0.0.1</html:code> as default router.</html:p>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2019</fr:year>
                      <fr:month>2</fr:month>
                      <fr:day>22</fr:day>
                    </fr:date>
                    <fr:title text="Revert (optional)">Revert (optional)</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>If you want to revert the previous steps, do the following.</html:p>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2019</fr:year>
                          <fr:month>2</fr:month>
                          <fr:day>22</fr:day>
                        </fr:date>
                        <fr:title text="Delete the non-global zone">Delete the non-global zone</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>Delete the zone.</html:p>
                        <html:pre>zoneadm -z for-sysroot shutdown
zoneadm -z for-sysroot uninstall -F
zonecfg -z for-sysroot delete -F
dladm delete-vnic vnic</html:pre>
                      </fr:mainmatter>
                    </fr:tree>
                    <fr:tree show-metadata="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2019</fr:year>
                          <fr:month>2</fr:month>
                          <fr:day>22</fr:day>
                        </fr:date>
                        <fr:title text="Restore the global zone">Restore the global zone</fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p>Restore the global zone to its original state.</html:p>
                        <html:pre>routeadm -u -d ipv4-forwarding
ipadm delete-addr vnic0/v4
ipadm delete-ip vnic0
dladm delete-vnic vnic0
dladm delete-etherstub ether0
ipadm set-ifprop -p forwarding=off -m ipv4 net2
svcadm disable network/ipfilter
rm /etc/ipf/ipnat.conf</html:pre>
                      </fr:mainmatter>
                    </fr:tree>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2018</fr:year>
                  <fr:month>6</fr:month>
                  <fr:day>7</fr:day>
                </fr:date>
                <fr:uri>https://xw.is/0011/</fr:uri>
                <fr:display-uri>0011</fr:display-uri>
                <fr:route>/0011/</fr:route>
                <fr:title text="Build GDB and gdbserver(1) for Solaris 11 SPARC">Build <fr:link href="/gdb/" title="GNU Project Debugger" uri="https://xw.is/gdb/" display-uri="gdb" type="local">GDB</fr:link> and <fr:link href="/gdbserver.1" title="gdbserver(1)" uri="https://xw.is/gdbserver.1" display-uri="gdbserver.1" type="local">gdbserver(1)</fr:link> for <fr:link href="/solaris11/" title="Oracle Solaris 11" uri="https://xw.is/solaris11/" display-uri="solaris11" type="local">Solaris 11</fr:link> SPARC</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2018</fr:year>
                      <fr:month>6</fr:month>
                      <fr:day>7</fr:day>
                    </fr:date>
                    <fr:title text="Build GDB on development machine">Build <fr:link href="/gdb/" title="GNU Project Debugger" uri="https://xw.is/gdb/" display-uri="gdb" type="local">GDB</fr:link> on development machine</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>On development (e.g. amd64) machine:</html:p>
                    <html:pre>cd $HOME
curl http://ftp.gnu.org/gnu/gdb/gdb-7.11.1.tar.gz | tar xf -

mkdir -p $HOME/gdb-build
cd $HOME/gdb-build

../gdb-7.11.1/configure --prefix $HOME/xgcc --bindir $HOME/bin --target sparc64-sun-solaris2.11
make -j5 &amp;&amp; make inst</html:pre>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2018</fr:year>
                      <fr:month>6</fr:month>
                      <fr:day>7</fr:day>
                    </fr:date>
                    <fr:title text="Build GDB and gdbserver(1) on target machine">Build <fr:link href="/gdb/" title="GNU Project Debugger" uri="https://xw.is/gdb/" display-uri="gdb" type="local">GDB</fr:link> and <fr:link href="/gdbserver.1" title="gdbserver(1)" uri="https://xw.is/gdbserver.1" display-uri="gdbserver.1" type="local">gdbserver(1)</fr:link> on target machine</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>On target (e.g. <fr:link href="/solaris/" title="Solaris" uri="https://xw.is/solaris/" display-uri="solaris" type="local">Solaris</fr:link>/SPARC) machine:</html:p>
                    <html:pre>cd $HOME/src
curl http://ftp.gnu.org/gnu/gdb/gdb-7.11.1.tar.gz | gtar xzf -

zfs create -p rpool/export/home/aram/builds/gdb
zfs create -p rpool/export/home/aram/builds/gdbserver

cd $HOME/builds/gdb
CFLAGS='-m64' ../../src/gdb-7.11.1/configure --disable-tui --host sparc64-sun-solaris2.11 --build sparc64-sun-solaris2.11 --target sparc64-sun-solaris2.11 --prefix $HOME/tools --bindir $HOME/bin
make -j80 &amp;&amp; make install

cd $HOME/builds/gdbserver
../../src/gdb-7.11.1/gdb/gdbserver/configure --host sparc64-sun-solaris2.11 --build sparc64-sun-solaris2.11 --target sparc64-sun-solaris2.11 --prefix $HOME/tools --bindir $HOME/bin
make -j80 &amp;&amp; make install</html:pre>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2018</fr:year>
                  <fr:month>6</fr:month>
                  <fr:day>7</fr:day>
                </fr:date>
                <fr:uri>https://xw.is/0009/</fr:uri>
                <fr:display-uri>0009</fr:display-uri>
                <fr:route>/0009/</fr:route>
                <fr:title text="Create a new administrative user in Solaris">Create a new administrative user in <fr:link href="/solaris/" title="Solaris" uri="https://xw.is/solaris/" display-uri="solaris" type="local">Solaris</fr:link></fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2018</fr:year>
                      <fr:month>6</fr:month>
                      <fr:day>7</fr:day>
                    </fr:date>
                    <fr:title text="Ensure &quot;Primary Administrator&quot; profile exist">Ensure "Primary Administrator" profile exist</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Make sure <html:code>Primary Administrator</html:code> profile exists and the current user is assigned to it.</html:p>
                    <fr:tree show-metadata="false" expanded="false">
                      <fr:frontmatter>
                        <fr:authors>
                          <fr:author>
                            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                          </fr:author>
                        </fr:authors>
                        <fr:date>
                          <fr:year>2018</fr:year>
                          <fr:month>6</fr:month>
                          <fr:day>7</fr:day>
                        </fr:date>
                        <fr:date>
                          <fr:year>2025</fr:year>
                          <fr:month>7</fr:month>
                          <fr:day>8</fr:day>
                        </fr:date>
                        <fr:uri>https://xw.is/0007/</fr:uri>
                        <fr:display-uri>0007</fr:display-uri>
                        <fr:route>/0007/</fr:route>
                        <fr:title text="Solaris › Re-add &quot;Primary Administrator&quot; in Solaris 11"><fr:link href="/solaris-index/" title="Solaris" uri="https://xw.is/solaris-index/" display-uri="solaris-index" type="local">Solaris</fr:link> › Re-add "Primary Administrator" in <fr:link href="/solaris11/" title="Oracle Solaris 11" uri="https://xw.is/solaris11/" display-uri="solaris11" type="local">Solaris 11</fr:link></fr:title>
                      </fr:frontmatter>
                      <fr:mainmatter>
                        <html:p><fr:link href="/solaris/" title="Solaris" uri="https://xw.is/solaris/" display-uri="solaris" type="local">Solaris</fr:link> used to ship with a <html:code>Primary Administrator</html:code> <fr:link href="/solaris-rbac/" title="Solaris Roles, Rights Profiles, and Privileges" uri="https://xw.is/solaris-rbac/" display-uri="solaris-rbac" type="local">RBAC</fr:link> <fr:link href="https://docs.oracle.com/cd/E23824_01/html/821-1456/rbac-1.html#rbac-33" type="external">profile</fr:link>, but it was removed some time in <fr:link href="/solaris11/" title="Oracle Solaris 11" uri="https://xw.is/solaris11/" display-uri="solaris11" type="local">Solaris 11</fr:link>. We can easily add it back to the <fr:link href="/prof_attr.5" title="prof_attr(5)" uri="https://xw.is/prof_attr.5" display-uri="prof_attr.5" type="local">profile description</fr:link> and to the <fr:link href="/exec_attr.5" title="exec_attr(5)" uri="https://xw.is/exec_attr.5" display-uri="exec_attr.5" type="local">execution profile</fr:link> databases. After this, we can run <fr:link href="/pfexec.1" title="pfexec(1)" uri="https://xw.is/pfexec.1" display-uri="pfexec.1" type="local">pfexec(1)</fr:link> without a password.</html:p>
                        <html:p>Run the following as <html:code>root</html:code>:</html:p>
                        <html:pre>echo 'Primary Administrator:suser:cmd:::*:uid=0;gid=0' &gt;&gt; /etc/security/exec_attr
echo 'Primary Administrator:::All administrative tasks:auths=solaris.*;solaris.grant;help=RtPriAdmin.html' &gt;&gt; /etc/security/prof_attr
usermod -P "Primary Administrator" aram</html:pre>
                      </fr:mainmatter>
                    </fr:tree>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2018</fr:year>
                      <fr:month>6</fr:month>
                      <fr:day>7</fr:day>
                    </fr:date>
                    <fr:title text="Create the new user">Create the new user</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:pre>pfexec useradd -u 5008 -g staff -s /bin/bash -m -P 'Primary Administrator' -K 'defaultpriv=basic,dtrace_proc,dtrace_user' foo
pfexec passwd -N foo</html:pre>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
          </fr:mainmatter>
        </fr:tree>
        <fr:tree show-metadata="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
              </fr:author>
            </fr:authors>
            <fr:uri>https://xw.is/macos-index/</fr:uri>
            <fr:display-uri>macos-index</fr:display-uri>
            <fr:route>/macos-index/</fr:route>
            <fr:title text="macOS">macOS</fr:title>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>Tips and tricks for using macOS.</html:p>
            <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
              <fr:frontmatter>
                <fr:authors />
                <fr:uri>https://xw.is/macos-installer/</fr:uri>
                <fr:display-uri>macos-installer</fr:display-uri>
                <fr:route>/macos-installer/</fr:route>
                <fr:title text="Create a bootable installer for macOS">Create a bootable installer for macOS</fr:title>
                <fr:taxon>Documentation</fr:taxon>
                <fr:meta name="external">https://support.apple.com/en-us/101578</fr:meta>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>You can use a USB flash drive or other secondary volume as a startup disk from which to install the Mac operating system. These steps are primarily for system administrators and other experienced users.</html:p>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2022</fr:year>
                  <fr:month>7</fr:month>
                  <fr:day>28</fr:day>
                </fr:date>
                <fr:uri>https://xw.is/0004/</fr:uri>
                <fr:display-uri>0004</fr:display-uri>
                <fr:route>/0004/</fr:route>
                <fr:title text="Use the Apple Keychain for ssh key passphrases">Use the Apple Keychain for ssh key passphrases</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>On <fr:link href="/apple-tn2449/" title="OpenSSH updates in macOS 10.12.2" uri="https://xw.is/apple-tn2449/" display-uri="apple-tn2449" type="local">modern macOS systems</fr:link>, you can set up your system such that your encrypted <fr:link href="/openssh/" title="OpenSSH" uri="https://xw.is/openssh/" display-uri="openssh" type="local">ssh</fr:link> keys get automatically decrypted using the passphrase stored in the Apple Keychain (which gets unlocked at login).</html:p>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2022</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>28</fr:day>
                    </fr:date>
                    <fr:title text="Add your passphrase to the Keychain">Add your passphrase to the Keychain</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Create your keys as usual, then do this once for every key:</html:p>
                    <html:pre>ssh-add --apple-use-keychain ~/.ssh/id_ed25519</html:pre>
                    <html:p>
                      <html:mark>You must use the full path your key, a relative path will not work!</html:mark>
                    </html:p>
                    <html:p>Note that we're <fr:link href="/ssh-add.1" title="ssh-add(1)" uri="https://xw.is/ssh-add.1" display-uri="ssh-add.1" type="local">adding</fr:link> the key to the <fr:link href="/ssh-agent.1" title="ssh-agent(1)" uri="https://xw.is/ssh-agent.1" display-uri="ssh-agent.1" type="local">ssh agent</fr:link> here, but we will not be using the ssh agent. Rather, this operation has the side effect that the key will be saved in the keychain.</html:p>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2022</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>28</fr:day>
                    </fr:date>
                    <fr:title text="Configure ssh to use the Keychain">Configure <fr:link href="/openssh/" title="OpenSSH" uri="https://xw.is/openssh/" display-uri="openssh" type="local">ssh</fr:link> to use the Keychain</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Add this to your <html:code>~/.ssh/config</html:code>:</html:p>
                    <html:pre>Host *
   IgnoreUnknown UseKeychain
   UseKeychain yes</html:pre>
                    <html:p><html:code>IgnoreUnknown</html:code> is there so that <html:code>UseKeychain</html:code> (an Apple-specific extension) will work with non-Apple ssh implementations. Contrary to Internet misinformation you do not need to use <fr:link href="/ssh-agent.1" title="ssh-agent(1)" uri="https://xw.is/ssh-agent.1" display-uri="ssh-agent.1" type="local">ssh-agent(1)</fr:link>, or enable any special Apple-specific options for the <fr:link href="/ssh-agent.1" title="ssh-agent(1)" uri="https://xw.is/ssh-agent.1" display-uri="ssh-agent.1" type="local">ssh agent</fr:link>. Of course you can do this per-host, or per-key, but then <html:code>IgnoreUnknown</html:code> should come early in your configuration, before any use of <html:code>UseKeychain</html:code>.</html:p>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2020</fr:year>
                  <fr:month>7</fr:month>
                  <fr:day>29</fr:day>
                </fr:date>
                <fr:uri>https://xw.is/0005/</fr:uri>
                <fr:display-uri>0005</fr:display-uri>
                <fr:route>/0005/</fr:route>
                <fr:title text="HiDPI XQuartz">HiDPI XQuartz</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>XQuartz doesn't support HiDPI in any reasonable way, but you can sort of make it work on a temporary basis using the following technique.</html:p>
                <html:p>Assuming you want to run a remote X application, and you want that application to use HiDPI:</html:p>
                <html:ol><html:li>Install XQuartz, for example <html:code>brew install xquartz</html:code>.</html:li>
  <html:li>Enable full screen mode in XQuartz. <html:mark>It doesn't work in non-root window mode</html:mark>.</html:li>
  <html:li>Connect to remote server using remote X forwarding, like <html:code>ssh -Snone -X z800.local</html:code>. <html:mark>Disabling multiplexing is important because it doesn't work well with X forwarding</html:mark>.</html:li>
  <html:li>Run <html:code>xterm</html:code>, we need an X (non-native) terminal for later.</html:li>
  <html:li>In a native terminal (Terminal.app) run <html:code>xrandr --output default --mode 5120x2880 --dpi 218</html:code>. Unfortunately we can't make this permanent. After this, you will be in high resolution full screen X, with a very tiny xterm.</html:li>
  <html:li>Run whatever application from that xterm. You might need to force HiDPI mode for that application, but it should have all the pixels available.</html:li>
  <html:li>To get out of X, press ⌥ ⌘ A. Unfortunately this will turn off the X resolution hack set above.</html:li>
  <html:li>To get back into X at the correct resolution, run <html:code>xrandr --output default --mode 5120x2880 --dpi 218</html:code> again in the native terminal.</html:li></html:ol>
                <html:p>It's awful, but it works.</html:p>
              </fr:mainmatter>
            </fr:tree>
          </fr:mainmatter>
        </fr:tree>
      </fr:mainmatter>
    </fr:tree>
    <fr:tree show-metadata="false">
      <fr:frontmatter>
        <fr:authors>
          <fr:author>
            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
          </fr:author>
        </fr:authors>
        <fr:uri>https://xw.is/git-index/</fr:uri>
        <fr:display-uri>git-index</fr:display-uri>
        <fr:route>/git-index/</fr:route>
        <fr:title text="Git">Git</fr:title>
      </fr:frontmatter>
      <fr:mainmatter>
        <html:p>Tips and tricks for using <fr:link href="/git/" title="Git distributed version control system" uri="https://xw.is/git/" display-uri="git" type="local">Git</fr:link>.</html:p>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
              </fr:author>
            </fr:authors>
            <fr:date>
              <fr:year>2025</fr:year>
              <fr:month>4</fr:month>
              <fr:day>1</fr:day>
            </fr:date>
            <fr:uri>https://xw.is/0003/</fr:uri>
            <fr:display-uri>0003</fr:display-uri>
            <fr:route>/0003/</fr:route>
            <fr:title text="Sign Git commits with SSH keys">Sign Git commits with SSH keys</fr:title>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p><fr:link href="/git/" title="Git distributed version control system" uri="https://xw.is/git/" display-uri="git" type="local">Git</fr:link> can use <fr:link href="/ssh-keygen.1" title="ssh-keygen(1)" uri="https://xw.is/ssh-keygen.1" display-uri="ssh-keygen.1" type="local">ssh-keygen(1)</fr:link> to sign commits and tags. The problem is that if you want to avoid entering passphrases it requires a running <fr:link href="/ssh-agent.1" title="ssh-agent(1)" uri="https://xw.is/ssh-agent.1" display-uri="ssh-agent.1" type="local">ssh-agent(1)</fr:link>. This is the case even if you configured <fr:link href="/openssh/" title="OpenSSH" uri="https://xw.is/openssh/" display-uri="openssh" type="local">ssh</fr:link> to <fr:link href="/0004/" title="macOS › Use the Apple Keychain for ssh key passphrases" uri="https://xw.is/0004/" display-uri="0004" type="local">automatically decrypt keys using the iCloud Keychain</fr:link>, as <fr:link href="/ssh-keygen.1" title="ssh-keygen(1)" uri="https://xw.is/ssh-keygen.1" display-uri="ssh-keygen.1" type="local">ssh-keygen(1)</fr:link> will not read <html:code>~/.ssh/config</html:code>.</html:p>
            <html:p>We're going to make <fr:link href="/git.1" title="git(1)" uri="https://xw.is/git.1" display-uri="git.1" type="local">git(1)</fr:link> run a helper script that temporarily loads the required key into the <fr:link href="/ssh-agent.1" title="ssh-agent(1)" uri="https://xw.is/ssh-agent.1" display-uri="ssh-agent.1" type="local">ssh agent</fr:link>, setting a short timeout.</html:p>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>4</fr:month>
                  <fr:day>1</fr:day>
                </fr:date>
                <fr:title text="Create helper script">Create helper script</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>Create this executable file and put it in your <html:code>PATH</html:code>, I'm using <html:code>~/bin/git-config-helper-gpg.ssh.defaultKeyCommand</html:code>.</html:p>
                <html:pre>#/bin/bash

ssh-add -q -t 5 --apple-load-keychain ~/.ssh/id_ed25519
KEY=$(ssh-add -L | head -n 1)
echo key::$KEY</html:pre>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>4</fr:month>
                  <fr:day>1</fr:day>
                </fr:date>
                <fr:title text="Configure Git to use SSH for signing">Configure Git to use SSH for signing</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:pre>git config --global gpg.format ssh
git config --global gpg.ssh.defaultKeyCommand ~/bin/git-config-helper-gpg.ssh.defaultKeyComma</html:pre>
                <html:p>This configures <fr:link href="/git.1" title="git(1)" uri="https://xw.is/git.1" display-uri="git.1" type="local">git(1)</fr:link> to use SSH signing (as opposed to GPG) and instructs it to run our helper script when it needs to sign.</html:p>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>4</fr:month>
                  <fr:day>1</fr:day>
                </fr:date>
                <fr:title text="Configure Git to verify signatures">Configure Git to verify signatures</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>Record a list of known email-signature pairs in <html:code>.ssh/allowed_signers</html:code> (file name and location is arbitrary):</html:p>
                <html:pre>aram@mgk.ro ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMRc0UWKrFpCv/EOUo2jpEQt+C/pa0tc1rUWKgjbKTp7 aram@edengate.local</html:pre>
                <html:p>Then configure <fr:link href="/git.1" title="git(1)" uri="https://xw.is/git.1" display-uri="git.1" type="local">git(1)</fr:link> to use this file for verification:</html:p>
                <html:pre>git config --global gpg.ssh.allowedSignersFile ~/.ssh/allowed_signers</html:pre>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>4</fr:month>
                  <fr:day>1</fr:day>
                </fr:date>
                <fr:title text="Sign every commit">Sign every commit</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>Optionally, you might want to automatically sign every commit and tag:</html:p>
                <html:pre>git config --global commit.gpgsign true
git config --global tag.gpgsign true</html:pre>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>4</fr:month>
                  <fr:day>1</fr:day>
                </fr:date>
                <fr:title text="How to use">How to use</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>Sign your commits using <html:code>git commit -S</html:code> (or enable autosigning). To check signatures use <html:code>git log --show-signature</html:code>.</html:p>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>4</fr:month>
                  <fr:day>1</fr:day>
                </fr:date>
                <fr:title text="GitHub">GitHub</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>GitHub <fr:link href="https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification" type="external">needs to be aware of signing keys</fr:link>. <html:mark>The SSH key <fr:link href="https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account" type="external">has to be specifically marked as a signing key</fr:link> in order for GitHub to show "verified" status.</html:mark></html:p>
              </fr:mainmatter>
            </fr:tree>
          </fr:mainmatter>
        </fr:tree>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
              </fr:author>
            </fr:authors>
            <fr:date>
              <fr:year>2021</fr:year>
              <fr:month>9</fr:month>
              <fr:day>20</fr:day>
            </fr:date>
            <fr:uri>https://xw.is/0001/</fr:uri>
            <fr:display-uri>0001</fr:display-uri>
            <fr:route>/0001/</fr:route>
            <fr:title text="Clone remote git repository using local cache">Clone remote git repository using local cache</fr:title>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>Let's say you want a new <fr:link href="/git-clone.1" title="git-clone(1)" uri="https://xw.is/git-clone.1" display-uri="git-clone.1" type="local">clone</fr:link> of a <fr:link href="/git/" title="Git distributed version control system" uri="https://xw.is/git/" display-uri="git" type="local">Git distributed version control system</fr:link> repository, for example <html:code>https://go.googlesource.com/go</html:code>, but you already have it cloned elsewhere, say <html:code>$HOME/go</html:code> and you don't want to download all the objects from the internet, yet you don't want to clone the local repository either — you want the new clone to be connected to the remote repository.</html:p>
            <html:p>You can do this:</html:p>
            <html:pre>git clone --reference-if-able $HOME/go --dissociate https://go.googlesource.com/go go.test</html:pre>
            <html:p>This will work even if <html:code>$HOME/go</html:code> doesn't exist.</html:p>
          </fr:mainmatter>
        </fr:tree>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
              </fr:author>
            </fr:authors>
            <fr:date>
              <fr:year>2021</fr:year>
              <fr:month>9</fr:month>
              <fr:day>20</fr:day>
            </fr:date>
            <fr:uri>https://xw.is/0002/</fr:uri>
            <fr:display-uri>0002</fr:display-uri>
            <fr:route>/0002/</fr:route>
            <fr:title text="Clone specific git branch only">Clone specific git branch only</fr:title>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p><fr:link href="/git-clone.1" title="git-clone(1)" uri="https://xw.is/git-clone.1" display-uri="git-clone.1" type="local">Git clone</fr:link> supports <html:code>--single-branch</html:code> option to limit cloning to a single branch</html:p>
            <html:pre>git clone --single-branch -b release-branch.go1.17 https://go.googlesource.com/go go.test</html:pre>
            <html:p>This can be combined with <html:code>--no-tags</html:code>:</html:p>
            <html:pre>git clone --single-branch -b release-branch.go1.17 --no-tags https://go.googlesource.com/go go.test</html:pre>
          </fr:mainmatter>
        </fr:tree>
      </fr:mainmatter>
    </fr:tree>
    <fr:tree show-metadata="false">
      <fr:frontmatter>
        <fr:authors>
          <fr:author>
            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
          </fr:author>
        </fr:authors>
        <fr:uri>https://xw.is/ssh-index/</fr:uri>
        <fr:display-uri>ssh-index</fr:display-uri>
        <fr:route>/ssh-index/</fr:route>
        <fr:title text="OpenSSH">OpenSSH</fr:title>
      </fr:frontmatter>
      <fr:mainmatter>
        <html:p>Tips and tricks for using <fr:link href="/openssh/" title="OpenSSH" uri="https://xw.is/openssh/" display-uri="openssh" type="local">OpenSSH</fr:link>.</html:p>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
              </fr:author>
            </fr:authors>
            <fr:date>
              <fr:year>2025</fr:year>
              <fr:month>7</fr:month>
              <fr:day>15</fr:day>
            </fr:date>
            <fr:uri>https://xw.is/ssh-keys/</fr:uri>
            <fr:display-uri>ssh-keys</fr:display-uri>
            <fr:route>/ssh-keys/</fr:route>
            <fr:title text="Public SSH Keys">Public SSH Keys</fr:title>
          </fr:frontmatter>
          <fr:mainmatter>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>7</fr:month>
                  <fr:day>15</fr:day>
                </fr:date>
                <fr:title text="SSH Keys">SSH Keys</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:title text="Authentication">Authentication</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter><html:p>These are the public SSH keys that I use for authentication:</html:p>
  <html:pre><![CDATA[ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHRJsbKlE9QWIQnC1YQPHV8C6cIx32Fjju7VQaKI67TPPm+FySrbJPsM6j4zm9IobTCQ0YOtVmlvXYlRtKdHm0I= pkcs11:id=%62%31%39%32%66%32%33%31%32%66%65%36%66%33%64%37;token=ssh;manufacturer=STMicro;serial=0000000000000000%0D%04?module-path=/usr/lib64/pkcs11/libtpm2_pkcs11.so aram@silverleaf.local
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHwq6SeyHhRRtiMmsBABHYgwqaOwwgBZEMgrRfoSpvzz aram@horizon.local
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMRc0UWKrFpCv/EOUo2jpEQt+C/pa0tc1rUWKgjbKTp7 aram@edengate.local
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPsg+utDc9GRb/n91r0j5vFsn+gVYPawpEbaNCuIhYmE aram@z800.mgk.ro]]></html:pre>
</fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:title text="Signing">Signing</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>These are the public SSH keys (in <fr:link href="https://man.openbsd.org/ssh-keygen.1ALLOWED_SIGNERS" type="external"><html:code>allowed_signers</html:code></fr:link> format) that I use for <fr:link href="https://man.openbsd.org/ssh-keygen.1" type="external">signing</fr:link>:</html:p>
                    <html:pre>aram@mgk.ro ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMRc0UWKrFpCv/EOUo2jpEQt+C/pa0tc1rUWKgjbKTp7 aram@edengate.local</html:pre>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>7</fr:month>
                  <fr:day>15</fr:day>
                </fr:date>
                <fr:title text="Install">Install</fr:title>
              </fr:frontmatter>
              <fr:mainmatter><html:p>Run the following commands to populate <html:code>~/.ssh/authorized_keys</html:code> (see <fr:link href="/ssh.1" title="ssh(1)" uri="https://xw.is/ssh.1" display-uri="ssh.1" type="local">ssh(1)</fr:link>), creating it with necessary permissions if required:</html:p>
  <html:pre>
mkdir -p $HOME/.ssh
chmod 700 $HOME/.ssh
cat &lt;&lt;EOF &gt;&gt;$HOME/.ssh/authorized_keys
<![CDATA[ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHRJsbKlE9QWIQnC1YQPHV8C6cIx32Fjju7VQaKI67TPPm+FySrbJPsM6j4zm9IobTCQ0YOtVmlvXYlRtKdHm0I= pkcs11:id=%62%31%39%32%66%32%33%31%32%66%65%36%66%33%64%37;token=ssh;manufacturer=STMicro;serial=0000000000000000%0D%04?module-path=/usr/lib64/pkcs11/libtpm2_pkcs11.so aram@silverleaf.local
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHwq6SeyHhRRtiMmsBABHYgwqaOwwgBZEMgrRfoSpvzz aram@horizon.local
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMRc0UWKrFpCv/EOUo2jpEQt+C/pa0tc1rUWKgjbKTp7 aram@edengate.local
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPsg+utDc9GRb/n91r0j5vFsn+gVYPawpEbaNCuIhYmE aram@z800.mgk.ro]]>
EOF
chmod 644 $HOME/.ssh/authorized_keys
sort -u -o $HOME/.ssh/authorized_keys $HOME/.ssh/authorized_keys</html:pre>
<html:p>These commands are idempotent and will preserve existing keys.</html:p></fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>7</fr:month>
                  <fr:day>15</fr:day>
                </fr:date>
                <fr:title text="Macros">Macros</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>This page exports the <html:code><![CDATA[\ssh-keys]]></html:code> and <html:code><![CDATA[\ssh-keys-install]]></html:code> macros. To use them from other pages import this page with <html:code><![CDATA[\import{ssh-keys}]]></html:code>.</html:p>
              </fr:mainmatter>
            </fr:tree>
          </fr:mainmatter>
        </fr:tree>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
              </fr:author>
            </fr:authors>
            <fr:date>
              <fr:year>2025</fr:year>
              <fr:month>4</fr:month>
              <fr:day>1</fr:day>
            </fr:date>
            <fr:uri>https://xw.is/0003/</fr:uri>
            <fr:display-uri>0003</fr:display-uri>
            <fr:route>/0003/</fr:route>
            <fr:title text="Git › Sign Git commits with SSH keys"><fr:link href="/git-index/" title="Git" uri="https://xw.is/git-index/" display-uri="git-index" type="local">Git</fr:link> › Sign Git commits with SSH keys</fr:title>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p><fr:link href="/git/" title="Git distributed version control system" uri="https://xw.is/git/" display-uri="git" type="local">Git</fr:link> can use <fr:link href="/ssh-keygen.1" title="ssh-keygen(1)" uri="https://xw.is/ssh-keygen.1" display-uri="ssh-keygen.1" type="local">ssh-keygen(1)</fr:link> to sign commits and tags. The problem is that if you want to avoid entering passphrases it requires a running <fr:link href="/ssh-agent.1" title="ssh-agent(1)" uri="https://xw.is/ssh-agent.1" display-uri="ssh-agent.1" type="local">ssh-agent(1)</fr:link>. This is the case even if you configured <fr:link href="/openssh/" title="OpenSSH" uri="https://xw.is/openssh/" display-uri="openssh" type="local">ssh</fr:link> to <fr:link href="/0004/" title="macOS › Use the Apple Keychain for ssh key passphrases" uri="https://xw.is/0004/" display-uri="0004" type="local">automatically decrypt keys using the iCloud Keychain</fr:link>, as <fr:link href="/ssh-keygen.1" title="ssh-keygen(1)" uri="https://xw.is/ssh-keygen.1" display-uri="ssh-keygen.1" type="local">ssh-keygen(1)</fr:link> will not read <html:code>~/.ssh/config</html:code>.</html:p>
            <html:p>We're going to make <fr:link href="/git.1" title="git(1)" uri="https://xw.is/git.1" display-uri="git.1" type="local">git(1)</fr:link> run a helper script that temporarily loads the required key into the <fr:link href="/ssh-agent.1" title="ssh-agent(1)" uri="https://xw.is/ssh-agent.1" display-uri="ssh-agent.1" type="local">ssh agent</fr:link>, setting a short timeout.</html:p>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>4</fr:month>
                  <fr:day>1</fr:day>
                </fr:date>
                <fr:title text="Create helper script">Create helper script</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>Create this executable file and put it in your <html:code>PATH</html:code>, I'm using <html:code>~/bin/git-config-helper-gpg.ssh.defaultKeyCommand</html:code>.</html:p>
                <html:pre>#/bin/bash

ssh-add -q -t 5 --apple-load-keychain ~/.ssh/id_ed25519
KEY=$(ssh-add -L | head -n 1)
echo key::$KEY</html:pre>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>4</fr:month>
                  <fr:day>1</fr:day>
                </fr:date>
                <fr:title text="Configure Git to use SSH for signing">Configure Git to use SSH for signing</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:pre>git config --global gpg.format ssh
git config --global gpg.ssh.defaultKeyCommand ~/bin/git-config-helper-gpg.ssh.defaultKeyComma</html:pre>
                <html:p>This configures <fr:link href="/git.1" title="git(1)" uri="https://xw.is/git.1" display-uri="git.1" type="local">git(1)</fr:link> to use SSH signing (as opposed to GPG) and instructs it to run our helper script when it needs to sign.</html:p>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>4</fr:month>
                  <fr:day>1</fr:day>
                </fr:date>
                <fr:title text="Configure Git to verify signatures">Configure Git to verify signatures</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>Record a list of known email-signature pairs in <html:code>.ssh/allowed_signers</html:code> (file name and location is arbitrary):</html:p>
                <html:pre>aram@mgk.ro ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMRc0UWKrFpCv/EOUo2jpEQt+C/pa0tc1rUWKgjbKTp7 aram@edengate.local</html:pre>
                <html:p>Then configure <fr:link href="/git.1" title="git(1)" uri="https://xw.is/git.1" display-uri="git.1" type="local">git(1)</fr:link> to use this file for verification:</html:p>
                <html:pre>git config --global gpg.ssh.allowedSignersFile ~/.ssh/allowed_signers</html:pre>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>4</fr:month>
                  <fr:day>1</fr:day>
                </fr:date>
                <fr:title text="Sign every commit">Sign every commit</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>Optionally, you might want to automatically sign every commit and tag:</html:p>
                <html:pre>git config --global commit.gpgsign true
git config --global tag.gpgsign true</html:pre>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>4</fr:month>
                  <fr:day>1</fr:day>
                </fr:date>
                <fr:title text="How to use">How to use</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>Sign your commits using <html:code>git commit -S</html:code> (or enable autosigning). To check signatures use <html:code>git log --show-signature</html:code>.</html:p>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>4</fr:month>
                  <fr:day>1</fr:day>
                </fr:date>
                <fr:title text="GitHub">GitHub</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>GitHub <fr:link href="https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification" type="external">needs to be aware of signing keys</fr:link>. <html:mark>The SSH key <fr:link href="https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account" type="external">has to be specifically marked as a signing key</fr:link> in order for GitHub to show "verified" status.</html:mark></html:p>
              </fr:mainmatter>
            </fr:tree>
          </fr:mainmatter>
        </fr:tree>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
              </fr:author>
            </fr:authors>
            <fr:date>
              <fr:year>2022</fr:year>
              <fr:month>7</fr:month>
              <fr:day>28</fr:day>
            </fr:date>
            <fr:uri>https://xw.is/0004/</fr:uri>
            <fr:display-uri>0004</fr:display-uri>
            <fr:route>/0004/</fr:route>
            <fr:title text="macOS › Use the Apple Keychain for ssh key passphrases"><fr:link href="/macos-index/" title="macOS" uri="https://xw.is/macos-index/" display-uri="macos-index" type="local">macOS</fr:link> › Use the Apple Keychain for ssh key passphrases</fr:title>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>On <fr:link href="/apple-tn2449/" title="OpenSSH updates in macOS 10.12.2" uri="https://xw.is/apple-tn2449/" display-uri="apple-tn2449" type="local">modern macOS systems</fr:link>, you can set up your system such that your encrypted <fr:link href="/openssh/" title="OpenSSH" uri="https://xw.is/openssh/" display-uri="openssh" type="local">ssh</fr:link> keys get automatically decrypted using the passphrase stored in the Apple Keychain (which gets unlocked at login).</html:p>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2022</fr:year>
                  <fr:month>7</fr:month>
                  <fr:day>28</fr:day>
                </fr:date>
                <fr:title text="Add your passphrase to the Keychain">Add your passphrase to the Keychain</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>Create your keys as usual, then do this once for every key:</html:p>
                <html:pre>ssh-add --apple-use-keychain ~/.ssh/id_ed25519</html:pre>
                <html:p>
                  <html:mark>You must use the full path your key, a relative path will not work!</html:mark>
                </html:p>
                <html:p>Note that we're <fr:link href="/ssh-add.1" title="ssh-add(1)" uri="https://xw.is/ssh-add.1" display-uri="ssh-add.1" type="local">adding</fr:link> the key to the <fr:link href="/ssh-agent.1" title="ssh-agent(1)" uri="https://xw.is/ssh-agent.1" display-uri="ssh-agent.1" type="local">ssh agent</fr:link> here, but we will not be using the ssh agent. Rather, this operation has the side effect that the key will be saved in the keychain.</html:p>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2022</fr:year>
                  <fr:month>7</fr:month>
                  <fr:day>28</fr:day>
                </fr:date>
                <fr:title text="Configure ssh to use the Keychain">Configure <fr:link href="/openssh/" title="OpenSSH" uri="https://xw.is/openssh/" display-uri="openssh" type="local">ssh</fr:link> to use the Keychain</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>Add this to your <html:code>~/.ssh/config</html:code>:</html:p>
                <html:pre>Host *
   IgnoreUnknown UseKeychain
   UseKeychain yes</html:pre>
                <html:p><html:code>IgnoreUnknown</html:code> is there so that <html:code>UseKeychain</html:code> (an Apple-specific extension) will work with non-Apple ssh implementations. Contrary to Internet misinformation you do not need to use <fr:link href="/ssh-agent.1" title="ssh-agent(1)" uri="https://xw.is/ssh-agent.1" display-uri="ssh-agent.1" type="local">ssh-agent(1)</fr:link>, or enable any special Apple-specific options for the <fr:link href="/ssh-agent.1" title="ssh-agent(1)" uri="https://xw.is/ssh-agent.1" display-uri="ssh-agent.1" type="local">ssh agent</fr:link>. Of course you can do this per-host, or per-key, but then <html:code>IgnoreUnknown</html:code> should come early in your configuration, before any use of <html:code>UseKeychain</html:code>.</html:p>
              </fr:mainmatter>
            </fr:tree>
          </fr:mainmatter>
        </fr:tree>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
              </fr:author>
            </fr:authors>
            <fr:date>
              <fr:year>2019</fr:year>
              <fr:month>7</fr:month>
              <fr:day>29</fr:day>
            </fr:date>
            <fr:uri>https://xw.is/0006/</fr:uri>
            <fr:display-uri>0006</fr:display-uri>
            <fr:route>/0006/</fr:route>
            <fr:title text="Connect to laptop (behind NAT) using intermediary server">Connect to laptop (behind NAT) using intermediary server</fr:title>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>We'll use a combination of <fr:link href="/openssh/" title="OpenSSH" uri="https://xw.is/openssh/" display-uri="openssh" type="local">ssh</fr:link> <fr:link href="https://www.openssh.com/features.html" type="external">remote and local port forwarding</fr:link> in order to expose the laptop's ssh port outside the NAT. The laptop must initiate the forwarding.</html:p>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>7</fr:month>
                  <fr:day>29</fr:day>
                </fr:date>
                <fr:title text="On the server">On the server</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>Make sure you have an account that the laptop can connect to through <fr:link href="/openssh/" title="OpenSSH" uri="https://xw.is/openssh/" display-uri="openssh" type="local">ssh</fr:link>.</html:p>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>7</fr:month>
                  <fr:day>29</fr:day>
                </fr:date>
                <fr:title text="On the laptop">On the laptop</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>This will initiate a connection to the server (from the laptop), and it will set-up a remote port forward such that dialing <html:code>localhost:12345</html:code> <html:em>on the server</html:em> will forward to <html:code>localhost:22</html:code> on the laptop.</html:p>
                <html:pre>ssh -N -R 12345:localhost:22 harieta@freedom.mgk.ro</html:pre>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>7</fr:month>
                  <fr:day>29</fr:day>
                </fr:date>
                <fr:title text="On the other client">On the other client</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>This will connect to the server, and then set-up a local port forward (from the <html:em>other client</html:em> to the server) such that dialing <html:code>localhost:12345</html:code> <html:em>on the client</html:em> will connect to <html:code>localhost:12345</html:code> <html:em>on the server</html:em>. Of course, <html:code>localhost:12345</html:code> on the server just forwards to <html:code>localhost:22</html:code> on the laptop.</html:p>
                <html:pre>ssh -N -L 12345:localhost:12345 freedom.mgk.ro</html:pre>
                <html:p>Then from another terminal (still on the <html:em>other client</html:em>) you can:</html:p>
                <html:pre>ssh -p 12345 ubuntu@localhost</html:pre>
                <html:p>And should reach localhost:22 <html:em>on the laptop</html:em>.</html:p>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>7</fr:month>
                  <fr:day>29</fr:day>
                </fr:date>
                <fr:title text="Alternatives">Alternatives</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>Alternativelly, you can use <fr:link href="/tailscale/" title="Tailscale" uri="https://xw.is/tailscale/" display-uri="tailscale" type="local">Tailscale</fr:link>.</html:p>
              </fr:mainmatter>
            </fr:tree>
          </fr:mainmatter>
        </fr:tree>
      </fr:mainmatter>
    </fr:tree>
    <fr:tree show-metadata="false">
      <fr:frontmatter>
        <fr:authors>
          <fr:author>
            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
          </fr:author>
        </fr:authors>
        <fr:uri>https://xw.is/misc-index/</fr:uri>
        <fr:display-uri>misc-index</fr:display-uri>
        <fr:route>/misc-index/</fr:route>
        <fr:title text="Miscellaneous">Miscellaneous</fr:title>
      </fr:frontmatter>
      <fr:mainmatter>
        <html:p>Miscellaneous tips and tricks.</html:p>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
              </fr:author>
            </fr:authors>
            <fr:date>
              <fr:year>2018</fr:year>
              <fr:month>9</fr:month>
              <fr:day>30</fr:day>
            </fr:date>
            <fr:date>
              <fr:year>2022</fr:year>
              <fr:month>9</fr:month>
              <fr:day>15</fr:day>
            </fr:date>
            <fr:date>
              <fr:year>2025</fr:year>
              <fr:month>8</fr:month>
              <fr:day>28</fr:day>
            </fr:date>
            <fr:uri>https://xw.is/001L/</fr:uri>
            <fr:display-uri>001L</fr:display-uri>
            <fr:route>/001L/</fr:route>
            <fr:title text="LED lights">LED lights</fr:title>
          </fr:frontmatter>
          <fr:mainmatter>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2018</fr:year>
                  <fr:month>9</fr:month>
                  <fr:day>30</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2022</fr:year>
                  <fr:month>9</fr:month>
                  <fr:day>15</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>28</fr:day>
                </fr:date>
                <fr:title text="Introduction">Introduction</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>Most LED lights are pretty bad. Better LEDs can be found in video/cinema applications, or for museum exhibits. Photographers do not care much about LEDs as they do tend not to use continuous lights.</html:p>
                <html:p>Most household lamps use E26/E27 sockets, and the most common bulbs are A19, A21, and A23. Every lamp will take A19, many will take A21, but A23 is larger and requires thorough investigation whether it's supported by indoor lamps.</html:p>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2018</fr:year>
                  <fr:month>9</fr:month>
                  <fr:day>30</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2022</fr:year>
                  <fr:month>9</fr:month>
                  <fr:day>15</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>28</fr:day>
                </fr:date>
                <fr:title text="Power and energy">Power and energy</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>LEDs are pretty energy efficient, but the power density is pretty low. If you need high power, incandescent or halogen is the only way to go. In general, this means you need more LED bulbs for household applications compared to incandescents, and it's very likely new fixtures supporting more bulbs are required. LEDs with more accurate color tend to have less power and be less energy efficient than other LEDs.</html:p>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2018</fr:year>
                  <fr:month>9</fr:month>
                  <fr:day>30</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2022</fr:year>
                  <fr:month>9</fr:month>
                  <fr:day>15</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>28</fr:day>
                </fr:date>
                <fr:title text="Light output">Light output</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>How many lumens do you need? My incandescent lights have the following specs: 
  <html:table>
    
  <html:tr>
      
  <html:th>Manufacturer</html:th>

      
  <html:th>Type</html:th>

      
  <html:th>Power</html:th>

      
  <html:th>Luminous Flux</html:th>

    </html:tr>

    
  <html:tr>
      
  <html:td>Philos</html:td>

      
  <html:td>Incandescent</html:td>

      
  <html:td>300 W</html:td>

      
  <html:td>4850 lm</html:td>

    </html:tr>

    
  <html:tr>
      
  <html:td>Powerlight</html:td>

      
  <html:td>Halogen</html:td>

      
  <html:td>200 W</html:td>

      
  <html:td>3980 lm</html:td>

    </html:tr>

    
  <html:tr>
      
  <html:td>Osram</html:td>

      
  <html:td>Halogen</html:td>

      
  <html:td>150 W</html:td>

      
  <html:td>2870 lm</html:td>

    </html:tr>

    
  <html:tr>
      
  <html:td>Philips</html:td>

      
  <html:td>Halogen</html:td>

      
  <html:td>105 W</html:td>

      
  <html:td>1980 lm</html:td>

    </html:tr>

    
  <html:tr>
      
  <html:td>Philips</html:td>

      
  <html:td>Incandescent</html:td>

      
  <html:td>40 W</html:td>

      
  <html:td>405 lm</html:td>

    </html:tr>

  </html:table></html:p>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2018</fr:year>
                  <fr:month>9</fr:month>
                  <fr:day>30</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2022</fr:year>
                  <fr:month>9</fr:month>
                  <fr:day>15</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>28</fr:day>
                </fr:date>
                <fr:title text="Color temperature">Color temperature</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>For general purpose household stuff you want something around 2700K. Very low power dim sidelighting can be lower (even 2000K). High power stuff can go as high as 3200K. Unless you have a special use case in mind, only look at 2700K and 3000K offerings.</html:p>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2018</fr:year>
                  <fr:month>9</fr:month>
                  <fr:day>30</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2022</fr:year>
                  <fr:month>9</fr:month>
                  <fr:day>15</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>28</fr:day>
                </fr:date>
                <fr:title text="Color rendering">Color rendering</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>The the most common standard is <fr:link href="https://en.wikipedia.org/wiki/Color_rendering_index" type="external">CRI</fr:link>. Unfortunately, CRI is pretty useless, but consumer manufacturers frequently only specify CRI. You want something with CRI over 95. An important color not taken into account by CRI is <fr:link href="https://www.waveformlighting.com/tech/what-is-cri-r9-and-why-is-it-important/" type="external">R9</fr:link>. You want something with R9 over 90.</html:p>
                <html:p>A much better standard is <fr:link href="https://tech.ebu.ch/tlci-2012" type="external">TLCI</fr:link>. You want something with TLCI over 90. Another standard is <fr:link href="https://www.energy.gov/eere/ssl/tm-30-frequently-asked-questions" type="external">TM-30</fr:link>.</html:p>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2018</fr:year>
                      <fr:month>9</fr:month>
                      <fr:day>30</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2022</fr:year>
                      <fr:month>9</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>28</fr:day>
                    </fr:date>
                    <fr:title text="TCLI results">TCLI results</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:ul><html:li><fr:link href="http://www.gtc.org.uk/members-area/tlci-results/current-tlci-results.aspx" type="external">TLCI Results as supplied by Alan Roberts</fr:link></html:li>
      <html:li><fr:link href="https://tech.ebu.ch/tlci-2012" type="external">Television Lighting Consistency Index 2012</fr:link> (results are from 2018)</html:li>
      <html:li><fr:link href="https://indiecinemaacademy.com/complete-led-color-database-cri-tlci-cqs-tm30-15/" type="external">Indie Cinema Academy LED database</fr:link></html:li></html:ul>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2018</fr:year>
                  <fr:month>9</fr:month>
                  <fr:day>30</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2022</fr:year>
                  <fr:month>9</fr:month>
                  <fr:day>15</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>28</fr:day>
                </fr:date>
                <fr:title text="Notable manufacturers">Notable manufacturers</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2018</fr:year>
                      <fr:month>9</fr:month>
                      <fr:day>30</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2022</fr:year>
                      <fr:month>9</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>28</fr:day>
                    </fr:date>
                    <fr:title text="Quality">Quality</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:ul><html:li><fr:link href="https://www.waveformlighting.com/" type="external">Waveform Lighting</fr:link></html:li>
      <html:li><fr:link href="https://www.yujiintl.com/" type="external">Yuji International</fr:link></html:li>
      <html:li><fr:link href="https://www.soraa.com/" type="external">Soraa</fr:link></html:li>
      <html:li><fr:link href="http://solux.net/" type="external">Solux</fr:link> (Nobel prize winner who invented blue LEDs works here)</html:li></html:ul>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2018</fr:year>
                      <fr:month>9</fr:month>
                      <fr:day>30</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2022</fr:year>
                      <fr:month>9</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>28</fr:day>
                    </fr:date>
                    <fr:title text="High power">High power</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:ul><html:li><fr:link href="https://creebulb.com/" type="external">Cree</fr:link></html:li>
      <html:li><fr:link href="https://www.eurilighting.com/" type="external">Euri</fr:link></html:li>
      <html:li><fr:link href="http://gc-lighting.com/" type="external">Green Creative</fr:link></html:li></html:ul>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2018</fr:year>
                  <fr:month>9</fr:month>
                  <fr:day>30</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2022</fr:year>
                  <fr:month>9</fr:month>
                  <fr:day>15</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>28</fr:day>
                </fr:date>
                <fr:title text="Notable products">Notable products</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2018</fr:year>
                      <fr:month>9</fr:month>
                      <fr:day>30</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2022</fr:year>
                      <fr:month>9</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>28</fr:day>
                    </fr:date>
                    <fr:title text="800 lm class">800 lm class</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
  <html:table>
      
  <html:tr>
        
  <html:th>Manufacturer</html:th>

        
  <html:th>Product</html:th>

        
  <html:th>Color Temperature</html:th>

        
  <html:th>Luminous Flux</html:th>

        
  <html:th>CRI</html:th>

        
  <html:th>R9</html:th>

        
  <html:th>TLCI</html:th>

        
  <html:th>Notes</html:th>

      </html:tr>

      
  <html:tr>
        
  <html:td>Waveform Lighting</html:td>

        
  <html:td><fr:link href="https://store.waveformlighting.com/collections/a19-bulbs/products/ultra-high-95-cri-e26-a19-10w-led-bulb-for-home-residential" type="external">Ultra High 95 CRI E26 A19 10W LED Bulb for Home &amp; Residential</fr:link></html:td>

        
  <html:td>2700/3000K</html:td>

        
  <html:td>800 lm</html:td>

        
  <html:td>95</html:td>

        
  <html:td>91/95</html:td>

        
  <html:td />

        
  <html:td>FilmGrade series has 95 TLCI</html:td>

      </html:tr>

      
  <html:tr>
        
  <html:td>Yuji</html:td>

        
  <html:td><fr:link href="https://store.yujiintl.com/collections/bc-series/products/bc-series-a60-high-cri-remote-phosphor-led-bulb-unit-2-pcs" type="external">BC Series A60 High CRI Remote Phosphor LED</fr:link></html:td>

        
  <html:td>3000K</html:td>

        
  <html:td>840 lm</html:td>

        
  <html:td>97</html:td>

        
  <html:td>95+</html:td>

        
  <html:td>97</html:td>

        
  <html:td>recommended by gaffers</html:td>

      </html:tr>

      
  <html:tr>
        
  <html:td>Soraa</html:td>

        
  <html:td><fr:link href="https://www.soraa.com/products/56-Soraa-VIVID-A60-(E27)" type="external">Soraa VIVID A60 (E27)</fr:link></html:td>

        
  <html:td>2700K</html:td>

        
  <html:td>800 lm</html:td>

        
  <html:td>95</html:td>

        
  <html:td>95</html:td>

        
  <html:td />

        
  <html:td />

      </html:tr>

      
  <html:tr>
        
  <html:td>Ikea</html:td>

        
  <html:td>Ledare 11W LED1304G11 E27</html:td>

        
  <html:td>2700K</html:td>

        
  <html:td>600 lm</html:td>

        
  <html:td>93</html:td>

        
  <html:td />

        
  <html:td>93</html:td>

        
  <html:td>600 lm only</html:td>

      </html:tr>

      
  <html:tr>
        
  <html:td>Ikea</html:td>

        
  <html:td>Trådfri LED1623G12</html:td>

        
  <html:td>2700K</html:td>

        
  <html:td>1000 lm</html:td>

        
  <html:td />

        
  <html:td />

        
  <html:td>89</html:td>

        
  <html:td>smart bulb</html:td>

      </html:tr>

      
  <html:tr>
        
  <html:td>Solux</html:td>

        
  <html:td><fr:link href="https://www.solux.net/cgi-bin/tlistore/colorviewbulbs.html" type="external">ColorView</fr:link></html:td>

        
  <html:td>3000K</html:td>

        
  <html:td>310–1490 lm</html:td>

        
  <html:td>100</html:td>

        
  <html:td>100</html:td>

        
  <html:td />

        
  <html:td>120V only</html:td>

      </html:tr>

    </html:table>
<html:p>Osram has some 95+ TLCI products in its professional spot line. It's unclear whether the A bulbs from the same professional line are just as good or not. Osram only claims 80+ CRI even for the good stuff, and the A products are rated the same. They might be much better than specified.</html:p></fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2018</fr:year>
                      <fr:month>9</fr:month>
                      <fr:day>30</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2022</fr:year>
                      <fr:month>9</fr:month>
                      <fr:day>15</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>8</fr:month>
                      <fr:day>28</fr:day>
                    </fr:date>
                    <fr:title text="High power class">High power class</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
  <html:table>
      
  <html:tr>
        
  <html:th>Manufacturer</html:th>

        
  <html:th>Product</html:th>

        
  <html:th>Color Temperature</html:th>

        
  <html:th>Luminous Flux</html:th>

        
  <html:th>CRI</html:th>

        
  <html:th>R9</html:th>

        
  <html:th>TLCI</html:th>

        
  <html:th>Notes</html:th>

      </html:tr>

      
  <html:tr>
        
  <html:td>EURI</html:td>

        
  <html:td><fr:link href="https://www.eurilighting.com/ea21-4000cec-2" type="external">A Series LED EA21-4000cec-2</fr:link></html:td>

        
  <html:td>3000K</html:td>

        
  <html:td>1600 lm</html:td>

        
  <html:td>90</html:td>

        
  <html:td />

        
  <html:td />

        
  <html:td>120V only</html:td>

      </html:tr>

      
  <html:tr>
        
  <html:td>Cree</html:td>

        
  <html:td><fr:link href="https://creebulb.com/100-watt-replacement-soft-white" type="external">Cree 100 Watt Replacement</fr:link></html:td>

        
  <html:td>2700K/3000K</html:td>

        
  <html:td>1600 lm</html:td>

        
  <html:td>90+</html:td>

        
  <html:td />

        
  <html:td />

        
  <html:td />

      </html:tr>

      
  <html:tr>
        
  <html:td>Green Creative</html:td>

        
  <html:td><fr:link href="http://gc-lighting.com/products/a21-18-5w-high-cri-dimmable" type="external">A21 18.5W HIGH CRI DIMMABLE</fr:link></html:td>

        
  <html:td>2700K</html:td>

        
  <html:td>1600 lm</html:td>

        
  <html:td>90</html:td>

        
  <html:td>60</html:td>

        
  <html:td />

        
  <html:td>120V only</html:td>

      </html:tr>

      
  <html:tr>
        
  <html:td>Green Creative</html:td>

        
  <html:td><fr:link href="http://gc-lighting.com/products/hid-led-25w-277v-e26" type="external">A23 LED 25W 277V E26</fr:link></html:td>

        
  <html:td>3000K</html:td>

        
  <html:td>3200 lm</html:td>

        
  <html:td>82</html:td>

        
  <html:td />

        
  <html:td />

        
  <html:td />

      </html:tr>

    </html:table>
</fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2018</fr:year>
                  <fr:month>9</fr:month>
                  <fr:day>30</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2022</fr:year>
                  <fr:month>9</fr:month>
                  <fr:day>15</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>28</fr:day>
                </fr:date>
                <fr:title text="Additional references">Additional references</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:ul><html:li><fr:link href="https://forum.luminous-landscape.com/index.php?topic=131594.0" type="external">Luminous Landscape Forum | Has anyone looked into the modern LED video lights as a print evaluation light?</fr:link></html:li>
    <html:li><fr:link href="https://budgetlightforum.com/node/69805" type="external">Ultimate LED Bulbs - Ultra High CRI - The Honorable Quest</fr:link></html:li></html:ul>
              </fr:mainmatter>
            </fr:tree>
          </fr:mainmatter>
        </fr:tree>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
              </fr:author>
            </fr:authors>
            <fr:date>
              <fr:year>2018</fr:year>
              <fr:month>6</fr:month>
              <fr:day>7</fr:day>
            </fr:date>
            <fr:date>
              <fr:year>2023</fr:year>
              <fr:month>8</fr:month>
              <fr:day>1</fr:day>
            </fr:date>
            <fr:date>
              <fr:year>2025</fr:year>
              <fr:month>7</fr:month>
              <fr:day>23</fr:day>
            </fr:date>
            <fr:uri>https://xw.is/001I/</fr:uri>
            <fr:display-uri>001I</fr:display-uri>
            <fr:route>/001I/</fr:route>
            <fr:title text="TLS Certificates Primer">TLS Certificates Primer</fr:title>
          </fr:frontmatter>
          <fr:mainmatter>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2018</fr:year>
                  <fr:month>6</fr:month>
                  <fr:day>7</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2023</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>1</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>7</fr:month>
                  <fr:day>23</fr:day>
                </fr:date>
                <fr:title text="Prerequisites">Prerequisites</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>You will need to generate a <html:em>private key</html:em> and a <html:em>certificate signing request</html:em>.</html:p>
                <html:pre>DOMAIN=xw.is
openssl req -new -newkey rsa:2048 -nodes -keyout $DOMAIN.key -out $DOMAIN.csr</html:pre>
                <html:p>Send <html:code>xw.is.csr</html:code> to your certificate vendor and follow the instructions.</html:p>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2018</fr:year>
                  <fr:month>6</fr:month>
                  <fr:day>7</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2023</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>1</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>7</fr:month>
                  <fr:day>23</fr:day>
                </fr:date>
                <fr:title text="Prepare certificates for use">Prepare certificates for use</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>Your certificate vendor will give you a bunch of files. You need to concatenate them in order to use them in your web server. Order is essential. For example, for <fr:link href="https://www.digicert.com/" type="external">DigiCert</fr:link>:</html:p>
                <html:pre>cat xw_is.crt DigiCertCA.crt TrustedRoot.crt &gt;xw.is.crt</html:pre>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2018</fr:year>
                  <fr:month>6</fr:month>
                  <fr:day>7</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2023</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>1</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>7</fr:month>
                  <fr:day>23</fr:day>
                </fr:date>
                <fr:title text="Configure your web server">Configure your web server</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>Use <html:code>xw.is.key</html:code> and <html:code>xw.is.crt</html:code> in your web server. For example for nginx add this to your server block:</html:p>
                <html:pre>
worker_processes 1;

events {
    worker_connections  1024;
}

http {
    server {
        listen 443;
        server_name xw.is;

        <html:strong>ssl on;
        ssl_certificate /tank/nginx/tls/xw.is.crt;
        ssl_certificate_key /tank/nginx/tls/xw.is.key;</html:strong>
        ssl_session_cache shared:SSL:1m;
        ssl_session_timeout 5m;

        ssl_ciphers HIGH:!aNULL:!MD5;
        ssl_prefer_server_ciphers on;

        location / {
            root /usr/local/www/nginx;
            index index.html index.htm;
        }
    }
}</html:pre>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2018</fr:year>
                  <fr:month>6</fr:month>
                  <fr:day>7</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2023</fr:year>
                  <fr:month>8</fr:month>
                  <fr:day>1</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>7</fr:month>
                  <fr:day>23</fr:day>
                </fr:date>
                <fr:title text="Alternatives">Alternatives</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:p>Alternativelly, you might want to use <fr:link href="https://letsencrypt.org/" type="external">Let's Encrypt</fr:link>.</html:p>
              </fr:mainmatter>
            </fr:tree>
          </fr:mainmatter>
        </fr:tree>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
              </fr:author>
            </fr:authors>
            <fr:date>
              <fr:year>2018</fr:year>
              <fr:month>9</fr:month>
              <fr:day>30</fr:day>
            </fr:date>
            <fr:date>
              <fr:year>2025</fr:year>
              <fr:month>7</fr:month>
              <fr:day>10</fr:day>
            </fr:date>
            <fr:uri>https://xw.is/0014/</fr:uri>
            <fr:display-uri>0014</fr:display-uri>
            <fr:route>/0014/</fr:route>
            <fr:title text="List of mobile network operators">List of mobile network operators</fr:title>
          </fr:frontmatter>
          <fr:mainmatter>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2018</fr:year>
                  <fr:month>9</fr:month>
                  <fr:day>30</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>7</fr:month>
                  <fr:day>10</fr:day>
                </fr:date>
                <fr:title text="United States">United States</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2018</fr:year>
                      <fr:month>9</fr:month>
                      <fr:day>30</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>10</fr:day>
                    </fr:date>
                    <fr:title text="Networks">Networks</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p>Coverage map (<html:em>very</html:em> optimistic) provided by <fr:link href="https://www.opensignal.com/" type="external">OpenSignal</fr:link>. In general Verizon has the best coverage, followed by AT&amp;T, T-Mobile, with Sprint far behind. Where I need it, Verizon works best.</html:p>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2018</fr:year>
                      <fr:month>9</fr:month>
                      <fr:day>30</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>10</fr:day>
                    </fr:date>
                    <fr:title text="List of MVNOs">List of MVNOs</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:ul><html:li><fr:link href="https://bestmvno.com/" type="external">BestMVNO</fr:link></html:li>
      <html:li><fr:link href="https://en.wikipedia.org/wiki/List_of_mobile_virtual_network_operators_in_the_United_States" type="external">List of mobile virtual network operators in the United States</fr:link></html:li></html:ul>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2018</fr:year>
                  <fr:month>9</fr:month>
                  <fr:day>30</fr:day>
                </fr:date>
                <fr:date>
                  <fr:year>2025</fr:year>
                  <fr:month>7</fr:month>
                  <fr:day>10</fr:day>
                </fr:date>
                <fr:title text="Austria">Austria</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2018</fr:year>
                      <fr:month>9</fr:month>
                      <fr:day>30</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>10</fr:day>
                    </fr:date>
                    <fr:title text="Networks">Networks</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:p><fr:link href="https://www.opensignal.com/" type="external">OpenSignal</fr:link> also provides a coverage map. As a general idea A1 has the best coverage, especially in rural areas, followed by Drei (slightly worse), and <html:s>T-Mobile</html:s> Magenta (not too bad).</html:p>
                  </fr:mainmatter>
                </fr:tree>
                <fr:tree show-metadata="false">
                  <fr:frontmatter>
                    <fr:authors>
                      <fr:author>
                        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                      </fr:author>
                    </fr:authors>
                    <fr:date>
                      <fr:year>2018</fr:year>
                      <fr:month>9</fr:month>
                      <fr:day>30</fr:day>
                    </fr:date>
                    <fr:date>
                      <fr:year>2025</fr:year>
                      <fr:month>7</fr:month>
                      <fr:day>10</fr:day>
                    </fr:date>
                    <fr:title text="List of MVNOs">List of MVNOs</fr:title>
                  </fr:frontmatter>
                  <fr:mainmatter>
                    <html:ul><html:li><fr:link href="https://web.telecompaper.com/research/mvno-list/austria" type="external">MVNO LIST AUSTRIA</fr:link></html:li>
      <html:li><fr:link href="https://de.wikipedia.org/wiki/Liste_der_Mobilfunkanbieter_in_%C3%96sterreich" type="external">Liste der Mobilfunkanbieter in Österreich</fr:link></html:li>
      <html:li>Also see the <fr:link href="https://www.lteforum.at/forum/" type="external">LTE-Forum</fr:link>.</html:li></html:ul>
                  </fr:mainmatter>
                </fr:tree>
              </fr:mainmatter>
            </fr:tree>
          </fr:mainmatter>
        </fr:tree>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
              </fr:author>
            </fr:authors>
            <fr:date>
              <fr:year>2019</fr:year>
              <fr:month>2</fr:month>
              <fr:day>22</fr:day>
            </fr:date>
            <fr:uri>https://xw.is/0016/</fr:uri>
            <fr:display-uri>0016</fr:display-uri>
            <fr:route>/0016/</fr:route>
            <fr:title text="Photo book print shops">Photo book print shops</fr:title>
          </fr:frontmatter>
          <fr:mainmatter>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>2</fr:month>
                  <fr:day>22</fr:day>
                </fr:date>
                <fr:title text="Cheap">Cheap</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:ul>
                  <html:li><fr:link href="http://www.blurb.com/" type="external">Blurb</fr:link>, no soft-proofing, spotty quality control and inconsistent.</html:li>
                </html:ul>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>2</fr:month>
                  <fr:day>22</fr:day>
                </fr:date>
                <fr:title text="Quality">Quality</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:ul><html:li><fr:link href="https://www.booksmartstudio.com/" type="external">Booksmart Studio</fr:link>, high end printer, both inkjet and digital press. Does NOT accept output-ready files.</html:li>
    <html:li><fr:link href="https://www.pikto.com/" type="external">Pikto</fr:link>, from Canada, digital press printing and chromogenic printing. Does NOT accept output-ready files.</html:li>
    <html:li><fr:link href="https://www.whcc.com/" type="external">White House Custom Colour</fr:link>, from California, digital press printing and chromogenic printing. Does NOT accept output-ready files.</html:li>
    <html:li><fr:link href="https://www.digitalprolab.com/index.html" type="external">Digital Pro Lab</fr:link>, from Texas, have press profiles, but don't use press printing for albums. Does NOT accept output-ready files.</html:li>
    <html:li><fr:link href="https://simplycolorlab.com/" type="external">Simply Color Lab</fr:link>, photo printing. Does NOT accept output-ready files.</html:li></html:ul>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>2</fr:month>
                  <fr:day>22</fr:day>
                </fr:date>
                <fr:title text="Best quality">Best quality</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:ul>
                  <html:li><fr:link href="https://www.hemlock.com/" type="external">Hemlock</fr:link>, they print <fr:link href="https://www.lenswork.com/" type="external">LensWork</fr:link>.</html:li>
                </html:ul>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>2</fr:month>
                  <fr:day>22</fr:day>
                </fr:date>
                <fr:title text="Questionable">Questionable</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:ul><html:li><fr:link href="https://www.adoramapix.com/" type="external">AdoramaPix</fr:link>, unclear whether they do this right or not. Some FAQ entry claims they don't offer ICC profiles! They are using a chromogenic process for books, not digital press.</html:li>
    <html:li><fr:link href="https://www.prodpi.com/" type="external">ProDPI</fr:link>, they seem to know what they are doing, but I found their ICC profiles only for their chromogenic prints. Also, I heard a rumor that they were bought by WHCC.</html:li>
    <html:li><fr:link href="https://paperchasepress.com/" type="external">Paper Chase Press</fr:link>, they seem to know what they are doing, but they want a <html:code>GRACoL2006_Coated1v2</html:code> color profile.</html:li></html:ul>
              </fr:mainmatter>
            </fr:tree>
            <fr:tree show-metadata="false">
              <fr:frontmatter>
                <fr:authors>
                  <fr:author>
                    <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
                  </fr:author>
                </fr:authors>
                <fr:date>
                  <fr:year>2019</fr:year>
                  <fr:month>2</fr:month>
                  <fr:day>22</fr:day>
                </fr:date>
                <fr:title text="Not reviewed">Not reviewed</fr:title>
              </fr:frontmatter>
              <fr:mainmatter>
                <html:ul>
                  <html:li><fr:link href="https://www.rit.edu/fa/hub/printing-services" type="external">RIT</fr:link>, mentioned by Bill Atkinson.</html:li>
                </html:ul>
              </fr:mainmatter>
            </fr:tree>
          </fr:mainmatter>
        </fr:tree>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
              </fr:author>
            </fr:authors>
            <fr:date>
              <fr:year>2018</fr:year>
              <fr:month>6</fr:month>
              <fr:day>7</fr:day>
            </fr:date>
            <fr:uri>https://xw.is/0015/</fr:uri>
            <fr:display-uri>0015</fr:display-uri>
            <fr:route>/0015/</fr:route>
            <fr:title text="Transcode mvk to mov with subtitles">Transcode mvk to mov with subtitles</fr:title>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:pre>ffmpeg -i in.mkv -vcodec copy -acodec copy -scodec mov_text out.mov</html:pre>
          </fr:mainmatter>
        </fr:tree>
      </fr:mainmatter>
    </fr:tree>
    <fr:tree show-metadata="false" expanded="false">
      <fr:frontmatter>
        <fr:authors>
          <fr:author>
            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
          </fr:author>
        </fr:authors>
        <fr:uri>https://xw.is/about/</fr:uri>
        <fr:display-uri>about</fr:display-uri>
        <fr:route>/about/</fr:route>
        <fr:title text="About">About</fr:title>
      </fr:frontmatter>
      <fr:mainmatter>
        <html:p>This website is a “<fr:link href="https://www.forester-notes.org/tfmt-000V/" type="external">forest</fr:link>” created using the <fr:link href="https://www.forester-notes.org/index/" type="external">Forester</fr:link> tool, a system of evergreen hypertext notes. To navigate my forest, press <html:kbd><html:kbd>Ctrl</html:kbd>+<html:kbd>K</html:kbd></html:kbd>.</html:p>
        <fr:tree show-metadata="false" expanded="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
              </fr:author>
            </fr:authors>
            <fr:uri>https://xw.is/copyright/</fr:uri>
            <fr:display-uri>copyright</fr:display-uri>
            <fr:route>/copyright/</fr:route>
            <fr:title text="Copyright and License">Copyright and License</fr:title>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>Except where otherwise stated, content on this site is is available under the <fr:link href="https://creativecommons.org/publicdomain/zero/1.0/" type="external">CC0 1.0 Universal</fr:link> license.</html:p>
          </fr:mainmatter>
        </fr:tree>
        <fr:tree show-metadata="false" expanded="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
              </fr:author>
            </fr:authors>
            <fr:uri>https://xw.is/disclaimer/</fr:uri>
            <fr:display-uri>disclaimer</fr:display-uri>
            <fr:route>/disclaimer/</fr:route>
            <fr:title text="Legal Disclaimer">Legal Disclaimer</fr:title>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>This site is provided as a public service by <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>. No guarantees, explicit or implicit, are made about the contents of this site. Use at your own risk.</html:p>
          </fr:mainmatter>
        </fr:tree>
        <fr:tree show-metadata="false" expanded="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
              </fr:author>
            </fr:authors>
            <fr:date>
              <fr:year>2025</fr:year>
              <fr:month>7</fr:month>
              <fr:day>8</fr:day>
            </fr:date>
            <fr:uri>https://xw.is/privacy/</fr:uri>
            <fr:display-uri>privacy</fr:display-uri>
            <fr:route>/privacy/</fr:route>
            <fr:title text="Privacy Policy">Privacy Policy</fr:title>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>Our web server does not ask anybody for any information, personal or otherwise. We don't use cookies, nor do we allow any third party to propagate cookies through our server.</html:p>
          </fr:mainmatter>
        </fr:tree>
      </fr:mainmatter>
    </fr:tree>
    <fr:tree show-metadata="false" expanded="false">
      <fr:frontmatter>
        <fr:authors>
          <fr:author>
            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
          </fr:author>
        </fr:authors>
        <fr:uri>https://xw.is/help/</fr:uri>
        <fr:display-uri>help</fr:display-uri>
        <fr:route>/help/</fr:route>
        <fr:title text="Help">Help</fr:title>
      </fr:frontmatter>
      <fr:mainmatter>
        <html:ul><html:li><fr:link href="https://www.forester-notes.org/jms-007N/" type="external">Overview of the Forester markup language</fr:link></html:li>
  <html:li><fr:link href="https://www.forester-notes.org/013A/index.xml" type="external">Datalog-based query engine</fr:link></html:li>
  <html:li><fr:link href="https://www.forester-notes.org/jms-007H/" type="external">Creating new trees</fr:link></html:li>
  <html:li><fr:link href="https://forest.localcharts.org/lc-0002.xml" type="external">Forester for the Woodland Skeptic</fr:link></html:li>
  <html:li><fr:link href="https://github.com/4ad/xw.is" type="external">Source code for this website</fr:link></html:li></html:ul>
      </fr:mainmatter>
    </fr:tree>
  </fr:mainmatter>
  <fr:backmatter>
    <fr:tree show-metadata="false" hidden-when-empty="true">
      <fr:frontmatter>
        <fr:authors />
        <fr:title text="References">References</fr:title>
      </fr:frontmatter>
      <fr:mainmatter />
    </fr:tree>
    <fr:tree show-metadata="false" hidden-when-empty="true">
      <fr:frontmatter>
        <fr:authors />
        <fr:title text="Context">Context</fr:title>
      </fr:frontmatter>
      <fr:mainmatter />
    </fr:tree>
    <fr:tree show-metadata="false" hidden-when-empty="true">
      <fr:frontmatter>
        <fr:authors />
        <fr:title text="Backlinks">Backlinks</fr:title>
      </fr:frontmatter>
      <fr:mainmatter />
    </fr:tree>
    <fr:tree show-metadata="false" hidden-when-empty="true">
      <fr:frontmatter>
        <fr:authors />
        <fr:title text="Related">Related</fr:title>
      </fr:frontmatter>
      <fr:mainmatter />
    </fr:tree>
    <fr:tree show-metadata="false" hidden-when-empty="true">
      <fr:frontmatter>
        <fr:authors />
        <fr:title text="Contributions">Contributions</fr:title>
      </fr:frontmatter>
      <fr:mainmatter />
    </fr:tree>
  </fr:backmatter>
</fr:tree>
