<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
<channel>
  <title>Daniel Wayne Armstrong</title>
  <link>https://www.dwarmstrong.org</link>
  <description>Libre all the things</description>
  <generator>Zola</generator>
  <language>en</language>
  <atom:link href="https://www.dwarmstrong.org/feed.xml" rel="self" type="application/rss+xml"/>
  <lastBuildDate>Sun, 12 Apr 2026 00:00:00 +0000</lastBuildDate>
    <item>
      <title>NetBSD Installation with Disk Encryption</title>
      <pubDate>Sun, 12 Apr 2026 00:00:00 +0000</pubDate>
      <link>https://www.dwarmstrong.org/netbsd-encrypt-install/</link>
      <guid>https://www.dwarmstrong.org/netbsd-encrypt-install/</guid>
      <description>&lt;p&gt;The first time I installed &lt;a href=&quot;&#x2F;netbsd-install&#x2F;&quot;&gt;NetBSD&lt;&#x2F;a&gt; I used &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;man.netbsd.org&#x2F;sysinst.8&quot;&gt;sysinst(8)&lt;&#x2F;a&gt;, a menu-based program launched at boot that runs in the console. It has a clear and concise layout and I was quickly up-and-running on my new &lt;a href=&quot;&#x2F;tags&#x2F;bsd&quot;&gt;BSD&lt;&#x2F;a&gt; system.&lt;&#x2F;p&gt;
&lt;p&gt;For my &lt;strong&gt;next&lt;&#x2F;strong&gt; install I wanted to include &lt;strong&gt;disk encryption&lt;&#x2F;strong&gt; to protect personal data in case the device is lost or stolen. Its not really enough to simply encrypt home directories. Passphrases and sensitive data can linger and be extracted from locations such as system logs and swap memory. There is a trade-off to be made between how much to encrypt, the convenience of operating the system, and the ability for the system to boot.&lt;&#x2F;p&gt;
&lt;img class=&quot;floatright&quot; src=&quot;&#x2F;img&#x2F;kitty-01.png&quot; alt=&quot;ascii kitty&quot; width=499 height=176 &#x2F;&gt;
&lt;hr &#x2F;&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-encrypt-install&#x2F;#1-start-here&quot;&gt;1. Start Here&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-encrypt-install&#x2F;#acquire-an-installation-image&quot;&gt;Acquire an installation image&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-encrypt-install&#x2F;#prepare-the-usb-installation-medium&quot;&gt;Prepare the USB installation medium&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-encrypt-install&#x2F;#2-configure-the-live-environment&quot;&gt;2. Configure the Live Environment&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-encrypt-install&#x2F;#connect-to-the-internet&quot;&gt;Connect to the internet&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-encrypt-install&#x2F;#remote-login-to-the-installer&quot;&gt;Remote login to the installer&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-encrypt-install&#x2F;#3-prepare-the-disk&quot;&gt;3. Prepare the DISK&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-encrypt-install&#x2F;#identify-disks-and-partitions&quot;&gt;Identify disks and partitions&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-encrypt-install&#x2F;#define-disk-variable&quot;&gt;Define DISK variable&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-encrypt-install&#x2F;#wipe-disk&quot;&gt;Wipe DISK&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-encrypt-install&#x2F;#partition-disk&quot;&gt;Partition DISK&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-encrypt-install&#x2F;#define-wedge-variables&quot;&gt;Define wedge variables&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-encrypt-install&#x2F;#format-and-mount-the-esp-wedge&quot;&gt;Format and mount the ESP wedge&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-encrypt-install&#x2F;#add-efi-boot-entries-to-esp&quot;&gt;Add EFI boot entries to ESP&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-encrypt-install&#x2F;#format-and-mount-the-root-wedge&quot;&gt;Format and mount the root wedge&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-encrypt-install&#x2F;#4-disk-encryption&quot;&gt;4. Disk Encryption&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-encrypt-install&#x2F;#create-encrypted-device&quot;&gt;Create encrypted device&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-encrypt-install&#x2F;#create-disklabels&quot;&gt;Create disklabels&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-encrypt-install&#x2F;#verify-encrypted-device&quot;&gt;Verify encrypted device&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-encrypt-install&#x2F;#format-and-mount-disklabels&quot;&gt;Format and mount disklabels&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-encrypt-install&#x2F;#5-installation&quot;&gt;5. Installation&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-encrypt-install&#x2F;#6-configure-the-system&quot;&gt;6. Configure the System&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-encrypt-install&#x2F;#chroot&quot;&gt;Chroot&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-encrypt-install&#x2F;#directories&quot;&gt;Directories&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-encrypt-install&#x2F;#devices&quot;&gt;Devices&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-encrypt-install&#x2F;#root-password&quot;&gt;Root password&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-encrypt-install&#x2F;#superuser&quot;&gt;Superuser&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-encrypt-install&#x2F;#fstab&quot;&gt;Fstab&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-encrypt-install&#x2F;#startup&quot;&gt;Startup&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-encrypt-install&#x2F;#keyboard&quot;&gt;Keyboard&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-encrypt-install&#x2F;#timezone&quot;&gt;Timezone&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-encrypt-install&#x2F;#network-interface&quot;&gt;Network interface&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-encrypt-install&#x2F;#terminals&quot;&gt;Terminals&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-encrypt-install&#x2F;#7-finish-up&quot;&gt;7. Finish Up&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-encrypt-install&#x2F;#8-resources&quot;&gt;8. Resources&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;1-start-here&quot;&gt;1. Start Here&lt;&#x2F;h2&gt;
&lt;p&gt;Throughout this HOWTO, if you see square brackets &lt;code&gt;[]&lt;&#x2F;code&gt; in code blocks, that means the word of code (square brackets included) should be replaced with something else. This is detailed in the instructions before or after the code block.&lt;&#x2F;p&gt;
&lt;p&gt;NetBSD will be installed as the sole operating system on a single disk using a four-partition layout:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Partition &lt;code&gt;ESP&lt;&#x2F;code&gt; is the EFI system partition.&lt;&#x2F;li&gt;
&lt;li&gt;Partition &lt;code&gt;root&lt;&#x2F;code&gt; hosts a minimal root filesystem that boots to an encryption passphrase prompt, which upon entry unlocks…&lt;&#x2F;li&gt;
&lt;li&gt;… the encrypted device on partition &lt;code&gt;syscgd&lt;&#x2F;code&gt; containing the contents of &lt;code&gt;var&lt;&#x2F;code&gt;, &lt;code&gt;usr&lt;&#x2F;code&gt;, and &lt;code&gt;home&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Partition &lt;code&gt;swap&lt;&#x2F;code&gt; is swap memory auto-encrypted at boot using a random key.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;A few assumptions:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Target device is &lt;code&gt;amd64&lt;&#x2F;code&gt; architecture using UEFI to boot.&lt;&#x2F;li&gt;
&lt;li&gt;Secure boot is disabled on target device.&lt;&#x2F;li&gt;
&lt;li&gt;Network access during install uses a wired interface.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Sysinst does not provide the option for encrypting the system in this manner, so early in the install process I switch to the console and proceed to manually install NetBSD.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;acquire-an-installation-image&quot;&gt;Acquire an installation image&lt;&#x2F;h3&gt;
&lt;p&gt;The latest official installation images (as of April 2026) are available here: &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;cdn.netbsd.org&#x2F;pub&#x2F;NetBSD&#x2F;images&#x2F;11.0_RC3&#x2F;&quot;&gt;Images and torrents&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Download the &lt;code&gt;NetBSD-11.0_RC3-amd64-install.img.gz&lt;&#x2F;code&gt; image and the &lt;code&gt;SHA512&lt;&#x2F;code&gt; file for verification:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;wget https:&#x2F;&#x2F;cdn.netbsd.org&#x2F;pub&#x2F;NetBSD&#x2F;images&#x2F;11.0_RC3&#x2F;NetBSD-11.0_RC3-amd64-install.img.gz
&lt;&#x2F;span&gt;&lt;span&gt;wget https:&#x2F;&#x2F;cdn.netbsd.org&#x2F;pub&#x2F;NetBSD&#x2F;images&#x2F;11.0_RC3&#x2F;SHA512
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Verify the image using &lt;code&gt;sha512sum&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;sha512sum -c --ignore-missing SHA512 
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Decompress the image:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;gunzip NetBSD-11.0_RC3-amd64-install.img.gz
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;prepare-the-usb-installation-medium&quot;&gt;Prepare the USB installation medium&lt;&#x2F;h3&gt;
&lt;p&gt;Write the installer to an &lt;strong&gt;unmounted&lt;&#x2F;strong&gt; USB storage device running the &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;man.netbsd.org&#x2F;dd.1&quot;&gt;dd(1)&lt;&#x2F;a&gt; command as &lt;code&gt;root&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;WARNING&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
&lt;strong&gt;Be very careful to note the proper device (which can be identified with &lt;code&gt;lsblk&lt;&#x2F;code&gt;). All contents on the device will be lost!&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Example: On a Linux system, if a USB stick appears as &lt;code&gt;sdx1&lt;&#x2F;code&gt;, then write the installer to &lt;code&gt;sdx&lt;&#x2F;code&gt; (omit partition number):&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;dd bs=4M conv=fsync oflag=direct status=progress if=NetBSD-11.0_RC3-amd64-install.img of=&#x2F;dev&#x2F;sdx
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;2-configure-the-live-environment&quot;&gt;2. Configure the Live Environment&lt;&#x2F;h2&gt;
&lt;p&gt;Boot the target device from the NetBSD installation medium. Select Option &lt;code&gt;1&lt;&#x2F;code&gt; (default) to &lt;code&gt;Install NetBSD&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;After the installer has successfully booted into the NetBSD kernel, a prompt appears to select which &lt;strong&gt;language&lt;&#x2F;strong&gt; will be used for installation messages, followed by a prompt to select a different &lt;strong&gt;keyboard type&lt;&#x2F;strong&gt; if desired or leave unchanged.&lt;&#x2F;p&gt;
&lt;p&gt;Next up the menu-based &lt;strong&gt;sysinst&lt;&#x2F;strong&gt; program is launched:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;NetBSD-11.0_RC3 Install System
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;a: Install NetBSD to hard disk
&lt;&#x2F;span&gt;&lt;span&gt; b: Upgrade NetBSD on a hard disk
&lt;&#x2F;span&gt;&lt;span&gt; c: Re-install sets or install additional sets
&lt;&#x2F;span&gt;&lt;span&gt; d: Reboot the computer
&lt;&#x2F;span&gt;&lt;span&gt; e: Utility menu
&lt;&#x2F;span&gt;&lt;span&gt; f: Config menu
&lt;&#x2F;span&gt;&lt;span&gt; x: Exit Install System
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;connect-to-the-internet&quot;&gt;Connect to the internet&lt;&#x2F;h3&gt;
&lt;p&gt;At the &lt;code&gt;Install System&lt;&#x2F;code&gt; main menu, select &lt;code&gt;&amp;gt;e: Utility menu&lt;&#x2F;code&gt; then &lt;code&gt;&amp;gt;c: Configure network&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;Available interfaces&lt;&#x2F;code&gt; lists the network interfaces detected by the NetBSD installer.&lt;&#x2F;p&gt;
&lt;p&gt;Example: With my target device &lt;code&gt;Available interfaces&lt;&#x2F;code&gt; lists two: &lt;code&gt;wm0&lt;&#x2F;code&gt; (wired) and &lt;code&gt;iwn0&lt;&#x2F;code&gt; (wireless). I choose to configure the wired ethernet interface:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;Network media (empty to autoconfigure) [autoselect]: &amp;lt;enter&amp;gt;
&lt;&#x2F;span&gt;&lt;span&gt;Perform autoconfiguration?
&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;a: Yes
&lt;&#x2F;span&gt;&lt;span&gt;Your host name: foobox
&lt;&#x2F;span&gt;&lt;span&gt;Your DNS domain: home.arpa
&lt;&#x2F;span&gt;&lt;span&gt;The following are the values you entered.
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;[...]
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;Are they OK?
&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;a: Yes
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;remote-login-to-the-installer&quot;&gt;Remote login to the installer&lt;&#x2F;h3&gt;
&lt;p&gt;Make this manual installation process easier (i.e. cut-n-paste commands) by remotely logging into the installer via &lt;code&gt;ssh&lt;&#x2F;code&gt; from another computer.&lt;&#x2F;p&gt;
&lt;p&gt;Open a shell by selecting &lt;code&gt;&amp;gt;a: Run &#x2F;bin&#x2F;sh&lt;&#x2F;code&gt; from the &lt;code&gt;Utilities&lt;&#x2F;code&gt; menu.&lt;&#x2F;p&gt;
&lt;p&gt;Set a password for &lt;code&gt;root&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;passwd
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Open the &lt;code&gt;sshd_config&lt;&#x2F;code&gt; file for editing using the &lt;code&gt;vi&lt;&#x2F;code&gt; editor:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;vi &#x2F;etc&#x2F;ssh&#x2F;sshd_config
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Set permission to allow &lt;code&gt;root&lt;&#x2F;code&gt; to login:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;PermitRootLogin yes
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Save changes and exit.&lt;&#x2F;p&gt;
&lt;p&gt;Start the &lt;code&gt;sshd&lt;&#x2F;code&gt; daemon:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;&#x2F;etc&#x2F;rc.d&#x2F;sshd onestart
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Retrieve the IP address for the active interface configured earlier (example: &lt;code&gt;wm0&lt;&#x2F;code&gt;):&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;ifconfig wm0
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Switch to the other computer and &lt;code&gt;ssh&lt;&#x2F;code&gt; into the target device:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;ssh root@[ip_address]
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;… where &lt;code&gt;[ip_address]&lt;&#x2F;code&gt; is the target device’s address obtained with the &lt;code&gt;ifconfig&lt;&#x2F;code&gt; command above.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;3-prepare-the-disk&quot;&gt;3. Prepare the DISK&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
For the purposes of this HOWTO, the example target device has a single NVMe disk with an existing install of &lt;a href=&quot;&#x2F;tags&#x2F;linux&quot;&gt;Linux&lt;&#x2F;a&gt; that will be erased and replaced by NetBSD. Device IDs and storage sizes will vary between devices.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;identify-disks-and-partitions&quot;&gt;Identify disks and partitions&lt;&#x2F;h3&gt;
&lt;p&gt;Discover what disk devices and partitions have been recognized by the kernel:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;# sysctl hw.disknames
&lt;&#x2F;span&gt;&lt;span&gt;hw.disknames = ld0 dk0 dk1 dk2 dk3 sd0 dk4 dk5
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;NVMe devices show up as &lt;code&gt;ld&lt;&#x2F;code&gt; and hard disks are identified by &lt;code&gt;wd&lt;&#x2F;code&gt;. USB devices usually show up as &lt;code&gt;sd&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;The &lt;code&gt;dk&lt;&#x2F;code&gt; devices are partitions (know as &lt;strong&gt;wedges&lt;&#x2F;strong&gt; in NetBSD parlance) on the storage devices, and this early after boot are usually displayed in order, that is: &lt;code&gt;dk0&lt;&#x2F;code&gt; through &lt;code&gt;dk3&lt;&#x2F;code&gt; are wedges on the NVMe target device &lt;code&gt;ld0&lt;&#x2F;code&gt;, and &lt;code&gt;dk4&lt;&#x2F;code&gt; and &lt;code&gt;dk5&lt;&#x2F;code&gt; on the USB installer &lt;code&gt;sd0&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Verify by asking for a list of wedges on &lt;code&gt;sd0&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;# dkctl sd0 listwedges
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;dev&#x2F;rsd0: 2 wedges:
&lt;&#x2F;span&gt;&lt;span&gt;dk4: EFI system, 262144 blocks at 2048, type: msdos
&lt;&#x2F;span&gt;&lt;span&gt;dk5: 30c4cc4e-5369-449c-8994-a4b1ea665b4b, 4853760 blocks at 264192, type: ffs
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Verify which device the installer booted from:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;# dmesg | fgrep &amp;quot;root on&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;[     4.158650] root on dk5
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;There is also the &lt;code&gt;nvmectl&lt;&#x2F;code&gt; command (use &lt;code&gt;atactl&lt;&#x2F;code&gt; for SATA drives):&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;# nvmectl identify nvme0 | egrep &amp;#39;Model|Device type|Capacity&amp;#39;
&lt;&#x2F;span&gt;&lt;span&gt;Model Number:               Samsung SSD 980 1TB
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;define-disk-variable&quot;&gt;Define DISK variable&lt;&#x2F;h3&gt;
&lt;p&gt;The NVMe storage device detected above as &lt;code&gt;ld0&lt;&#x2F;code&gt; is where NetBSD will be installed. Adjust accordingly for your own storage device:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;DISK=&amp;quot;ld0&amp;quot;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;wipe-disk&quot;&gt;Wipe DISK&lt;&#x2F;h3&gt;
&lt;p&gt;Wipe existing file systems and partition table on DISK:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;gpt destroy $DISK &amp;amp;&amp;amp; gpt show $DISK
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;partition-disk&quot;&gt;Partition DISK&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
I typically set the swap partition size equal to the amount of physical RAM to a maximum &lt;code&gt;16g&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Create a GPT partition table on DISK with the following layout:&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th style=&quot;text-align: center&quot;&gt;Number&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: center&quot;&gt;Size&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: center&quot;&gt;Type&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: center&quot;&gt;Use as&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center&quot;&gt;1&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;550m&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;efi&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;ESP partition&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center&quot;&gt;2&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;6g&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;ffs&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;Root partition&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center&quot;&gt;3&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;16g&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;swap&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;Encrypted swap partition&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center&quot;&gt;4&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;-&amp;gt;END&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;cgd&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;Encrypted system partition&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;p&gt;Create a new GPT partition table:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;gpt create -f $DISK
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Create the wedges:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;gpt add -l &amp;quot;ESP&amp;quot; -t efi -s 550m $DISK
&lt;&#x2F;span&gt;&lt;span&gt;gpt add -l &amp;quot;root&amp;quot; -t ffs -s 6g $DISK
&lt;&#x2F;span&gt;&lt;span&gt;gpt add -l &amp;quot;swap&amp;quot; -t swap -s 16g $DISK
&lt;&#x2F;span&gt;&lt;span&gt;gpt add -l &amp;quot;syscgd&amp;quot; -t cgd $DISK
&lt;&#x2F;span&gt;&lt;span&gt;gpt show $DISK
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;define-wedge-variables&quot;&gt;Define wedge variables&lt;&#x2F;h3&gt;
&lt;p&gt;List wedges:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;# dkctl $DISK listwedges
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;dev&#x2F;rld0: 4 wedges:
&lt;&#x2F;span&gt;&lt;span&gt;dk2: ESP, 524288 blocks at 34, type: msdos
&lt;&#x2F;span&gt;&lt;span&gt;dk3: root, 16777216 blocks at 524322, type: ffs
&lt;&#x2F;span&gt;&lt;span&gt;dk4: swap, 33554432 blocks at 17301538, type: swap
&lt;&#x2F;span&gt;&lt;span&gt;dk5: syscgd, 1902669165 blocks at 50855970, type: cgd
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
Your &lt;code&gt;dk[number]&lt;&#x2F;code&gt; numbering may differ from above. Adjust accordingly:&lt;&#x2F;p&gt;
&lt;p&gt;Define variables:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;DK_ESP=&amp;quot;dk2&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;DK_ROOT=&amp;quot;dk3&amp;quot;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;format-and-mount-the-esp-wedge&quot;&gt;Format and mount the ESP wedge&lt;&#x2F;h3&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;newfs_msdos &#x2F;dev&#x2F;r${DK_ESP} &amp;amp;&amp;amp; mount &#x2F;dev&#x2F;${DK_ESP} &#x2F;mnt
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;add-efi-boot-entries-to-esp&quot;&gt;Add EFI boot entries to ESP&lt;&#x2F;h3&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;mkdir -p &#x2F;mnt&#x2F;EFI&#x2F;boot &amp;amp;&amp;amp; cp -v &#x2F;usr&#x2F;mdec&#x2F;*.efi &#x2F;mnt&#x2F;EFI&#x2F;boot
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Unmount wedge:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;umount &#x2F;mnt
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;format-and-mount-the-root-wedge&quot;&gt;Format and mount the root wedge&lt;&#x2F;h3&gt;
&lt;p&gt;Format and mount the root wedge with the &lt;code&gt;FFSv2&lt;&#x2F;code&gt; file system with support for extended attributes and access control lists:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;newfs -O 2ea &#x2F;dev&#x2F;r${DK_ROOT} &amp;amp;&amp;amp; mount &#x2F;dev&#x2F;${DK_ROOT} &#x2F;targetroot
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;4-disk-encryption&quot;&gt;4. Disk Encryption&lt;&#x2F;h2&gt;
&lt;p&gt;NetBSD uses the &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.netbsd.org&#x2F;docs&#x2F;guide&#x2F;en&#x2F;chap-cgd.html&quot;&gt;cryptographic device driver&lt;&#x2F;a&gt; (CGD) to create and manage encrypted devices.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;create-encrypted-device&quot;&gt;Create encrypted device&lt;&#x2F;h3&gt;
&lt;p&gt;Using &lt;code&gt;cgdconfig&lt;&#x2F;code&gt;, a parameters file is generated that stores the encryption type, key length, and a random password salt for the new encrypted device.&lt;&#x2F;p&gt;
&lt;p&gt;There are a few &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.netbsd.org&#x2F;docs&#x2F;guide&#x2F;en&#x2F;chap-cgd.html#chap-cgd-components-ciphers&quot;&gt;different encryption ciphers supported&lt;&#x2F;a&gt;. I choose &lt;code&gt;aes-xts&lt;&#x2F;code&gt; with a 512-bit key:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;mkdir -p &#x2F;targetroot&#x2F;etc&#x2F;cgd &amp;amp;&amp;amp; chmod 700 &#x2F;targetroot&#x2F;etc&#x2F;cgd
&lt;&#x2F;span&gt;&lt;span&gt;cgdconfig -g -V disklabel -o &#x2F;targetroot&#x2F;etc&#x2F;cgd&#x2F;syscgd aes-xts 512
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
&lt;code&gt;NAME=syscgd&lt;&#x2F;code&gt; is the label for the CGD wedge created earlier.&lt;&#x2F;p&gt;
&lt;p&gt;Create the encrypted device and assign it a passphrase. This passphrase will be used to open the CGD device at boot:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;cgdconfig -V re-enter cgd0 NAME=syscgd &#x2F;targetroot&#x2F;etc&#x2F;cgd&#x2F;syscgd
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;create-disklabels&quot;&gt;Create disklabels&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
Disklabels &lt;code&gt;c&lt;&#x2F;code&gt; and &lt;code&gt;d&lt;&#x2F;code&gt; have &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;man.netbsd.org&#x2F;disklabel.5&quot;&gt;special meaning in NetBSD&lt;&#x2F;a&gt; and should not be used.&lt;&#x2F;p&gt;
&lt;p&gt;Within the encrypted device, three disklabels are created:&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th style=&quot;text-align: center&quot;&gt;Disklabel&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: center&quot;&gt;Mountpoint&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: center&quot;&gt;Size&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center&quot;&gt;cgd0a&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;&#x2F;var&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;8GB&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center&quot;&gt;cgd0b&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;&#x2F;usr&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;48GB&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center&quot;&gt;cgd0e&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;&#x2F;home&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;-&amp;gt;END&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;p&gt;Create the labels using &lt;code&gt;disklabel&lt;&#x2F;code&gt; in interactive mode:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;# disklabel -Ii cgd0
&lt;&#x2F;span&gt;&lt;span&gt;Enter &amp;#39;?&amp;#39; for help
&lt;&#x2F;span&gt;&lt;span&gt;...
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Create &lt;code&gt;cgd0a&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;partition&amp;gt;a
&lt;&#x2F;span&gt;&lt;span&gt;Filesystem type [4.2BSD]: &amp;lt;enter&amp;gt;
&lt;&#x2F;span&gt;&lt;span&gt;Start offset (&amp;#39;x&amp;#39; to start after partition &amp;#39;x&amp;#39;) [0c, 0s, 0M]: &amp;lt;enter&amp;gt;
&lt;&#x2F;span&gt;&lt;span&gt;Partition size (&amp;#39;$&amp;#39; for all remaining) [947594c, 1940672512s, 947594M]: 8G
&lt;&#x2F;span&gt;&lt;span&gt;  a: ...
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Create &lt;code&gt;cgd0b&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;partition&amp;gt;b
&lt;&#x2F;span&gt;&lt;span&gt;Filesystem type [unused]: 4.2BSD
&lt;&#x2F;span&gt;&lt;span&gt;Start offset (&amp;#39;x&amp;#39; to start after partition &amp;#39;x&amp;#39;) [0c, 0s, 0M]: a
&lt;&#x2F;span&gt;&lt;span&gt;Partition size (&amp;#39;$&amp;#39; for all remaining) [0c, 0s, 0M]: 48G    
&lt;&#x2F;span&gt;&lt;span&gt;  b: ...
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Create &lt;code&gt;cgd0e&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;partition&amp;gt;e
&lt;&#x2F;span&gt;&lt;span&gt;Filesystem type [unused]: 4.2BSD
&lt;&#x2F;span&gt;&lt;span&gt;Start offset (&amp;#39;x&amp;#39; to start after partition &amp;#39;x&amp;#39;) [0c, 0s, 0M]: b
&lt;&#x2F;span&gt;&lt;span&gt;Partition size (&amp;#39;$&amp;#39; for all remaining) [0c, 0s, 0M]: $
&lt;&#x2F;span&gt;&lt;span&gt; e: ...
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Write the label and quit:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;partition&amp;gt;W
&lt;&#x2F;span&gt;&lt;span&gt;Label disk [n]?y
&lt;&#x2F;span&gt;&lt;span&gt;Label written
&lt;&#x2F;span&gt;&lt;span&gt;partition&amp;gt;Q
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;verify-encrypted-device&quot;&gt;Verify encrypted device&lt;&#x2F;h3&gt;
&lt;p&gt;Set configuration in target device:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;echo &amp;#39;cgd0 NAME=syscgd &#x2F;etc&#x2F;cgd&#x2F;syscgd&amp;#39; &amp;gt; &#x2F;targetroot&#x2F;etc&#x2F;cgd&#x2F;cgd.conf
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Close the CGD device:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;cgdconfig -u cgd0
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Unlock the CGD device again with the passphrase set earlier:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;cgdconfig cgd0 NAME=syscgd &#x2F;targetroot&#x2F;etc&#x2F;cgd&#x2F;syscgd
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The &lt;code&gt;cgd0&lt;&#x2F;code&gt; drive should now be open and the disklabel visible:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;disklabel cgd0
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;format-and-mount-disklabels&quot;&gt;Format and mount disklabels&lt;&#x2F;h3&gt;
&lt;p&gt;Format:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;newfs -O 2ea cgd0a
&lt;&#x2F;span&gt;&lt;span&gt;newfs -O 2ea cgd0b
&lt;&#x2F;span&gt;&lt;span&gt;newfs -O 2ea cgd0e
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Mount:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;mkdir &#x2F;targetroot&#x2F;var &#x2F;targetroot&#x2F;usr &#x2F;targetroot&#x2F;home
&lt;&#x2F;span&gt;&lt;span&gt;mount &#x2F;dev&#x2F;cgd0a &#x2F;targetroot&#x2F;var
&lt;&#x2F;span&gt;&lt;span&gt;mount &#x2F;dev&#x2F;cgd0b &#x2F;targetroot&#x2F;usr
&lt;&#x2F;span&gt;&lt;span&gt;mount &#x2F;dev&#x2F;cgd0e &#x2F;targetroot&#x2F;home
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;5-installation&quot;&gt;5. Installation&lt;&#x2F;h2&gt;
&lt;p&gt;The new system is composed of &lt;strong&gt;sets&lt;&#x2F;strong&gt; (collections of packages) installed to the target device. These sets are located in &lt;code&gt;&#x2F;amd64&#x2F;binary&#x2F;sets&lt;&#x2F;code&gt;. Move into that directory:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;cd &#x2F;amd64&#x2F;binary&#x2F;sets &amp;amp;&amp;amp; ls
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
Adding flag &lt;code&gt;p&lt;&#x2F;code&gt; to the &lt;code&gt;tar&lt;&#x2F;code&gt; command is important. It ensures that all files preserve their &lt;code&gt;owners&lt;&#x2F;code&gt; and &lt;code&gt;mode&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;At a minimum, you must select a kernel and the &lt;code&gt;base&lt;&#x2F;code&gt; and &lt;code&gt;etc&lt;&#x2F;code&gt; sets. Below are the sets I choose to install for a desktop setup:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;# for set in base comp etc games gpufw kern-GENERIC man misc modules rescue tests text xbase xcomp xetc xfont xserver; do
&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt; tar -xvzpf $set.tar.xz -C &#x2F;targetroot
&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt; done
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;6-configure-the-system&quot;&gt;6. Configure the System&lt;&#x2F;h2&gt;
&lt;p&gt;Chroot into the freshly installed NetBSD and configure the new OS.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;chroot&quot;&gt;Chroot&lt;&#x2F;h3&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;chroot &#x2F;targetroot
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;directories&quot;&gt;Directories&lt;&#x2F;h3&gt;
&lt;p&gt;Create the &lt;code&gt;kern&lt;&#x2F;code&gt; and &lt;code&gt;proc&lt;&#x2F;code&gt; directories:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;mkdir kern proc
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;devices&quot;&gt;Devices&lt;&#x2F;h3&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;cd dev
&lt;&#x2F;span&gt;&lt;span&gt;sh MAKEDEV all
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;On a previous install, after rebooting the boot process halted with the error message:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;&#x2F;etc&#x2F;defaults&#x2F;rc.conf: cannot create &#x2F;dev&#x2F;null: read-only file system
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;etc&#x2F;rc: cannot create &#x2F;dev&#x2F;null: read-only file system
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;code&gt;MAKEDEV&lt;&#x2F;code&gt; had created &lt;code&gt;null&lt;&#x2F;code&gt; but it was incorrectly configured:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;# ls -l &#x2F;dev&#x2F;null
&lt;&#x2F;span&gt;&lt;span&gt;-rw-r--r--  1 root  wheel  0 Apr  5 13:06 null
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;To avoid this error, remove the existing &lt;code&gt;null&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;rm &#x2F;dev&#x2F;null
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Re-create &lt;code&gt;null&lt;&#x2F;code&gt; with &lt;code&gt;mknod&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;# mknod -m 0666 -u root -g wheel &#x2F;dev&#x2F;null c 2 2 &amp;amp;&amp;amp; ls -l &#x2F;dev&#x2F;null
&lt;&#x2F;span&gt;&lt;span&gt;crw-rw-rw-  1 root  wheel  2, 2 Apr 11 13:10 &#x2F;dev&#x2F;null
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;root-password&quot;&gt;Root password&lt;&#x2F;h3&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;passwd
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;superuser&quot;&gt;Superuser&lt;&#x2F;h3&gt;
&lt;p&gt;Create a user account assigned to the &lt;code&gt;wheel&lt;&#x2F;code&gt; and &lt;code&gt;operator&lt;&#x2F;code&gt; groups:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;useradd -G [groups] -m [username]
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Example: Create an account for user &lt;code&gt;foo&lt;&#x2F;code&gt; and assign a password:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;useradd -G wheel,operator -m foo
&lt;&#x2F;span&gt;&lt;span&gt;passwd foo
&lt;&#x2F;span&gt;&lt;span&gt;userinfo foo
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;fstab&quot;&gt;Fstab&lt;&#x2F;h3&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;# cat &amp;gt; &#x2F;etc&#x2F;fstab &amp;lt;&amp;lt; EOF
&lt;&#x2F;span&gt;&lt;span&gt;NAME=root         &#x2F;         ffs     rw,log,noatime  	1 1
&lt;&#x2F;span&gt;&lt;span&gt;NAME=swap         none      swap    sw,dp   		0 0
&lt;&#x2F;span&gt;&lt;span&gt;tmpfs             &#x2F;tmp      tmpfs   rw,-m1777,-sram%25
&lt;&#x2F;span&gt;&lt;span&gt;kernfs            &#x2F;kern     kernfs  rw
&lt;&#x2F;span&gt;&lt;span&gt;ptyfs             &#x2F;dev&#x2F;pts  ptyfs   rw
&lt;&#x2F;span&gt;&lt;span&gt;procfs            &#x2F;proc     procfs  rw
&lt;&#x2F;span&gt;&lt;span&gt;tmpfs             &#x2F;var&#x2F;shm  tmpfs   rw,-m1777,-sram%25
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;dev&#x2F;cgd0a        &#x2F;var      ffs     rw,log,noatime      1 2
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;dev&#x2F;cgd0b        &#x2F;usr      ffs     rw,log,noatime      1 2
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;dev&#x2F;cgd0e        &#x2F;home     ffs     rw,log,noatime      1 2 
&lt;&#x2F;span&gt;&lt;span&gt;EOF
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;startup&quot;&gt;Startup&lt;&#x2F;h3&gt;
&lt;p&gt;Open &lt;code&gt;rc.conf&lt;&#x2F;code&gt; for editing:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;vi &#x2F;etc&#x2F;rc.conf
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
In this HOWTO, my hostname was earlier set to &lt;code&gt;foobox.home.arpa&lt;&#x2F;code&gt; during network setup, and my wired interface is &lt;code&gt;wm0&lt;&#x2F;code&gt;. Adjust accordingly:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;# If this is not set to YES, the system will drop into single-user mode.
&lt;&#x2F;span&gt;&lt;span&gt;#
&lt;&#x2F;span&gt;&lt;span&gt;rc_configured=YES
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;# Add local overrides below.
&lt;&#x2F;span&gt;&lt;span&gt;#
&lt;&#x2F;span&gt;&lt;span&gt;# Wait for CGD to be unlocked before mounting.
&lt;&#x2F;span&gt;&lt;span&gt;critical_filesystems_local=&amp;quot;OPTIONAL:&#x2F;var OPTIONAL:&#x2F;usr&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;dhcpcd=YES
&lt;&#x2F;span&gt;&lt;span&gt;dhcpcd_flags=&amp;quot;-qM wm0&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;hostname=foobox.home.arpa
&lt;&#x2F;span&gt;&lt;span&gt;sshd=YES
&lt;&#x2F;span&gt;&lt;span&gt;ntpd=YES
&lt;&#x2F;span&gt;&lt;span&gt;ntpdate=YES
&lt;&#x2F;span&gt;&lt;span&gt;wscons=YES
&lt;&#x2F;span&gt;&lt;span&gt;cgd=YES
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Save changes and exit.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
Any &lt;code&gt;Error: &#x2F;dev&#x2F;ttyp0: No such file or directory&lt;&#x2F;code&gt; messages can be safely ignored.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;keyboard&quot;&gt;Keyboard&lt;&#x2F;h3&gt;
&lt;p&gt;A full list of keyboard mappings and variants can be found in &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;man.netbsd.org&#x2F;wskbd.4&quot;&gt;wskbd(4)&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Set &lt;code&gt;encoding [type_of_keyboard]&lt;&#x2F;code&gt; in &lt;code&gt;wscons.conf&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Open file for editing:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;vi &#x2F;etc&#x2F;wscons.conf
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Example: I use the non-default &lt;code&gt;colemak&lt;&#x2F;code&gt; keymap:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;encoding us.colemak
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Save changes and exit.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;timezone&quot;&gt;Timezone&lt;&#x2F;h3&gt;
&lt;p&gt;Create a symlink to the appropriate timezone for your &lt;code&gt;localtime&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;ln -sf &#x2F;usr&#x2F;share&#x2F;zoneinfo&#x2F;[region&#x2F;&amp;lt;city_or_sub-region] &#x2F;etc&#x2F;localtime
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Example: Set &lt;code&gt;localtime&lt;&#x2F;code&gt; to &lt;code&gt;Canada&#x2F;Eastern&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;ln -sf &#x2F;usr&#x2F;share&#x2F;zoneinfo&#x2F;Canada&#x2F;Eastern &#x2F;etc&#x2F;localtime &amp;amp;&amp;amp; date
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;network-interface&quot;&gt;Network interface&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;man.netbsd.org&#x2F;ifconfig.if.5&quot;&gt;ifconfig.if(5)&lt;&#x2F;a&gt; contains the configuration details for each network interface.&lt;&#x2F;p&gt;
&lt;p&gt;Example: Create an interface file for the &lt;code&gt;wm0&lt;&#x2F;code&gt; interface that is assigned an IP address via DHCP:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;# cat &amp;gt; &#x2F;etc&#x2F;ifconfig.wm0 &amp;lt;&amp;lt; EOF
&lt;&#x2F;span&gt;&lt;span&gt;up
&lt;&#x2F;span&gt;&lt;span&gt;media autoselect
&lt;&#x2F;span&gt;&lt;span&gt;EOF
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;terminals&quot;&gt;Terminals&lt;&#x2F;h3&gt;
&lt;p&gt;Set the status of terminals &lt;code&gt;ttyE1-ttyE3&lt;&#x2F;code&gt; in &lt;code&gt;ttys&lt;&#x2F;code&gt; from &lt;code&gt;off&lt;&#x2F;code&gt; to &lt;code&gt;on&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Open file for editing:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;vi &#x2F;etc&#x2F;ttys
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This is how it should look:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;# name  getty                           type    status          comments
&lt;&#x2F;span&gt;&lt;span&gt;#
&lt;&#x2F;span&gt;&lt;span&gt;console &amp;quot;&#x2F;usr&#x2F;libexec&#x2F;getty Pc&amp;quot;         wsvt25  off secure
&lt;&#x2F;span&gt;&lt;span&gt;constty &amp;quot;&#x2F;usr&#x2F;libexec&#x2F;getty Pc&amp;quot;         wsvt25  on secure
&lt;&#x2F;span&gt;&lt;span&gt;ttyE0   &amp;quot;&#x2F;usr&#x2F;libexec&#x2F;getty Pc&amp;quot;         wsvt25  off secure
&lt;&#x2F;span&gt;&lt;span&gt;ttyE1   &amp;quot;&#x2F;usr&#x2F;libexec&#x2F;getty Pc&amp;quot;         wsvt25  on secure
&lt;&#x2F;span&gt;&lt;span&gt;ttyE2   &amp;quot;&#x2F;usr&#x2F;libexec&#x2F;getty Pc&amp;quot;         wsvt25  on secure
&lt;&#x2F;span&gt;&lt;span&gt;ttyE3   &amp;quot;&#x2F;usr&#x2F;libexec&#x2F;getty Pc&amp;quot;         wsvt25  on secure
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Save changes and exit.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;7-finish-up&quot;&gt;7. Finish Up&lt;&#x2F;h2&gt;
&lt;p&gt;Exit chroot:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;exit
&lt;&#x2F;span&gt;&lt;span&gt;cd &#x2F;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Unmount:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;umount &#x2F;targetroot&#x2F;home
&lt;&#x2F;span&gt;&lt;span&gt;umount &#x2F;targetroot&#x2F;usr
&lt;&#x2F;span&gt;&lt;span&gt;umount &#x2F;targetroot&#x2F;var
&lt;&#x2F;span&gt;&lt;span&gt;umount &#x2F;targetroot
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Close encrypted device:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;cgdconfig -u cgd0
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Reboot system:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;shutdown -r now
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
When prompted for the passphrase to unlock the encrypted device, keymap is &lt;code&gt;us qwerty&lt;&#x2F;code&gt; regardless of keymap that might have been set in &lt;code&gt;wscons.conf&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;User is prompted for the passphrase to unlock the encrypted &lt;code&gt;syscgd&lt;&#x2F;code&gt; device. Upon success, boot resumes:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;NetBSD&#x2F;amd64 (foobox.home.arpa) (constty)
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;login: root
&lt;&#x2F;span&gt;&lt;span&gt;Password:
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;Welcome to NetBSD!&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;p&gt;To shutdown&#x2F;poweroff the system:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;shutdown -p now
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;8-resources&quot;&gt;8. Resources&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;This HOWTO posted by &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;vsis.online&#x2F;&quot;&gt;vsis&lt;&#x2F;a&gt; was crucial in getting my own system configured with encryption: &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;vsis.online&#x2F;posts&#x2F;2024-05-27-uefi-full-disk-encryption&#x2F;&quot;&gt;NetBSD - UEFI installation with Full Disk Encryption&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Alternative approach for disk encryption using a ramdisk on BIOS boot systems: &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.unitedbsd.com&#x2F;d&#x2F;461-netbsd-full-disk-encryption-with-cgd&quot;&gt;NetBSD Full-Disk Encryption with CGD (BIOS&#x2F;GPT)&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;NetBSD INSTALL: &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;ftp.netbsd.org&#x2F;pub&#x2F;NetBSD&#x2F;NetBSD-10.1&#x2F;amd64&#x2F;INSTALL.html&quot;&gt;Installation procedure for NetBSD&#x2F;amd64&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;NetBSD Wiki: &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.netbsd.org&#x2F;Installation_on_UEFI_systems&#x2F;&quot;&gt;Installing NetBSD on a x86 system with UEFI&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;NetBSD Guide: &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.netbsd.org&#x2F;docs&#x2F;guide&#x2F;en&#x2F;chap-cgd.html&quot;&gt;Chapter 14. The cryptographic device driver (CGD)&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Suggested tools for inspecting disks: &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.unitedbsd.com&#x2F;d&#x2F;1157-disk-management-from-installation-iso&quot;&gt;Disk management from Installation ISO&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Skipping sysinst install for a more “hands-on” approach: &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.unitedbsd.com&#x2F;d&#x2F;771-netbsd-desktop-part-1-manual-netbsd-installation-on-gptuefi&quot;&gt;Manual NetBSD install on GPT&#x2F;UEFI&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Swap encryption is now automatic using the &lt;code&gt;vm.swap_encrypt=1&lt;&#x2F;code&gt; &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;man.netbsd.org&#x2F;sysctl.8&quot;&gt;sysctl(8)&lt;&#x2F;a&gt; variable: &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.netbsd.org&#x2F;releases&#x2F;formal-10&#x2F;NetBSD-10.0.html&quot;&gt;Announcing NetBSD 10.0&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Next: &lt;em&gt;NetBSD: After the First Boot&lt;&#x2F;em&gt; (TODO)&lt;&#x2F;p&gt;
&lt;p class=&quot;mastodon&quot;&gt;
You can like, share, or comment on this post &lt;a href=&quot;https:&#x2F;&#x2F;fosstodon.org&#x2F;@dwarmstrong&#x2F;116392209156044836&quot; target=&quot;_blank&quot;&gt;on the Fediverse&lt;&#x2F;a&gt; &amp;#128172
&lt;&#x2F;p&gt;
</description>
    </item>
    <item>
      <title>Configure SSH on NetBSD for Passwordless Logins to Servers</title>
      <pubDate>Mon, 06 Apr 2026 00:00:00 +0000</pubDate>
      <link>https://www.dwarmstrong.org/netbsd-ssh-keys/</link>
      <guid>https://www.dwarmstrong.org/netbsd-ssh-keys/</guid>
      <description>&lt;p&gt;Disable password logins on the BSD or Linux &lt;strong&gt;SERVER&lt;&#x2F;strong&gt; in favour of using SSH keys for authentication. Create the necessary SSH keys on a NetBSD &lt;strong&gt;CLIENT&lt;&#x2F;strong&gt; that will be used to secure access to remote devices.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-ssh-keys&#x2F;#1-start-here&quot;&gt;1. Start Here&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-ssh-keys&#x2F;#2-create-public-and-private-keys&quot;&gt;2. Create Public and Private Keys&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-ssh-keys&#x2F;#3-share-public-key&quot;&gt;3. Share Public Key&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-ssh-keys&#x2F;#4-disable-password-logins&quot;&gt;4. Disable Password Logins&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-ssh-keys&#x2F;#5-create-an-alias&quot;&gt;5. Create an Alias&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;netbsd-ssh-keys&#x2F;#6-keychain&quot;&gt;6. Keychain&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;1-start-here&quot;&gt;1. Start Here&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;on-both-the-client-and-the-server&quot;&gt;On BOTH the CLIENT and the SERVER&lt;&#x2F;h3&gt;
&lt;p&gt;Create the &lt;code&gt;.ssh&lt;&#x2F;code&gt; directory and &lt;code&gt;authorized_keys&lt;&#x2F;code&gt; file in &lt;code&gt;$HOME&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;mkdir ~&#x2F;.ssh &amp;amp;&amp;amp; touch ~&#x2F;.ssh&#x2F;authorized_keys
&lt;&#x2F;span&gt;&lt;span&gt;chmod 700 ~&#x2F;.ssh &amp;amp;&amp;amp; chmod 600 ~&#x2F;.ssh&#x2F;authorized_keys
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;2-create-public-and-private-keys&quot;&gt;2. Create Public and Private Keys&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;on-the-client&quot;&gt;On the CLIENT&lt;&#x2F;h3&gt;
&lt;p&gt;Create the SSH public&#x2F;private key pair protected with a passphrase:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;ssh-keygen -t ed25519 -C &amp;quot;$(whoami)@$(hostname -s)-$(date +%Y-%m-%d)&amp;quot; 
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Start &lt;code&gt;ssh-agent&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;eval &amp;quot;$(ssh-agent -s)&amp;quot;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Add the newly-created SSH private key to the current session:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;ssh-add ~&#x2F;.ssh&#x2F;id_ed25519
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Any SSH logins launched during the session will now access this key stored in memory.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;3-share-public-key&quot;&gt;3. Share Public Key&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;on-the-client-1&quot;&gt;On the CLIENT&lt;&#x2F;h3&gt;
&lt;p&gt;Upload the public key to the SERVER and append to the SERVER &lt;code&gt;authorized_keys&lt;&#x2F;code&gt; file:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;ssh-copy-id -i ~&#x2F;.ssh&#x2F;id_ed25519.pub [remote_ip_address]
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Example: SERVER has a &lt;code&gt;[remote_ip_address]&lt;&#x2F;code&gt; of &lt;code&gt;178.123.1.45&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;ssh-copy-id -i ~&#x2F;.ssh&#x2F;id_ed25519.pub 178.123.1.45
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Verify key-based authentication is configured correctly by successfully logging in using &lt;code&gt;ssh&lt;&#x2F;code&gt; without a password:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;ssh -o PasswordAuthentication=no 178.123.1.45
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;4-disable-password-logins&quot;&gt;4. Disable Password Logins&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;on-the-server&quot;&gt;On the SERVER&lt;&#x2F;h3&gt;
&lt;p&gt;After verifying the SERVER can be accessed remotely using SSH keys, open &lt;code&gt;sshd_config&lt;&#x2F;code&gt; for editing:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;doas vi &#x2F;etc&#x2F;ssh&#x2F;sshd_config
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Disable password authentication with these modifications:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;PubkeyAuthentication yes
&lt;&#x2F;span&gt;&lt;span&gt;PasswordAuthentication no
&lt;&#x2F;span&gt;&lt;span&gt;KbdInteractiveAuthentication no
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;As an additional security measure, change the port (by default port &lt;code&gt;22&lt;&#x2F;code&gt;) that SSH listens for connections. Changing this to a &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Port_(computer_networking)#Common_port_numbers&quot;&gt;dynamic or private port&lt;&#x2F;a&gt; between &lt;code&gt;49152&lt;&#x2F;code&gt; through &lt;code&gt;65535&lt;&#x2F;code&gt; will frustrate automated attacks.&lt;&#x2F;p&gt;
&lt;p&gt;Example: Modify the SERVER listening port from &lt;code&gt;#Port 22&lt;&#x2F;code&gt; to &lt;code&gt;Port 52222&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;Port 52222
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Save changes and exit.&lt;&#x2F;p&gt;
&lt;p&gt;Reload SSH:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;On NetBSD and FreeBSD and servers:&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;doas service sshd reload
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ul&gt;
&lt;li&gt;On Linux servers using &lt;code&gt;systemd&lt;&#x2F;code&gt;:&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;sudo systemctl reload ssh
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;on-the-client-2&quot;&gt;On the CLIENT&lt;&#x2F;h3&gt;
&lt;p&gt;While remaining logged into SERVER, open another terminal and verify the changes by attempting a new login using password authentication (which should &lt;strong&gt;fail&lt;&#x2F;strong&gt;):&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;$ ssh -p 52222 -o PreferredAuthentications=password -o PubkeyAuthentication=no 178.123.1.45
&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;username&amp;gt;@178.123.1.45: Permission denied (publickey).
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Verify key-based authentication continues to work as before:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;ssh -p 52222 178.123.1.45
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Device is now secured to accept only SSH key authentication for logins.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;5-create-an-alias&quot;&gt;5. Create An Alias&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;on-the-client-3&quot;&gt;On the CLIENT&lt;&#x2F;h3&gt;
&lt;p&gt;Create an alias for the SERVER in the user’s &lt;code&gt;ssh_config&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;vi ~&#x2F;.ssh&#x2F;config
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Add an alias for SERVER named &lt;code&gt;myserver&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;Host myserver
&lt;&#x2F;span&gt;&lt;span&gt;  HostName 178.123.1.45
&lt;&#x2F;span&gt;&lt;span&gt;  Port 52222
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Save changes and exit.&lt;&#x2F;p&gt;
&lt;p&gt;Now login to SERVER is simply:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;$ ssh myserver
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;6-keychain&quot;&gt;6. Keychain&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;on-the-client-4&quot;&gt;On the CLIENT&lt;&#x2F;h3&gt;
&lt;p&gt;For CLIENT devices that are not running desktop environments with their own built-in &lt;code&gt;ssh&lt;&#x2F;code&gt; key management, I like to install the &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;danielrobbins&#x2F;keychain&quot;&gt;keychain&lt;&#x2F;a&gt; package to manage my keys:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;doas pkgin install keychain
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;When logging in for the first time after boot, it prompts me for the passphrase to unlock my key, then will maintain a single &lt;code&gt;ssh-agent&lt;&#x2F;code&gt; process across multiple login sessions.&lt;&#x2F;p&gt;
&lt;p&gt;Flush all cached keys from memory:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;keychain --clear                  
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
I rename my keys from &lt;code&gt;id_ed25519*&lt;&#x2F;code&gt; to the hostname of the device (hence the &lt;code&gt;$(hostname -s)&lt;&#x2F;code&gt; below).&lt;&#x2F;p&gt;
&lt;p&gt;If using &lt;code&gt;sh&lt;&#x2F;code&gt; or &lt;code&gt;bash&lt;&#x2F;code&gt; as SHELL, open &lt;code&gt;.profile&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;vi ~&#x2F;.profile
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Add:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;# maintain a single ssh-agent process across multiple login sessions
&lt;&#x2F;span&gt;&lt;span&gt;if command -v keychain 2&amp;gt;&amp;amp;1 &amp;gt;&#x2F;dev&#x2F;null
&lt;&#x2F;span&gt;&lt;span&gt;then
&lt;&#x2F;span&gt;&lt;span&gt;  eval $(keychain --eval $(hostname -s))
&lt;&#x2F;span&gt;&lt;span&gt;fi
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Save changes and exit.&lt;&#x2F;p&gt;
&lt;p class=&quot;mastodon&quot;&gt;
You can like, share, or comment on this post &lt;a href=&quot;https:&#x2F;&#x2F;fosstodon.org&#x2F;@dwarmstrong&#x2F;115016465014478640&quot; target=&quot;_blank&quot;&gt;on the Fediverse&lt;&#x2F;a&gt; &amp;#128172
&lt;&#x2F;p&gt;
</description>
    </item>
    <item>
      <title>Just Enough Chimera Linux</title>
      <pubDate>Fri, 03 Apr 2026 00:00:00 +0000</pubDate>
      <link>https://www.dwarmstrong.org/chimera-install-zfs/</link>
      <guid>https://www.dwarmstrong.org/chimera-install-zfs/</guid>
      <description>&lt;p&gt;&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;chimera-linux.org&#x2F;about&#x2F;&quot;&gt;Chimera Linux&lt;&#x2F;a&gt; is a delightful community-driven Linux distribution built from scratch that does things differently: &lt;code&gt;musl&lt;&#x2F;code&gt; instead of the typical &lt;code&gt;glibc&lt;&#x2F;code&gt; for C library, &lt;code&gt;dinit&lt;&#x2F;code&gt; over &lt;code&gt;systemd&lt;&#x2F;code&gt; for system init, and a userland derived from FreeBSD core tools.&lt;&#x2F;p&gt;
&lt;p&gt;Using the Chimera &lt;code&gt;base&lt;&#x2F;code&gt; install image and working my way through this excellent &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.zfsbootmenu.org&#x2F;en&#x2F;latest&#x2F;guides&#x2F;chimera&#x2F;uefi.html&quot;&gt;installation guide&lt;&#x2F;a&gt; for configuring Chimera with the &lt;strong&gt;OpenZFS&lt;&#x2F;strong&gt; filesystem and the &lt;strong&gt;ZFSBootMenu&lt;&#x2F;strong&gt; bootloader, I show the choices I make to create an &lt;strong&gt;encrypted, minimal Linux system&lt;&#x2F;strong&gt; with “just enough” to provide a solid foundation to build upon further: whether that be setting up a desktop, laptop, or server.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#1-start-here&quot;&gt;1. Start Here&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#acquire-an-installation-image&quot;&gt;Acquire an installation image&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#prepare-the-usb-installation-medium&quot;&gt;Prepare the USB installation medium&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#2-configure-the-live-environment&quot;&gt;2. Configure the Live Environment&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#set-the-console-font&quot;&gt;Set the console font&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#set-the-console-keyboard&quot;&gt;Set the console keyboard&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#verify-the-boot-mode&quot;&gt;Verify the boot mode&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#connect-to-the-internet&quot;&gt;Connect to the internet&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#remote-login-to-the-installer&quot;&gt;Remote login to the installer&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#define-id-variable&quot;&gt;Define ID variable&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#generate-hostid&quot;&gt;Generate hostid&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#3-prepare-the-disk&quot;&gt;3. Prepare the DISK&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#define-disk-variables&quot;&gt;Define DISK variables&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#wipe-disk&quot;&gt;Wipe DISK&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#partition-disk&quot;&gt;Partition DISK&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#4-zfs-pool-creation&quot;&gt;4. ZFS Pool Creation&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#create-encryption-keyfile&quot;&gt;Create encryption keyfile&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#create-encrypted-zfs-pool&quot;&gt;Create encrypted ZFS pool&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#create-zfs-datasets&quot;&gt;Create ZFS datasets&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#export-and-re-import-pool-for-installation&quot;&gt;Export and re-import pool for installation&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#5-installation&quot;&gt;5. Installation&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#6-configure-the-system&quot;&gt;6. Configure the System&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#chroot&quot;&gt;Chroot&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#root-password&quot;&gt;Root password&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#superuser&quot;&gt;Superuser&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#package-manager-and-extra-packages&quot;&gt;Package manager and extra packages&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#console-font&quot;&gt;Console font&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#console-keyboard&quot;&gt;Console keyboard&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#timezone&quot;&gt;Timezone&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#hostname&quot;&gt;Hostname&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#services&quot;&gt;Services&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#esp-partition&quot;&gt;ESP partition&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#initramfs&quot;&gt;Initramfs&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#7-zfsbootmenu&quot;&gt;7. ZFSBootMenu&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#boot-properties&quot;&gt;Boot properties&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#prebuilt-executable&quot;&gt;Prebuilt executable&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#efi-boot-entries&quot;&gt;EFI boot entries&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#8-finish-up&quot;&gt;8. Finish Up&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#exit-chroot-unmount-and-export&quot;&gt;Exit chroot, unmount, and export&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#reboot&quot;&gt;Reboot&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#zram-swap&quot;&gt;Zram swap&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;chimera-install-zfs&#x2F;#9-resources&quot;&gt;9. Resources&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;1-start-here&quot;&gt;1. Start Here&lt;&#x2F;h2&gt;
&lt;p&gt;Chimera Linux is installed as the sole operating system on a single disk using a two-partition layout:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Partition &lt;code&gt;pool&lt;&#x2F;code&gt; is formatted with the &lt;code&gt;zfs&lt;&#x2F;code&gt; file system using native encryption.&lt;&#x2F;li&gt;
&lt;li&gt;Partition &lt;code&gt;esp&lt;&#x2F;code&gt; serves as the EFI system partition and is formatted with the &lt;code&gt;fat32&lt;&#x2F;code&gt; file system.&lt;&#x2F;li&gt;
&lt;li&gt;In lieu of creating a partition for &lt;code&gt;swap&lt;&#x2F;code&gt;, the &lt;code&gt;zram&lt;&#x2F;code&gt; kernel module is used to create a compressed block device in RAM to provide swap space.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;A few assumptions:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Target device is &lt;code&gt;x86_64&lt;&#x2F;code&gt; architecture using UEFI to boot.&lt;&#x2F;li&gt;
&lt;li&gt;Secure boot is disabled on target device.&lt;&#x2F;li&gt;
&lt;li&gt;Network access during install uses a wired interface.&lt;&#x2F;li&gt;
&lt;li&gt;System does not require hibernation support.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;acquire-an-installation-image&quot;&gt;Acquire an installation image&lt;&#x2F;h3&gt;
&lt;p&gt;The latest live ISO install images are available here: &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;repo.chimera-linux.org&#x2F;live&#x2F;latest&#x2F;&quot;&gt;repo.chimera-linux.org&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Download &lt;code&gt;chimera-linux-x86_64-LIVE-[RELEASE]-base.iso&lt;&#x2F;code&gt;, the &lt;code&gt;sha256sums.txt&lt;&#x2F;code&gt; file, then verify the image integrity:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;sha256sum -c --ignore-missing sha256sums.txt
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;prepare-the-usb-installation-medium&quot;&gt;Prepare the USB installation medium&lt;&#x2F;h3&gt;
&lt;p&gt;Write the installer to an unmounted USB storage device running the &lt;code&gt;dd&lt;&#x2F;code&gt; command as root.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;WARNING&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
&lt;strong&gt;Be very careful to note the proper device (which can be identified with the &lt;code&gt;lsblk&lt;&#x2F;code&gt; command). All contents on the device will be lost!&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Example: On a Linux system, if a USB stick appears as &lt;code&gt;sdx1&lt;&#x2F;code&gt;, then write the installer to &lt;code&gt;sdx&lt;&#x2F;code&gt; (omit partition number):&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;dd bs=4M conv=fsync oflag=direct status=progress if=chimera-linux-x86_64-LIVE-[RELEASE]-base.iso of=&#x2F;dev&#x2F;sdx
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;2-configure-the-live-environment&quot;&gt;2. Configure the Live Environment&lt;&#x2F;h2&gt;
&lt;p&gt;Boot the target device from the Chimera installation media. Login and password is &lt;code&gt;root:chimera&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;set-the-console-font&quot;&gt;Set the console font&lt;&#x2F;h3&gt;
&lt;p&gt;If the existing font size appears too small, running:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;setfont -d
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;… will double the size.&lt;&#x2F;p&gt;
&lt;p&gt;Console fonts are located in &lt;code&gt;&#x2F;usr&#x2F;share&#x2F;consolefonts&#x2F;&lt;&#x2F;code&gt; and a different font can be set with &lt;code&gt;setfont&lt;&#x2F;code&gt; omitting the path and file extension.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;set-the-console-keyboard&quot;&gt;Set the console keyboard&lt;&#x2F;h3&gt;
&lt;p&gt;Default console keymap is &lt;code&gt;us&lt;&#x2F;code&gt;. Available keymaps are listed in &lt;code&gt;&#x2F;usr&#x2F;share&#x2F;keymaps&#x2F;&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;If some other keymap is desired, set a different keymap temporarily with &lt;code&gt;loadkeys&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;loadkeys [keymap]
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;…where &lt;code&gt;[keymap]&lt;&#x2F;code&gt; is the desired keyboard layout.&lt;&#x2F;p&gt;
&lt;p&gt;Example: I configure the system to use my preferred &lt;code&gt;colemak&lt;&#x2F;code&gt; layout, which is available in &lt;code&gt;&#x2F;usr&#x2F;share&#x2F;keymaps&#x2F;i386&#x2F;colemak&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;loadkeys colemak&#x2F;en-latin9
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;verify-the-boot-mode&quot;&gt;Verify the boot mode&lt;&#x2F;h3&gt;
&lt;p&gt;Confirm target device is using UEFI boot mode:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;cat &#x2F;sys&#x2F;firmware&#x2F;efi&#x2F;fw_platform_size
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;If the command returns &lt;code&gt;64&lt;&#x2F;code&gt;, then system is booted in UEFI with 64-bit x64 UEFI and we are good to go.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
If the file does not exist, the device is not using UEFI.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;connect-to-the-internet&quot;&gt;Connect to the internet&lt;&#x2F;h3&gt;
&lt;p&gt;Wired network interfaces should be auto-enabled and connected at boot.&lt;&#x2F;p&gt;
&lt;p&gt;Verify the network interface is active, has been assigned an address, and the internet is reachable:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;ip addr
&lt;&#x2F;span&gt;&lt;span&gt;ping -c 5 chimera-linux.org
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;remote-login-to-the-installer&quot;&gt;Remote login to the installer&lt;&#x2F;h3&gt;
&lt;p&gt;Make this manual installation process easier (i.e. cut-n-paste commands) by remotely logging into the installer via &lt;code&gt;ssh&lt;&#x2F;code&gt; from another computer.&lt;&#x2F;p&gt;
&lt;p&gt;Start the &lt;code&gt;sshd&lt;&#x2F;code&gt; daemon:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;dinitctl start sshd
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Switch to the other computer and &lt;code&gt;ssh&lt;&#x2F;code&gt; into the target device as &lt;code&gt;anon:chimera&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;ssh anon@[ip_address]
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;… where &lt;code&gt;[ip_address]&lt;&#x2F;code&gt; is the target device’s address obtained with the &lt;code&gt;ip addr&lt;&#x2F;code&gt; command above.&lt;&#x2F;p&gt;
&lt;p&gt;Switch to &lt;code&gt;root&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;doas -s
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;define-id-variable&quot;&gt;Define ID variable&lt;&#x2F;h3&gt;
&lt;p&gt;File &lt;code&gt;&#x2F;etc&#x2F;os-release&lt;&#x2F;code&gt; defines variables that describe the current operating system. Use the &lt;code&gt;$ID&lt;&#x2F;code&gt; variable to set the short name of the Linux distribution in later commands:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;. &#x2F;etc&#x2F;os-release &amp;amp;&amp;amp; export ID &amp;amp;&amp;amp; echo $ID
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;generate-hostid&quot;&gt;Generate hostid&lt;&#x2F;h3&gt;
&lt;p&gt;Generate &lt;code&gt;hostid&lt;&#x2F;code&gt; hexadecimal identifier for use by ZFSBootMenu:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;zgenhostid &amp;quot;$(hostid)&amp;quot; &amp;amp;&amp;amp; hostid
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
Musl doesn’t read &lt;code&gt;&#x2F;etc&#x2F;hostid&lt;&#x2F;code&gt; and will always display &lt;code&gt;00000000&lt;&#x2F;code&gt;. Its not an issue. See &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;zbm-dev&#x2F;zfsbootmenu&#x2F;discussions&#x2F;465&quot;&gt;this discussion&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;3-prepare-the-disk&quot;&gt;3. Prepare the DISK&lt;&#x2F;h2&gt;
&lt;p&gt;Setup a custom partition layout on a single disk before implementing the Chimera base installation.&lt;&#x2F;p&gt;
&lt;p&gt;Install:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;apk update &amp;amp;&amp;amp; apk add --no-interactive gptfdisk parted
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;define-disk-variables&quot;&gt;Define DISK variables&lt;&#x2F;h3&gt;
&lt;p&gt;Identify the disk where Chimera will be installed by listing block devices:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;lsblk -f
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Set DISK variables for either a SATA or NVMe disk:&lt;&#x2F;p&gt;
&lt;h4 id=&quot;sata&quot;&gt;SATA&lt;&#x2F;h4&gt;
&lt;p&gt;Example disk: &lt;code&gt;sda&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;export DISK=&amp;quot;&#x2F;dev&#x2F;sda&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;export ESP_PART=&amp;quot;1&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;export POOL_PART=&amp;quot;2&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;export ESP_DEVICE=&amp;quot;${DISK}${ESP_PART}&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;export POOL_DEVICE=&amp;quot;${DISK}${POOL_PART}&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;echo $ESP_DEVICE &amp;amp;&amp;amp; echo $POOL_DEVICE
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h4 id=&quot;nvme&quot;&gt;NVMe&lt;&#x2F;h4&gt;
&lt;p&gt;Example disk: &lt;code&gt;nvme0n1&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;export DISK=&amp;quot;&#x2F;dev&#x2F;nvme0n1&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;export ESP_PART=&amp;quot;1&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;export POOL_PART=&amp;quot;2&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;export ESP_DEVICE=&amp;quot;${DISK}p${ESP_PART}&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;export POOL_DEVICE=&amp;quot;${DISK}p${POOL_PART}&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;echo $ESP_DEVICE &amp;amp;&amp;amp; echo $POOL_DEVICE
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;wipe-disk&quot;&gt;Wipe DISK&lt;&#x2F;h3&gt;
&lt;p&gt;If there was previously a ZFS pool on DISK, run:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;zpool labelclear -f $DISK
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;If DISK was previously configured with LVM, bring down the volume group:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;vgchange -an
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Wipe existing file systems and partition table on DISK:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;wipefs -af $DISK &amp;amp;&amp;amp; sgdisk --zap-all --clear $DISK
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Notify the system of changes to the partition table:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;partprobe $DISK
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;partition-disk&quot;&gt;Partition DISK&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
Many partitioning guides assign 256-512M of space to the EFI system partition. I like to future-proof the partition for whatever else Linux might want to store there by assigning a more generous 2G of space.&lt;&#x2F;p&gt;
&lt;p&gt;Create a GPT partition table on DISK with the following layout:&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th style=&quot;text-align: center&quot;&gt;Number&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: center&quot;&gt;Size&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: center&quot;&gt;Code&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: center&quot;&gt;Format&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: center&quot;&gt;Use as&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: center&quot;&gt;Mountpoint&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center&quot;&gt;1&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;2g&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;ef00&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;vfat&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;EFI system partition&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;&#x2F;boot&#x2F;efi&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center&quot;&gt;2&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;-&amp;gt;END&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;bf00&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;zfs&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;ZFS pool partition&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;&#x2F;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;p&gt;Create the EFI system partition:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;sgdisk -n &amp;quot;${ESP_PART}:1m:+2g&amp;quot; -t &amp;quot;${ESP_PART}:ef00&amp;quot; -c 0:esp $DISK
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Create the ZFS pool partition:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;sgdisk -n &amp;quot;${POOL_PART}:0:0&amp;quot; -t &amp;quot;${POOL_PART}:bf00&amp;quot; -c 0:pool $DISK
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Display DISK layout:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;partprobe $DISK &amp;amp;&amp;amp; sgdisk -p $DISK
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;4-zfs-pool-creation&quot;&gt;4. ZFS Pool Creation&lt;&#x2F;h2&gt;
&lt;p&gt;When adding disks or partitions to ZFS pools, its good practice to refer to them by the symbolic links created in &lt;code&gt;&#x2F;dev&#x2F;disk&#x2F;by-partuuid&lt;&#x2F;code&gt; (UEFI) so that ZFS will identify the right devices even if disk naming should change at some point. Using traditional device nodes like &lt;code&gt;&#x2F;dev&#x2F;sda2&lt;&#x2F;code&gt; may cause intermittent import failures.&lt;&#x2F;p&gt;
&lt;p&gt;So I create a &lt;code&gt;POOL_ID&lt;&#x2F;code&gt; variable:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;POOL_ID=&#x2F;dev&#x2F;disk&#x2F;by-partuuid&#x2F;$( blkid -s PARTUUID -o value $POOL_DEVICE )
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Verify:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;ls -al &#x2F;dev&#x2F;disk&#x2F;by-partuuid&#x2F; &amp;amp;&amp;amp; echo &amp;quot;POOL_ID = $POOL_ID&amp;quot;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;create-encryption-keyfile&quot;&gt;Create encryption keyfile&lt;&#x2F;h3&gt;
&lt;p&gt;Store the encryption passphrase for the ZFS pool in a keyfile:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;echo &amp;#39;SuperSecretPassphrase&amp;#39; &amp;gt; &#x2F;etc&#x2F;zfs&#x2F;zroot.key
&lt;&#x2F;span&gt;&lt;span&gt;chmod 000 &#x2F;etc&#x2F;zfs&#x2F;zroot.key
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;create-encrypted-zfs-pool&quot;&gt;Create encrypted ZFS pool&lt;&#x2F;h3&gt;
&lt;p&gt;Create the pool with native encryption enabled:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;zpool create -f \
&lt;&#x2F;span&gt;&lt;span&gt; -o ashift=12 \
&lt;&#x2F;span&gt;&lt;span&gt; -o autotrim=on \
&lt;&#x2F;span&gt;&lt;span&gt; -o compatibility=openzfs-2.3-linux \
&lt;&#x2F;span&gt;&lt;span&gt; -O acltype=posixacl \
&lt;&#x2F;span&gt;&lt;span&gt; -O xattr=sa \
&lt;&#x2F;span&gt;&lt;span&gt; -O compression=lz4 \
&lt;&#x2F;span&gt;&lt;span&gt; -O encryption=aes-256-gcm \
&lt;&#x2F;span&gt;&lt;span&gt; -O keylocation=file:&#x2F;&#x2F;&#x2F;etc&#x2F;zfs&#x2F;zroot.key \
&lt;&#x2F;span&gt;&lt;span&gt; -O keyformat=passphrase \
&lt;&#x2F;span&gt;&lt;span&gt; -O relatime=on \
&lt;&#x2F;span&gt;&lt;span&gt; -m none zroot &amp;quot;$POOL_ID&amp;quot;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;create-zfs-datasets&quot;&gt;Create ZFS datasets&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
It is necessary to explicitly set the &lt;code&gt;canmount=noauto&lt;&#x2F;code&gt; on every boot environment you create.&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;zfs create -o mountpoint=none zroot&#x2F;ROOT
&lt;&#x2F;span&gt;&lt;span&gt;zfs create -o mountpoint=&#x2F; -o canmount=noauto zroot&#x2F;ROOT&#x2F;${ID}
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Set the preferred boot file system:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;zpool set bootfs=zroot&#x2F;ROOT&#x2F;${ID} zroot
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;I create an additional &lt;code&gt;home&lt;&#x2F;code&gt; dataset for each system:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;zfs create zroot&#x2F;ROOT&#x2F;${ID}&#x2F;home
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This allows me to keep user config files unique to each boot environment that I might create in the future. It also separates user data from system data, which is useful for ZFS snapshots and enables system rollbacks while leaving user data untouched.&lt;&#x2F;p&gt;
&lt;p&gt;To share data between boot environments, I create a &lt;code&gt;data&lt;&#x2F;code&gt; dataset to store common files:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;zfs create -o mountpoint=&#x2F;data zroot&#x2F;data
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;export-and-re-import-pool-for-installation&quot;&gt;Export and re-import pool for installation&lt;&#x2F;h3&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;zpool export zroot
&lt;&#x2F;span&gt;&lt;span&gt;zpool import -N -R &#x2F;mnt zroot
&lt;&#x2F;span&gt;&lt;span&gt;zfs load-key -L prompt zroot
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Mount datasets:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;zfs mount zroot&#x2F;ROOT&#x2F;${ID}
&lt;&#x2F;span&gt;&lt;span&gt;zfs mount zroot&#x2F;ROOT&#x2F;${ID}&#x2F;home
&lt;&#x2F;span&gt;&lt;span&gt;zfs mount zroot&#x2F;data
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Verify:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;# mount -t zfs
&lt;&#x2F;span&gt;&lt;span&gt;zroot&#x2F;ROOT&#x2F;chimera on &#x2F;mnt type zfs (rw,relatime,xattr,posixacl,casesensitive)
&lt;&#x2F;span&gt;&lt;span&gt;zroot&#x2F;ROOT&#x2F;chimera&#x2F;home on &#x2F;mnt&#x2F;home type zfs (rw,relatime,xattr,posixacl,casesensitive)
&lt;&#x2F;span&gt;&lt;span&gt;root&#x2F;data on &#x2F;mnt&#x2F;data type zfs (rw,relatime,xattr,posixacl,casesensitive)
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Update device symlinks:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;udevadm trigger
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;5-installation&quot;&gt;5. Installation&lt;&#x2F;h2&gt;
&lt;p&gt;Install the &lt;code&gt;base-full&lt;&#x2F;code&gt; packages:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;chimera-bootstrap &#x2F;mnt
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Copy files into the new operating system:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;cp &#x2F;etc&#x2F;hostid &#x2F;mnt&#x2F;etc&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;mkdir &#x2F;mnt&#x2F;etc&#x2F;zfs &amp;amp;&amp;amp; cp &#x2F;etc&#x2F;zfs&#x2F;zroot.key &#x2F;mnt&#x2F;etc&#x2F;zfs&#x2F;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;6-configure-the-system&quot;&gt;6. Configure the System&lt;&#x2F;h2&gt;
&lt;p&gt;Chroot into the freshly installed Chimera and configure the new OS.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;chroot&quot;&gt;Chroot&lt;&#x2F;h3&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;chimera-chroot &#x2F;mnt
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;root-password&quot;&gt;Root password&lt;&#x2F;h3&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;passwd
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;superuser&quot;&gt;Superuser&lt;&#x2F;h3&gt;
&lt;p&gt;Create a user account with superuser privileges:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;useradd -m -G wheel [username]
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;… where &lt;code&gt;[username]&lt;&#x2F;code&gt; is the desired name for the account.&lt;&#x2F;p&gt;
&lt;p&gt;Set a password for &lt;code&gt;[username]&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;passwd [username]
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;(Optional) Give &lt;code&gt;root&lt;&#x2F;code&gt; access to &lt;code&gt;[username]&lt;&#x2F;code&gt; with no password using the &lt;code&gt;doas&lt;&#x2F;code&gt; command:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;echo &amp;#39;permit nopass keepenv [username]&amp;#39; &amp;gt;&amp;gt; &#x2F;etc&#x2F;doas.conf
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;package-manager-and-extra-packages&quot;&gt;Package manager and extra packages&lt;&#x2F;h3&gt;
&lt;p&gt;Add the &lt;code&gt;user&lt;&#x2F;code&gt; subrepo and sync mirrors:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;apk add --no-interactive chimera-repo-user &amp;amp;&amp;amp; apk update
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Identify the processor vendor:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;grep vendor_id &#x2F;proc&#x2F;cpuinfo
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Define a variable for an appropriate microcode package to load updates and security fixes:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;UCODE=&amp;quot;[vendor]&amp;quot;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;… where &lt;code&gt;[vendor]&lt;&#x2F;code&gt; for Intel processors is &lt;code&gt;ucode-intel&lt;&#x2F;code&gt; and AMD processors is &lt;code&gt;ucode-amd&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Install:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;apk add --no-interactive $UCODE linux-lts-zfs-bin curl efibootmgr font-terminus
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;console-font&quot;&gt;Console font&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
For &lt;code&gt;terminus&lt;&#x2F;code&gt; font settings, see &lt;code&gt;&#x2F;usr&#x2F;share&#x2F;consolefonts&#x2F;README.Lat2-Terminus16&lt;&#x2F;code&gt; for details.&lt;&#x2F;p&gt;
&lt;p&gt;Chimera uses the same &lt;code&gt;console-setup&lt;&#x2F;code&gt; system as Debian.&lt;&#x2F;p&gt;
&lt;p&gt;Example: Use &lt;code&gt;TerminusBold&lt;&#x2F;code&gt; as the console font and increase font size by modifying &lt;code&gt;&#x2F;etc&#x2F;default&#x2F;console-setup&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;ACTIVE_CONSOLES=&amp;quot;&#x2F;dev&#x2F;tty[1-6]&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;CHARMAP=&amp;quot;UTF-8&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;CODESET=guess
&lt;&#x2F;span&gt;&lt;span&gt;FONTFACE=TerminusBold
&lt;&#x2F;span&gt;&lt;span&gt;FONTSIZE=12x24
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;console-keyboard&quot;&gt;Console keyboard&lt;&#x2F;h3&gt;
&lt;p&gt;Default keyboard is &lt;code&gt;us&lt;&#x2F;code&gt;. If a keymap alternative is desired, see &lt;code&gt;keyboard(5)&lt;&#x2F;code&gt; for options.&lt;&#x2F;p&gt;
&lt;p&gt;Example: I like to use the &lt;code&gt;colemak&lt;&#x2F;code&gt; keymap (available in &lt;code&gt;&#x2F;usr&#x2F;share&#x2F;keymaps&#x2F;i386&#x2F;colemak&lt;&#x2F;code&gt;), which I set by modifying &lt;code&gt;&#x2F;etc&#x2F;default&#x2F;keyboard&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;KMAP=colemak&#x2F;en-latin9
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;XKBMODEL=pc105
&lt;&#x2F;span&gt;&lt;span&gt;XKBLAYOUT=us
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;timezone&quot;&gt;Timezone&lt;&#x2F;h3&gt;
&lt;p&gt;Timezones are located in &lt;code&gt;&#x2F;usr&#x2F;share&#x2F;zoneinfo&#x2F;[Region]&#x2F;[City]&lt;&#x2F;code&gt;, where &lt;code&gt;[Region]&lt;&#x2F;code&gt; is the geographical region (Africa, America, Europe, …) and the &lt;code&gt;[City]&lt;&#x2F;code&gt; within that region.&lt;&#x2F;p&gt;
&lt;p&gt;Example: Create the &lt;code&gt;&#x2F;etc&#x2F;localtime&lt;&#x2F;code&gt; symbolic link to the timezone where &lt;code&gt;Toronto&lt;&#x2F;code&gt; is located:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;ln -sf &#x2F;usr&#x2F;share&#x2F;zoneinfo&#x2F;America&#x2F;Toronto &#x2F;etc&#x2F;localtime &amp;amp;&amp;amp; date
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;hostname&quot;&gt;Hostname&lt;&#x2F;h3&gt;
&lt;p&gt;Create the &lt;code&gt;hostname&lt;&#x2F;code&gt; file:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;echo [hostname] &amp;gt; &#x2F;etc&#x2F;hostname
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;… where &lt;code&gt;[hostname]&lt;&#x2F;code&gt; is the desired name of the system (single word, no spaces):&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;echo chimeralinux &amp;gt; &#x2F;etc&#x2F;hostname
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;services&quot;&gt;Services&lt;&#x2F;h3&gt;
&lt;p&gt;Links to services enabled by the admin are in &lt;code&gt;&#x2F;etc&#x2F;dinit.d&#x2F;boot.d&#x2F;&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Default logging system on Chimera is &lt;code&gt;syslog-ng&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Enable the service:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;dinitctl -o enable syslog-ng
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Logs are written to &lt;code&gt;&#x2F;var&#x2F;log&#x2F;messages&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;You can configure wired networks statically or dynamically with &lt;code&gt;dhcpcd&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Enable the service:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;dinitctl -o enable dhcpcd
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Default activity is for &lt;code&gt;dhcpcd&lt;&#x2F;code&gt; to configure all interfaces with DHCP. Changes are made in &lt;code&gt;&#x2F;etc&#x2F;dhcpcd.conf&lt;&#x2F;code&gt;. See &lt;code&gt;dhcpcd.conf(5)&lt;&#x2F;code&gt; for more details.&lt;&#x2F;p&gt;
&lt;p&gt;Enable the &lt;code&gt;sshd&lt;&#x2F;code&gt; service to allow remote logins:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;dinitctl -o enable sshd
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;esp-partition&quot;&gt;ESP partition&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
Labels on file systems are optional, but helpful. They allow for easy mounting without a UUID.&lt;&#x2F;p&gt;
&lt;p&gt;Create a &lt;code&gt;fat32&lt;&#x2F;code&gt; file system:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;mkfs.fat -n ESP -F 32 $ESP_DEVICE
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Mount device:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;mount --mkdir $ESP_DEVICE &#x2F;boot&#x2F;efi
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Add partition to &lt;code&gt;fstab&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;echo &amp;#39;LABEL=ESP &#x2F;boot&#x2F;efi vfat defaults 0 0&amp;#39; &amp;gt;&amp;gt; &#x2F;etc&#x2F;fstab
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;initramfs&quot;&gt;Initramfs&lt;&#x2F;h3&gt;
&lt;p&gt;Encryption key is stored in &lt;code&gt;&#x2F;etc&#x2F;zfs&lt;&#x2F;code&gt; and will automatically be copied into the initramfs:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;mkdir -p &#x2F;etc&#x2F;initramfs-tools&#x2F;conf.d
&lt;&#x2F;span&gt;&lt;span&gt;echo &amp;#39;UMASK=0077&amp;#39; &amp;gt; &#x2F;etc&#x2F;initramfs-tools&#x2F;conf.d&#x2F;umask.conf
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Rebuild:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;update-initramfs -u -k all
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;7-zfsbootmenu&quot;&gt;7. ZFSBootMenu&lt;&#x2F;h2&gt;
&lt;p&gt;Install this bootloader to support &lt;strong&gt;Root-on-ZFS&lt;&#x2F;strong&gt; boot environments on Linux.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;boot-properties&quot;&gt;Boot properties&lt;&#x2F;h3&gt;
&lt;p&gt;Assign command-line arguments to be used when booting the kernel:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;zfs set org.zfsbootmenu:commandline=&amp;quot;quiet&amp;quot; zroot&#x2F;ROOT
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Configure key caching:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;zfs set org.zfsbootmenu:keysource=&amp;quot;zroot&#x2F;ROOT&#x2F;${ID}&amp;quot; zroot
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;prebuilt-executable&quot;&gt;Prebuilt executable&lt;&#x2F;h3&gt;
&lt;p&gt;Install a prebuilt ZFSBootMenu executable to the EFI system partition:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;mkdir -p &#x2F;boot&#x2F;efi&#x2F;EFI&#x2F;ZBM
&lt;&#x2F;span&gt;&lt;span&gt;curl -o &#x2F;boot&#x2F;efi&#x2F;EFI&#x2F;ZBM&#x2F;VMLINUZ.EFI -L https:&#x2F;&#x2F;get.zfsbootmenu.org&#x2F;efi
&lt;&#x2F;span&gt;&lt;span&gt;cp &#x2F;boot&#x2F;efi&#x2F;EFI&#x2F;ZBM&#x2F;VMLINUZ.EFI &#x2F;boot&#x2F;efi&#x2F;EFI&#x2F;ZBM&#x2F;VMLINUZ-BACKUP.EFI
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;efi-boot-entries&quot;&gt;EFI boot entries&lt;&#x2F;h3&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;efibootmgr -c -d &amp;quot;$DISK&amp;quot; -p &amp;quot;$ESP_PART&amp;quot; -L &amp;quot;ZFSBootMenu (Backup)&amp;quot; -l &amp;#39;\EFI\ZBM\VMLINUZ-BACKUP.EFI&amp;#39;
&lt;&#x2F;span&gt;&lt;span&gt;efibootmgr -c -d &amp;quot;$DISK&amp;quot; -p &amp;quot;$ESP_PART&amp;quot; -L &amp;quot;ZFSBootMenu&amp;quot; -l &amp;#39;\EFI\ZBM\VMLINUZ.EFI&amp;#39;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;8-finish-up&quot;&gt;8. Finish Up&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;exit-chroot-unmount-and-export&quot;&gt;Exit chroot, unmount, and export&lt;&#x2F;h3&gt;
&lt;p&gt;Exit chroot:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;exit
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Unmount everything:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;umount &#x2F;mnt&#x2F;home &amp;amp;&amp;amp; umount &#x2F;mnt&#x2F;data &amp;amp;&amp;amp; umount &#x2F;mnt&#x2F;boot&#x2F;efi &amp;amp;&amp;amp; umount -n -R &#x2F;mnt
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Export the zpool:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;zpool export zroot
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;reboot&quot;&gt;Reboot&lt;&#x2F;h3&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;reboot
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
When prompted for passphrase to unlock zpool, keymap is &lt;code&gt;us&lt;&#x2F;code&gt; regardless of keymap that might have been set on system.&lt;&#x2F;p&gt;
&lt;p&gt;User is prompted for the passphrase to unlock the encrypted root partition. Upon success, boot resumes:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;chimeralinux login:
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;Welcome to Chimera!&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;zram-swap&quot;&gt;Zram swap&lt;&#x2F;h3&gt;
&lt;p&gt;Chimera uses &lt;code&gt;dinit&lt;&#x2F;code&gt; for init which supports the management of &lt;code&gt;zramN&lt;&#x2F;code&gt; devices.&lt;&#x2F;p&gt;
&lt;p&gt;Load module:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;doas modprobe zram
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
I set &lt;code&gt;size = xG&lt;&#x2F;code&gt; to half of the system’s physical RAM.&lt;&#x2F;p&gt;
&lt;p&gt;Create a configuration file for the &lt;code&gt;zram0&lt;&#x2F;code&gt; device:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;doas tee &#x2F;etc&#x2F;dinit-zram.conf &amp;gt;&#x2F;dev&#x2F;null &amp;lt;&amp;lt;&amp;#39;EOF&amp;#39;
&lt;&#x2F;span&gt;&lt;span&gt;[zram0]
&lt;&#x2F;span&gt;&lt;span&gt;size = 4G
&lt;&#x2F;span&gt;&lt;span&gt;algorithm = lz4
&lt;&#x2F;span&gt;&lt;span&gt;format = mkswap -U clear %0
&lt;&#x2F;span&gt;&lt;span&gt;EOF
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Add &lt;code&gt;zram0&lt;&#x2F;code&gt; swap to &lt;code&gt;fstab&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;echo &amp;#39;&#x2F;dev&#x2F;zram0 none swap defaults 0 0&amp;#39; | doas tee -a &#x2F;etc&#x2F;fstab &amp;gt;&#x2F;dev&#x2F;null
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Enable the service:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;doas dinitctl enable zram-device@zram0
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Activate the swap for the current session:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;doas swapon &#x2F;dev&#x2F;zram0 &amp;amp;&amp;amp; zramctl
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;9-resources&quot;&gt;9. Resources&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;ZFSBootMenu: &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.zfsbootmenu.org&#x2F;en&#x2F;latest&#x2F;guides&#x2F;chimera&#x2F;uefi.html&quot;&gt;Chimera Linux Guide&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Chimera Linux: &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;chimera-linux.org&#x2F;docs&#x2F;installation&quot;&gt;Installation Guide&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;OpenZFS Man Pages: &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;openzfs.github.io&#x2F;openzfs-docs&#x2F;man&#x2F;master&#x2F;7&#x2F;zpoolprops.7.html&quot;&gt;zpoolprops.7&lt;&#x2F;a&gt; and &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;openzfs.github.io&#x2F;openzfs-docs&#x2F;man&#x2F;master&#x2F;7&#x2F;zfsprops.7.html&quot;&gt;zfsprops.7&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Arch Linux Wiki: &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;title&#x2F;Persistent_block_device_naming#Persistent_naming_methods&quot;&gt;Persistent block device naming&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Practical ZFS: &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;discourse.practicalzfs.com&#x2F;t&#x2F;linux-home-directory-on-zfs&#x2F;1429&quot;&gt;Linux home directory on ZFS&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Dinit-chimera: &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;chimera-linux&#x2F;dinit-chimera#zram-support&quot;&gt;zram-support&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Next: &lt;em&gt;Chimera Linux: After the First Boot&lt;&#x2F;em&gt; (TODO)&lt;&#x2F;p&gt;
&lt;p class=&quot;mastodon&quot;&gt;
You can like, share, or comment on this post &lt;a href=&quot;https:&#x2F;&#x2F;fosstodon.org&#x2F;@dwarmstrong&#x2F;116331318588277218&quot; target=&quot;_blank&quot;&gt;on the Fediverse&lt;&#x2F;a&gt; &amp;#128172
&lt;&#x2F;p&gt;
</description>
    </item>
    <item>
      <title>FreeBSD: After the First Boot</title>
      <pubDate>Thu, 19 Mar 2026 00:00:00 +0000</pubDate>
      <link>https://www.dwarmstrong.org/freebsd-after-install/</link>
      <guid>https://www.dwarmstrong.org/freebsd-after-install/</guid>
      <description>&lt;img class=&quot;floatright&quot; src=&quot;&#x2F;img&#x2F;neofetch-freebsd.png&quot; alt=&quot;FreeBSD logo in ASCII&quot; &#x2F;&gt;
&lt;p&gt;&lt;em&gt;Part of the &lt;a href=&quot;&#x2F;freebsd-laptop&quot;&gt;“FreeBSD on a Laptop”&lt;&#x2F;a&gt; series.&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;p&gt;After the first boot of my &lt;a href=&quot;&#x2F;freebsd-install&quot;&gt;new FreeBSD installation&lt;&#x2F;a&gt;, these are some extra steps I like to make right away to get a system off to a good start!&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;freebsd-after-install&#x2F;#package-management&quot;&gt;Package management&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;freebsd-after-install&#x2F;#set-pkg-manager-to-default-to-yes&quot;&gt;Set pkg manager to default to yes&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;freebsd-after-install&#x2F;#allow-designated-users-to-run-commands-as-root&quot;&gt;Allow designated users to run commands as root&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;freebsd-after-install&#x2F;#use-a-larger-font-in-console&quot;&gt;Use a larger font in console&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;freebsd-after-install&#x2F;#add-user-to-additional-groups&quot;&gt;Add user to additional groups&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;freebsd-after-install&#x2F;#alias-for-root-mail&quot;&gt;Alias for root mail&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;freebsd-after-install&#x2F;#switch-user-shell-from-sh-to-bash&quot;&gt;Switch user shell from sh to bash&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;freebsd-after-install&#x2F;#create-ssh-keys&quot;&gt;Create SSH keys&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;freebsd-after-install&#x2F;#boot-delay&quot;&gt;Boot delay&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;freebsd-after-install&#x2F;#message-of-the-day&quot;&gt;Message of the day&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;freebsd-after-install&#x2F;#clear-terminal-at-logout&quot;&gt;Clear terminal at logout&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;package-management&quot;&gt;Package management&lt;&#x2F;h2&gt;
&lt;p&gt;Package management is one area where the differences between the Linux philosophy and the BSD philosophy about how to build a system becomes apparent.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Linux&lt;&#x2F;strong&gt; is an operating system kernel. Developers take this kernel and combine it with various independent software projects in a collection of &lt;strong&gt;packages&lt;&#x2F;strong&gt; that is released as a Linux &lt;strong&gt;distribution&lt;&#x2F;strong&gt; (Ubuntu, &lt;a href=&quot;&#x2F;tags&#x2F;debian&quot;&gt;Debian&lt;&#x2F;a&gt;, Fedora, etc.).&lt;&#x2F;p&gt;
&lt;p&gt;In contrast, each of the BSDs develop their own kernel and combine it with system components that are developed together “in-house” and released as a whole. The idea being that this approach leads to a more robust and tightly integrated core operating system. Third-party “userland” packages not included in the core may still be installed at the discretion of the user, with source code and binary packages provided from a &lt;strong&gt;ports&lt;&#x2F;strong&gt; repository.&lt;&#x2F;p&gt;
&lt;p&gt;A major change in FreeBSD 15.0 is the introduction of a new method for installing and managing the core operating system using the &lt;code&gt;pkg(8)&lt;&#x2F;code&gt; package manager. Currently marked as being a “technology preview”, the plan is it will become the default method for managing all base and userland binary packages on the system when FreeBSD 16.0 is released.&lt;&#x2F;p&gt;
&lt;p&gt;When I ran my fresh install of FreeBSD, I opted to use this &lt;code&gt;pkg&lt;&#x2F;code&gt; tool in combination with a network install, and the base system was installed as a set of packages from the “FreeBSD-base” repository.&lt;&#x2F;p&gt;
&lt;p&gt;To keep packages up-to-date, compare installed packages to the versions in &lt;code&gt;ports&lt;&#x2F;code&gt;, and generate a list of packages due for an upgrade, run the command:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;pkg upgrade
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;To add a package:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;pkg install [package]
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;One of the first packages I like to install on any BSD or Linux system is &lt;code&gt;htop(1)&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;pkg install htop
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;More: &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.freebsd.org&#x2F;en&#x2F;books&#x2F;handbook&#x2F;ports&#x2F;&quot;&gt;FreeBSD Handbook - Installing Applications: Packages and Ports&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;set-pkg-manager-to-default-to-yes&quot;&gt;Set pkg manager to default to yes&lt;&#x2F;h2&gt;
&lt;p&gt;From &lt;code&gt;pkg.conf(5)&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;&amp;gt; DEFAULT_ALWAYS_YES: boolean
&lt;&#x2F;span&gt;&lt;span&gt;		    When  this	option is enabled pkg(1) will default to &amp;quot;yes&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;		    for	all questions which require user confirmation before
&lt;&#x2F;span&gt;&lt;span&gt;		    doing anything. Default: NO.
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Open the file for editing:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;vi &#x2F;usr&#x2F;local&#x2F;etc&#x2F;pkg.conf
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Change:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;#DEFAULT_ALWAYS_YES = false;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;… to:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;DEFAULT_ALWAYS_YES = true;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Save changes and exit.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;allow-designated-users-to-run-commands-as-root&quot;&gt;Allow designated users to run commands as root&lt;&#x2F;h2&gt;
&lt;p&gt;A user account (example: &lt;code&gt;foo&lt;&#x2F;code&gt;) was created during installation and assigned to the &lt;code&gt;wheel&lt;&#x2F;code&gt; group.&lt;&#x2F;p&gt;
&lt;p&gt;Install &lt;code&gt;doas&lt;&#x2F;code&gt; to run root-level access commands, and allow members of &lt;code&gt;wheel&lt;&#x2F;code&gt; to do so by default, by creating &lt;code&gt;doas.conf&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;pkg install doas
&lt;&#x2F;span&gt;&lt;span&gt;echo &amp;quot;permit :wheel&amp;quot; &amp;gt; &#x2F;usr&#x2F;local&#x2F;etc&#x2F;doas.conf
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;To allow user &lt;code&gt;foo&lt;&#x2F;code&gt; to run commands as root without asking for a password:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;echo &amp;quot;permit nopass keepenv foo&amp;quot; &amp;gt;&amp;gt; &#x2F;usr&#x2F;local&#x2F;etc&#x2F;doas.conf
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Log out as &lt;code&gt;root&lt;&#x2F;code&gt;, log back in as your user, and use &lt;code&gt;doas&lt;&#x2F;code&gt; to run any commands that require root privileges.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;use-a-larger-font-in-console&quot;&gt;Use a larger font in console&lt;&#x2F;h2&gt;
&lt;p&gt;On some of the higher-resolution displays I find the default font size in the console pretty small. The base system includes a selection of console fonts in &lt;code&gt;&#x2F;usr&#x2F;share&#x2F;vt&#x2F;fonts&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Try a different, larger font size:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;doas vidcontrol -f terminus-b32
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Download (in &lt;code&gt;raw&lt;&#x2F;code&gt; format) this nice selection of &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;LionyxML&#x2F;freebsd-terminus&#x2F;tree&#x2F;master&quot;&gt;terminus fonts of different sizes&lt;&#x2F;a&gt;, converted for use in the FreeBSD console.&lt;&#x2F;p&gt;
&lt;p&gt;Unpack the &lt;code&gt;.txz&lt;&#x2F;code&gt; package and copy the fonts to &lt;code&gt;&#x2F;usr&#x2F;share&#x2F;vt&#x2F;fonts&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;tar xvf vt-font-terminus-*.txz &amp;amp;&amp;amp; doas cp terminus-font&#x2F;ter-u* &#x2F;usr&#x2F;share&#x2F;vt&#x2F;fonts&#x2F;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Try different font sizes:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;doas vidcontrol -f ter-u22
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Use &lt;code&gt;sysrc&lt;&#x2F;code&gt; to make a selection permanent by modifying &lt;code&gt;rc.conf&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;doas sysrc allscreens_flags=&amp;quot;-f ter-u22&amp;quot;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;More: &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.micski.dk&#x2F;2022&#x2F;01&#x2F;06&#x2F;fix-small-font-in-freebsd-virtual-terminal-system-console&#x2F;&quot;&gt;Fix small font in FreeBSD&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;add-user-to-additional-groups&quot;&gt;Add user to additional groups&lt;&#x2F;h2&gt;
&lt;p&gt;Add my user account created during installation to a group with the syntax:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;doas pw groupmod [group_name] -m [username]
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Example: Permit powering off the system as a non-root user using &lt;code&gt;shutdown&lt;&#x2F;code&gt; by adding my user &lt;code&gt;foo&lt;&#x2F;code&gt; to the &lt;code&gt;operator&lt;&#x2F;code&gt; group:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;doas pw groupmod operator -m foo
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;alias-for-root-mail&quot;&gt;Alias for root mail&lt;&#x2F;h2&gt;
&lt;p&gt;Rather than login to root to collect system mail, I forward the root user’s mail to my non-root user’s inbox.&lt;&#x2F;p&gt;
&lt;p&gt;Open the &lt;code&gt;aliases&lt;&#x2F;code&gt; file for editing:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;doas vi &#x2F;etc&#x2F;aliases
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Modify:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;# root: me@my.domain
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;… by uncommenting the line and replacing &lt;code&gt;me@my.domain&lt;&#x2F;code&gt; with my &lt;code&gt;foo&lt;&#x2F;code&gt; username:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;root: foo
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Save changes and exit.&lt;&#x2F;p&gt;
&lt;p&gt;Let the MTA know about the modification by running the &lt;code&gt;newaliases&lt;&#x2F;code&gt; command with no arguments:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;doas newaliases
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Test whether mail is indeed being forwarded by using the &lt;code&gt;mail&lt;&#x2F;code&gt; command as my user to send root a message:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;$ mail root
&lt;&#x2F;span&gt;&lt;span&gt;Subject: Test new alias 
&lt;&#x2F;span&gt;&lt;span&gt;Is it working?
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Press &lt;code&gt;CTRL-d&lt;&#x2F;code&gt; to exit and send message.&lt;&#x2F;p&gt;
&lt;p&gt;It works!&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;$ mail
&lt;&#x2F;span&gt;&lt;span&gt;Mail version 8.1 6&#x2F;6&#x2F;93.  Type ? for help.
&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;&#x2F;var&#x2F;mail&#x2F;foo&amp;quot;: 1 message 1 new
&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;N  1 dwa@tukturjuit.home.  Thu Mar 19 15:05  13&#x2F;427   &amp;quot;Test new alias&amp;quot;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;More: &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.iceflatline.com&#x2F;2012&#x2F;09&#x2F;how-to-forward-roots-mail-to-a-another-user-in-freebsd&#x2F;&quot;&gt;How to Forward Root’s Mail&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;switch-user-shell-from-sh-to-bash&quot;&gt;Switch user shell from sh to bash&lt;&#x2F;h2&gt;
&lt;p&gt;If a user account is created during the install of FreeBSD, the default shell assigned is &lt;code&gt;sh&lt;&#x2F;code&gt;. I prefer &lt;code&gt;bash&lt;&#x2F;code&gt;, which is not included in the base system:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;doas pkg install bash bash-completion 
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;List available shells:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;$ cat &#x2F;etc&#x2F;shells
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;...
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;bin&#x2F;sh
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;bin&#x2F;csh
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;bin&#x2F;tcsh
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;usr&#x2F;local&#x2F;bin&#x2F;bash
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;usr&#x2F;local&#x2F;bin&#x2F;rbash
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Open &lt;code&gt;.bashrc&lt;&#x2F;code&gt; for editing:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;vi ~&#x2F;.bashrc
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Enable the bash completion library:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;[[ $PS1 &amp;amp;&amp;amp; -f &#x2F;usr&#x2F;local&#x2F;share&#x2F;bash-completion&#x2F;bash_completion.sh ]] &amp;amp;&amp;amp; \
&lt;&#x2F;span&gt;&lt;span&gt;  source &#x2F;usr&#x2F;local&#x2F;share&#x2F;bash-completion&#x2F;bash_completion.sh
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Save changes and exit.&lt;&#x2F;p&gt;
&lt;p&gt;Open &lt;code&gt;.bash_profile&lt;&#x2F;code&gt; for editing:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;vi ~&#x2F;.bash_profile
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Source &lt;code&gt;.bashrc&lt;&#x2F;code&gt; on shell launch:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;. ~&#x2F;.bashrc
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Save changes and exit.&lt;&#x2F;p&gt;
&lt;p&gt;Make the switch from &lt;code&gt;sh&lt;&#x2F;code&gt; to &lt;code&gt;bash&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;chsh -s &#x2F;usr&#x2F;local&#x2F;bin&#x2F;bash
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Log out and back in to start using the new shell.&lt;&#x2F;p&gt;
&lt;p&gt;More: &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.freebsd.org&#x2F;en&#x2F;books&#x2F;handbook&#x2F;basics&#x2F;#shells&quot;&gt;FreeBSD Handbook - Shells&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;create-ssh-keys&quot;&gt;Create SSH keys&lt;&#x2F;h2&gt;
&lt;p&gt;Create an SSH public&#x2F;private key pair to facilitate passwordless logins to remote servers and (optional) configure remote access to the localhost. &lt;a href=&quot;&#x2F;freebsd-ssh-keys&quot;&gt;Read More&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;boot-delay&quot;&gt;Boot delay&lt;&#x2F;h2&gt;
&lt;p&gt;By default the system will pause at the boot menu for 10 seconds. I shorten this to 3 seconds by setting:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;echo &amp;#39;autoboot_delay=&amp;quot;3&amp;quot;&amp;#39; | doas tee -a &#x2F;boot&#x2F;loader.conf
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;message-of-the-day&quot;&gt;Message of the day&lt;&#x2F;h2&gt;
&lt;p&gt;Quiet the “message of the day” (&lt;code&gt;motd&lt;&#x2F;code&gt;) output after logging into the system by creating an empty &lt;code&gt;.hushlogin&lt;&#x2F;code&gt; file:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;touch ~&#x2F;.hushlogin
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;clear-terminal-at-logout&quot;&gt;Clear terminal at logout&lt;&#x2F;h2&gt;
&lt;p&gt;For the &lt;code&gt;bash&lt;&#x2F;code&gt; shell, add to &lt;code&gt;.bash_profile&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;echo &amp;#39;test -f ~&#x2F;.exitrc &amp;amp;&amp;amp; trap &amp;quot;. ~&#x2F;.exitrc&amp;quot; EXIT&amp;#39; &amp;gt;&amp;gt; ~&#x2F;.bash_profile
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Create &lt;code&gt;.exitrc&lt;&#x2F;code&gt; with:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;echo &amp;quot;type clear &amp;gt;&#x2F;dev&#x2F;null 2&amp;gt;&amp;amp;1 &amp;amp;&amp;amp; clear&amp;quot; &amp;gt; ~&#x2F;.exitrc
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;More: &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;unix.stackexchange.com&#x2F;a&#x2F;12013&quot;&gt;How to clear terminal after logging out?&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p class=&quot;mastodon&quot;&gt;
You can like, share, or comment on this post &lt;a href=&quot;https:&#x2F;&#x2F;fosstodon.org&#x2F;@dwarmstrong&#x2F;116258748485813933&quot; target=&quot;_blank&quot;&gt;on the Fediverse&lt;&#x2F;a&gt; &amp;#128172
&lt;&#x2F;p&gt;
</description>
    </item>
    <item>
      <title>Install FreeBSD (Short and Sweet Version)</title>
      <pubDate>Tue, 17 Mar 2026 00:00:00 +0000</pubDate>
      <link>https://www.dwarmstrong.org/freebsd-install/</link>
      <guid>https://www.dwarmstrong.org/freebsd-install/</guid>
      <description>&lt;img class=&quot;floatright&quot; src=&quot;&#x2F;img&#x2F;beastie.png&quot; alt=&quot;FreeBSD beastie&quot; &#x2F;&gt;
&lt;p&gt;&lt;em&gt;Part of the &lt;a href=&quot;&#x2F;freebsd-laptop&quot;&gt;“FreeBSD on a Laptop”&lt;&#x2F;a&gt; series.&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;p&gt;The &lt;strong&gt;FreeBSD Handbook&lt;&#x2F;strong&gt; has an &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.freebsd.org&#x2F;en&#x2F;books&#x2F;handbook&#x2F;bsdinstall&#x2F;&quot;&gt;extensive chapter on installing FreeBSD&lt;&#x2F;a&gt; that covers a wide range of scenarios with descriptions of each possible choice. Its an invaluable resource maintained by volunteer contributors.&lt;&#x2F;p&gt;
&lt;p&gt;After performing a few installs, these are my personal notes of steps taken and choices made. A “short and sweet” version of the above Handbook.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;freebsd-install&#x2F;#1-start-here&quot;&gt;1. Start Here&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;freebsd-install&#x2F;#acquire-an-installation-image&quot;&gt;Acquire an installation image&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;freebsd-install&#x2F;#prepare-the-usb-installation-medium&quot;&gt;Prepare the USB installation medium&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;freebsd-install&#x2F;#2-installation&quot;&gt;2. Installation&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;freebsd-install&#x2F;#steps&quot;&gt;Steps&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;1-start-here&quot;&gt;1. Start Here&lt;&#x2F;h2&gt;
&lt;p&gt;Throughout this guide, if you see square brackets &lt;code&gt;[]&lt;&#x2F;code&gt; in code blocks, that means the word of code (square brackets included) should be replaced with something else. This is detailed in the instructions before or after the code block.&lt;&#x2F;p&gt;
&lt;p&gt;FreeBSD will be installed as the sole operating system on a single disk using the &lt;code&gt;ZFS&lt;&#x2F;code&gt; file system with encryption.&lt;&#x2F;p&gt;
&lt;p&gt;A few assumptions:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Target device is &lt;code&gt;amd64&lt;&#x2F;code&gt; architecture using UEFI to boot.&lt;&#x2F;li&gt;
&lt;li&gt;Network access during install uses a wired interface&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;acquire-an-installation-image&quot;&gt;Acquire an installation image&lt;&#x2F;h3&gt;
&lt;p&gt;As of March 2026 the latest release is &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;download.freebsd.org&#x2F;releases&#x2F;amd64&#x2F;amd64&#x2F;ISO-IMAGES&#x2F;15.0&#x2F;&quot;&gt;FreeBSD 15.0-RELEASE&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Download &lt;code&gt;FreeBSD-15.0-RELEASE-amd64-memstick.img&lt;&#x2F;code&gt; and the &lt;code&gt;CHECKSUM&lt;&#x2F;code&gt; file for verification:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;wget https:&#x2F;&#x2F;download.freebsd.org&#x2F;releases&#x2F;amd64&#x2F;amd64&#x2F;ISO-IMAGES&#x2F;15.0&#x2F;FreeBSD-15.0-RELEASE-amd64-memstick.img
&lt;&#x2F;span&gt;&lt;span&gt;wget https:&#x2F;&#x2F;download.freebsd.org&#x2F;releases&#x2F;amd64&#x2F;amd64&#x2F;ISO-IMAGES&#x2F;15.0&#x2F;CHECKSUM.SHA512-FreeBSD-15.0-RELEASE-amd64
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Verify the integrity of the image by running:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;sha512sum -c --ignore-missing CHECKSUM.SHA512-FreeBSD-15.0-RELEASE-amd64
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;prepare-the-usb-installation-medium&quot;&gt;Prepare the USB installation medium&lt;&#x2F;h3&gt;
&lt;p&gt;Write the installer to an &lt;strong&gt;unmounted&lt;&#x2F;strong&gt; USB storage device running the &lt;code&gt;dd&lt;&#x2F;code&gt; command as root.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;WARNING&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
&lt;strong&gt;Be very careful to note the proper device (which can be identified with &lt;code&gt;lsblk&lt;&#x2F;code&gt;). All contents on the device will be lost!&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Example: On a Linux system, if a USB stick appears as &lt;code&gt;sdx1&lt;&#x2F;code&gt;, then write the installer to &lt;code&gt;sdx&lt;&#x2F;code&gt; (omit partition number):&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;dd bs=4M conv=fsync oflag=direct status=progress if=FreeBSD-15.0-RELEASE-amd64-memstick.img of=&#x2F;dev&#x2F;sdx
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;2-installation&quot;&gt;2. Installation&lt;&#x2F;h2&gt;
&lt;p&gt;Boot target device from the install media. In the &lt;strong&gt;FreeBSD Boot Menu&lt;&#x2F;strong&gt; press &lt;code&gt;&amp;lt;Enter&amp;gt;&lt;&#x2F;code&gt; to launch the installer.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;&#x2F;img&#x2F;bsdinstall-boot-loader-menu.png&quot; alt=&quot;FreeBSD boot loader menu&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;steps&quot;&gt;Steps&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;Welcome: &lt;code&gt;Install&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Keymap Selection: Default is standard &lt;code&gt;US&lt;&#x2F;code&gt; keyboard map. Press &lt;code&gt;&amp;lt;enter&amp;gt;&lt;&#x2F;code&gt; to continue or select an alternative from the list.&lt;&#x2F;li&gt;
&lt;li&gt;Set Hostname: &lt;code&gt;[new_name_for_device].home.arpa&lt;&#x2F;code&gt;   &lt;em&gt;# example:&lt;&#x2F;em&gt; &lt;code&gt;foobox.home.arpa&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Set Installation Type: &lt;code&gt;Packages (Tech Preview)&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Network or Offline Installation: &lt;code&gt;Network&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Network Configuration: &lt;code&gt;[ethernet interface]&lt;&#x2F;code&gt; and &lt;code&gt;Auto&lt;&#x2F;code&gt;   &lt;em&gt;# example: Intel network device&lt;&#x2F;em&gt; &lt;code&gt;em0&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Partitioning: &lt;code&gt;Auto (ZFS) Guided Root-on-ZFS&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;ZFS Configuration:
&lt;ul&gt;
&lt;li&gt;Pool Type&#x2F;Disks:  &lt;code&gt;stripe: 1 disk&lt;&#x2F;code&gt;   # &lt;code&gt;[*] ada0&lt;&#x2F;code&gt; &lt;em&gt;for SATA and&lt;&#x2F;em&gt; &lt;code&gt;[*] nda0&lt;&#x2F;code&gt; &lt;em&gt;for NVME&lt;&#x2F;em&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Pool Name         &lt;code&gt;zroot&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Force 4K Sectors? &lt;code&gt;YES&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Encrypt Disks?    &lt;code&gt;YES&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Partition Scheme? &lt;code&gt;GPT (UEFI)&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Swap Size         &lt;code&gt;16g&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Mirror Swap?      &lt;code&gt;NO&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Encrypt Swap?     &lt;code&gt;YES&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Select &lt;code&gt;&amp;gt;&amp;gt;&amp;gt; Install     Proceed with Installation&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Select &lt;code&gt;YES&lt;&#x2F;code&gt; to destroy current contents of target disk&lt;&#x2F;li&gt;
&lt;li&gt;Enter encryption passphrase. Retype to confirm.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;Select System Components:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;[x] base&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;[*] kernel-dbg&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;[*] lib32&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;Set root password. Retype to confirm.&lt;&#x2F;li&gt;
&lt;li&gt;Time Zone Selector: &lt;code&gt;[region]&lt;&#x2F;code&gt;   &lt;em&gt;# example:&lt;&#x2F;em&gt; &lt;code&gt;America - Canada - Eastern - ON &amp;amp; QC (EDT)&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Time and Date:
&lt;ul&gt;
&lt;li&gt;Date: &lt;code&gt;Skip&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Time: &lt;code&gt;Skip&lt;&#x2F;code&gt;   &lt;em&gt;# NTP will set on reboot&lt;&#x2F;em&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;Services to be started at boot:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;[*] sshd&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;[*] ntpd&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;[*] powerd&lt;&#x2F;code&gt;   &lt;em&gt;# for laptops&lt;&#x2F;em&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;[*] dumpdev&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;System hardening:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;[*] clear_tmp&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;Firmware installation: &lt;code&gt;[package(s)]&lt;&#x2F;code&gt;   &lt;em&gt;# install packages if available&lt;&#x2F;em&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Add user account? &lt;code&gt;Yes&lt;&#x2F;code&gt;
&lt;ul&gt;
&lt;li&gt;Username: &lt;code&gt;[username]&lt;&#x2F;code&gt;   &lt;em&gt;# example:&lt;&#x2F;em&gt; &lt;code&gt;foo&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Full name: &lt;code&gt;&amp;lt;enter&amp;gt;&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Uid: &lt;code&gt;&amp;lt;enter&amp;gt;&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Login group: &lt;code&gt;&amp;lt;enter&amp;gt;&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Other groups?: &lt;code&gt;wheel&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Login class: &lt;code&gt;&amp;lt;enter&amp;gt;&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Shell: &lt;code&gt;&amp;lt;enter&amp;gt;&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Home directory: &lt;code&gt;&amp;lt;enter&amp;gt;&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Home directory permissions: &lt;code&gt;&amp;lt;enter&amp;gt;&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Enable ZFS encryption? &lt;code&gt;no&lt;&#x2F;code&gt;   &lt;em&gt;# encrypted Root-on-ZFS already enabled&lt;&#x2F;em&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Use password-based authentication? &lt;code&gt;&amp;lt;enter&amp;gt;&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Use an empty password? &lt;code&gt;&amp;lt;enter&amp;gt;&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Use a random password? &lt;code&gt;&amp;lt;enter&amp;gt;&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Enter password. Retype to confirm.&lt;&#x2F;li&gt;
&lt;li&gt;Lock out account after creation? &lt;code&gt;&amp;lt;enter&amp;gt;&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;OK? &lt;code&gt;&amp;lt;enter&amp;gt;&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Add another user? &lt;code&gt;&amp;lt;enter&amp;gt;&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;Final configuration: &lt;code&gt;Finish    Apply configuration and exit installer&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Manual configuration: &lt;code&gt;No&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Complete: &lt;code&gt;Reboot&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
When prompted for the encryption passphrase - regardless of the keymap set during install - enter the correct passphrase referencing the &lt;code&gt;US&lt;&#x2F;code&gt; keymap:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;GELI Passphrase for &amp;lt;disk&amp;gt;:
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Upon success, boot resumes….&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;FreeBSD&#x2F;amd64 (foobox.home.arpa) (ttyv0)
&lt;&#x2F;span&gt;&lt;span&gt;login: root
&lt;&#x2F;span&gt;&lt;span&gt;Password:
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;Welcome to FreeBSD!&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;p&gt;To shutdown&#x2F;poweroff the system:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;shutdown -p now
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;Next:&lt;&#x2F;strong&gt; &lt;a href=&quot;&#x2F;freebsd-after-install&quot;&gt;After the First Boot&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p class=&quot;mastodon&quot;&gt;
You can like, share, or comment on this post &lt;a href=&quot;https:&#x2F;&#x2F;fosstodon.org&#x2F;@dwarmstrong&#x2F;116252354471681551&quot; target=&quot;_blank&quot;&gt;on Mastodon&lt;&#x2F;a&gt; &amp;#128172
&lt;&#x2F;p&gt;
</description>
    </item>
</channel>
</rss>
