<?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="false" 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/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: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 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: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: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 show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors />
            <fr:uri>https://xw.is/solaris/</fr:uri>
            <fr:display-uri>solaris</fr:display-uri>
            <fr:route>/solaris/</fr:route>
            <fr:title text="Solaris">Solaris</fr:title>
            <fr:taxon>Software</fr:taxon>
            <fr:meta name="external">https://www.oracle.com/solaris</fr:meta>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>Proprietary Unix operating system originally developed by <fr:link href="/sun/" title="Sun Microsystems" uri="https://xw.is/sun/" display-uri="sun" type="local">Sun Microsystems</fr:link>.</html:p>
          </fr:mainmatter>
        </fr:tree>
      </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>
