<?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>Mon, 13 Jul 2026 00:00:00 +0000</lastBuildDate>
    <item>
      <title>Install Linux Mint Debian Edition (LMDE 7) in Expert Mode</title>
      <pubDate>Mon, 13 Jul 2026 00:00:00 +0000</pubDate>
      <link>https://www.dwarmstrong.org/lmde-install-expert-mode/</link>
      <guid>https://www.dwarmstrong.org/lmde-install-expert-mode/</guid>
      <description>&lt;p&gt;I like to create encrypted storage space to hold the contents of my &lt;code&gt;home&lt;&#x2F;code&gt; directory that is separate from the space that contains the &lt;code&gt;root&lt;&#x2F;code&gt; filesystem. This makes it easier if I decide to re-install Linux on the target system while preserving user data.&lt;&#x2F;p&gt;
&lt;p&gt;During an install of &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.linuxmint.com&#x2F;download_lmde.php&quot;&gt;LMDE 7 aka &quot;Gigi&quot;&lt;&#x2F;a&gt; - if you select the option to automatically erase and partition the disk using LUKS (&lt;em&gt;Linux Unified Key Setup&lt;&#x2F;em&gt;) - the installer creates a single encrypted partition formatted with LVM (&lt;em&gt;Logical Volume Manager&lt;&#x2F;em&gt;) containing two &quot;virtual partitions&quot; (&lt;em&gt;Logical Volumes&lt;&#x2F;em&gt; or LVs): a &lt;code&gt;swap&lt;&#x2F;code&gt; LV, and a &lt;code&gt;root&lt;&#x2F;code&gt; LV that uses all remaining disk storage. There is no option to add a &lt;code&gt;home&lt;&#x2F;code&gt; LV to the automatic schema.&lt;&#x2F;p&gt;
&lt;p&gt;Previously I would resize the &lt;code&gt;root&lt;&#x2F;code&gt; LV to &lt;a href=&quot;&#x2F;install-lmde-with-custom-lvm-luks&#x2F;&quot;&gt;make room for a home LV&lt;&#x2F;a&gt;, but in my daily use I&#x27;ve found LVM to be an extra layer of complexity whose benefits - such as resizing existing LVs and creating new ones - I never end up using. More significantly, LVM makes re-installing the OS while preserving the contents of &lt;code&gt;home&lt;&#x2F;code&gt; more complicated on LMDE (which again is different than how its done on the Ubuntu-based Linux Mint).&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;My preferred alternative:&lt;&#x2F;strong&gt; LMDE offers an &lt;strong&gt;expert-mode&lt;&#x2F;strong&gt; install option that is considerably more flexible in handling a custom partition layout of disk storage. I use the &lt;code&gt;live-installer-expert-mode&lt;&#x2F;code&gt; to create 4 partitions: a small EFI system partition, &lt;code&gt;root&lt;&#x2F;code&gt; partition, &lt;code&gt;swap&lt;&#x2F;code&gt; partition, and a LUKS encrypted &lt;code&gt;home&lt;&#x2F;code&gt; partition.&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;lmde-install-expert-mode&#x2F;#start-here&quot;&gt;Start Here&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;lmde-install-expert-mode&#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;lmde-install-expert-mode&#x2F;#prepare-the-usb-installation-media&quot;&gt;Prepare the USB installation media&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;lmde-install-expert-mode&#x2F;#configure-the-live-environment&quot;&gt;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;lmde-install-expert-mode&#x2F;#switch-to-root&quot;&gt;Switch to root&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;lmde-install-expert-mode&#x2F;#verify-network-connectivity&quot;&gt;Verify network connectivity&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;lmde-install-expert-mode&#x2F;#verify-boot-mode&quot;&gt;Verify boot mode&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;lmde-install-expert-mode&#x2F;#prepare-the-disk&quot;&gt;Prepare the Disk&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;lmde-install-expert-mode&#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;lmde-install-expert-mode&#x2F;#wipe-the-disk&quot;&gt;Wipe the disk&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;lmde-install-expert-mode&#x2F;#partition-the-disk&quot;&gt;Partition the disk&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;lmde-install-expert-mode&#x2F;#encrypt-the-home-partition&quot;&gt;Encrypt the home partition&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;lmde-install-expert-mode&#x2F;#format-the-partitions&quot;&gt;Format the partitions&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;lmde-install-expert-mode&#x2F;#installation&quot;&gt;Installation&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;lmde-install-expert-mode&#x2F;#expert-mode&quot;&gt;Expert mode&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;lmde-install-expert-mode&#x2F;#mount-partition-file-systems&quot;&gt;Mount partition file systems&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;lmde-install-expert-mode&#x2F;#install-lmde&quot;&gt;Install LMDE&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;lmde-install-expert-mode&#x2F;#create-a-swapfile&quot;&gt;Create a swapfile&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;lmde-install-expert-mode&#x2F;#add-to-fstab&quot;&gt;Add to fstab&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;lmde-install-expert-mode&#x2F;#add-to-crypttab&quot;&gt;Add to crypttab&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;lmde-install-expert-mode&#x2F;#finish-the-install&quot;&gt;Finish the install&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;lmde-install-expert-mode&#x2F;#mount-virtual-file-systems&quot;&gt;Mount virtual file systems&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;lmde-install-expert-mode&#x2F;#enter-chroot&quot;&gt;Enter chroot&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;lmde-install-expert-mode&#x2F;#add-packages&quot;&gt;Add packages&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;lmde-install-expert-mode&#x2F;#finish-up&quot;&gt;Finish Up&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;lmde-install-expert-mode&#x2F;#exit-chroot&quot;&gt;Exit chroot&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;lmde-install-expert-mode&#x2F;#unmount-and-close&quot;&gt;Unmount and close&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;lmde-install-expert-mode&#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;lmde-install-expert-mode&#x2F;#troubleshooting&quot;&gt;Troubleshooting&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;lmde-install-expert-mode&#x2F;#resources&quot;&gt;Resources&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;start-here&quot;&gt;Start Here&lt;&#x2F;h2&gt;
&lt;p&gt;A few assumptions:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;LMDE is installed as the sole operating system on a single disk.&lt;&#x2F;li&gt;
&lt;li&gt;Target device is &lt;code&gt;64-bit&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;Installation image is prepared on a Linux&#x2F;BSD system.&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;external&quot; href=&quot;https:&#x2F;&#x2F;www.linuxmint.com&#x2F;edition.php?id=325&quot;&gt;Torrents and download mirrors&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Download the &lt;code&gt;lmde-7-cinnamon-64bit.iso&lt;&#x2F;code&gt; image and &lt;code&gt;sha256sum.txt&lt;&#x2F;code&gt; file.&lt;&#x2F;p&gt;
&lt;p&gt;Verify the image integrity:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sha256sum -c --ignore-missing sha256sum.txt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;prepare-the-usb-installation-media&quot;&gt;Prepare the USB installation media&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;ALERT&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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;dd bs=4M conv=fsync oflag=direct status=progress \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  if=lmde-7-cinnamon-64bit.iso of=&#x2F;dev&#x2F;sdx&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;configure-the-live-environment&quot;&gt;Configure the Live Environment&lt;&#x2F;h2&gt;
&lt;p&gt;Boot the target device from the &lt;code&gt;lmde&lt;&#x2F;code&gt; installation media. User is automatically logged in to the Cinnamon desktop.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;switch-to-root&quot;&gt;Switch to root&lt;&#x2F;h3&gt;
&lt;p&gt;Open a terminal and switch to a root shell:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sudo -i&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;verify-network-connectivity&quot;&gt;Verify network connectivity&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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;ip addr&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;ping -c 3 8.8.8.8&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;ping -c 3 linuxmint.com&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;verify-boot-mode&quot;&gt;Verify boot mode&lt;&#x2F;h3&gt;
&lt;p&gt;Confirm target device is using UEFI boot mode:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;cat &#x2F;sys&#x2F;firmware&#x2F;efi&#x2F;fw_platform_size&lt;&#x2F;span&gt;&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;ALERT&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
&lt;strong&gt;If the file does not exist, the device is not using UEFI and these instructions will not produce a working system.&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;prepare-the-disk&quot;&gt;Prepare the Disk&lt;&#x2F;h2&gt;
&lt;p&gt;Set up a custom partition layout on a single disk before implementing the LMDE installation.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;define-disk-variables&quot;&gt;Define disk variables&lt;&#x2F;h3&gt;
&lt;p&gt;Identify the disk where LMDE will be installed by listing block devices:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;lsblk -f&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Set variables for the partitions:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;esp_part=&amp;quot;1&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;root_part=&amp;quot;2&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;home_part=&amp;quot;3&amp;quot;&lt;&#x2F;span&gt;&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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;disk=&amp;quot;&#x2F;dev&#x2F;sda&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;esp_device=${disk}${esp_part}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;root_device=${disk}${root_part}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;home_device=${disk}${home_part}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;echo $esp_device &amp;amp;&amp;amp; echo $root_device &amp;amp;&amp;amp; echo $home_device&lt;&#x2F;span&gt;&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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;disk=&amp;quot;&#x2F;dev&#x2F;nvme0n1&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;esp_device=${disk}p${esp_part}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;root_device=${disk}p${root_part}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;home_device=${disk}p${home_part}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;echo $esp_device &amp;amp;&amp;amp; echo $root_device &amp;amp;&amp;amp; echo $home_device&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;wipe-the-disk&quot;&gt;Wipe the disk&lt;&#x2F;h3&gt;
&lt;p&gt;If disk was previously configured with LVM, bring down the volume group:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vgchange -an&lt;&#x2F;span&gt;&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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;wipefs -af $disk &amp;amp;&amp;amp; sgdisk --zap-all --clear $disk&lt;&#x2F;span&gt;&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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;partprobe $disk&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;partition-the-disk&quot;&gt;Partition the disk&lt;&#x2F;h3&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;FS Code&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: center&quot;&gt;FS 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;1g&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;64g&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;8300&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;ext4&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;Root partition&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;&#x2F;&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;&amp;gt;END&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;8309&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;luks&#x2F;ext4&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;Encrypted partition&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;&#x2F;home&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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sgdisk -n &amp;quot;${esp_part}:1m:+1g&amp;quot; -t &amp;quot;${esp_part}:ef00&amp;quot; -c 0:esp $disk&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Create the root partition:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sgdisk -n &amp;quot;${root_part}:0:+64g&amp;quot; -t &amp;quot;${root_part}:8300&amp;quot; -c 0:root $disk&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Create the home partition:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sgdisk -n &amp;quot;${home_part}:0:0&amp;quot; -t &amp;quot;${home_part}:8309&amp;quot; -c 0:home $disk&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Display layout:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;partprobe $disk &amp;amp;&amp;amp; sgdisk -p $disk&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;encrypt-the-home-partition&quot;&gt;Encrypt the home partition&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;cryptsetup luksFormat --type luks2 -y $home_device&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Unlock home_device:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;cryptsetup open $home_device crypthome&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Set a variable for &lt;code&gt;crypthome&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;luks_dev_home=&amp;quot;crypthome&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;format-the-partitions&quot;&gt;Format the partitions&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 are a more reliable way to identify the correct partition than simple device nodes and allow for easy mounting without a UUID.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mkfs.fat -n ESP -F 32 $esp_device&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mkfs.ext4 -L rootfs $root_device&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mkfs.ext4 -L homefs &#x2F;dev&#x2F;mapper&#x2F;${luks_dev_home}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;installation&quot;&gt;Installation&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;expert-mode&quot;&gt;Expert mode&lt;&#x2F;h3&gt;
&lt;p&gt;Open a new tab in the terminal.&lt;&#x2F;p&gt;
&lt;p&gt;Launch the LMDE installer in &lt;code&gt;expert-mode&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sudo live-installer-expert-mode&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Proceed as normal up to &lt;code&gt;Installation Type&lt;&#x2F;code&gt;. Select &lt;code&gt;Manual Partitioning&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;img src=&quot;&#x2F;img&#x2F;lmde-expert-mode&#x2F;lmde-manual-partitioning.png&quot; alt=&quot;Manual partitioning&quot; width=&quot;748&quot; height=&quot;713&quot; &#x2F;&gt;
&lt;p&gt;In the &lt;code&gt;Partitioning&lt;&#x2F;code&gt; window, click &lt;code&gt;Expert mode&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Before continuing, we mount our file systems on &lt;code&gt;&#x2F;target&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;img src=&quot;&#x2F;img&#x2F;lmde-expert-mode&#x2F;lmde-expert-mode.png&quot; alt=&quot;Expert mode&quot; width=&quot;746&quot; height=&quot;712&quot; &#x2F;&gt;
&lt;h3 id=&quot;mount-partition-file-systems&quot;&gt;Mount partition file systems&lt;&#x2F;h3&gt;
&lt;p&gt;Switch back to the root terminal.&lt;&#x2F;p&gt;
&lt;p&gt;Mount:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mount --mkdir LABEL=rootfs &#x2F;target&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mount --mkdir LABEL=homefs &#x2F;target&#x2F;home&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mount --mkdir LABEL=ESP &#x2F;target&#x2F;boot&#x2F;efi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;install-lmde&quot;&gt;Install LMDE&lt;&#x2F;h3&gt;
&lt;p&gt;Switch back to the installer window and click &lt;code&gt;Next&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Proceed to &lt;code&gt;Summary&lt;&#x2F;code&gt; and confirm:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Home encryption: disabled&lt;&#x2F;code&gt;   _# entire partition is LUKS-encrypted&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;Install bootloader on &#x2F;dev&#x2F;[disk]&lt;&#x2F;code&gt;   &lt;em&gt;# example: &lt;code&gt;&#x2F;dev&#x2F;sda&lt;&#x2F;code&gt; with no partition number&lt;&#x2F;em&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;Use already mounted &#x2F;target&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;When satisfied, click &lt;code&gt;Install&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;LMDE install proceeds as per usual up to &lt;code&gt;Installation paused&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;img src=&quot;&#x2F;img&#x2F;lmde-expert-mode&#x2F;lmde-installation-paused.png&quot; alt=&quot;Installation paused&quot; width=&quot;493&quot; height=&quot;132&quot; &#x2F;&gt;
&lt;p&gt;Do the following before continuing the install:&lt;&#x2F;p&gt;
&lt;img src=&quot;&#x2F;img&#x2F;lmde-expert-mode&#x2F;lmde-installation-paused-2.png&quot; alt=&quot;Installation paused 2&quot; width=&quot;748&quot; height=&quot;712&quot; &#x2F;&gt;
&lt;h3 id=&quot;create-a-swapfile&quot;&gt;Create a swapfile&lt;&#x2F;h3&gt;
&lt;p&gt;Create a (example: &lt;code&gt;2G&lt;&#x2F;code&gt;) swapfile:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;fallocate -l 2G &#x2F;swapfile&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Set correct permissions:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;chmod 600 &#x2F;swapfile&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Format the file as &lt;code&gt;swap&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mkswap &#x2F;swapfile&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;add-to-fstab&quot;&gt;Add to fstab&lt;&#x2F;h3&gt;
&lt;p&gt;Add file systems to &lt;code&gt;fstab&lt;&#x2F;code&gt; to be mounted at boot:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;echo &amp;quot;LABEL=ESP     &#x2F;boot&#x2F;efi   vfat    defaults    0 0&amp;quot; &amp;gt;&amp;gt; &#x2F;target&#x2F;etc&#x2F;fstab&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;echo &amp;quot;LABEL=rootfs  &#x2F;           ext4    defaults    0 1&amp;quot; &amp;gt;&amp;gt; &#x2F;target&#x2F;etc&#x2F;fstab&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;echo &amp;quot;LABEL=homefs  &#x2F;home       ext4    defaults    0 2&amp;quot; &amp;gt;&amp;gt; &#x2F;target&#x2F;etc&#x2F;fstab&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Add &lt;code&gt;swapfile&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;echo &amp;quot;&#x2F;swapfile     none        swap    sw          0 0&amp;quot; &amp;gt;&amp;gt; &#x2F;target&#x2F;etc&#x2F;fstab&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;add-to-crypttab&quot;&gt;Add to crypttab&lt;&#x2F;h3&gt;
&lt;p&gt;Set &lt;code&gt;home&lt;&#x2F;code&gt; to be opened at boot:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;echo &amp;quot;$luks_dev_home PARTLABEL=home none luks,discard&amp;quot; &amp;gt;&amp;gt; &#x2F;target&#x2F;etc&#x2F;crypttab&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;finish-the-install&quot;&gt;Finish the install&lt;&#x2F;h3&gt;
&lt;p&gt;Switch back to installer window and click &lt;code&gt;Next&lt;&#x2F;code&gt; to finish the install.&lt;&#x2F;p&gt;
&lt;p&gt;When prompted &lt;code&gt;Do you want to restart your computer to use the new system?&lt;&#x2F;code&gt; choose &lt;code&gt;No&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;img src=&quot;&#x2F;img&#x2F;lmde-expert-mode&#x2F;lmde-installation-finished.png&quot; alt=&quot;Installation finished&quot; width=&quot;533&quot; height=&quot;135&quot; &#x2F;&gt;
&lt;h3 id=&quot;mount-virtual-file-systems&quot;&gt;Mount virtual file systems&lt;&#x2F;h3&gt;
&lt;p&gt;Switch back to the root terminal.&lt;&#x2F;p&gt;
&lt;p&gt;Mount:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mount --bind &#x2F;dev &#x2F;target&#x2F;dev&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mount --bind &#x2F;dev&#x2F;pts &#x2F;target&#x2F;dev&#x2F;pts&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mount -t proc &#x2F;proc &#x2F;target&#x2F;proc&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mount -t sysfs &#x2F;sys &#x2F;target&#x2F;sys&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;enter-chroot&quot;&gt;Enter chroot&lt;&#x2F;h3&gt;
&lt;p&gt;Copy &lt;code&gt;resolv.conf&lt;&#x2F;code&gt; to enable network access inside chroot environment:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;cp &#x2F;etc&#x2F;resolv.conf &#x2F;target&#x2F;etc&#x2F;resolv.conf&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Make changes inside the local installed system via &lt;code&gt;chroot&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;chroot &#x2F;target&#x2F; &#x2F;bin&#x2F;bash&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Change the prompt to highlight actions inside &lt;code&gt;chroot&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;export PS1=&amp;quot;(chroot) $PS1&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;add-packages&quot;&gt;Add packages&lt;&#x2F;h3&gt;
&lt;p&gt;Update the package repository contents and install extra packages:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;apt update &amp;amp;&amp;amp; apt install systemd-cryptsetup&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;finish-up&quot;&gt;Finish Up&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;exit-chroot&quot;&gt;Exit chroot&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;exit&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;cd&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;unmount-and-close&quot;&gt;Unmount and close&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
&lt;em&gt;Partition &lt;code&gt;&#x2F;target&#x2F;boot&#x2F;efi&lt;&#x2F;code&gt; is auto-unmounted by the installer.&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;umount &#x2F;target&#x2F;home &amp;amp;&amp;amp; umount -l -n -R &#x2F;target&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Remove encrypted &lt;code&gt;home&lt;&#x2F;code&gt; mapping:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;cryptsetup close $luks_dev_home&lt;&#x2F;span&gt;&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;p&gt;Reboot the system.&lt;&#x2F;p&gt;
&lt;p&gt;User is prompted for the passphrase to unlock the encrypted &lt;code&gt;home&lt;&#x2F;code&gt; partition. Upon success, boot resumes...&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Welcome to LMDE!&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;troubleshooting&quot;&gt;Troubleshooting&lt;&#x2F;h3&gt;
&lt;p&gt;The default Plymouth (boot) theme &lt;code&gt;mint-logo&lt;&#x2F;code&gt; fails to display properly rendered text for the password prompt on the splash screen to unlock &lt;code&gt;home&lt;&#x2F;code&gt; partition (except for this detail it otherwise works correctly).&lt;&#x2F;p&gt;
&lt;p&gt;After a successful first boot, possible workarounds are: 1. switch to another built-in plymouth theme; or 2. disable plymouth and use a text-based password prompt.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;1-switch-theme&quot;&gt;1. Switch theme&lt;&#x2F;h4&gt;
&lt;p&gt;Plymouth theme &lt;code&gt;bgrt&lt;&#x2F;code&gt; renders text correctly:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sudo plymouth-set-default-theme bgrt &amp;amp;&amp;amp; sudo update-initramfs -u&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h4 id=&quot;2-text-based-prompt&quot;&gt;2. Text-based prompt&lt;&#x2F;h4&gt;
&lt;p&gt;Modify &lt;code&gt;&#x2F;etc&#x2F;default&#x2F;grub.d&#x2F;50_lmde.cfg&lt;&#x2F;code&gt; by removing &lt;code&gt;splash&lt;&#x2F;code&gt; from &lt;code&gt;GRUB_CMDLINE_LINUX_DEFAULT&lt;&#x2F;code&gt;. Save changes, then run &lt;code&gt;update-grub&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;resources&quot;&gt;Resources&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;Release notes for &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.linuxmint.com&#x2F;rel_gigi.php&quot;&gt;LMDE 7&lt;&#x2F;a&gt; and upstream &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.debian.org&#x2F;releases&#x2F;trixie&#x2F;release-notes&#x2F;&quot;&gt;Debian 13 &quot;Trixie&quot;&lt;&#x2F;a&gt;. Pay particular attention to &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.debian.org&#x2F;releases&#x2F;trixie&#x2F;release-notes&#x2F;issues.en.html#issues-to-be-aware-of-for-releasename&quot;&gt;&quot;Issues to be aware of for trixie&quot;&lt;&#x2F;a&gt; (especially #5).&lt;&#x2F;li&gt;
&lt;&#x2F;ul&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;115408909537210596&quot; target=&quot;_blank&quot;&gt;on Mastodon&lt;&#x2F;a&gt; &amp;#128172
&lt;&#x2F;p&gt;
</description>
    </item>
    <item>
      <title>Zswap Makes Swap Go Zoom</title>
      <pubDate>Fri, 10 Jul 2026 00:00:00 +0000</pubDate>
      <link>https://www.dwarmstrong.org/zswap/</link>
      <guid>https://www.dwarmstrong.org/zswap/</guid>
      <description>&lt;p&gt;Linux kernel features &lt;strong&gt;zswap&lt;&#x2F;strong&gt; and &lt;strong&gt;zram&lt;&#x2F;strong&gt; both provide a compressed storage area in RAM for swap memory. But each takes a very different approach to achieve a fast(er) swap.&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;zswap&#x2F;#start-here&quot;&gt;Start Here&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;zswap&#x2F;#configure-the-bootloader&quot;&gt;Configure the Bootloader&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;zswap&#x2F;#grub&quot;&gt;GRUB&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;zswap&#x2F;#zbm&quot;&gt;ZBM&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;zswap&#x2F;#verify&quot;&gt;Verify&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;zswap&#x2F;#cmdline&quot;&gt;Cmdline&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;zswap&#x2F;#dmesg&quot;&gt;Dmesg&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;zswap&#x2F;#parameters&quot;&gt;Parameters&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;zswap&#x2F;#statistics&quot;&gt;Statistics&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;zswap&#x2F;#troubleshooting&quot;&gt;Troubleshooting&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;zswap&#x2F;#resources&quot;&gt;Resources&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;start-here&quot;&gt;Start Here&lt;&#x2F;h2&gt;
&lt;p&gt;The most apparent difference between the two approaches to swap management are that while &lt;code&gt;zswap&lt;&#x2F;code&gt; works in tandem with a swapfile or swap partition, &lt;code&gt;zram&lt;&#x2F;code&gt; does not require a backing swap device. So &lt;code&gt;zram&lt;&#x2F;code&gt; all the way, right? At least I thought so. I&#x27;ve used &lt;code&gt;zram&lt;&#x2F;code&gt; in the past to keep swap contents in speedy RAM vs not-as-speedy-storage, but after reading this comprehensive &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;chrisdown.name&#x2F;2026&#x2F;03&#x2F;24&#x2F;zswap-vs-zram-when-to-use-what.html&quot;&gt;debunking of zswap and zram myths&lt;&#x2F;a&gt; I&#x27;ve switched to &lt;code&gt;zswap&lt;&#x2F;code&gt; on my machines.&lt;&#x2F;p&gt;
&lt;p&gt;Different bootloaders initiate &lt;code&gt;zswap&lt;&#x2F;code&gt; differently. For the purposes of this HOWTO I profile two systems, each with a different bootloader: a &lt;a href=&quot;&#x2F;void-linux-install-zfs&#x2F;&quot;&gt;Void Linux&lt;&#x2F;a&gt; desktop using &lt;strong&gt;ZFSBootMenu&lt;&#x2F;strong&gt; (&lt;a href=&quot;&#x2F;tags&#x2F;zbm&quot;&gt;ZBM&lt;&#x2F;a&gt;), and a &lt;a href=&quot;&#x2F;lmde-install-expert-mode&#x2F;&quot;&gt;Linux Mint Debian Edition&lt;&#x2F;a&gt; (&lt;a href=&quot;&#x2F;tags&#x2F;lmde&quot;&gt;LMDE&lt;&#x2F;a&gt;) laptop using &lt;strong&gt;GRUB&lt;&#x2F;strong&gt;. Both systems were provisioned with a swap partition during install.&lt;&#x2F;p&gt;
&lt;p&gt;To use &lt;code&gt;zswap&lt;&#x2F;code&gt;, I need to supply the desired arguments to the kernel at boot. These are the arguments I use:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;zswap.enabled=1&lt;&#x2F;code&gt;           # the master switch&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;zswap.compressor=lz4&lt;&#x2F;code&gt;       # prioritize the lowest latency vs a higher compression ratio&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;zswap.zpool=zsmalloc&lt;&#x2F;code&gt;       # most modern and efficient memory allocator&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;zswap.max_pool_percent=10&lt;&#x2F;code&gt;   # zswap can use up to 10% of physical RAM&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;configure-the-bootloader&quot;&gt;Configure the Bootloader&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;grub&quot;&gt;GRUB&lt;&#x2F;h3&gt;
&lt;p&gt;If the system bootloader is GRUB, view the current boot arguments by inspecting &lt;code&gt;cmdline&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$ cat &#x2F;proc&#x2F;cmdline&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;BOOT_IMAGE=&#x2F;boot&#x2F;vmlinuz-6.12.95+deb13-amd64 root=UUID=&amp;lt;long_string_of_characters&amp;gt; ro quiet splash&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Add the desired &lt;code&gt;zswap&lt;&#x2F;code&gt; boot arguments to GRUB by modifying the &lt;code&gt;GRUB_CMDLINE_LINUX_DEFAULT&lt;&#x2F;code&gt; setting, which exists in &lt;code&gt;&#x2F;etc&#x2F;default&#x2F;grub&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;However, settings in this file can be overridden if additional config files exist in the &lt;code&gt;&#x2F;etc&#x2F;default&#x2F;grub.d&lt;&#x2F;code&gt; directory. In LMDE this is indeed the case, which has a &lt;code&gt;&#x2F;etc&#x2F;default&#x2F;grub.d&#x2F;50_lmde.cfg&lt;&#x2F;code&gt; file. Higher numbered files in this directory are read later by GRUB in generating its config, and take precedence over earlier settings.&lt;&#x2F;p&gt;
&lt;p&gt;Since any changes made to &lt;code&gt;50_lmde.cfg&lt;&#x2F;code&gt; may be lost in a future system upgrade, I create a custom file to hold the boot arguments:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;echo &amp;#39;GRUB_CMDLINE_LINUX_DEFAULT=&amp;quot;quiet splash zswap.enabled=1 zswap.zpool=zsmalloc zswap.max_pool_percent=10&amp;quot;&amp;#39; | sudo tee &#x2F;etc&#x2F;default&#x2F;grub.d&#x2F;99_cmdline.cfg&lt;&#x2F;span&gt;&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&#x27;ve made a slight alteration here, dropping the &lt;code&gt;zswap.compressor=lz4&lt;&#x2F;code&gt; argument. The reason is that on (all?) Debian-based distros like LMDE, the default &lt;code&gt;lzo&lt;&#x2F;code&gt; compressor is loaded very early in the boot process before the &lt;code&gt;lz4&lt;&#x2F;code&gt; modules are considered (even if included in the initramfs) and the argument will fail. An alternative is described below in &quot;Troubleshooting&quot;.&lt;&#x2F;p&gt;
&lt;p&gt;Update GRUB:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sudo update-grub&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Reboot the system.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;zbm&quot;&gt;ZBM&lt;&#x2F;h3&gt;
&lt;p&gt;If the system bootloader is ZBM, view the current boot arguments for (example) &lt;code&gt;zroot&#x2F;ROOT&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$ zfs get org.zfsbootmenu:commandline zroot&#x2F;ROOT&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;NAME        PROPERTY                     VALUE                    SOURCE&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;zroot&#x2F;ROOT  org.zfsbootmenu:commandline  quiet hibernate=no       local&lt;&#x2F;span&gt;&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 had added the &lt;code&gt;quiet&lt;&#x2F;code&gt; and &lt;code&gt;hiberate=no&lt;&#x2F;code&gt; parameters earlier &lt;a href=&quot;&#x2F;void-linux-install-zfs&#x2F;#set-boot-properties&quot;&gt;during the Void install&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Add the following boot arguments to ZBM:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sudo zfs set org.zfsbootmenu:commandline=&amp;quot;quiet hiberate=no zswap.enabled=1 zswap.compressor=lz4 zswap.zpool=zsmalloc zswap.max_pool_percent=10&amp;quot; zroot&#x2F;ROOT&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Reboot the system.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;verify&quot;&gt;Verify&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;cmdline&quot;&gt;Cmdline&lt;&#x2F;h3&gt;
&lt;p&gt;Arguments used to boot the system:&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;GRUB on LMDE&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$ cat &#x2F;proc&#x2F;cmdline&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;BOOT_IMAGE=&#x2F;boot&#x2F;vmlinuz-6.12.95+deb13-amd64 root=UUID=&amp;lt;long_string_of_characters&amp;gt; ro quiet splash zswap.enabled=1 zswap.zpool=zsmalloc zswap.max_pool_percent=10&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;ZBM on Void&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$ cat &#x2F;proc&#x2F;cmdline &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;root=zfs:zroot&#x2F;ROOT&#x2F;void quiet hiberate=no zswap.enabled=1 zswap.compressor=lz4 zswap.zpool=zsmalloc zswap.max_pool_percent=10 spl.spl_hostid=0x00bab10c&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;dmesg&quot;&gt;Dmesg&lt;&#x2F;h3&gt;
&lt;p&gt;Confirm &lt;code&gt;zswap&lt;&#x2F;code&gt; was loaded during boot:&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;LMDE&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$ sudo dmesg | grep zswap&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[    0.746379] zswap: loaded using pool lzo&#x2F;zsmalloc&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;Void&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$ sudo dmesg | grep zswap&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[    0.507529] zswap: loaded using pool lz4&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;parameters&quot;&gt;Parameters&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
On systems that are running more recent (6.18+) kernels (like Void) &lt;code&gt;zsmalloc&lt;&#x2F;code&gt; is now the exclusive backend for zswap, and the &lt;code&gt;zpool&lt;&#x2F;code&gt; option has been removed.&lt;&#x2F;p&gt;
&lt;p&gt;View live settings:&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Void&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$ grep -r . &#x2F;sys&#x2F;module&#x2F;zswap&#x2F;parameters&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;sys&#x2F;module&#x2F;zswap&#x2F;parameters&#x2F;enabled:Y&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;sys&#x2F;module&#x2F;zswap&#x2F;parameters&#x2F;shrinker_enabled:N&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;sys&#x2F;module&#x2F;zswap&#x2F;parameters&#x2F;max_pool_percent:10&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;sys&#x2F;module&#x2F;zswap&#x2F;parameters&#x2F;compressor:lz4&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;sys&#x2F;module&#x2F;zswap&#x2F;parameters&#x2F;accept_threshold_percent:90&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;LMDE&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$ grep -r . &#x2F;sys&#x2F;module&#x2F;zswap&#x2F;parameters&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;sys&#x2F;module&#x2F;zswap&#x2F;parameters&#x2F;enabled:Y&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;sys&#x2F;module&#x2F;zswap&#x2F;parameters&#x2F;shrinker_enabled:N&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;sys&#x2F;module&#x2F;zswap&#x2F;parameters&#x2F;max_pool_percent:10&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;sys&#x2F;module&#x2F;zswap&#x2F;parameters&#x2F;compressor:lzo&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;sys&#x2F;module&#x2F;zswap&#x2F;parameters&#x2F;zpool:zsmalloc&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;sys&#x2F;module&#x2F;zswap&#x2F;parameters&#x2F;accept_threshold_percent:90&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;statistics&quot;&gt;Statistics&lt;&#x2F;h3&gt;
&lt;p&gt;View how &lt;code&gt;zswap&lt;&#x2F;code&gt; is performing:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sudo grep -r . &#x2F;sys&#x2F;kernel&#x2F;debug&#x2F;zswap&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;If the above command outputs the error message:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;grep: &#x2F;sys&#x2F;kernel&#x2F;debug&#x2F;zswap&#x2F;: No such file or directory&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;...mount &lt;code&gt;debugfs&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sudo mount -t debugfs none &#x2F;sys&#x2F;kernel&#x2F;debug&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;...and re-run &lt;code&gt;grep&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;troubleshooting&quot;&gt;Troubleshooting&lt;&#x2F;h2&gt;
&lt;p&gt;To use the zswap compressor of our choice on a system that won&#x27;t accept it as a boot argument (i.e. &lt;code&gt;lz4&lt;&#x2F;code&gt; on LMDE), one approach is to create a systemd service file that will switch compressors after &lt;code&gt;zswap&lt;&#x2F;code&gt; starts at boot.&lt;&#x2F;p&gt;
&lt;p&gt;Create &lt;code&gt;zswap-compress.service&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sudo nano &#x2F;etc&#x2F;systemd&#x2F;system&#x2F;zswap-compress.service&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Add:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[Unit]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Description=Configure zswap compressor to LZ4&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;After=systemd-modules-load.service&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[Service]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Type=oneshot&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;ExecStart=&#x2F;bin&#x2F;bash -c &amp;#39;echo lz4 &amp;gt; &#x2F;sys&#x2F;module&#x2F;zswap&#x2F;parameters&#x2F;compressor&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;RemainAfterExit=yes&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[Install]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;WantedBy=multi-user.target&lt;&#x2F;span&gt;&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;Enable the service:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sudo systemctl enable --now zswap-compress.service&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Verify:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;cat &#x2F;sys&#x2F;module&#x2F;zswap&#x2F;parameters&#x2F;compressor&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;It should output &lt;code&gt;lz4&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;On the next reboot, &lt;code&gt;dmesg&lt;&#x2F;code&gt; may show a &lt;code&gt;lz4 not available, using default&lt;&#x2F;code&gt; log entry from the beginning of boot, but the systemd service will override it seconds later. After login, running the &lt;code&gt;cat&lt;&#x2F;code&gt; command above will output the current compressor handling the swap pool.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;resources&quot;&gt;Resources&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;Essential reading: &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;chrisdown.name&#x2F;2026&#x2F;03&#x2F;24&#x2F;zswap-vs-zram-when-to-use-what.html&quot;&gt;Debunking zswap and zram myth&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Linux Kernel Admin Guide: &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;docs.kernel.org&#x2F;admin-guide&#x2F;mm&#x2F;zswap.html&quot;&gt;zswap&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Arch Wiki: &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;title&#x2F;Zswap&quot;&gt;Zswap&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&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;116898602382964187&quot; target=&quot;_blank&quot;&gt;on the Fediverse&lt;&#x2F;a&gt; &amp;#128172
&lt;&#x2F;p&gt;
</description>
    </item>
    <item>
      <title>Virtualization in Void Linux Using KVM + QEMU + Libvirt</title>
      <pubDate>Fri, 03 Jul 2026 00:00:00 +0000</pubDate>
      <link>https://www.dwarmstrong.org/void-libvirt/</link>
      <guid>https://www.dwarmstrong.org/void-libvirt/</guid>
      <description>&lt;p&gt;Set up a stack of virtualization tools on a &lt;a href=&quot;&#x2F;tags&#x2F;void&#x2F;&quot;&gt;Void Linux&lt;&#x2F;a&gt; host for creating and managing virtual machines (VMs).&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;void-libvirt&#x2F;#start-here&quot;&gt;Start Here&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-libvirt&#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;void-libvirt&#x2F;#permissions&quot;&gt;Permissions&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-libvirt&#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;void-libvirt&#x2F;#create-vm&quot;&gt;Create VM&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-libvirt&#x2F;#resize-vm-guest-window&quot;&gt;Resize VM guest window&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-libvirt&#x2F;#video-acceleration&quot;&gt;Video Acceleration&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-libvirt&#x2F;#virsh-and-virt-clone&quot;&gt;Virsh and Virt-clone&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-libvirt&#x2F;#resources&quot;&gt;Resources&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;start-here&quot;&gt;Start Here&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Kernel-based_Virtual_Machine&quot;&gt;KVM&lt;&#x2F;a&gt; (Kernel-based Virtual Machine) is built into the Linux kernel and handles the CPU and memory details. &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;QEMU&quot;&gt;QEMU&lt;&#x2F;a&gt; (Quick EMUlator) emulates the various hardware components of a physical machine. Finally, &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;title&#x2F;Libvirt&quot;&gt;libvirt&lt;&#x2F;a&gt; provides the tools for creating and managing VMs. I use &lt;code&gt;virt-manager&lt;&#x2F;code&gt; and &lt;code&gt;virsh&lt;&#x2F;code&gt; as graphical and console interfaces respectively.&lt;&#x2F;p&gt;
&lt;p&gt;First, check whether the host computer&#x27;s CPU supports virtualization:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;egrep -c &amp;#39;(vmx|svm)&amp;#39; &#x2F;proc&#x2F;cpuinfo&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;A result of &lt;code&gt;1&lt;&#x2F;code&gt; or more means the CPU supports virtualization extensions. A result of &lt;code&gt;0&lt;&#x2F;code&gt; means it does not, though double-check the BIOS and see if the extensions are available and just need to be enabled.&lt;&#x2F;p&gt;
&lt;p&gt;Install packages:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sudo xbps-install -S libvirt virt-manager qemu dbus polkit&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Add &lt;code&gt;[my_username_goes_here]&lt;&#x2F;code&gt; to the &lt;code&gt;kvm&lt;&#x2F;code&gt; and &lt;code&gt;libvirt&lt;&#x2F;code&gt; groups:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sudo usermod -a -G libvirt,kvm [my_username_goes_here]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Log out and back in.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;directories&quot;&gt;Directories&lt;&#x2F;h2&gt;
&lt;p&gt;Default directory to store VM images is &lt;code&gt;&#x2F;var&#x2F;lib&#x2F;libvirt&#x2F;images&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;The large amounts of space that these VM images occupy might pose an issue if &lt;code&gt;&#x2F;var&lt;&#x2F;code&gt; is mounted separately, or its included with the &lt;code&gt;root&lt;&#x2F;code&gt; directory on a relatively small partition (i.e. separate &lt;code&gt;root&lt;&#x2F;code&gt; and &lt;code&gt;home&lt;&#x2F;code&gt; partitions). If this is the case, consider storing VMs on the partition with the greatest amount of free storage and symlink to that location.&lt;&#x2F;p&gt;
&lt;p&gt;Additionally, if using BTRFS or &lt;a href=&quot;&#x2F;tags&#x2F;zfs&quot;&gt;ZFS&lt;&#x2F;a&gt; to make snapshots of &lt;code&gt;root&lt;&#x2F;code&gt;, its probably not desirable to have VMs bulking up the snapshots, nor have them deleted&#x2F;reverted back to earlier states upon a system rollback.&lt;&#x2F;p&gt;
&lt;p&gt;My &lt;a href=&quot;&#x2F;void-linux-install-zfs&#x2F;&quot;&gt;installation of Void uses ZFS&lt;&#x2F;a&gt;, so I create a &lt;code&gt;vm&lt;&#x2F;code&gt; dataset to store the VM images:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sudo zfs create -o mountpoint=&#x2F;vm zroot&#x2F;vm&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Create the &lt;code&gt;images&lt;&#x2F;code&gt; directory:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sudo mkdir -p &#x2F;vm&#x2F;libvirt&#x2F;images&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Delete the existing (empty) &lt;code&gt;images&lt;&#x2F;code&gt; directory and create a symlink to the new location in &lt;code&gt;vm&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sudo rmdir &#x2F;var&#x2F;lib&#x2F;libvirt&#x2F;images&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sudo ln -s &#x2F;vm&#x2F;libvirt&#x2F;images &#x2F;var&#x2F;lib&#x2F;libvirt&#x2F;images&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;I also create an &lt;code&gt;iso&lt;&#x2F;code&gt; directory to store ISO install images, accessible to my &lt;code&gt;USER&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sudo mkdir &#x2F;vm&#x2F;libvirt&#x2F;iso&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sudo chown $USER:$USER &#x2F;vm&#x2F;libvirt&#x2F;iso&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;permissions&quot;&gt;Permissions&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;libvirt-conf&quot;&gt;libvirt.conf&lt;&#x2F;h3&gt;
&lt;p&gt;Create &lt;code&gt;libvirt.conf&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mkdir ~&#x2F;.config&#x2F;libvirt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;cp &#x2F;etc&#x2F;libvirt&#x2F;libvirt.conf ~&#x2F;.config&#x2F;libvirt&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Open the file for editing and uncomment:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;uri_default = &amp;quot;qemu:&#x2F;&#x2F;&#x2F;system&amp;quot;&lt;&#x2F;span&gt;&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;qemu-conf&quot;&gt;qemu.conf&lt;&#x2F;h3&gt;
&lt;p&gt;For storage file permissions, modify &lt;code&gt;&#x2F;etc&#x2F;libvirt&#x2F;qemu.conf&lt;&#x2F;code&gt; by setting &lt;code&gt;user&lt;&#x2F;code&gt; to &lt;code&gt;[my_username_goes_here]&lt;&#x2F;code&gt; and &lt;code&gt;group&lt;&#x2F;code&gt; to &lt;code&gt;libvirt&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;user = &amp;quot;[my_username_goes_here]&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;group = &amp;quot;libvirt&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;services&quot;&gt;Services&lt;&#x2F;h2&gt;
&lt;p&gt;Enable necessary services:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sudo ln -s &#x2F;etc&#x2F;sv&#x2F;dbus &#x2F;var&#x2F;service&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sudo ln -s &#x2F;etc&#x2F;sv&#x2F;libvirtd &#x2F;var&#x2F;service&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sudo ln -s &#x2F;etc&#x2F;sv&#x2F;virtlockd &#x2F;var&#x2F;service&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sudo ln -s &#x2F;etc&#x2F;sv&#x2F;virtlogd &#x2F;var&#x2F;service&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;create-vm&quot;&gt;Create VM&lt;&#x2F;h2&gt;
&lt;p&gt;Create a VM using &lt;code&gt;virt-manager&lt;&#x2F;code&gt;. Click the &lt;code&gt;+&lt;&#x2F;code&gt; icon to add a new VM, and work through the series of dialog boxes to configure.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;&#x2F;img&#x2F;virt-manager-2.png&quot; alt=&quot;virt-manager&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;During the creation of a VM, the network selection option defaults to &lt;code&gt;Virtual network &#x27;default&#x27;: NAT&lt;&#x2F;code&gt;. If the &lt;code&gt;default&lt;&#x2F;code&gt; network is not active, &lt;code&gt;virt-manager&lt;&#x2F;code&gt; will prompt to start it.&lt;&#x2F;p&gt;
&lt;p&gt;Or start manually with:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;virsh net-start default&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Each VM (in &lt;code&gt;default&lt;&#x2F;code&gt; network) will be a member of &lt;code&gt;192.168.122.0&#x2F;24&lt;&#x2F;code&gt;, with an IP address in the range of &lt;code&gt;192.168.122.2&lt;&#x2F;code&gt; to &lt;code&gt;192.168.122.254&lt;&#x2F;code&gt;, and are accessible via SSH from the host.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;resize-vm-guest-window&quot;&gt;Resize VM guest window&lt;&#x2F;h2&gt;
&lt;p&gt;In the &lt;code&gt;virt-manager&lt;&#x2F;code&gt; console window, navigate to &lt;code&gt;Edit &amp;gt; Preferences &amp;gt; Console&lt;&#x2F;code&gt; and set:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Graphical console scaling&lt;&#x2F;code&gt; to &lt;code&gt;Always&lt;&#x2F;code&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Resize guest with window&lt;&#x2F;code&gt; to &lt;code&gt;On&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Install a &lt;strong&gt;spice agent&lt;&#x2F;strong&gt; inside a VM (example: for Debian and Debian-based VMs):&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sudo apt install spice-vdagent&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Reboot the VM.&lt;&#x2F;p&gt;
&lt;p&gt;In the VM guest window, navigate to &lt;code&gt;View &amp;gt; Scale display&lt;&#x2F;code&gt; and check &lt;code&gt;Always&lt;&#x2F;code&gt; and &lt;code&gt;Auto resize VM with window&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Now click-and-drag the window edge to resize display, or use &lt;code&gt;xrandr&lt;&#x2F;code&gt; to set display size.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;video-acceleration&quot;&gt;Video acceleration&lt;&#x2F;h2&gt;
&lt;p&gt;Using &lt;em&gt;VirtIO&lt;&#x2F;em&gt; its possible to create a virtual 3D accelerated GPU and pass through the hardware capabilities of the VM host&#x27;s graphics card.&lt;&#x2F;p&gt;
&lt;p&gt;With the VM shutdown, open the VM hardware details window. Click on &lt;code&gt;Video Virtio&lt;&#x2F;code&gt; and set &lt;code&gt;Model: Virtio&lt;&#x2F;code&gt;, check the box for &lt;code&gt;3D acceleration&lt;&#x2F;code&gt;, and &lt;code&gt;Apply&lt;&#x2F;code&gt; the modifications.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;&#x2F;img&#x2F;video-virtio.png&quot; alt=&quot;video-virtio&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Click on &lt;code&gt;Display Spice&lt;&#x2F;code&gt;, set &lt;code&gt;Type: Spice Server&lt;&#x2F;code&gt; and &lt;code&gt;Listen type: None&lt;&#x2F;code&gt;, check the box for &lt;code&gt;OpenGL&lt;&#x2F;code&gt;, and &lt;code&gt;Apply&lt;&#x2F;code&gt; the modifications.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;&#x2F;img&#x2F;spice-opengl.png&quot; alt=&quot;spice-opengl&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;virsh-and-virt-clone&quot;&gt;Virsh and virt-clone&lt;&#x2F;h2&gt;
&lt;p&gt;Some useful commands:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Start network: &lt;code&gt;virsh net-start &amp;lt;network_name&amp;gt;&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;List networks: &lt;code&gt;virsh net-list&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;List VMs: &lt;code&gt;virsh list --all&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Start, reboot, and shutdown VM: &lt;code&gt;virsh start &amp;lt;VM&amp;gt;&lt;&#x2F;code&gt;, &lt;code&gt;virsh reboot &amp;lt;VM&amp;gt;&lt;&#x2F;code&gt;, and &lt;code&gt;virsh shutdown &amp;lt;VM&amp;gt;&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Show IP addresses: &lt;code&gt;virsh net-dhcp-leases &amp;lt;network_name&amp;gt;&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;resources&quot;&gt;Resources&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;Void Linux Handbook: &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;docs.voidlinux.org&#x2F;config&#x2F;containers-and-vms&#x2F;libvirt.html&quot;&gt;libvirt&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Arch Linux Wiki: &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;title&#x2F;Libvirt&quot;&gt;libvirt&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;ryan.himmelwright.net&#x2F;post&#x2F;virtio-3d-vms&#x2F;&quot;&gt;Running VMs with VirtIO 3D Acceleration&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&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;116857073252768864&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 Void</title>
      <pubDate>Mon, 29 Jun 2026 00:00:00 +0000</pubDate>
      <link>https://www.dwarmstrong.org/void-linux-install-zfs/</link>
      <guid>https://www.dwarmstrong.org/void-linux-install-zfs/</guid>
      <description>&lt;p&gt;I&#x27;ve only been using &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;voidlinux.org&#x2F;&quot;&gt;Void Linux&lt;&#x2F;a&gt; for a few weeks, but I think &lt;strong&gt;this&lt;&#x2F;strong&gt; Linux has put a stop to my distro-hopping for a while.&lt;&#x2F;p&gt;
&lt;p&gt;Void meets all the criteria I especially value when evaluating a desktop Linux distro for my personal use:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Built by a community and built from scratch (not a fork).&lt;&#x2F;li&gt;
&lt;li&gt;Maintains a &lt;strong&gt;rolling release&lt;&#x2F;strong&gt; model of continuous, incremental upgrades.&lt;&#x2F;li&gt;
&lt;li&gt;Provides &lt;code&gt;init&lt;&#x2F;code&gt; system alternative(s) to &lt;code&gt;systemd&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Decent project documentation to get started and perform basic tasks.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Tinkering friendly.&lt;&#x2F;strong&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;What with all this rolling and tinkering I require a robust means of recovery when things go awry. To satisfy this need I turn to the combination of &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;openzfs.org&#x2F;wiki&#x2F;Main_Page&quot;&gt;OpenZFS&lt;&#x2F;a&gt; for making snapshots of system states and &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;docs.zfsbootmenu.org&quot;&gt;ZFSBootMenu&lt;&#x2F;a&gt; to boot and rollback to former, better times.&lt;&#x2F;p&gt;
&lt;p&gt;Working my way through this excellent &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;docs.zfsbootmenu.org&#x2F;en&#x2F;v3.1.x&#x2F;guides&#x2F;void-linux&#x2F;uefi.html&quot;&gt;installation guide&lt;&#x2F;a&gt;, I show the choices I make to create an &lt;strong&gt;encrypted Root-On-ZFS minimal Linux system&lt;&#x2F;strong&gt; with &quot;just enough&quot; to provide a solid foundation to build upon further: whether that be setting up a desktop, laptop, or server.&lt;&#x2F;p&gt;
&lt;img class=&quot;floatright&quot; src=&quot;&#x2F;img&#x2F;ascii_kitty.png&quot; alt=&quot;ascii kitty&quot; width=467 height=158 &#x2F;&gt;
&lt;hr &#x2F;&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-linux-install-zfs&#x2F;#start-here&quot;&gt;Start Here&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-linux-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;void-linux-install-zfs&#x2F;#prepare-the-usb-installation-media&quot;&gt;Prepare the USB installation media&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;void-linux-install-zfs&#x2F;#configure-the-live-environment&quot;&gt;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;void-linux-install-zfs&#x2F;#set-larger-console-font&quot;&gt;Set larger console font&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-linux-install-zfs&#x2F;#set-temporary-console-keyboard&quot;&gt;Set temporary console keyboard&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-linux-install-zfs&#x2F;#verify-network-connectivity&quot;&gt;Verify network connectivity&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-linux-install-zfs&#x2F;#remote-login-to-installer&quot;&gt;Remote login to installer&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-linux-install-zfs&#x2F;#verify-boot-mode&quot;&gt;Verify boot mode&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;void-linux-install-zfs&#x2F;#prepare-the-disk&quot;&gt;Prepare the Disk&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-linux-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;void-linux-install-zfs&#x2F;#wipe-the-disk&quot;&gt;Wipe the disk&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-linux-install-zfs&#x2F;#partition-the-disk&quot;&gt;Partition the 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;void-linux-install-zfs&#x2F;#configure-the-zfs-pool&quot;&gt;Configure the ZFS Pool&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-linux-install-zfs&#x2F;#create-the-encryption-keyfile&quot;&gt;Create the encryption keyfile&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-linux-install-zfs&#x2F;#create-the-encrypted-pool&quot;&gt;Create the encrypted pool&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-linux-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;void-linux-install-zfs&#x2F;#create-the-datasets&quot;&gt;Create the datasets&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-linux-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;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-linux-install-zfs&#x2F;#mount-the-datasets&quot;&gt;Mount the datasets&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;void-linux-install-zfs&#x2F;#installation&quot;&gt;Installation&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-linux-install-zfs&#x2F;#configure-the-system&quot;&gt;Configure the System&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-linux-install-zfs&#x2F;#generate-the-fstab&quot;&gt;Generate the fstab&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-linux-install-zfs&#x2F;#generate-the-hostid&quot;&gt;Generate the hostid&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-linux-install-zfs&#x2F;#enter-chroot&quot;&gt;Enter chroot&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-linux-install-zfs&#x2F;#set-the-root-password&quot;&gt;Set the root password&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-linux-install-zfs&#x2F;#create-the-superuser&quot;&gt;Create the superuser&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-linux-install-zfs&#x2F;#add-package-repository&quot;&gt;Add package repository&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-linux-install-zfs&#x2F;#install-extra-packages&quot;&gt;Install extra packages&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-linux-install-zfs&#x2F;#set-console-keymap-font-and-hardware-clock&quot;&gt;Set console keymap, font, and hardware clock&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-linux-install-zfs&#x2F;#set-the-timezone&quot;&gt;Set the timezone&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-linux-install-zfs&#x2F;#set-the-locale&quot;&gt;Set the locale&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-linux-install-zfs&#x2F;#assign-the-hostname&quot;&gt;Assign the hostname&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-linux-install-zfs&#x2F;#enable-services&quot;&gt;Enable services&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-linux-install-zfs&#x2F;#create-encrypted-swap&quot;&gt;Create encrypted swap&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-linux-install-zfs&#x2F;#regenerate-initramfs&quot;&gt;Regenerate 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;void-linux-install-zfs&#x2F;#zfsbootmenu&quot;&gt;ZFSBootMenu&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-linux-install-zfs&#x2F;#set-boot-properties&quot;&gt;Set boot properties&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-linux-install-zfs&#x2F;#format-and-mount-the-esp-partition&quot;&gt;Format and mount the ESP partition&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-linux-install-zfs&#x2F;#install-the-prebuilt-executable&quot;&gt;Install the prebuilt executable&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-linux-install-zfs&#x2F;#configure-efi-boot-entries&quot;&gt;Configure 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;void-linux-install-zfs&#x2F;#finish-up&quot;&gt;Finish Up&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-linux-install-zfs&#x2F;#exit-chroot&quot;&gt;Exit chroot&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;void-linux-install-zfs&#x2F;#unmount-and-export&quot;&gt;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;void-linux-install-zfs&#x2F;#reboot&quot;&gt;Reboot&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;void-linux-install-zfs&#x2F;#resources&quot;&gt;Resources&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;start-here&quot;&gt;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;Void Linux is installed as the &lt;strong&gt;sole operating system&lt;&#x2F;strong&gt; on a &lt;strong&gt;single disk&lt;&#x2F;strong&gt; using a &lt;strong&gt;three-partition layout&lt;&#x2F;strong&gt;:&lt;&#x2F;p&gt;
&lt;ul&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;Partition &lt;code&gt;swap&lt;&#x2F;code&gt; provides &lt;code&gt;swap&lt;&#x2F;code&gt; space with encryption courtesy of &lt;code&gt;dm-crypt&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Partition &lt;code&gt;pool&lt;&#x2F;code&gt; contains &lt;code&gt;root&lt;&#x2F;code&gt; and is formatted with the &lt;code&gt;zfs&lt;&#x2F;code&gt; file system using native encryption.&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;Use &lt;code&gt;glibc&lt;&#x2F;code&gt; as system libc.&lt;&#x2F;li&gt;
&lt;li&gt;Secure boot is disabled on target device.&lt;&#x2F;li&gt;
&lt;li&gt;Installation image is prepared on a Linux&#x2F;BSD system.&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 standard Void &lt;code&gt;live&lt;&#x2F;code&gt; images do not include support for the ZFS file system. A &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;orgs&#x2F;void-linux&#x2F;people&quot;&gt;Void team member&lt;&#x2F;a&gt; maintains the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;leahneukirchen&#x2F;hrmpf&quot;&gt;hrmpf rescue system&lt;&#x2F;a&gt;. These prebuilt images are extensions of the Void images that include precompiled ZFS modules in addition to other useful tools.&lt;&#x2F;p&gt;
&lt;p&gt;From the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;leahneukirchen&#x2F;hrmpf&#x2F;releases&quot;&gt;releases&lt;&#x2F;a&gt; directory, download &lt;code&gt;hrmpf-x86_64-[RELEASE].iso&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;As of June 29 2026, &lt;code&gt;[RELEASE]&lt;&#x2F;code&gt; is &lt;code&gt;20251231&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;The &lt;code&gt;SHA256&lt;&#x2F;code&gt; strings are printed in the directory. Verify the image integrity:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sha256sum hrmpf-x86_64-20251231.iso&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;prepare-the-usb-installation-media&quot;&gt;Prepare the USB installation media&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;ALERT&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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;dd bs=4M conv=fsync oflag=direct status=progress \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  if=hrmpf-x86_64-20251231.iso of=&#x2F;dev&#x2F;sdx&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;configure-the-live-environment&quot;&gt;Configure the Live Environment&lt;&#x2F;h2&gt;
&lt;p&gt;Boot the target device from the &lt;code&gt;hrmpf&lt;&#x2F;code&gt; installation media. User is automatically logged in as user &lt;code&gt;root&lt;&#x2F;code&gt; to the first virtual console.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;set-larger-console-font&quot;&gt;Set larger console font&lt;&#x2F;h3&gt;
&lt;p&gt;Console fonts are located in &lt;code&gt;&#x2F;usr&#x2F;share&#x2F;kbd&#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;p&gt;If the existing font size appears too small, running:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;setfont -d&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;... will double the size.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;set-temporary-console-keyboard&quot;&gt;Set temporary 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;kbd&#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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;loadkeys [keymap]&lt;&#x2F;span&gt;&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:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;loadkeys colemak&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;verify-network-connectivity&quot;&gt;Verify network connectivity&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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;ip addr&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;ping -c 3 8.8.8.8&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;ping -c 3 voidlinux.org&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;remote-login-to-installer&quot;&gt;Remote login to 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;The &lt;code&gt;sshd&lt;&#x2F;code&gt; daemon is auto-started at boot. Switch to the other computer and &lt;code&gt;ssh&lt;&#x2F;code&gt; into the target device as &lt;code&gt;anon:voidlinux&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;ssh anon@[ip_address]&lt;&#x2F;span&gt;&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; (password &lt;code&gt;voidlinux&lt;&#x2F;code&gt;):&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;su -&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;verify-boot-mode&quot;&gt;Verify boot mode&lt;&#x2F;h3&gt;
&lt;p&gt;Confirm target device is using UEFI boot mode:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;cat &#x2F;sys&#x2F;firmware&#x2F;efi&#x2F;fw_platform_size&lt;&#x2F;span&gt;&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;ALERT&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
&lt;strong&gt;If the file does not exist, the device is not using UEFI and these instructions will not produce a working system.&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;prepare-the-disk&quot;&gt;Prepare the Disk&lt;&#x2F;h2&gt;
&lt;p&gt;Set up a custom partition layout on a single disk before implementing the Void base installation.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;define-disk-variables&quot;&gt;Define disk variables&lt;&#x2F;h3&gt;
&lt;p&gt;Identify the disk where Void will be installed by listing block devices:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;lsblk -f&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Set variables for the partitions:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;export esp_part=&amp;quot;1&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;export swap_part=&amp;quot;2&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;export pool_part=&amp;quot;3&amp;quot;&lt;&#x2F;span&gt;&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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;export disk=&amp;quot;&#x2F;dev&#x2F;sda&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;export esp_device=&amp;quot;${disk}${esp_part}&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;export swap_device=&amp;quot;${disk}${swap_part}&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;export pool_device=&amp;quot;${disk}${pool_part}&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;echo $esp_device &amp;amp;&amp;amp; echo $swap_device &amp;amp;&amp;amp; echo $pool_device&lt;&#x2F;span&gt;&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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;export disk=&amp;quot;&#x2F;dev&#x2F;nvme0n1&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;export esp_device=&amp;quot;${disk}p${esp_part}&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;export swap_device=&amp;quot;${disk}p${swap_part}&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;export pool_device=&amp;quot;${disk}p${pool_part}&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;echo $esp_device &amp;amp;&amp;amp; echo $swap_device &amp;amp;&amp;amp; echo $pool_device&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;wipe-the-disk&quot;&gt;Wipe the disk&lt;&#x2F;h3&gt;
&lt;p&gt;If there was previously a ZFS pool on disk, run:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;zpool labelclear -f $disk&lt;&#x2F;span&gt;&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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vgchange -an&lt;&#x2F;span&gt;&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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;wipefs -af $disk &amp;amp;&amp;amp; sgdisk --zap-all --clear $disk&lt;&#x2F;span&gt;&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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;partprobe $disk&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;partition-the-disk&quot;&gt;Partition the 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;FS Code&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: center&quot;&gt;FS 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;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;8g&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;8200&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;Swap partition&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;(not applicable)&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;-&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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&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;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Create the swap partition:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sgdisk -n &amp;quot;${swap_part}:0:+8g&amp;quot; -t &amp;quot;${swap_part}:8200&amp;quot; -c 0:swap $disk&lt;&#x2F;span&gt;&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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&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;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Display disk layout:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;partprobe $disk &amp;amp;&amp;amp; sgdisk -p $disk&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;configure-the-zfs-pool&quot;&gt;Configure the ZFS Pool&lt;&#x2F;h2&gt;
&lt;p&gt;When adding disks or partitions to ZFS pools, it is advisable to refer to them by the symbolic links created in &lt;code&gt;&#x2F;dev&#x2F;disk&#x2F;by-partuuid&lt;&#x2F;code&gt; so that ZFS will identify the right devices even if disk naming should change at some point. Using device nodes like &lt;code&gt;&#x2F;dev&#x2F;sda2&lt;&#x2F;code&gt; may cause 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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&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;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Verify:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&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;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;create-the-encryption-keyfile&quot;&gt;Create the 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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;echo &amp;#39;SuperSecretPassphrase&amp;#39; &amp;gt; &#x2F;etc&#x2F;zfs&#x2F;zroot.key&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;chmod 000 &#x2F;etc&#x2F;zfs&#x2F;zroot.key&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;create-the-encrypted-pool&quot;&gt;Create the encrypted pool&lt;&#x2F;h3&gt;
&lt;p&gt;Create the pool with &lt;strong&gt;native encryption&lt;&#x2F;strong&gt; enabled:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;zpool create -f \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt; -o ashift=12 \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt; -o autotrim=on \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt; -o compatibility=openzfs-2.3-linux \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt; -O acltype=posixacl \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt; -O xattr=sa \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt; -O compression=lz4 \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt; -O encryption=aes-256-gcm \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt; -O keylocation=file:&#x2F;&#x2F;&#x2F;etc&#x2F;zfs&#x2F;zroot.key \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt; -O keyformat=passphrase \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt; -O relatime=on \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt; -m none zroot &amp;quot;$pool_id&amp;quot;&lt;&#x2F;span&gt;&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;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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;. &#x2F;etc&#x2F;os-release &amp;amp;&amp;amp; export ID &amp;amp;&amp;amp; env | grep ID&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;create-the-datasets&quot;&gt;Create the 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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;zfs create -o mountpoint=none zroot&#x2F;ROOT&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;zfs create -o mountpoint=&#x2F; -o canmount=noauto zroot&#x2F;ROOT&#x2F;${ID}&lt;&#x2F;span&gt;&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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;zpool set bootfs=zroot&#x2F;ROOT&#x2F;${ID} zroot&lt;&#x2F;span&gt;&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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;zfs create zroot&#x2F;ROOT&#x2F;${ID}&#x2F;home&lt;&#x2F;span&gt;&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 files common to all of them:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;zfs create -o mountpoint=&#x2F;data zroot&#x2F;data&lt;&#x2F;span&gt;&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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;zpool export zroot&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;zpool import -N -R &#x2F;mnt zroot&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;zfs load-key -L prompt zroot&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;mount-the-datasets&quot;&gt;Mount the datasets&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;zfs mount zroot&#x2F;ROOT&#x2F;${ID}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;zfs mount zroot&#x2F;ROOT&#x2F;${ID}&#x2F;home&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;zfs mount zroot&#x2F;data&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Verify:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# mount -t zfs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;zroot&#x2F;ROOT&#x2F;void on &#x2F;mnt type zfs (rw,relatime,xattr,posixacl,casesensitive)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;zroot&#x2F;ROOT&#x2F;void&#x2F;home on &#x2F;mnt&#x2F;home type zfs (rw,relatime,xattr,posixacl,casesensitive)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;zroot&#x2F;data on &#x2F;mnt&#x2F;data type zfs (rw,relatime,xattr,posixacl,casesensitive)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Update device symlinks:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;udevadm trigger&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;installation&quot;&gt;Installation&lt;&#x2F;h2&gt;
&lt;p&gt;Install the &lt;code&gt;base-system&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;XBPS_ARCH=x86_64 xbps-install -S -R https:&#x2F;&#x2F;repo-default.voidlinux.org&#x2F;current -r &#x2F;mnt base-system&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;configure-the-system&quot;&gt;Configure the System&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;generate-the-fstab&quot;&gt;Generate the fstab&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;xgenfstab &#x2F;mnt &amp;gt; &#x2F;mnt&#x2F;etc&#x2F;fstab &amp;amp;&amp;amp; cat &#x2F;mnt&#x2F;etc&#x2F;fstab&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;generate-the-hostid&quot;&gt;Generate the hostid&lt;&#x2F;h3&gt;
&lt;p&gt;Generate &lt;code&gt;hostid&lt;&#x2F;code&gt; hexadecimal identifier for use by ZFSBootMenu (&lt;code&gt;0x00bab10c&lt;&#x2F;code&gt; is the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;zbm-dev&#x2F;zfsbootmenu&#x2F;discussions&#x2F;465&quot;&gt;default value used internally&lt;&#x2F;a&gt;):&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;zgenhostid -f 0x00bab10c &amp;amp;&amp;amp; hostid&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;enter-chroot&quot;&gt;Enter chroot&lt;&#x2F;h3&gt;
&lt;p&gt;Copy files into the mounted ZFS file system:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;cp &#x2F;etc&#x2F;hostid &#x2F;mnt&#x2F;etc&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&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;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mkdir -p &#x2F;mnt&#x2F;var&#x2F;db&#x2F;xbps&#x2F;keys &amp;amp;&amp;amp; cp &#x2F;var&#x2F;db&#x2F;xbps&#x2F;keys&#x2F;* &#x2F;mnt&#x2F;var&#x2F;db&#x2F;xbps&#x2F;keys&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Enter the chroot environment:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;xchroot &#x2F;mnt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;set-the-root-password&quot;&gt;Set the root password&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;passwd&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;create-the-superuser&quot;&gt;Create the superuser&lt;&#x2F;h3&gt;
&lt;p&gt;Create a user account with superuser privileges:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;useradd -m -G wheel [username]&lt;&#x2F;span&gt;&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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;passwd [username]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Activate &lt;code&gt;wheel&lt;&#x2F;code&gt; group access for the &lt;code&gt;sudo&lt;&#x2F;code&gt; command:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sed -i &amp;quot;s&#x2F;# %wheel ALL=(ALL:ALL) ALL&#x2F;%wheel ALL=(ALL:ALL) ALL&#x2F;&amp;quot; &#x2F;etc&#x2F;sudoers&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;add-package-repository&quot;&gt;Add package repository&lt;&#x2F;h3&gt;
&lt;p&gt;Add the &lt;code&gt;nonfree&lt;&#x2F;code&gt; subrepo (required for proprietary firmware) and sync mirrors:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;xbps-install void-repo-nonfree &amp;amp;&amp;amp; xbps-install -S &amp;amp;&amp;amp; xbps-query -L&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;install-extra-packages&quot;&gt;Install extra packages&lt;&#x2F;h3&gt;
&lt;p&gt;Identify the processor vendor:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;grep vendor_id &#x2F;proc&#x2F;cpuinfo&lt;&#x2F;span&gt;&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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;ucode=&amp;quot;[vendor]&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;... where [vendor] for Intel processors is &lt;code&gt;intel-ucode&lt;&#x2F;code&gt; and AMD processors is &lt;code&gt;linux-firmware-amd&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Install:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;xbps-install $ucode cryptsetup curl dkms efibootmgr nano terminus-font zfs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;set-console-keymap-font-and-hardware-clock&quot;&gt;Set console keymap, font, and hardware clock&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;kbd&#x2F;consolefonts&#x2F;README.Lat2-Terminus16&lt;&#x2F;code&gt; for details.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;rc.conf&lt;&#x2F;code&gt; is read during boot and configures the system. Open the file:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;nano &#x2F;etc&#x2F;rc.conf&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Set the &lt;code&gt;KEYMAP&lt;&#x2F;code&gt;, &lt;code&gt;FONT&lt;&#x2F;code&gt;, and &lt;code&gt;HARDWARECLOCK&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Example:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;HARDWARECLOCK=&amp;quot;UTC&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;KEYMAP=&amp;quot;us&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;FONT=&amp;quot;ter-u24b&amp;quot;&lt;&#x2F;span&gt;&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;set-the-timezone&quot;&gt;Set the 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;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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;ln -sf &#x2F;usr&#x2F;share&#x2F;zoneinfo&#x2F;America&#x2F;Toronto &#x2F;etc&#x2F;localtime&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;hwclock --systohc &amp;amp;&amp;amp; date&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;set-the-locale&quot;&gt;Set the locale&lt;&#x2F;h3&gt;
&lt;p&gt;Open the &lt;code&gt;libc-locales&lt;&#x2F;code&gt; file:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;nano &#x2F;etc&#x2F;default&#x2F;libc-locales&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Uncomment the desired system locales (example: &lt;code&gt;en_CA&lt;&#x2F;code&gt; and &lt;code&gt;en_US&lt;&#x2F;code&gt;):&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;en_CA.UTF-8 UTF-8&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;en_US.UTF-8 UTF-8&lt;&#x2F;span&gt;&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;Generate the locales:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;xbps-reconfigure -f glibc-locales&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Set the default system locale:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;echo &amp;quot;LANG=en_CA.UTF-8&amp;quot; &amp;gt; &#x2F;etc&#x2F;locale.conf&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;assign-the-hostname&quot;&gt;Assign the 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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;echo [hostname] &amp;gt; &#x2F;etc&#x2F;hostname&lt;&#x2F;span&gt;&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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;echo voidlinux &amp;gt; &#x2F;etc&#x2F;hostname&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;enable-services&quot;&gt;Enable services&lt;&#x2F;h3&gt;
&lt;p&gt;Wired networks can be configured 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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;ln -s &#x2F;etc&#x2F;sv&#x2F;dhcpcd &#x2F;etc&#x2F;runit&#x2F;runsvdir&#x2F;default&#x2F;&lt;&#x2F;span&gt;&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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;ln -s &#x2F;etc&#x2F;sv&#x2F;sshd &#x2F;etc&#x2F;runit&#x2F;runsvdir&#x2F;default&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;create-encrypted-swap&quot;&gt;Create encrypted swap&lt;&#x2F;h3&gt;
&lt;p&gt;Using raw &lt;code&gt;dm-crypt&lt;&#x2F;code&gt; enables the system to generate a random, one-time encryption key at boot that requires no action from the user to encrypt &lt;code&gt;swap&lt;&#x2F;code&gt;. At shutdown the key is discarded, rendering any remaining data effectively destroyed.&lt;&#x2F;p&gt;
&lt;p&gt;Retrieve the &lt;code&gt;PARTUUID&lt;&#x2F;code&gt; of &lt;code&gt;swap_device&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;blkid | grep $swap_device&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Configure &lt;code&gt;dm-crypt&lt;&#x2F;code&gt; to set up swap at boot by adding an entry to &lt;code&gt;crypttab&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;echo &amp;#39;swap PARTUUID=[long_string_of_characters] &#x2F;dev&#x2F;urandom swap,cipher=aes-xts-plain64,size=512&amp;#39; &amp;gt;&amp;gt; &#x2F;etc&#x2F;crypttab&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;... where &lt;code&gt;[long_string_of_characters]&lt;&#x2F;code&gt; is replaced with the string retrieved by &lt;code&gt;blkid&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Add swap device to &lt;code&gt;fstab&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;echo &amp;#39;&#x2F;dev&#x2F;mapper&#x2F;swap  none    swap    defaults    0 0&amp;#39; &amp;gt;&amp;gt; &#x2F;etc&#x2F;fstab&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;regenerate-initramfs&quot;&gt;Regenerate initramfs&lt;&#x2F;h3&gt;
&lt;p&gt;Configure &lt;code&gt;dracut&lt;&#x2F;code&gt; for ZFS boot support by creating the &lt;code&gt;zfs.conf&lt;&#x2F;code&gt; file:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;nano &#x2F;etc&#x2F;dracut.conf.d&#x2F;zfs.conf&lt;&#x2F;span&gt;&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;
Make sure to enter spaces surrounding the module and item names.&lt;&#x2F;p&gt;
&lt;p&gt;Add:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;nofsck=&amp;quot;yes&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;add_dracutmodules+=&amp;quot; zfs &amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;omit_dracutmodules+=&amp;quot; btrfs resume &amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;force_drivers+=&amp;quot; zfs &amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;install_items+=&amp;quot; &#x2F;etc&#x2F;zfs&#x2F;zroot.key &amp;quot;&lt;&#x2F;span&gt;&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;Ensure all installed packages are configured properly and a working initramfs is generated:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;xbps-reconfigure -fa&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;zfsbootmenu&quot;&gt;ZFSBootMenu&lt;&#x2F;h2&gt;
&lt;p&gt;Install the ZBM 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;set-boot-properties&quot;&gt;Set boot properties&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
Add the &lt;code&gt;hibernate=no&lt;&#x2F;code&gt; argument to ensure that no process can trigger a suspend-to-disk action, which is consistent with the goal of using an ephemeral, random-key swap space.&lt;&#x2F;p&gt;
&lt;p&gt;Assign command-line arguments to be used when booting the kernel:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;zfs set org.zfsbootmenu:commandline=&amp;quot;quiet hibernate=no&amp;quot; zroot&#x2F;ROOT&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Configure key caching:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&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;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;format-and-mount-the-esp-partition&quot;&gt;Format and mount the 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 are a more reliable way to identify the correct partition than simple device nodes and 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 on the partition:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mkfs.fat -n ESP -F 32 $esp_device&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Add the partition to &lt;code&gt;fstab&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;echo &amp;#39;LABEL=ESP     &#x2F;efi    vfat    defaults    0 0&amp;#39; &amp;gt;&amp;gt; &#x2F;etc&#x2F;fstab&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Mount:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mkdir &#x2F;efi &amp;amp;&amp;amp; mount $esp_device &#x2F;efi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;install-the-prebuilt-executable&quot;&gt;Install the prebuilt executable&lt;&#x2F;h3&gt;
&lt;p&gt;Install a prebuilt ZBM executable to the ESP:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mkdir -p &#x2F;efi&#x2F;EFI&#x2F;ZBM&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;curl -o &#x2F;efi&#x2F;EFI&#x2F;ZBM&#x2F;VMLINUZ.EFI -L https:&#x2F;&#x2F;get.zfsbootmenu.org&#x2F;efi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;cp &#x2F;efi&#x2F;EFI&#x2F;ZBM&#x2F;VMLINUZ.EFI &#x2F;efi&#x2F;EFI&#x2F;ZBM&#x2F;VMLINUZ-BACKUP.EFI&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;configure-efi-boot-entries&quot;&gt;Configure EFI boot entries&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&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; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  -l &amp;#39;\EFI\ZBM\VMLINUZ-BACKUP.EFI&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&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; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  -l &amp;#39;\EFI\ZBM\VMLINUZ.EFI&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;finish-up&quot;&gt;Finish Up&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;exit-chroot&quot;&gt;Exit chroot&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;exit&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;cd&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;unmount-and-export&quot;&gt;Unmount and export&lt;&#x2F;h3&gt;
&lt;p&gt;Unmount:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&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;efi &amp;amp;&amp;amp; umount -l -n -R &#x2F;mnt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Export the zpool:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;zpool export zroot&lt;&#x2F;span&gt;&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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;reboot&lt;&#x2F;span&gt;&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 &lt;code&gt;zpool&lt;&#x2F;code&gt;, keymap is &lt;code&gt;us&lt;&#x2F;code&gt; regardless of the keymap that might have been set in &lt;code&gt;&#x2F;etc&#x2F;rc.conf&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;User is prompted for the passphrase to unlock the encrypted ZFS &lt;code&gt;pool&lt;&#x2F;code&gt;. Upon success, boot resumes...&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;voidlinux login:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;Welcome to Void!&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;resources&quot;&gt;Resources&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;ZFSBootMenu: &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;docs.zfsbootmenu.org&#x2F;en&#x2F;latest&#x2F;guides&#x2F;void-linux&#x2F;uefi.html&quot;&gt;Void Linux Guide&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Void Linux Handbook: &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;docs.voidlinux.org&#x2F;installation&#x2F;guides&#x2F;fde.html&quot;&gt;Full Disk Encryption&lt;&#x2F;a&gt; and &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;docs.voidlinux.org&#x2F;installation&#x2F;guides&#x2F;zfs.html&quot;&gt;Root on ZFS&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;hrmpf rescue system: &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;leahneukirchen&#x2F;hrmpf&quot;&gt;github.com&#x2F;leahneukirchen&#x2F;hrmpf&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;OpenZFS Man Pages: &lt;a rel=&quot;external&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;external&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;Practical ZFS: &lt;a rel=&quot;external&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;Arch Linux Wiki: &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;title&#x2F;Dm-crypt&#x2F;Swap_encryption&quot;&gt;Swap encryption&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;&lt;strong&gt;Next:&lt;&#x2F;strong&gt; &lt;em&gt;Void 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;116835383234784774&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>Wed, 24 Jun 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;&quot;FreeBSD on a Laptop&quot;&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-fish&quot;&gt;Switch user shell from sh to fish&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-system-console-at-logout&quot;&gt;Clear system console 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 &quot;in-house&quot; and released as a whole. The idea being that this approach leads to a more robust and tightly integrated core operating system. Third-party &quot;userland&quot; 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 &quot;technology preview&quot;, 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 &quot;FreeBSD-base&quot; 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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;pkg upgrade&lt;&#x2F;span&gt;&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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;pkg install [package]&lt;&#x2F;span&gt;&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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;pkg install htop&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;More: &lt;a rel=&quot;external&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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;gt; DEFAULT_ALWAYS_YES: boolean&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;		    When  this	option is enabled pkg(1) will default to &amp;quot;yes&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;		    for	all questions which require user confirmation before&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;		    doing anything. Default: NO.&lt;&#x2F;span&gt;&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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vi &#x2F;usr&#x2F;local&#x2F;etc&#x2F;pkg.conf&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Change:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#DEFAULT_ALWAYS_YES = false;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;... to:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;DEFAULT_ALWAYS_YES = true;&lt;&#x2F;span&gt;&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;I created a user account (example: &lt;code&gt;foo&lt;&#x2F;code&gt;) during installation and added myself 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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;pkg install doas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&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;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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&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;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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;doas vidcontrol -f terminus-b32&lt;&#x2F;span&gt;&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;external&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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&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;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Try different font sizes:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;doas vidcontrol -f ter-u28&lt;&#x2F;span&gt;&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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;doas sysrc allscreens_flags=&amp;quot;-f ter-u28&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;More: &lt;a rel=&quot;external&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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;doas pw groupmod [group_name] -m [username]&lt;&#x2F;span&gt;&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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;doas pw groupmod operator -m foo&lt;&#x2F;span&gt;&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&#x27;s mail to my non-root user&#x27;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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;doas vi &#x2F;etc&#x2F;aliases&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Modify:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# root: me@my.domain&lt;&#x2F;span&gt;&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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;root: foo&lt;&#x2F;span&gt;&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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;doas newaliases&lt;&#x2F;span&gt;&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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$ mail root&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Subject: Test new alias &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Is it working?&lt;&#x2F;span&gt;&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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$ mail&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Mail version 8.1 6&#x2F;6&#x2F;93.  Type ? for help.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;quot;&#x2F;var&#x2F;mail&#x2F;foo&amp;quot;: 1 message 1 new&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&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;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;More: &lt;a rel=&quot;external&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-fish&quot;&gt;Switch user shell from sh to fish&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;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;fishshell.com&#x2F;&quot;&gt;fish&lt;&#x2F;a&gt;, which is not included in the base system:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;doas pkg install fish&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;List available shells:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$ cat &#x2F;etc&#x2F;shells&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;...&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;bin&#x2F;sh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;bin&#x2F;csh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;bin&#x2F;tcsh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;usr&#x2F;local&#x2F;bin&#x2F;fish&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;To change my user&#x27;s shell from &lt;code&gt;sh&lt;&#x2F;code&gt; to &lt;code&gt;fish&lt;&#x2F;code&gt; it is &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;tim.siosm.fr&#x2F;blog&#x2F;2023&#x2F;12&#x2F;22&#x2F;dont-change-defaut-login-shell&#x2F;&quot;&gt;strongly recommended&lt;&#x2F;a&gt; to make the change via &lt;code&gt;.shrc&lt;&#x2F;code&gt; instead of &lt;code&gt;chsh&lt;&#x2F;code&gt; system-wide.&lt;&#x2F;p&gt;
&lt;p&gt;Backup the current &lt;code&gt;.shrc&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mv ~&#x2F;.shrc ~&#x2F;.shrc.bak&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Create a new &lt;code&gt;.shrc&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vi ~&#x2F;.shrc&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Add:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# ~&#x2F;.shrc&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Switch to fish shell if interactive session&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;case &amp;quot;$-&amp;quot; in&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    *i*)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        FISH_PATH=$(command -v fish 2&amp;gt;&#x2F;dev&#x2F;null)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        if [ -n &amp;quot;$FISH_PATH&amp;quot; ]; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            export SHELL=&amp;quot;$FISH_PATH&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            # avoid the delay and primary device attribute warning (on freebsd)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            export fish_features=&amp;quot;no-query-term&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            exec &amp;quot;$FISH_PATH&amp;quot; -l&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        fi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        ;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;esac&lt;&#x2F;span&gt;&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;Backup the current &lt;code&gt;.profile&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mv ~&#x2F;.profile ~&#x2F;.profile.bak&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Create a new &lt;code&gt;.profile&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vi ~&#x2F;.profile&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Add:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# ~&#x2F;.profile&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;if [ -f ~&#x2F;.shrc ]; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    . ~&#x2F;.shrc&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;fi&lt;&#x2F;span&gt;&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;Log out and back in to start using the new shell.&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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&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;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 &quot;message of the day&quot; (&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 class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;touch ~&#x2F;.hushlogin&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;clear-system-console-at-logout&quot;&gt;Clear system console at logout&lt;&#x2F;h2&gt;
&lt;p&gt;For the &lt;code&gt;fish&lt;&#x2F;code&gt; shell I modify &lt;code&gt;config.fish&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vi ~&#x2F;.config&#x2F;fish&#x2F;config.fish&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Add:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #D8DEE9; background-color: #2E3440;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;function on_exit --on-event fish_exit&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    clear&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;end&lt;&#x2F;span&gt;&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;More: &lt;a rel=&quot;external&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>
</channel>
</rss>
