<?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, 23 Feb 2026 00:00:00 +0000</lastBuildDate>
    <item>
      <title>Configure SSH on Linux for Passwordless Logins to Servers</title>
      <pubDate>Mon, 23 Feb 2026 00:00:00 +0000</pubDate>
      <link>https://www.dwarmstrong.org/ssh-keys/</link>
      <guid>https://www.dwarmstrong.org/ssh-keys/</guid>
      <description>&lt;p&gt;Disable password logins on the Linux &lt;strong&gt;SERVER&lt;&#x2F;strong&gt; in favour of using SSH keys for authentication. Create the necessary SSH keys on a Linux &lt;strong&gt;CLIENT&lt;&#x2F;strong&gt; that will be used to secure access to remote devices.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;ssh-keys&#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;ssh-keys&#x2F;#create-public-and-private-keys&quot;&gt;Create Public and Private Keys&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;ssh-keys&#x2F;#share-public-key&quot;&gt;Share Public Key&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;ssh-keys&#x2F;#disable-password-logins&quot;&gt;Disable Password Logins&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;ssh-keys&#x2F;#create-an-alias&quot;&gt;Create An Alias&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;ssh-keys&#x2F;#keychain&quot;&gt;Keychain&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;h3 id=&quot;on-the-client-and-the-server&quot;&gt;On the CLIENT and the SERVER&lt;&#x2F;h3&gt;
&lt;p&gt;Create the &lt;code&gt;.ssh&lt;&#x2F;code&gt; directory and &lt;code&gt;authorized_keys&lt;&#x2F;code&gt; file in &lt;code&gt;$HOME&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;mkdir ~&#x2F;.ssh &amp;amp;&amp;amp; touch ~&#x2F;.ssh&#x2F;authorized_keys
&lt;&#x2F;span&gt;&lt;span&gt;chmod 700 ~&#x2F;.ssh &amp;amp;&amp;amp; chmod 600 ~&#x2F;.ssh&#x2F;authorized_keys
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;create-public-and-private-keys&quot;&gt;Create Public and Private Keys&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;on-the-client&quot;&gt;On the CLIENT&lt;&#x2F;h3&gt;
&lt;p&gt;Create the SSH public&#x2F;private key pair protected with a passphrase using &lt;code&gt;ssh-keygen&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;ssh-keygen -t ed25519 -C &amp;quot;$(whoami)@$(uname -n)-$(date +%Y-%m-%d)&amp;quot; 
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Start &lt;code&gt;ssh-agent&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;if ! pidof ssh-agent &amp;gt; &#x2F;dev&#x2F;null; then eval &amp;quot;$(ssh-agent -s)&amp;quot;; fi
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Add the newly-created SSH private key to the current session by running &lt;code&gt;ssh-add&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;ssh-add ~&#x2F;.ssh&#x2F;id_ed25519
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Any SSH logins launched during the session will now access this key stored in memory.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;share-public-key&quot;&gt;Share Public Key&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;on-the-client-1&quot;&gt;On the CLIENT&lt;&#x2F;h3&gt;
&lt;p&gt;Upload the public key using &lt;code&gt;ssh-copy-id&lt;&#x2F;code&gt; to the SERVER and append to the SERVER &lt;code&gt;authorized_keys&lt;&#x2F;code&gt; file:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;ssh-copy-id -i ~&#x2F;.ssh&#x2F;id_ed25519.pub [remote_ip_address]
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Example: SERVER has a &lt;code&gt;[remote_ip_address]&lt;&#x2F;code&gt; of &lt;code&gt;178.123.1.456&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;ssh-copy-id -i ~&#x2F;.ssh&#x2F;id_ed25519.pub 178.123.1.456
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Verify key-based authentication is configured correctly by successfully logging in using &lt;code&gt;ssh&lt;&#x2F;code&gt; without a password:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;ssh -o PasswordAuthentication=no 178.123.1.456
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;disable-password-logins&quot;&gt;Disable Password Logins&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;on-the-server&quot;&gt;On the SERVER&lt;&#x2F;h3&gt;
&lt;p&gt;After verifying the SERVER can be accessed remotely using SSH keys, open &lt;code&gt;sshd_config&lt;&#x2F;code&gt; for editing:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;vi &#x2F;etc&#x2F;ssh&#x2F;sshd_config
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Disable password authentication with these modifications:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;PubkeyAuthentication yes
&lt;&#x2F;span&gt;&lt;span&gt;PasswordAuthentication no
&lt;&#x2F;span&gt;&lt;span&gt;KbdInteractiveAuthentication no
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;As an additional security measure, change the port (by default port &lt;code&gt;22&lt;&#x2F;code&gt;) that SSH listens for connections. Changing this to a &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Port_(computer_networking)#Common_port_numbers&quot;&gt;dynamic or private port&lt;&#x2F;a&gt; between &lt;code&gt;49152&lt;&#x2F;code&gt; through &lt;code&gt;65535&lt;&#x2F;code&gt; will frustrate automated attacks.&lt;&#x2F;p&gt;
&lt;p&gt;Example: Modify the SERVER listening port from &lt;code&gt;#Port 22&lt;&#x2F;code&gt; to &lt;code&gt;Port 52222&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;Port 52222
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Save changes and exit.&lt;&#x2F;p&gt;
&lt;p&gt;Restart SSH:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;On Linux servers using &lt;code&gt;systemd&lt;&#x2F;code&gt;:&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;systemctl restart sshd
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ul&gt;
&lt;li&gt;On FreeBSD and NetBSD servers:&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;service sshd restart
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;on-the-client-2&quot;&gt;On the CLIENT&lt;&#x2F;h3&gt;
&lt;p&gt;While remaining logged into SERVER, open another terminal and verify the changes by attempting a new login using password authentication (which should &lt;strong&gt;fail&lt;&#x2F;strong&gt;):&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;$ ssh -p 52222 -o PreferredAuthentications=password -o PubkeyAuthentication=no 178.123.1.456
&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;username&amp;gt;@178.123.1.456: Permission denied (publickey).
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Verify key-based authentication continues to work as before:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;ssh -p 52222 178.123.1.456
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Device is now secured to accept only SSH key authentication for logins.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;create-an-alias&quot;&gt;Create An Alias&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;on-the-client-3&quot;&gt;On the CLIENT&lt;&#x2F;h3&gt;
&lt;p&gt;Create an &lt;strong&gt;alias&lt;&#x2F;strong&gt; for the remote SERVER in the user &lt;code&gt;ssh_config&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;vi ~&#x2F;.ssh&#x2F;config
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Add an alias for SERVER named &lt;code&gt;myserver&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;Host myserver
&lt;&#x2F;span&gt;&lt;span&gt;  HostName 178.123.1.456
&lt;&#x2F;span&gt;&lt;span&gt;  Port 52222
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Save changes and exit.&lt;&#x2F;p&gt;
&lt;p&gt;Now a login to SERVER is simply:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;ssh myserver
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;keychain&quot;&gt;Keychain&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;on-the-client-4&quot;&gt;On the CLIENT&lt;&#x2F;h3&gt;
&lt;p&gt;For CLIENT devices that are not running desktop environments with their own built-in &lt;code&gt;ssh&lt;&#x2F;code&gt; key management, I like to install the &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;danielrobbins&#x2F;keychain&quot;&gt;keychain&lt;&#x2F;a&gt; package to manage my keys. When logging in for the first time after boot, it prompts me for the passphrase to unlock my key, then will maintain a single &lt;code&gt;ssh-agent&lt;&#x2F;code&gt; process across multiple login sessions.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
I rename my keys from &lt;code&gt;id_ed25519*&lt;&#x2F;code&gt; to the hostname of the device (hence the &lt;code&gt;$(uname -n)&lt;&#x2F;code&gt; below).&lt;&#x2F;p&gt;
&lt;p&gt;If using &lt;code&gt;bash&lt;&#x2F;code&gt; as the user’s SHELL, add to &lt;code&gt;.bashrc&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;[[ -x &amp;quot;&#x2F;usr&#x2F;bin&#x2F;keychain&amp;quot; ]] &amp;amp;&amp;amp; eval $(keychain --eval --quiet ~&#x2F;.ssh&#x2F;$(uname -n))
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&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;114296991925513283&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 Arch Linux</title>
      <pubDate>Sun, 22 Feb 2026 00:00:00 +0000</pubDate>
      <link>https://www.dwarmstrong.org/archlinux-install/</link>
      <guid>https://www.dwarmstrong.org/archlinux-install/</guid>
      <description>&lt;p&gt;Using the &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;title&#x2F;Arch_Linux&quot;&gt;Arch Linux&lt;&#x2F;a&gt; installation image and working my way through the excellent &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;title&#x2F;Installation_guide&quot;&gt;installation guide&lt;&#x2F;a&gt;, I show the choices I make to create an encrypted, minimal Linux system with “just enough” to provide a solid foundation to build upon further: whether that be setting up a desktop, laptop, or server.&lt;&#x2F;p&gt;
&lt;img class=&quot;floatright&quot; src=&quot;&#x2F;img&#x2F;kitty-01.png&quot; alt=&quot;ascii kitty&quot; width=499 height=176 &#x2F;&gt;
&lt;hr &#x2F;&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;archlinux-install&#x2F;#1-start-here&quot;&gt;1. Start Here&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;archlinux-install&#x2F;#acquire-an-installation-image&quot;&gt;Acquire an installation image&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;archlinux-install&#x2F;#prepare-the-usb-installation-medium&quot;&gt;Prepare the USB installation medium&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;archlinux-install&#x2F;#2-configure-the-live-environment&quot;&gt;2. Configure the Live Environment&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;archlinux-install&#x2F;#set-the-console-keyboard&quot;&gt;Set the console keyboard&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;archlinux-install&#x2F;#set-the-console-font&quot;&gt;Set the console font&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;archlinux-install&#x2F;#verify-the-boot-mode&quot;&gt;Verify the boot mode&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;archlinux-install&#x2F;#connect-to-the-internet&quot;&gt;Connect to the internet&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;archlinux-install&#x2F;#remote-login-to-the-installer&quot;&gt;Remote login to the installer&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;archlinux-install&#x2F;#update-the-system-clock&quot;&gt;Update the system clock&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;archlinux-install&#x2F;#3-prepare-the-disk&quot;&gt;3. Prepare the DISK&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;archlinux-install&#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;archlinux-install&#x2F;#erase-disk&quot;&gt;Erase DISK&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;archlinux-install&#x2F;#partition-disk&quot;&gt;Partition DISK&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;archlinux-install&#x2F;#format-the-esp-partition&quot;&gt;Format 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;archlinux-install&#x2F;#encrypt-the-root-partition&quot;&gt;Encrypt the root partition&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;archlinux-install&#x2F;#format-the-root-device&quot;&gt;Format the root device&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;archlinux-install&#x2F;#create-subvolumes&quot;&gt;Create subvolumes&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;archlinux-install&#x2F;#define-variable-for-subvolume-mount-options&quot;&gt;Define variable for subvolume mount options&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;archlinux-install&#x2F;#mount-the-subvolumes&quot;&gt;Mount the subvolumes&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;archlinux-install&#x2F;#mount-the-esp-partition&quot;&gt;Mount the ESP partition&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;archlinux-install&#x2F;#4-installation&quot;&gt;4. Installation&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;archlinux-install&#x2F;#select-the-mirrors&quot;&gt;Select the mirrors&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;archlinux-install&#x2F;#install&quot;&gt;Install&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;archlinux-install&#x2F;#5-configure-the-system&quot;&gt;5. Configure the System&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;archlinux-install&#x2F;#fstab&quot;&gt;Fstab&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;archlinux-install&#x2F;#chroot&quot;&gt;Chroot&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;archlinux-install&#x2F;#zram-swap&quot;&gt;Zram swap&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;archlinux-install&#x2F;#time&quot;&gt;Time&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;archlinux-install&#x2F;#localization&quot;&gt;Localization&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;archlinux-install&#x2F;#console-keymap-and-font&quot;&gt;Console keymap and font&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;archlinux-install&#x2F;#hostname&quot;&gt;Hostname&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;archlinux-install&#x2F;#network-configuration&quot;&gt;Network configuration&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;archlinux-install&#x2F;#initramfs&quot;&gt;Initramfs&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;archlinux-install&#x2F;#root-password&quot;&gt;Root password&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;archlinux-install&#x2F;#superuser&quot;&gt;Superuser&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;archlinux-install&#x2F;#boot-loader&quot;&gt;Boot loader&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;archlinux-install&#x2F;#6-finish-up&quot;&gt;6. Finish Up&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;archlinux-install&#x2F;#7-resources&quot;&gt;7. Resources&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;1-start-here&quot;&gt;1. Start Here&lt;&#x2F;h2&gt;
&lt;p&gt;Throughout this HOWTO, if you see square brackets &lt;code&gt;[]&lt;&#x2F;code&gt; in code blocks, that means the word of code (square brackets included) should be replaced with something else. This is detailed in the instructions before or after the code block.&lt;&#x2F;p&gt;
&lt;p&gt;Arch Linux will be installed as the sole operating system on a single disk using a two-partition layout:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Partition &lt;code&gt;root&lt;&#x2F;code&gt; is encrypted with &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Linux_Unified_Key_Setup&quot;&gt;LUKS2&lt;&#x2F;a&gt; and formatted with the &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;btrfs.readthedocs.io&#x2F;en&#x2F;latest&#x2F;Introduction.html&quot;&gt;BTRFS&lt;&#x2F;a&gt; file system using subvolumes.&lt;&#x2F;li&gt;
&lt;li&gt;Partition &lt;code&gt;esp&lt;&#x2F;code&gt; is formatted with the &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;title&#x2F;FAT&quot;&gt;FAT32&lt;&#x2F;a&gt; file system and mounted to &lt;code&gt;boot&lt;&#x2F;code&gt;. Because this partition will also be storing kernels and initramfs in addition to EFI-related files - and to future-proof it for whatever else Linux might want to store there - I assign it a generous 4GB of storage.&lt;&#x2F;li&gt;
&lt;li&gt;In lieu of creating a partition for &lt;code&gt;swap&lt;&#x2F;code&gt;, the &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;title&#x2F;Zram&quot;&gt;zram&lt;&#x2F;a&gt; kernel module is used to create a compressed block device in RAM to provide swap space.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;A few assumptions:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Target device is &lt;code&gt;x86_64&lt;&#x2F;code&gt; architecture using UEFI to boot.&lt;&#x2F;li&gt;
&lt;li&gt;Network access during install uses a wired interface.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;title&#x2F;Limine&quot;&gt;Limine&lt;&#x2F;a&gt; will be used as the system bootloader.&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 official installation images are available here: &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;archlinux.org&#x2F;download&#x2F;&quot;&gt;Torrents and download mirrors&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Download &lt;code&gt;archlinux-[RELEASE]-x86_64.iso&lt;&#x2F;code&gt; and &lt;code&gt;sha256sums.txt&lt;&#x2F;code&gt;. As of February 2026 the latest RELEASE is &lt;code&gt;2026.02.01&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;On a Linux system, verify the integrity of the image by running:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;sha256sum -c --ignore-missing sha256sums.txt
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;prepare-the-usb-installation-medium&quot;&gt;Prepare the USB installation medium&lt;&#x2F;h3&gt;
&lt;p&gt;Write the installer to an &lt;strong&gt;unmounted&lt;&#x2F;strong&gt; USB storage device running the &lt;code&gt;dd&lt;&#x2F;code&gt; command as root.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;WARNING&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
&lt;strong&gt;Be very careful to note the proper device (which can be identified with &lt;code&gt;lsblk&lt;&#x2F;code&gt;). All contents on the device will be lost!&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Example: On a Linux system, if a USB stick appears as &lt;code&gt;sdx1&lt;&#x2F;code&gt;, then write the installer to &lt;code&gt;sdx&lt;&#x2F;code&gt; (omit partition number):&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;sudo dd if=archlinux-2026.02.01-x86_64.iso of=&#x2F;dev&#x2F;sdx bs=4M conv=fsync oflag=direct status=progress; sync
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;2-configure-the-live-environment&quot;&gt;2. Configure the Live Environment&lt;&#x2F;h2&gt;
&lt;p&gt;Boot the target device from the Arch installation media. User is automatically logged in as &lt;code&gt;root&lt;&#x2F;code&gt; to the first virtual console.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;set-the-console-keyboard&quot;&gt;Set the console keyboard&lt;&#x2F;h3&gt;
&lt;p&gt;Default console keymap is &lt;code&gt;us&lt;&#x2F;code&gt;. List available layouts:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;localectl list-keymaps
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;If some other keymap is desired, set a different keymap temporarily:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;loadkeys [keymap]
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;…where &lt;code&gt;[keymap]&lt;&#x2F;code&gt; is the desired keyboard layout.&lt;&#x2F;p&gt;
&lt;p&gt;Example: I configure the system to use my preferred &lt;code&gt;colemak&lt;&#x2F;code&gt; layout:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;loadkeys colemak
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;set-the-console-font&quot;&gt;Set the console font&lt;&#x2F;h3&gt;
&lt;p&gt;If the existing font size appears too small, running:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;setfont -d
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;… will double the size.&lt;&#x2F;p&gt;
&lt;p&gt;Console fonts are located in &lt;code&gt;&#x2F;usr&#x2F;share&#x2F;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;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;setfont [FONT]-[X][SIZE][STYLE]
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;…where &lt;code&gt;[FONT]&lt;&#x2F;code&gt; is font name, &lt;code&gt;[X]&lt;&#x2F;code&gt; is a character identifying the code page, &lt;code&gt;[SIZE]&lt;&#x2F;code&gt; is font height, and &lt;code&gt;[STYLE]&lt;&#x2F;code&gt; is &lt;code&gt;n&lt;&#x2F;code&gt; for normal, &lt;code&gt;b&lt;&#x2F;code&gt; for bold, &lt;code&gt;v&lt;&#x2F;code&gt; for CRT VGA bold.&lt;&#x2F;p&gt;
&lt;p&gt;Example: Temporarily load the &lt;code&gt;terminus&lt;&#x2F;code&gt; font in bold:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;setfont ter-122b
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;See &lt;code&gt;&#x2F;usr&#x2F;share&#x2F;terminus-font&#x2F;README&lt;&#x2F;code&gt; and &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;title&#x2F;Linux_console#Fonts&quot;&gt;Fonts&lt;&#x2F;a&gt; for more details.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;verify-the-boot-mode&quot;&gt;Verify the boot mode&lt;&#x2F;h3&gt;
&lt;p&gt;Confirm target device is using UEFI boot mode:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;cat &#x2F;sys&#x2F;firmware&#x2F;efi&#x2F;fw_platform_size
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;If the command returns &lt;code&gt;64&lt;&#x2F;code&gt;, then system is booted in UEFI with 64-bit x64 UEFI and we are good to go.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
If the file does not exist, the device is not using UEFI. Stop here and consult the official &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;title&#x2F;Installation_guide#Verify_the_boot_mode&quot;&gt;Installation Guide&lt;&#x2F;a&gt; on how to proceed with the install on a device using BIOS boot mode.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;connect-to-the-internet&quot;&gt;Connect to the internet&lt;&#x2F;h3&gt;
&lt;p&gt;Wired network interfaces should be auto-enabled and connected at boot.&lt;&#x2F;p&gt;
&lt;p&gt;Verify the network interface is active, has been assigned an address, and the internet is reachable using &lt;code&gt;ip-address&lt;&#x2F;code&gt; and &lt;code&gt;ping&lt;&#x2F;code&gt; commands:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;ip addr
&lt;&#x2F;span&gt;&lt;span&gt;ping -c 5 archlinux.org
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;If this fails, or a wireless interface is required, see the &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;title&#x2F;Installation_guide#Connect_to_the_internet&quot;&gt;Installation Guide&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;remote-login-to-the-installer&quot;&gt;Remote login to the installer&lt;&#x2F;h3&gt;
&lt;p&gt;Make this manual installation process easier (i.e. cut-n-paste commands) by remotely logging into the installer via &lt;code&gt;ssh&lt;&#x2F;code&gt; from another computer.&lt;&#x2F;p&gt;
&lt;p&gt;Confirm &lt;code&gt;sshd&lt;&#x2F;code&gt; daemon was started at boot:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;systemctl status sshd
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;… otherwise, start the service:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;systemctl start sshd.service
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Set a password for &lt;code&gt;root&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;passwd
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Switch to the other computer and &lt;code&gt;ssh&lt;&#x2F;code&gt; into the target device:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;ssh root@[ip_address]
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;…where &lt;code&gt;[ip_address]&lt;&#x2F;code&gt; is the target device’s address obtained with the &lt;code&gt;ip addr&lt;&#x2F;code&gt; command above.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;update-the-system-clock&quot;&gt;Update the system clock&lt;&#x2F;h3&gt;
&lt;p&gt;The &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;title&#x2F;Systemd-timesyncd&quot;&gt;systemd-timesyncd&lt;&#x2F;a&gt; service is enabled by default by the installer and the time and date will be synchronized automatically once access to the internet is established.&lt;&#x2F;p&gt;
&lt;p&gt;Verify the system clock is synchronized:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;timedatectl
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;3-prepare-the-disk&quot;&gt;3. Prepare the DISK&lt;&#x2F;h2&gt;
&lt;p&gt;Setup a custom partition layout on a single disk before implementing the Arch 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 Arch will be installed by listing block devices:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;lsblk -f
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Set DISK variables for either a SATA or NVMe disk:&lt;&#x2F;p&gt;
&lt;h4 id=&quot;sata&quot;&gt;SATA&lt;&#x2F;h4&gt;
&lt;p&gt;Example disk: &lt;code&gt;sda&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;export DISK=&amp;quot;&#x2F;dev&#x2F;sda&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;export ESP_PART=&amp;quot;1&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;export ROOT_PART=&amp;quot;2&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;export ESP_DISK=&amp;quot;${DISK}${ESP_PART}&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;export ROOT_DISK=&amp;quot;${DISK}${ROOT_PART}&amp;quot;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h4 id=&quot;nvme&quot;&gt;NVMe&lt;&#x2F;h4&gt;
&lt;p&gt;Example disk: &lt;code&gt;nvme0n1&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;export DISK=&amp;quot;&#x2F;dev&#x2F;nvme0n1&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;export ESP_PART=&amp;quot;1&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;export ROOT_PART=&amp;quot;2&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;export ESP_DISK=&amp;quot;${DISK}p${ESP_PART}&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;export ROOT_DISK=&amp;quot;${DISK}p${ROOT_PART}&amp;quot;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;erase-disk&quot;&gt;Erase DISK&lt;&#x2F;h3&gt;
&lt;p&gt;Erase existing file systems and partition table on &lt;code&gt;DISK&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;wipefs -af $DISK &amp;amp;&amp;amp; sgdisk --zap-all --clear $DISK
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Notify the system of changes to the partition table:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;partprobe $DISK
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
If &lt;code&gt;DISK&lt;&#x2F;code&gt; was previously configured with &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;title&#x2F;LVM&quot;&gt;LVM&lt;&#x2F;a&gt;, this operation might fail with an error such as &lt;code&gt;Device or resource busy&lt;&#x2F;code&gt;. This is because the volume group might have been set up on boot. In such cases, first bring down the volume group:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;vgchange -an
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;After that, &lt;code&gt;wipefs&lt;&#x2F;code&gt; and &lt;code&gt;sgdisk&lt;&#x2F;code&gt; should work as expected.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;partition-disk&quot;&gt;Partition 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;Code&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: center&quot;&gt;Format&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: center&quot;&gt;Use as&lt;&#x2F;th&gt;&lt;&#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;4g&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;ESP partition&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center&quot;&gt;2&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;-&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&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;Encrypted root partition&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;p&gt;Create the ESP partition:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;sgdisk -n &amp;quot;${ESP_PART}:1m:+4g&amp;quot; -t &amp;quot;${ESP_PART}:ef00&amp;quot; -c 0:esp $DISK
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Create the encrypted root partition:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;sgdisk -n &amp;quot;${ROOT_PART}:0:0&amp;quot; -t &amp;quot;${ROOT_PART}:8309&amp;quot; -c 0:root $DISK
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Display layout:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;partprobe $DISK &amp;amp;&amp;amp; sgdisk -p $DISK
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;format-the-esp-partition&quot;&gt;Format 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 allow for easy mounting without a UUID.&lt;&#x2F;p&gt;
&lt;p&gt;Create a FAT32 file system:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;mkfs.fat -n ESP -F 32 $ESP_DISK
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;encrypt-the-root-partition&quot;&gt;Encrypt the root partition&lt;&#x2F;h3&gt;
&lt;p&gt;Encrypt the partition using &lt;code&gt;luks2&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;cryptsetup luksFormat -y --type luks2 $ROOT_DISK
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The newly-created LUKS device is opened and mapped to &lt;code&gt;&#x2F;dev&#x2F;mapper&#x2F;root&lt;&#x2F;code&gt;, as suggested by the &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;uapi-group.org&#x2F;specifications&#x2F;specs&#x2F;discoverable_partitions_specification&#x2F;&quot;&gt;Discoverable Partitions Specification&lt;&#x2F;a&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;cryptsetup open $ROOT_DISK root
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Define a variable for the root device:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;export ROOT_DEV=&amp;quot;&#x2F;dev&#x2F;mapper&#x2F;root&amp;quot;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;format-the-root-device&quot;&gt;Format the root device&lt;&#x2F;h3&gt;
&lt;p&gt;Create a BTRFS file system:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;mkfs.btrfs -L arch $ROOT_DEV
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Mount the root device:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;mount $ROOT_DEV &#x2F;mnt
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;create-subvolumes&quot;&gt;Create subvolumes&lt;&#x2F;h3&gt;
&lt;p&gt;Changing BTRFS subvolume layouts is made simpler by not mounting the top-level subvolume as &lt;code&gt;&#x2F;&lt;&#x2F;code&gt; (which is the default).&lt;&#x2F;p&gt;
&lt;p&gt;As an alternative, create a BTRFS subvolume that contains the actual data, and mount &lt;em&gt;that&lt;&#x2F;em&gt; to &lt;code&gt;&#x2F;&lt;&#x2F;code&gt;. Use &lt;code&gt;@&lt;&#x2F;code&gt; for the name of this new subvolume (which is the default name used by &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;title&#x2F;Snapper&quot;&gt;Snapper&lt;&#x2F;a&gt;, a tool for making file system snapshots):&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;btrfs subvolume create &#x2F;mnt&#x2F;@
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Create additional subvolumes to facilitate system rollbacks that leave logs, databases, and home files untouched:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;btrfs subvolume create &#x2F;mnt&#x2F;@home
&lt;&#x2F;span&gt;&lt;span&gt;btrfs subvolume create &#x2F;mnt&#x2F;@cache
&lt;&#x2F;span&gt;&lt;span&gt;btrfs subvolume create &#x2F;mnt&#x2F;@log
&lt;&#x2F;span&gt;&lt;span&gt;btrfs subvolume create &#x2F;mnt&#x2F;@tmp
&lt;&#x2F;span&gt;&lt;span&gt;btrfs subvolume create &#x2F;mnt&#x2F;@srv
&lt;&#x2F;span&gt;&lt;span&gt;btrfs subvolume create &#x2F;mnt&#x2F;@snapshots
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;define-variable-for-subvolume-mount-options&quot;&gt;Define variable for subvolume mount options&lt;&#x2F;h3&gt;
&lt;p&gt;For an installation on a NVMe disk, these are the subvolume mount options I use:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;noatime&lt;&#x2F;code&gt;: Disables writing “last accessed” timestamps. Extends SSD lifespan and improves read speeds.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;compress=zstd:1&lt;&#x2F;code&gt;: Compression algorithm&#x2F;setting “sweet spot” for NVMe (default is &lt;code&gt;3&lt;&#x2F;code&gt;). For non-NVMe disks, omit this setting and accept the default.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;space_cache=v2&lt;&#x2F;code&gt;: Method to track free blocks. Significantly more efficient than &lt;code&gt;v1&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;commit=120&lt;&#x2F;code&gt;: Default commit interval is 30 seconds. Increasing the interval allows BTRFS to bundle small writes in memory into fewer, larger sequential writes. If the system is connected to a UPS or healthy battery, the commit interval can be increased because the risk of a sudden power-loss shutdown is much lower.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Define a variable with these options:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;export SUB_OPTS=&amp;quot;noatime,compress=zstd:1,space_cache=v2,commit=120&amp;quot;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;For more options and details, see the &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;btrfs.readthedocs.io&#x2F;en&#x2F;latest&#x2F;Administration.html&quot;&gt;BTRFS Administration&lt;&#x2F;a&gt; page.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;mount-the-subvolumes&quot;&gt;Mount the subvolumes&lt;&#x2F;h3&gt;
&lt;p&gt;Unmount the previously mounted &lt;code&gt;root&lt;&#x2F;code&gt; device:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;umount &#x2F;mnt
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Mount the subvolumes:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;mount -o ${SUB_OPTS},subvol=@ $ROOT_DEV &#x2F;mnt
&lt;&#x2F;span&gt;&lt;span&gt;mount --mkdir -o ${SUB_OPTS},subvol=@home $ROOT_DEV &#x2F;mnt&#x2F;home
&lt;&#x2F;span&gt;&lt;span&gt;mount --mkdir -o ${SUB_OPTS},subvol=@cache $ROOT_DEV &#x2F;mnt&#x2F;var&#x2F;cache
&lt;&#x2F;span&gt;&lt;span&gt;mount --mkdir -o ${SUB_OPTS},subvol=@log $ROOT_DEV &#x2F;mnt&#x2F;var&#x2F;log
&lt;&#x2F;span&gt;&lt;span&gt;mount --mkdir -o ${SUB_OPTS},subvol=@tmp $ROOT_DEV &#x2F;mnt&#x2F;var&#x2F;tmp
&lt;&#x2F;span&gt;&lt;span&gt;mount --mkdir -o ${SUB_OPTS},subvol=@srv $ROOT_DEV &#x2F;mnt&#x2F;srv
&lt;&#x2F;span&gt;&lt;span&gt;mount --mkdir -o ${SUB_OPTS},subvol=@snapshots $ROOT_DEV &#x2F;mnt&#x2F;.snapshots
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;mount-the-esp-partition&quot;&gt;Mount the ESP partition&lt;&#x2F;h3&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;mount --mkdir $ESP_DISK &#x2F;mnt&#x2F;boot &amp;amp;&amp;amp; df -h
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;4-installation&quot;&gt;4. Installation&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;select-the-mirrors&quot;&gt;Select the mirrors&lt;&#x2F;h3&gt;
&lt;p&gt;Packages to be installed must be downloaded from mirror servers, which are defined in &lt;code&gt;&#x2F;etc&#x2F;pacman.d&#x2F;mirrorlist&lt;&#x2F;code&gt;. Generate a &lt;strong&gt;new&lt;&#x2F;strong&gt; mirrorlist using &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;title&#x2F;reflector&quot;&gt;reflector&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Backup the existing mirrorlist:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;cp &#x2F;etc&#x2F;pacman.d&#x2F;mirrorlist &#x2F;etc&#x2F;pacman.d&#x2F;mirrorlist.bak
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Example: This command will select the 5 most recently synchronized HTTPS mirrors located in Canada, sort them by download speed, and overwrite the mirrorlist with the new links:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;reflector --verbose --protocol https --latest 5 --sort rate --country Canada --save &#x2F;etc&#x2F;pacman.d&#x2F;mirrorlist
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Synchronize the &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;title&#x2F;Pacman&quot;&gt;pacman&lt;&#x2F;a&gt; package databases using the new mirror list:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;pacman -Syy
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;install&quot;&gt;Install&lt;&#x2F;h3&gt;
&lt;p&gt;Identify the processor vendor:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;grep vendor_id &#x2F;proc&#x2F;cpuinfo
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Create a variable for an appropriate microcode package to load updates and security fixes:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;UCODE=&amp;quot;[vendor]-ucode&amp;quot;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;…where &lt;code&gt;[vendor]&lt;&#x2F;code&gt; for Intel processors is &lt;code&gt;intel&lt;&#x2F;code&gt; and AMD processors is &lt;code&gt;amd&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Create a variable for an editor (&lt;code&gt;nano&lt;&#x2F;code&gt;, &lt;code&gt;vim&lt;&#x2F;code&gt;, etc.) used to modify configuration files after we &lt;code&gt;chroot&lt;&#x2F;code&gt; into the new system:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;export EDIT=&amp;quot;nano&amp;quot;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Use &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;title&#x2F;Pacstrap&quot;&gt;pacstrap&lt;&#x2F;a&gt; to install the base package, Linux kernel, firmware for common hardware, crypt and file utilities, and some nice extras:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;pacstrap -K &#x2F;mnt base base-devel linux linux-firmware btrfs-progs cryptsetup efibootmgr limine man-db networkmanager openssh reflector sudo terminus-font $UCODE $EDIT
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;5-configure-the-system&quot;&gt;5. Configure the System&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;fstab&quot;&gt;Fstab&lt;&#x2F;h3&gt;
&lt;p&gt;Generate an &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;title&#x2F;Fstab&quot;&gt;fstab&lt;&#x2F;a&gt; file:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;genfstab -L &#x2F;mnt &amp;gt;&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;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Inspect the results for any possible errors.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;chroot&quot;&gt;Chroot&lt;&#x2F;h3&gt;
&lt;p&gt;Chroot into the newly-installed base system:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;arch-chroot &#x2F;mnt &#x2F;bin&#x2F;bash
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;zram-swap&quot;&gt;Zram swap&lt;&#x2F;h3&gt;
&lt;p&gt;Load the module at boot:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;echo &amp;quot;zram&amp;quot; &amp;gt; &#x2F;etc&#x2F;modules-load.d&#x2F;zram.conf
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Create the following &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;title&#x2F;Zram#Using_a_udev_rule&quot;&gt;udev rule&lt;&#x2F;a&gt; adjusting the &lt;strong&gt;disksize&lt;&#x2F;strong&gt; attribute (1&#x2F;2 of physical RAM is a good benchmark) as necessary:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;$EDIT &#x2F;etc&#x2F;udev&#x2F;rules.d&#x2F;99-zram.rules
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Add rule:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;ACTION==&amp;quot;add&amp;quot;, KERNEL==&amp;quot;zram0&amp;quot;, ATTR{initstate}==&amp;quot;0&amp;quot;, ATTR{comp_algorithm}=&amp;quot;zstd&amp;quot;, ATTR{disksize}=&amp;quot;4G&amp;quot;, TAG+=&amp;quot;systemd&amp;quot;
&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;Add &lt;code&gt;zram0&lt;&#x2F;code&gt; to &lt;code&gt;fstab&lt;&#x2F;code&gt; with a higher than default priority and the &lt;code&gt;x-systemd.makefs&lt;&#x2F;code&gt; option:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;echo -e &amp;quot;&#x2F;dev&#x2F;zram0\tnone\tswap\tdefaults,discard,pri=100,x-systemd.makefs\t0 0&amp;quot; &amp;gt;&amp;gt; &#x2F;etc&#x2F;fstab
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;After rebooting the system, check status with:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;zramctl
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;time&quot;&gt;Time&lt;&#x2F;h3&gt;
&lt;p&gt;Timezones are located in &lt;code&gt;&#x2F;usr&#x2F;share&#x2F;zoneinfo&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;List the timezones:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;timedatectl list-timezones
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Set the desired timezone:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;timedatectl set-timezone [Region]&#x2F;[City]
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;…where &lt;code&gt;[Region]&lt;&#x2F;code&gt; is the geographical region (&lt;code&gt;Africa&lt;&#x2F;code&gt;, &lt;code&gt;America&lt;&#x2F;code&gt;, &lt;code&gt;Europe&lt;&#x2F;code&gt;, …) and the &lt;code&gt;[City]&lt;&#x2F;code&gt; within that region.&lt;&#x2F;p&gt;
&lt;p&gt;Example: Timezone where &lt;code&gt;Toronto&lt;&#x2F;code&gt; is located:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;timedatectl set-timezone America&#x2F;Toronto
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Update the system clock:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;hwclock --systohc
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Enable network time synchronization:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;timedatectl set-ntp true
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Show current time settings:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;timedatectl
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;localization&quot;&gt;Localization&lt;&#x2F;h3&gt;
&lt;p&gt;Open the list of locales:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;$EDIT &#x2F;etc&#x2F;locale.gen
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;… and uncomment any desired locales.&lt;&#x2F;p&gt;
&lt;p&gt;Save changes and exit.&lt;&#x2F;p&gt;
&lt;p&gt;Generate the locales by running:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;locale-gen
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Set the &lt;code&gt;LANG&lt;&#x2F;code&gt; variable:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;echo &amp;quot;LANG=[locale]&amp;quot; &amp;gt; &#x2F;etc&#x2F;locale.conf
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;… where &lt;code&gt;[locale]&lt;&#x2F;code&gt; is one of the generated locales (example: &lt;code&gt;en_CA.UTF-8&lt;&#x2F;code&gt;):&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;echo &amp;quot;LANG=en_CA.UTF-8&amp;quot; &amp;gt; &#x2F;etc&#x2F;locale.conf
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;console-keymap-and-font&quot;&gt;Console keymap and font&lt;&#x2F;h3&gt;
&lt;p&gt;If earlier during the installation a different console keyboard layout than &lt;code&gt;us&lt;&#x2F;code&gt; was selected, make the change persistent by writing the choice to &lt;code&gt;vconsole.conf&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;echo &amp;quot;KEYMAP=[keyboard]&amp;quot; &amp;gt;&amp;gt; &#x2F;etc&#x2F;vconsole.conf
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;…where &lt;code&gt;[keyboard]&lt;&#x2F;code&gt; is your desired keymap (example: &lt;code&gt;colemak&lt;&#x2F;code&gt;):&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;echo &amp;quot;KEYMAP=colemak&amp;quot; &amp;gt;&amp;gt; &#x2F;etc&#x2F;vconsole.conf
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Same process if the default font was changed:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;echo &amp;quot;FONT=[font]&amp;quot; &amp;gt;&amp;gt; &#x2F;etc&#x2F;vconsole.conf
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;… which in this HOWTO would be &lt;code&gt;ter-122b&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;echo &amp;quot;FONT=ter-122b&amp;quot; &amp;gt;&amp;gt; &#x2F;etc&#x2F;vconsole.conf
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;hostname&quot;&gt;Hostname&lt;&#x2F;h3&gt;
&lt;p&gt;Create the &lt;code&gt;hostname&lt;&#x2F;code&gt; file:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;echo [hostname] &amp;gt; &#x2F;etc&#x2F;hostname
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;…where &lt;code&gt;[hostname]&lt;&#x2F;code&gt; is the desired name of the system (single word, no spaces):&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;echo &amp;quot;archlinux&amp;quot; &amp;gt; &#x2F;etc&#x2F;hostname
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;network-configuration&quot;&gt;Network configuration&lt;&#x2F;h3&gt;
&lt;p&gt;Enable &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;title&#x2F;NetworkManager&quot;&gt;NetworkManager&lt;&#x2F;a&gt; to start at boot:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;systemctl enable NetworkManager
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Enable &lt;code&gt;sshd&lt;&#x2F;code&gt; to start at boot:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;systemctl enable sshd
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;initramfs&quot;&gt;Initramfs&lt;&#x2F;h3&gt;
&lt;p&gt;Configure the &lt;code&gt;initramfs&lt;&#x2F;code&gt; image to be generated by opening the &lt;code&gt;mkinitcpio.conf&lt;&#x2F;code&gt; file for editing:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;$EDIT &#x2F;etc&#x2F;mkinitcpio.conf
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Set the necessary &lt;code&gt;MODULES&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;MODULES=(btrfs)
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;… and &lt;code&gt;BINARIES&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;BINARIES=(&#x2F;usr&#x2F;bin&#x2F;btrfs)
&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;
Order of the hooks matters. See &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;title&#x2F;Mkinitcpio#Hook_list&quot;&gt;Hook List&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;HOOKS&lt;&#x2F;code&gt; control the modules and scripts added to the image and what happens at boot time:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;HOOKS=(base udev keyboard autodetect microcode modconf kms keymap consolefont block encrypt filesystems fsck)
&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;Recreate the initramfs image with &lt;code&gt;mkinitcpio&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;mkinitcpio -P
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;root-password&quot;&gt;Root password&lt;&#x2F;h3&gt;
&lt;p&gt;Set a password for root:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;passwd
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;superuser&quot;&gt;Superuser&lt;&#x2F;h3&gt;
&lt;p&gt;Create a user account with superuser privileges:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;useradd -m -G wheel -s &#x2F;bin&#x2F;bash [username]
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;…where &lt;code&gt;[username]&lt;&#x2F;code&gt; is the desired name for the account.&lt;&#x2F;p&gt;
&lt;p&gt;Set a password for &lt;code&gt;[username]&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;passwd [username]
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Activate &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;title&#x2F;Users_and_groups#Group_list&quot;&gt;wheel&lt;&#x2F;a&gt; group access for the &lt;code&gt;sudo&lt;&#x2F;code&gt; command:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;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;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;boot-loader&quot;&gt;Boot loader&lt;&#x2F;h3&gt;
&lt;p&gt;Create the &lt;code&gt;&#x2F;boot&#x2F;EFI&#x2F;BOOT&lt;&#x2F;code&gt; directory and copy the &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;title&#x2F;Limine&quot;&gt;Limine&lt;&#x2F;a&gt; BOOT file there:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;mkdir -p &#x2F;boot&#x2F;EFI&#x2F;BOOT
&lt;&#x2F;span&gt;&lt;span&gt;cp &#x2F;usr&#x2F;share&#x2F;limine&#x2F;BOOTX64.EFI &#x2F;boot&#x2F;EFI&#x2F;BOOT&#x2F;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Limine does not add an entry for the boot loader in the NVRAM. Use &lt;code&gt;efibootmgr&lt;&#x2F;code&gt; to create an entry:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;efibootmgr --create --disk $DISK --part $ESP_PART --label &amp;quot;Arch Linux Limine Boot Loader&amp;quot; --loader &amp;#39;\EFI\BOOT\BOOTX64.EFI&amp;#39; --unicode
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Limine does not provide a default configuration file, it is therefore necessary to create one.&lt;&#x2F;p&gt;
&lt;p&gt;Firstly, make note of the LUKS device UUID required by the config file, which is retrieved by running:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;cryptsetup luksUUID $ROOT_DISK
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Create the &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;codeberg.org&#x2F;Limine&#x2F;Limine&#x2F;src&#x2F;branch&#x2F;v10.x&#x2F;CONFIG.md&quot;&gt;limine.conf&lt;&#x2F;a&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;$EDIT &#x2F;boot&#x2F;limine.conf
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Add entry:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;timeout: 3
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;Arch Linux
&lt;&#x2F;span&gt;&lt;span&gt;  protocol: linux
&lt;&#x2F;span&gt;&lt;span&gt;  path: boot():&#x2F;vmlinuz-linux
&lt;&#x2F;span&gt;&lt;span&gt;  cmdline: cryptdevice=UUID=[device-UUID]:root root=&#x2F;dev&#x2F;mapper&#x2F;root rootflags=subvol=@ rw rootfstype=btrfs
&lt;&#x2F;span&gt;&lt;span&gt;  module_path: boot():&#x2F;initramfs-linux.img
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Replace the &lt;code&gt;[device-UUID]&lt;&#x2F;code&gt; above with the UUID of the LUKS device.&lt;&#x2F;p&gt;
&lt;p&gt;Save changes and exit.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;6-finish-up&quot;&gt;6. Finish Up&lt;&#x2F;h2&gt;
&lt;p&gt;Exit chroot:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;exit
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Unmount partitions:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;umount &#x2F;mnt&#x2F;boot
&lt;&#x2F;span&gt;&lt;span&gt;umount -l -n -R &#x2F;mnt
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Remove encrypted device mapping:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;cryptsetup close root
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Reboot system:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;reboot
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;User is prompted for the passphrase to unlock the encrypted &lt;code&gt;root&lt;&#x2F;code&gt; partition. Upon success, boot resumes…&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;archlinux login:
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;Welcome to Arch!&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;7-resources&quot;&gt;7. Resources&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;Not just for Arch Linux, but for Linux in general, the &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;title&#x2F;Installation_guide&quot;&gt;Arch Wiki&lt;&#x2F;a&gt; is a tremendous resource.&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;116114616224709544&quot; target=&quot;_blank&quot;&gt;on the Fediverse&lt;&#x2F;a&gt; &amp;#128172
&lt;&#x2F;p&gt;
</description>
    </item>
    <item>
      <title>Minimal Alpine Linux</title>
      <pubDate>Wed, 04 Feb 2026 00:00:00 +0000</pubDate>
      <link>https://www.dwarmstrong.org/minimal-alpine-linux/</link>
      <guid>https://www.dwarmstrong.org/minimal-alpine-linux/</guid>
      <description>&lt;img class=&quot;floatright&quot; src=&quot;&#x2F;img&#x2F;mountain-range.png&quot; alt=&quot;mountain range&quot; width=250 height=102 &#x2F;&gt;
&lt;p&gt;&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.alpinelinux.org&#x2F;&quot;&gt;Alpine Linux&lt;&#x2F;a&gt; is a lightweight and delightful community-driven Linux distribution that does things a bit differently than the standard defaults (&lt;code&gt;musl&lt;&#x2F;code&gt; vs &lt;code&gt;glibc&lt;&#x2F;code&gt; for C library, &lt;code&gt;openrc&lt;&#x2F;code&gt; vs &lt;code&gt;systemd&lt;&#x2F;code&gt; for init). I use an Alpine installation image to create an &lt;strong&gt;encrypted, console-only minimal system&lt;&#x2F;strong&gt; that provides a solid foundation while I explore building it up bit by bit to a workstation, laptop, and server configuration.&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;minimal-alpine-linux&#x2F;#1-start-here&quot;&gt;1. Start Here&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;minimal-alpine-linux&#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;minimal-alpine-linux&#x2F;#prepare-the-usb-installation-medium&quot;&gt;Prepare the USB installation medium&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;minimal-alpine-linux&#x2F;#2-configure-the-live-environment&quot;&gt;2. Configure the Live Environment&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;minimal-alpine-linux&#x2F;#set-the-console-keyboard&quot;&gt;Set the console keyboard&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;minimal-alpine-linux&#x2F;#verify-the-boot-mode&quot;&gt;Verify the boot mode&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;minimal-alpine-linux&#x2F;#connect-to-the-internet&quot;&gt;Connect to the internet&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;minimal-alpine-linux&#x2F;#remote-login-to-the-installer&quot;&gt;Remote login to the installer&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;minimal-alpine-linux&#x2F;#3-initial-system-setup&quot;&gt;3. Initial System Setup&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;minimal-alpine-linux&#x2F;#4-prepare-the-disk&quot;&gt;4. Prepare the DISK&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;minimal-alpine-linux&#x2F;#install-extra-tools&quot;&gt;Install extra tools&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;minimal-alpine-linux&#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;minimal-alpine-linux&#x2F;#erase-disk&quot;&gt;Erase DISK&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;minimal-alpine-linux&#x2F;#partition-disk&quot;&gt;Partition DISK&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;minimal-alpine-linux&#x2F;#encrypt-the-root-partition&quot;&gt;Encrypt the root partition&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;minimal-alpine-linux&#x2F;#encrypt-the-data-partition&quot;&gt;Encrypt the data partition&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;minimal-alpine-linux&#x2F;#format-and-mount-the-root-device&quot;&gt;Format and mount the root device&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;minimal-alpine-linux&#x2F;#format-and-mount-the-data-device&quot;&gt;Format and mount the data device&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;minimal-alpine-linux&#x2F;#format-and-mount-the-esp-partition&quot;&gt;Format and mount the ESP partition&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;minimal-alpine-linux&#x2F;#5-installation&quot;&gt;5. Installation&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;minimal-alpine-linux&#x2F;#6-configure-the-system&quot;&gt;6. Configure the System&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;minimal-alpine-linux&#x2F;#chroot&quot;&gt;Chroot&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;minimal-alpine-linux&#x2F;#zram-swap&quot;&gt;Zram swap&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;minimal-alpine-linux&#x2F;#auto-mount-data-disk&quot;&gt;Auto-mount DATA_DISK&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;minimal-alpine-linux&#x2F;#mkinitfs&quot;&gt;Mkinitfs&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;minimal-alpine-linux&#x2F;#bootloader&quot;&gt;Bootloader&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;minimal-alpine-linux&#x2F;#7-finish-up&quot;&gt;7. Finish Up&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;minimal-alpine-linux&#x2F;#8-resources&quot;&gt;8. Resources&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;1-start-here&quot;&gt;1. Start Here&lt;&#x2F;h2&gt;
&lt;p&gt;This guide makes 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 and uses UEFI to boot.&lt;&#x2F;li&gt;
&lt;li&gt;Alpine will be installed as the sole operating system on a single disk.&lt;&#x2F;li&gt;
&lt;li&gt;Network access during install uses a wired interface.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Alpine includes a &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.alpinelinux.org&#x2F;wiki&#x2F;Alpine_configuration_management_scripts#setup-alpine&quot;&gt;setup-alpine&lt;&#x2F;a&gt; script in the installer that can quickly get a system up-and-running. I will use the script to set a few basic settings, then skip the disk setup stage and proceed to manually create a custom partition layout, followed by &lt;code&gt;chroot&lt;&#x2F;code&gt;-ing into the newly-installed system to complete the setup.&lt;&#x2F;p&gt;
&lt;p&gt;This custom partition layout includes:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Separate &lt;code&gt;root&lt;&#x2F;code&gt; and &lt;code&gt;data&lt;&#x2F;code&gt; partitions encrypted with LUKS2 and formatted with the &lt;code&gt;ext4&lt;&#x2F;code&gt; file system. I like to keep my user data in a separate partition to preserve its contents and make things simpler if&#x2F;when I wipe &lt;code&gt;root&lt;&#x2F;code&gt; and re-install Linux.&lt;&#x2F;li&gt;
&lt;li&gt;An EFI partition formatted with the &lt;code&gt;fat32&lt;&#x2F;code&gt; file system and mounted to &lt;code&gt;boot&lt;&#x2F;code&gt;. Because this partition will also be storing kernels and initramfs in addition to EFI-related files - and to future-proof it for whatever else Linux might want to store here - I assign it a generous 2GB of storage.&lt;&#x2F;li&gt;
&lt;li&gt;In lieu of creating a partition for &lt;code&gt;swap&lt;&#x2F;code&gt; memory, I use the Linux &lt;code&gt;zram&lt;&#x2F;code&gt; kernel module to configure a compressed block device in RAM to provide swapspace.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;&#x2F;strong&gt;&lt;br&#x2F;&gt;
Throughout this guide, square brackets &lt;code&gt;[]&lt;&#x2F;code&gt; in code blocks indicates 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;h3 id=&quot;acquire-an-installation-image&quot;&gt;Acquire an installation image&lt;&#x2F;h3&gt;
&lt;p&gt;The latest official installation images are available here: &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.alpinelinux.org&#x2F;downloads&#x2F;&quot;&gt;Downloads&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Download &lt;code&gt;alpine-standard-[RELEASE]-x86_64.iso&lt;&#x2F;code&gt; and &lt;code&gt;alpine-standard-[RELEASE]-x86_64.iso.sha256&lt;&#x2F;code&gt;. As of 2026-02-04 the latest RELEASE is &lt;code&gt;3.23.3&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;On a Linux system, verify the integrity of the image with &lt;code&gt;sha256sum&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;sha256sum -c --ignore-missing alpine-standard-3.23.3-x86_64.iso.sha256
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;prepare-the-usb-installation-medium&quot;&gt;Prepare the USB installation medium&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;strong&gt;WARNING&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
&lt;strong&gt;Be very careful to note the proper device (which can be identified with the &lt;code&gt;lsblk&lt;&#x2F;code&gt; command). All contents on the device will be lost!&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;p&gt;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;Example: On a Linux system, if a USB stick appears as &lt;code&gt;sdx1&lt;&#x2F;code&gt;, then write the installer to &lt;code&gt;sdx&lt;&#x2F;code&gt; (omit partition number):&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;sudo dd if=alpine-standard-3.23.3-x86_64.iso of=&#x2F;dev&#x2F;sdx bs=4M conv=fsync oflag=direct status=progress; sync
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;2-configure-the-live-environment&quot;&gt;2. Configure the Live Environment&lt;&#x2F;h2&gt;
&lt;p&gt;Boot the target device from the Alpine installation media. Login as &lt;code&gt;root&lt;&#x2F;code&gt; with no password.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;set-the-console-keyboard&quot;&gt;Set the console keyboard&lt;&#x2F;h3&gt;
&lt;p&gt;Default console keymap is &lt;code&gt;us&lt;&#x2F;code&gt;. Available layouts are located in &lt;code&gt;&#x2F;usr&#x2F;share&#x2F;bkeymaps&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;If some other keymap is desired, set a different one using the &lt;code&gt;setup-keymap&lt;&#x2F;code&gt; script:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;setup-keymap [LAYOUT] [VARIANT]
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Example: I configure the system to use the &lt;code&gt;us&lt;&#x2F;code&gt; layout with my preferred &lt;code&gt;colemak&lt;&#x2F;code&gt; variant:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;setup-keymap us us-colemak
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Or run &lt;code&gt;setup-keymap&lt;&#x2F;code&gt; in interactive mode:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;# setup-keymap
&lt;&#x2F;span&gt;&lt;span&gt;Select keyboard layout: `us`
&lt;&#x2F;span&gt;&lt;span&gt;Select variant: `us-colemak`
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;verify-the-boot-mode&quot;&gt;Verify the boot mode&lt;&#x2F;h3&gt;
&lt;p&gt;Confirm target device is using UEFI boot mode:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;cat &#x2F;sys&#x2F;firmware&#x2F;efi&#x2F;fw_platform_size
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;If the command returns &lt;code&gt;64&lt;&#x2F;code&gt;, then system is booted in UEFI with 64-bit x64 UEFI and we are good to go.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
If the file does not exist, the device is not using UEFI.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;connect-to-the-internet&quot;&gt;Connect to the internet&lt;&#x2F;h3&gt;
&lt;p&gt;Configure the wired interface by running the &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.alpinelinux.org&#x2F;wiki&#x2F;Alpine_configuration_management_scripts#setup-interfaces&quot;&gt;setup-interfaces&lt;&#x2F;a&gt; script in interactive mode:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;setup-interfaces
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Example: I configure the ethernet interface device identified as &lt;code&gt;eth0&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Interface: &lt;code&gt;eth0&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Ip address: &lt;code&gt;dhcp&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Manual configuration: &lt;code&gt;n&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Bring up the interface:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;ifup eth0
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Verify the network interface is active, has been assigned an address, and the internet is reachable:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;ip addr
&lt;&#x2F;span&gt;&lt;span&gt;ping -c 5 alpinelinux.org
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;If this fails, or a wireless interface is required, consult the &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.alpinelinux.org&#x2F;user-handbook&#x2F;0.1a&#x2F;Installing&#x2F;manual.html#_networking&quot;&gt;User Handbook: Networking&lt;&#x2F;a&gt; page.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;remote-login-to-the-installer&quot;&gt;Remote login to the installer&lt;&#x2F;h3&gt;
&lt;p&gt;One option to make this manual installation process easier (i.e. cut-n-paste commands) is to remotely log into the installer via &lt;code&gt;ssh&lt;&#x2F;code&gt; from another computer.&lt;&#x2F;p&gt;
&lt;p&gt;On the installer, add the &lt;code&gt;sshd&lt;&#x2F;code&gt; daemon using &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.alpinelinux.org&#x2F;wiki&#x2F;Alpine_configuration_management_scripts#setup-sshd&quot;&gt;setup-sshd&lt;&#x2F;a&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;setup-sshd -c openssh
&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;
Editor &lt;code&gt;vi&lt;&#x2F;code&gt; is used for modifying files, or install &lt;code&gt;nano&lt;&#x2F;code&gt; with:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;apk add nano
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Modify &lt;code&gt;&#x2F;etc&#x2F;ssh&#x2F;sshd_config&lt;&#x2F;code&gt; by setting &lt;code&gt;PermitRootLogin&lt;&#x2F;code&gt; to allow root logins:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;PermitRootLogin yes
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Reload the daemon:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;rc-service sshd reload
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Set a password for &lt;code&gt;root&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;passwd
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Switch to the other computer and &lt;code&gt;ssh&lt;&#x2F;code&gt; into the target device:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;ssh root@[ip_address]
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;…where &lt;code&gt;[ip_address]&lt;&#x2F;code&gt; is the target device’s address obtained with the &lt;code&gt;ip addr&lt;&#x2F;code&gt; command above.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;3-initial-system-setup&quot;&gt;3. Initial System Setup&lt;&#x2F;h2&gt;
&lt;p&gt;Begin the system configuration using the &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.alpinelinux.org&#x2F;wiki&#x2F;Alpine_configuration_management_scripts#setup-alpine&quot;&gt;setup-alpine&lt;&#x2F;a&gt; script:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;setup-alpine
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Example configuration steps:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Keyboard layout: &lt;code&gt;us&lt;&#x2F;code&gt;   ## skipped if set above&lt;&#x2F;li&gt;
&lt;li&gt;Keyboard variant: &lt;code&gt;us-colemak&lt;&#x2F;code&gt;   ## skipped if set above&lt;&#x2F;li&gt;
&lt;li&gt;Enter system hostname: &lt;code&gt;alpinebox.home.arpa&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Interface: &lt;code&gt;eth0&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Ip address: &lt;code&gt;dhcp&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Manual network configuration? &lt;code&gt;n&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Root password: &lt;code&gt;xxxxxxxx&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Timezone: &lt;code&gt;Canada&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Sub-timezone: &lt;code&gt;Eastern&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Proxy: &lt;code&gt;none&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Network Time Protocol: &lt;code&gt;chrony&lt;&#x2F;code&gt;   ## skipped if running in a virtual machine; defaults to built-in &lt;code&gt;busybox&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;APK Mirror: &lt;code&gt;c&lt;&#x2F;code&gt;   ## enable community repository&lt;&#x2F;li&gt;
&lt;li&gt;APK Mirror: &lt;code&gt;f&lt;&#x2F;code&gt;   ## find and use fastest mirror&lt;&#x2F;li&gt;
&lt;li&gt;Setup user: &lt;code&gt;foo&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Full name: &lt;code&gt;foo&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;User password: &lt;code&gt;xxxxxxxx&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;SSH key: &lt;code&gt;none&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;SSH server: &lt;code&gt;openssh&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;&lt;strong&gt;At the &lt;code&gt;Disk &amp;amp; Install&lt;&#x2F;code&gt; step, enter &lt;code&gt;Ctrl-C&lt;&#x2F;code&gt; to exit script.&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;4-prepare-the-disk&quot;&gt;4. Prepare the DISK&lt;&#x2F;h2&gt;
&lt;p&gt;Setup a custom partition layout on a single disk before implementing the Alpine base installation.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;install-extra-tools&quot;&gt;Install extra tools&lt;&#x2F;h3&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;apk update &amp;amp;&amp;amp; apk add cryptsetup dosfstools e2fsprogs lsblk sgdisk wipefs
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;define-disk-variables&quot;&gt;Define DISK variables&lt;&#x2F;h3&gt;
&lt;p&gt;Identify the disk where Alpine will be installed by listing block devices:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;lsblk -f
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Set DISK variables for either a SATA or NVMe device:&lt;&#x2F;p&gt;
&lt;h4 id=&quot;sata-example-device-sda&quot;&gt;SATA (example device: &lt;code&gt;sda&lt;&#x2F;code&gt;)&lt;&#x2F;h4&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;export DISK=&amp;quot;&#x2F;dev&#x2F;sda&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;export ESP_PART=&amp;quot;1&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;export ROOT_PART=&amp;quot;2&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;export DATA_PART=&amp;quot;3&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;export ESP_DISK=&amp;quot;${DISK}${ESP_PART}&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;export ROOT_DISK=&amp;quot;${DISK}${ROOT_PART}&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;export DATA_DISK=&amp;quot;${DISK}${DATA_PART}&amp;quot;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h4 id=&quot;nvme-example-device-nvme0n1&quot;&gt;NVMe (example device: &lt;code&gt;nvme0n1&lt;&#x2F;code&gt;)&lt;&#x2F;h4&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;export DISK=&amp;quot;&#x2F;dev&#x2F;nvme0n1&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;export ESP_PART=&amp;quot;1&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;export ROOT_PART=&amp;quot;2&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;export DATA_PART=&amp;quot;3&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;export ESP_DISK=&amp;quot;${DISK}p${ESP_PART}&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;export ROOT_DISK=&amp;quot;${DISK}p${ROOT_PART}&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;export DATA_DISK=&amp;quot;${DISK}p${DATA_PART}&amp;quot;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;erase-disk&quot;&gt;Erase DISK&lt;&#x2F;h3&gt;
&lt;p&gt;Erase existing file systems and partition table on &lt;code&gt;DISK&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;wipefs -af $DISK &amp;amp;&amp;amp; sgdisk --zap-all --clear $DISK
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Notify the system of the changes to the partition table:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;partprobe $DISK
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
If the Logical Volume Manager (LVM) framework was previously installed on &lt;code&gt;DISK&lt;&#x2F;code&gt;, the above might fail with an error such as &lt;code&gt;Device or resource busy&lt;&#x2F;code&gt;. This is because the LVM volume group might have gotten set up at boot.&lt;&#x2F;p&gt;
&lt;p&gt;If so, bring down the volume group:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;vgchange -an
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;After that, &lt;code&gt;wipefs&lt;&#x2F;code&gt; should work as expected.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;partition-disk&quot;&gt;Partition DISK&lt;&#x2F;h3&gt;
&lt;p&gt;Create a custom GPT partition table on DISK with the following layout:&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th style=&quot;text-align: center&quot;&gt;Number&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: center&quot;&gt;Size&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: center&quot;&gt;Code&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: center&quot;&gt;Format&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: center&quot;&gt;Use as&lt;&#x2F;th&gt;&lt;&#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;ESP partition&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center&quot;&gt;2&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;48g&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&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;Encrypted root partition&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center&quot;&gt;3&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;-&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&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;Encrypted data partition&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;p&gt;Create the ESP partition:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;sgdisk -n &amp;quot;${ESP_PART}:1m:+2g&amp;quot; -t &amp;quot;${ESP_PART}:ef00&amp;quot; -c 0:esp $DISK
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Create the encrypted root partition:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;sgdisk -n &amp;quot;${ROOT_PART}:0:+48g&amp;quot; -t &amp;quot;${ROOT_PART}:8309&amp;quot; -c 0:root $DISK
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Create the encrypted data partition:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;sgdisk -n &amp;quot;${DATA_PART}:0:0&amp;quot; -t &amp;quot;${DATA_PART}:8309&amp;quot; -c 0:data $DISK
&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;
Run command &lt;code&gt;mdev -s&lt;&#x2F;code&gt; to create partition nodes in &lt;code&gt;&#x2F;dev&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Notify the system of changes to the partition table and display layout:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;partprobe $DISK &amp;amp;&amp;amp; mdev -s &amp;amp;&amp;amp; sgdisk -p $DISK
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;encrypt-the-root-partition&quot;&gt;Encrypt the root partition&lt;&#x2F;h3&gt;
&lt;p&gt;Load the encryption kernel module:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;modprobe dm-crypt
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Encrypt the partition using &lt;code&gt;cryptsetup&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;cryptsetup luksFormat -y --type luks2 $ROOT_DISK
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Open the newly-created root device and map to &lt;code&gt;&#x2F;dev&#x2F;mapper&#x2F;root&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;cryptsetup open $ROOT_DISK root
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Define a variable for this device:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;export ROOT_DEV=&amp;quot;&#x2F;dev&#x2F;mapper&#x2F;root&amp;quot;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;encrypt-the-data-partition&quot;&gt;Encrypt the data partition&lt;&#x2F;h3&gt;
&lt;p&gt;Encrypt the partition:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;cryptsetup luksFormat -y --type luks2 $DATA_DISK
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Open the newly-created data device and map to &lt;code&gt;&#x2F;dev&#x2F;mapper&#x2F;data&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;cryptsetup open $DATA_DISK data
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Define a variable for this device:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;export DATA_DEV=&amp;quot;&#x2F;dev&#x2F;mapper&#x2F;data&amp;quot;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;format-and-mount-the-root-device&quot;&gt;Format and mount the root device&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
Labels on file systems are optional, but helpful. They allow for easy identification&#x2F;mounting without a UUID.&lt;&#x2F;p&gt;
&lt;p&gt;Create a &lt;code&gt;ext4&lt;&#x2F;code&gt; file system on the device:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;mkfs.ext4 -L rootfs $ROOT_DEV
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Mount the device:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;mount -t ext4 $ROOT_DEV &#x2F;mnt
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;format-and-mount-the-data-device&quot;&gt;Format and mount the data device&lt;&#x2F;h3&gt;
&lt;p&gt;Create a &lt;code&gt;ext4&lt;&#x2F;code&gt; file system on the device:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;mkfs.ext4 -L datafs $DATA_DEV
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Create the &lt;code&gt;data&lt;&#x2F;code&gt; mountpoint and mount the device:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;mkdir &#x2F;mnt&#x2F;data &amp;amp;&amp;amp; mount -t ext4 $DATA_DEV &#x2F;mnt&#x2F;data
&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;Create a &lt;code&gt;fat32&lt;&#x2F;code&gt; file system on the partition:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;mkfs.fat -n ESP -F 32 $ESP_DISK
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Create the &lt;code&gt;boot&lt;&#x2F;code&gt; mountpoint and mount the partition:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;mkdir &#x2F;mnt&#x2F;boot &amp;amp;&amp;amp; mount -t vfat $ESP_DISK &#x2F;mnt&#x2F;boot &amp;amp;&amp;amp; df -h
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;5-installation&quot;&gt;5. Installation&lt;&#x2F;h2&gt;
&lt;p&gt;Use the &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.alpinelinux.org&#x2F;wiki&#x2F;Alpine_configuration_management_scripts#setup-disk&quot;&gt;setup-disk&lt;&#x2F;a&gt; script to install an Alpine base system to the &lt;code&gt;root&lt;&#x2F;code&gt; device currently mounted on &lt;code&gt;&#x2F;mnt&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;setup-disk -m sys &#x2F;mnt
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;6-configure-the-system&quot;&gt;6. Configure the System&lt;&#x2F;h2&gt;
&lt;p&gt;Before &lt;code&gt;chroot&lt;&#x2F;code&gt;-ing into the system to configure it, a number of directories must be mounted:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;mount --rbind &#x2F;dev &#x2F;mnt&#x2F;dev
&lt;&#x2F;span&gt;&lt;span&gt;mount --make-rslave &#x2F;mnt&#x2F;dev
&lt;&#x2F;span&gt;&lt;span&gt;mount -t proc &#x2F;proc &#x2F;mnt&#x2F;proc
&lt;&#x2F;span&gt;&lt;span&gt;mount --rbind &#x2F;sys &#x2F;mnt&#x2F;sys
&lt;&#x2F;span&gt;&lt;span&gt;mount --make-rslave &#x2F;mnt&#x2F;sys
&lt;&#x2F;span&gt;&lt;span&gt;mount --rbind &#x2F;tmp &#x2F;mnt&#x2F;tmp
&lt;&#x2F;span&gt;&lt;span&gt;mount --bind &#x2F;run &#x2F;mnt&#x2F;run 
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;chroot&quot;&gt;Chroot&lt;&#x2F;h3&gt;
&lt;p&gt;Enter the newly-installed base system:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;chroot &#x2F;mnt
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;zram-swap&quot;&gt;Zram swap&lt;&#x2F;h3&gt;
&lt;p&gt;Install &lt;code&gt;zram-init&lt;&#x2F;code&gt;, a wrapper script for the &lt;code&gt;zram&lt;&#x2F;code&gt; kernel module:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;apk update &amp;amp;&amp;amp; apk add zram-init
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The configuration file &lt;code&gt;&#x2F;etc&#x2F;conf.d&#x2F;zram-init&lt;&#x2F;code&gt; is well-commented. These are the settings I modify&#x2F;verify are set as follows:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;load_on_start=yes
&lt;&#x2F;span&gt;&lt;span&gt;unload_on_stop=yes
&lt;&#x2F;span&gt;&lt;span&gt;num_devices=1
&lt;&#x2F;span&gt;&lt;span&gt;type0=swap
&lt;&#x2F;span&gt;&lt;span&gt;size0=`LC_ALL=C free -m | awk &amp;#39;&#x2F;^Mem:&#x2F;{print int($2&#x2F;4)}&amp;#39;`    ## use a fourth of available memory
&lt;&#x2F;span&gt;&lt;span&gt;algo0=zstd
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Enable the service:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;rc-update add zram-init
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;After rebooting the system, check status with:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;zramctl
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;auto-mount-data-disk&quot;&gt;Auto-mount DATA_DISK&lt;&#x2F;h3&gt;
&lt;p&gt;Decrypt and auto-mount &lt;code&gt;DATA_DISK&lt;&#x2F;code&gt; at boot by using a keyfile securely stored on the encrypted &lt;code&gt;ROOT_DISK&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Create the keyfile:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;dd if=&#x2F;dev&#x2F;urandom of=&#x2F;root&#x2F;crypt-data-keyfile.bin bs=1024 count=4
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Restrict permissions so only &lt;code&gt;root&lt;&#x2F;code&gt; can read it:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;chmod 400 &#x2F;root&#x2F;crypt-data-keyfile.bin
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Add the keyfile to a LUKS key slot on &lt;code&gt;DATA_DISK&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;cryptsetup luksAddKey $DATA_DISK &#x2F;root&#x2F;crypt-data-keyfile.bin
&lt;&#x2F;span&gt;&lt;span&gt;cryptsetup luksDump $DATA_DISK | grep luks2
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Original passphrase for &lt;code&gt;DATA_DISK&lt;&#x2F;code&gt; occupies slot &lt;code&gt;0&lt;&#x2F;code&gt; and the keyfile has been added to slot &lt;code&gt;1&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Make note of the &lt;code&gt;device-UUID&lt;&#x2F;code&gt; required by the &lt;code&gt;dmcrypt&lt;&#x2F;code&gt; config file, which can be obtained using &lt;code&gt;blkid&lt;&#x2F;code&gt; or &lt;code&gt;cryptsetup&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;cryptsetup luksUUID $DATA_DISK
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Edit &lt;code&gt;&#x2F;etc&#x2F;conf.d&#x2F;dmcrypt&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;## Definition for &#x2F;dev&#x2F;mapper&#x2F;data (for &#x2F;data) with keyfile
&lt;&#x2F;span&gt;&lt;span&gt;target=data
&lt;&#x2F;span&gt;&lt;span&gt;source=UUID=&amp;quot;[device-UUID]&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;key=&#x2F;root&#x2F;crypt-data-keyfile.bin
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;… where &lt;code&gt;[device-UUID]&lt;&#x2F;code&gt; is replaced with the UUID of &lt;code&gt;DATA_DISK&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Enable the &lt;code&gt;dmcrypt&lt;&#x2F;code&gt; service to start on boot:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;rc-update add dmcrypt boot
&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;
Verify an entry for &lt;code&gt;&#x2F;data&lt;&#x2F;code&gt; exists in &lt;code&gt;&#x2F;etc&#x2F;fstab&lt;&#x2F;code&gt;. Otherwise, add it:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;&#x2F;dev&#x2F;mapper&#x2F;data &#x2F;data ext4 rw,relatime 0 2
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;mkinitfs&quot;&gt;Mkinitfs&lt;&#x2F;h3&gt;
&lt;p&gt;Edit &lt;code&gt;&#x2F;etc&#x2F;mkinitfs&#x2F;mkinitfs.conf&lt;&#x2F;code&gt;, adding &lt;code&gt;cryptsetup&lt;&#x2F;code&gt; and &lt;code&gt;keymap&lt;&#x2F;code&gt; to the features list:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;features=&amp;quot;ata base ide scsi usb virtio ext4 cryptsetup keymap&amp;quot;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Generate a new &lt;code&gt;initramfs&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;mkinitfs $(ls &#x2F;lib&#x2F;modules)
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;bootloader&quot;&gt;Bootloader&lt;&#x2F;h3&gt;
&lt;p&gt;Install packages:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;apk add grub-efi efibootmgr
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Install boot loader:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;grub-install --target=x86_64-efi --efi-directory=&#x2F;boot --bootloader-id=ALPINE 
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Make note of the &lt;code&gt;device-UUID&lt;&#x2F;code&gt; required by the &lt;code&gt;grub&lt;&#x2F;code&gt; config file:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;cryptsetup luksUUID $ROOT_DISK
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Edit &lt;code&gt;&#x2F;etc&#x2F;default&#x2F;grub&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;GRUB_CMDLINE_LINUX_DEFAULT=&amp;quot;modules=sd-mod,usb-storage,ext4 cryptroot=UUID=[device-UUID] cryptdm=root quiet rootfstype=ext4&amp;quot;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;… where &lt;code&gt;[device-UUID]&lt;&#x2F;code&gt; is replaced with the UUID of &lt;code&gt;ROOT_DISK&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Run:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;update-grub
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;7-finish-up&quot;&gt;7. Finish Up&lt;&#x2F;h2&gt;
&lt;p&gt;Exit chroot:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;exit
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Unmount partitions:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;umount &#x2F;mnt&#x2F;boot &amp;amp;&amp;amp; umount &#x2F;mnt&#x2F;data &amp;amp;&amp;amp; umount -l &#x2F;mnt
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Remove encrypted device mapping:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;cryptsetup close data &amp;amp;&amp;amp; cryptsetup close root
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Reboot system:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;reboot
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;User is prompted for the passphrase to unlock the encrypted &lt;code&gt;root&lt;&#x2F;code&gt; partition. Upon success, boot resumes:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;.
&lt;&#x2F;span&gt;&lt;span&gt;.
&lt;&#x2F;span&gt;&lt;span&gt;.
&lt;&#x2F;span&gt;&lt;span&gt;alpinebox.home.arpa login:
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;Welcome to Alpine!&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;8-resources&quot;&gt;8. Resources&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.alpinelinux.org&#x2F;wiki&#x2F;Main_Page&quot;&gt;Alpine Linux Wiki&lt;&#x2F;a&gt;, particularly:
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.alpinelinux.org&#x2F;wiki&#x2F;Installation&quot;&gt;Installation&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.alpinelinux.org&#x2F;wiki&#x2F;Alpine_Linux:FAQ&quot;&gt;FAQ&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.alpinelinux.org&#x2F;wiki&#x2F;Setting_up_disks_manually&quot;&gt;Setting up disks manually&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.alpinelinux.org&#x2F;wiki&#x2F;Setting_up_encrypted_volumes_with_LUKS&quot;&gt;Setting up encrypted volumes with LUKS&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.alpinelinux.org&#x2F;wiki&#x2F;LVM_on_LUKS#Mounting_additional_encrypted_filesystems_at_boot&quot;&gt;Mounting encrypted filesystems at boot&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.alpinelinux.org&#x2F;wiki&#x2F;Zram&quot;&gt;Zram&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.gentoo.org&#x2F;wiki&#x2F;Main_Page&quot;&gt;Gentoo Linux Wiki&lt;&#x2F;a&gt;, particularly:
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.gentoo.org&#x2F;wiki&#x2F;Dm-crypt#Automate_mounting_encrypted_file_systems&quot;&gt;Dm-crypt&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.gentoo.org&#x2F;wiki&#x2F;Chroot&quot;&gt;Chroot&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&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;116014084388659876&quot; target=&quot;_blank&quot;&gt;on the Fediverse&lt;&#x2F;a&gt; &amp;#128172
&lt;&#x2F;p&gt;
</description>
    </item>
    <item>
      <title>Real-time File Synchronization Across Devices Using Syncthing</title>
      <pubDate>Wed, 29 Oct 2025 00:00:00 +0000</pubDate>
      <link>https://www.dwarmstrong.org/syncthing/</link>
      <guid>https://www.dwarmstrong.org/syncthing/</guid>
      <description>&lt;p&gt;&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;syncthing.net&#x2F;&quot;&gt;Syncthing&lt;&#x2F;a&gt; is a real-time, continuous file synchronization program. Once installed and configured, it will keep files synced between multiple computers (known as “devices”) in real time.&lt;&#x2F;p&gt;
&lt;p&gt;I have the program installed and configured for syncing on:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Desktop running &lt;a href=&quot;&#x2F;tags&#x2F;lmde&#x2F;&quot;&gt;LMDE&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Pixel 6a phone running &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;grapheneos.org&#x2F;&quot;&gt;GrapheneOS&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;hr &#x2F;&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;syncthing&#x2F;#1-start-here-desktop&quot;&gt;1. Start Here&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;syncthing&#x2F;#2-apt-sources&quot;&gt;2. Apt Sources&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;syncthing&#x2F;#3-apt-pin&quot;&gt;3. Apt Pin&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;syncthing&#x2F;#4-install-and-autostart&quot;&gt;4. Install and Autostart&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;syncthing&#x2F;#5-administration&quot;&gt;5. Administration&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;syncthing&#x2F;#6-add-devices-and-folders&quot;&gt;6. Add Devices and Folders&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;syncthing&#x2F;#7-resources&quot;&gt;7. Resources&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;1-start-here-desktop&quot;&gt;1. Start Here (Desktop)&lt;&#x2F;h2&gt;
&lt;p&gt;Syncthing is under active development and hosts a dedicated [Debian package repository](apt.syncthing.net](https:&#x2F;&#x2F;apt.syncthing.net&#x2F;) for the latest stable release. Verify the authenticity of Syncthing’s packages by adding the release PGP key:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;sudo curl -L -o &#x2F;etc&#x2F;apt&#x2F;keyrings&#x2F;syncthing-archive-keyring.gpg https:&#x2F;&#x2F;syncthing.net&#x2F;release-key.gpg
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;2-apt-sources&quot;&gt;2. Apt Sources&lt;&#x2F;h2&gt;
&lt;p&gt;The &lt;strong&gt;stable channel&lt;&#x2F;strong&gt; is updated with stable release builds, usually every first Tuesday of the month.&lt;&#x2F;p&gt;
&lt;p&gt;Add to apt sources:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;echo &amp;quot;deb [signed-by=&#x2F;etc&#x2F;apt&#x2F;keyrings&#x2F;syncthing-archive-keyring.gpg] https:&#x2F;&#x2F;apt.syncthing.net&#x2F; syncthing stable&amp;quot; | sudo tee &#x2F;etc&#x2F;apt&#x2F;sources.list.d&#x2F;syncthing.list
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;3-apt-pin&quot;&gt;3. Apt Pin&lt;&#x2F;h2&gt;
&lt;p&gt;Set a preference for installing Syncthing’s own packaged version over the default Debian package by increasing its &lt;strong&gt;pin-priority&lt;&#x2F;strong&gt;:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;printf &amp;quot;Package: *\nPin: origin apt.syncthing.net\nPin-Priority: 990\n&amp;quot; | sudo tee &#x2F;etc&#x2F;apt&#x2F;preferences.d&#x2F;syncthing.pref
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Update and display the new priorities:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;$ sudo apt update &amp;amp;&amp;amp; apt-cache policy syncthing
&lt;&#x2F;span&gt;&lt;span&gt;syncthing:
&lt;&#x2F;span&gt;&lt;span&gt;  Installed: (none)
&lt;&#x2F;span&gt;&lt;span&gt;  Candidate: 1.30.0
&lt;&#x2F;span&gt;&lt;span&gt;  Version table:
&lt;&#x2F;span&gt;&lt;span&gt;     1.30.0 990
&lt;&#x2F;span&gt;&lt;span&gt;        990 https:&#x2F;&#x2F;apt.syncthing.net syncthing&#x2F;stable amd64 Packages
&lt;&#x2F;span&gt;&lt;span&gt;     1.29.7 990
&lt;&#x2F;span&gt;&lt;span&gt;        990 https:&#x2F;&#x2F;apt.syncthing.net syncthing&#x2F;stable amd64 Packages
&lt;&#x2F;span&gt;&lt;span&gt;     1.29.5~ds1-2 500
&lt;&#x2F;span&gt;&lt;span&gt;        500 https:&#x2F;&#x2F;deb.debian.org&#x2F;debian trixie&#x2F;main amd64 Packages
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;4-install-and-autostart&quot;&gt;4. Install and Autostart&lt;&#x2F;h2&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;sudo apt install syncthing
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Autostart syncthing as a user without requiring root privileges by setting up a &lt;strong&gt;systemd user service&lt;&#x2F;strong&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Create a folder to hold &lt;code&gt;user&lt;&#x2F;code&gt; services:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;mkdir -p ~&#x2F;.config&#x2F;systemd&#x2F;user
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Copy the &lt;code&gt;syncthing.service&lt;&#x2F;code&gt; file into the load path of the user instance:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;cp &#x2F;usr&#x2F;lib&#x2F;systemd&#x2F;user&#x2F;syncthing.service ~&#x2F;.config&#x2F;systemd&#x2F;user&#x2F;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Enable and start the service:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;systemctl --user enable syncthing.service
&lt;&#x2F;span&gt;&lt;span&gt;systemctl --user start syncthing.service
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;A default &lt;code&gt;~&#x2F;Sync&lt;&#x2F;code&gt; folder for synchronization is automatically created.&lt;&#x2F;p&gt;
&lt;p&gt;Check the status:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;systemctl --user status syncthing.service
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;View the logs for the user service:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;journalctl -e --user-unit=syncthing.service
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;5-administration&quot;&gt;5. Administration&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;5-1-localhost&quot;&gt;5.1 Localhost&lt;&#x2F;h3&gt;
&lt;p&gt;The administration GUI starts automatically and remains available on &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;localhost:8384&#x2F;&quot;&gt;localhost:8384&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Go to &lt;code&gt;Actions-&amp;gt;Settings-&amp;gt;GUI&lt;&#x2F;code&gt; and add a username and password to the web interface.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;5-2-remote-hosts&quot;&gt;5.2 Remote hosts&lt;&#x2F;h3&gt;
&lt;p&gt;By default, we can’t connect to the GUI running on a remote computer. Syncthing is only listening for connections from &lt;code&gt;127.0.0.1&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Allow connections to the GUI from network devices by first logging into the remote host, then editing &lt;code&gt;~&#x2F;.local&#x2F;state&#x2F;syncthing&#x2F;config.xml&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Change the line:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;&amp;lt;gui enabled=&amp;quot;true&amp;quot; tls=&amp;quot;false&amp;quot; debugging=&amp;quot;false&amp;quot; sendBasicAuthPrompt=&amp;quot;false&amp;quot;&amp;gt;
&lt;&#x2F;span&gt;&lt;span&gt; &amp;lt;address&amp;gt;127.0.0.1:8384&amp;lt;&#x2F;address&amp;gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;to&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;&amp;lt;gui enabled=&amp;quot;true&amp;quot; tls=&amp;quot;true&amp;quot; debugging=&amp;quot;false&amp;quot; sendBasicAuthPrompt=&amp;quot;false&amp;quot;&amp;gt;
&lt;&#x2F;span&gt;&lt;span&gt; &amp;lt;address&amp;gt;0.0.0.0:8384&amp;lt;&#x2F;address&amp;gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Restart the service:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;systemctl --user restart syncthing.service
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Remote host is now accessible at &lt;code&gt;&amp;lt;ip_address&amp;gt;:8384&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Go to &lt;code&gt;Actions-&amp;gt;Settings-GUI&lt;&#x2F;code&gt; and add a username and password to the web interface.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;6-add-devices-and-folders&quot;&gt;6. Add Devices and Folders&lt;&#x2F;h2&gt;
&lt;p&gt;See this &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;youtu.be&#x2F;se4V-CgO7ZM?si=Arrj4C9-c19VVDSe&quot;&gt;video tutorial&lt;&#x2F;a&gt; for adding devices and folders for synchronization.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;6-1-syncthing-on-android&quot;&gt;6.1 Syncthing on Android&lt;&#x2F;h3&gt;
&lt;p&gt;Install the &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;f-droid.org&#x2F;en&#x2F;packages&#x2F;com.github.catfriend1.syncthingfork&#x2F;&quot;&gt;Syncthing-Fork&lt;&#x2F;a&gt; application on the phone.&lt;&#x2F;p&gt;
&lt;p&gt;Enable syncing between the phone and desktop:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;On the desktop: &lt;code&gt;Actions-&amp;gt;Show ID&lt;&#x2F;code&gt; to display QR code&lt;&#x2F;li&gt;
&lt;li&gt;On the phone: &lt;code&gt;Devices&lt;&#x2F;code&gt;, click &lt;code&gt;+&lt;&#x2F;code&gt; to &lt;code&gt;Add Device&lt;&#x2F;code&gt;, click QR icon for &lt;code&gt;Device ID&lt;&#x2F;code&gt; to launch camera app and scan remote device’s QR code&lt;&#x2F;li&gt;
&lt;li&gt;On the desktop: Click accept to add new device, set config options&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Share a folder (example: the phone’s camera folder at &lt;code&gt;&#x2F;storage&#x2F;emulated&#x2F;0&#x2F;DCIM&lt;&#x2F;code&gt;):&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;On the phone: Click on folder, enable file sharing to the remote device&lt;&#x2F;li&gt;
&lt;li&gt;On the desktop: Click accept to add new folder, set config options&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;7-resources&quot;&gt;7. Resources&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;Syncthing Docs: &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.syncthing.net&#x2F;intro&#x2F;getting-started.html&quot;&gt;Getting Started&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Syncthing Docs: &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.syncthing.net&#x2F;users&#x2F;autostart.html#linux&quot;&gt;Starting Syncthing Automatically on Linux&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;apt.syncthing.net&#x2F;&quot;&gt;Syncthing on Debian&#x2F;Ubuntu&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;Catfriend1&#x2F;syncthing-android&#x2F;tree&#x2F;main&#x2F;wiki&quot;&gt;Syncthing-Fork on Android&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=se4V-CgO7ZM&quot;&gt;Syncthing Tutorial: Open Source &amp;amp; Private File Sync Made Simple&lt;&#x2F;a&gt; (video)&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;112904479379711869&quot; target=&quot;_blank&quot;&gt;on Mastodon&lt;&#x2F;a&gt; &amp;#128172
&lt;&#x2F;p&gt;
</description>
    </item>
    <item>
      <title>Install Linux Mint Debian Edition (LMDE 7) in Expert Mode</title>
      <pubDate>Mon, 27 Oct 2025 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;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.linuxmint.com&#x2F;download_lmde.php&quot;&gt;LMDE 7 aka “Gigi”&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 “virtual partitions” (&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’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 &lt;code&gt;live-installer-expert-mode&lt;&#x2F;code&gt; to &lt;strong&gt;create 3 partitions&lt;&#x2F;strong&gt;: a small EFI system partition, a &lt;code&gt;root&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;#1-start-here&quot;&gt;1. Start Here&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;lmde-install-expert-mode&#x2F;#1-1-download-install-image&quot;&gt;1.1 Download install 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;#1-2-prepare-usb-install-media&quot;&gt;1.2 Prepare USB install 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;#2-live-environment&quot;&gt;2. 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;#2-1-switch-to-root&quot;&gt;2.1 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;#2-2-confirm-efi-support&quot;&gt;2.2 Confirm EFI support&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;#2-3-define-disk-variables&quot;&gt;2.3 Define DISK variables&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;#3-prepare-disk&quot;&gt;3. Prepare 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;#3-1-wipe-disk&quot;&gt;3.1 Wipe 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;#3-2-partition-disk&quot;&gt;3.2 Partition DISK&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;lmde-install-expert-mode&#x2F;#4-encryption-and-file-systems&quot;&gt;4. Encryption and File Systems&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;#4-1-encrypt-home-partition&quot;&gt;4.1 Encrypt 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;#4-2-create-file-systems&quot;&gt;4.2 Create file systems&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;#5-install-lmde&quot;&gt;5. Install LMDE&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;#5-1-expert-mode&quot;&gt;5.1 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;#5-2-mount-file-systems&quot;&gt;5.2 Mount 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;#5-3-install&quot;&gt;5.3 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;#5-4-fstab&quot;&gt;5.4 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;#5-5-crypttab&quot;&gt;5.5 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;#5-6-complete-installation&quot;&gt;5.6 Complete installation&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;lmde-install-expert-mode&#x2F;#6-configuration&quot;&gt;6. Configuration&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;#6-1-mount-virtual-file-systems&quot;&gt;6.1 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;#6-2-chroot&quot;&gt;6.2 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;#6-3-add-packages&quot;&gt;6.3 Add packages&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;#6-4-zram-swap&quot;&gt;6.4 Zram swap&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;lmde-install-expert-mode&#x2F;#7-finish-up&quot;&gt;7. 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;#7-1-unmount-virtual-file-systems-and-partitions&quot;&gt;7.1 Unmount virtual file systems and partitions&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;#7-2-remove-encrypted-home-mapping&quot;&gt;7.2 Remove encrypted home mapping&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;#7-3-first-boot&quot;&gt;7.3 First boot&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;#8-resources&quot;&gt;8. Resources&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;1-start-here&quot;&gt;1. Start Here&lt;&#x2F;h2&gt;
&lt;p&gt;This guide makes a few assumptions:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Target device is &lt;code&gt;64-bit&lt;&#x2F;code&gt; architecture&lt;&#x2F;li&gt;
&lt;li&gt;System use UEFI to boot with GRUB as bootloader&lt;&#x2F;li&gt;
&lt;li&gt;LMDE install media prepared on a Linux system&lt;&#x2F;li&gt;
&lt;li&gt;LMDE is the sole OS on a single disk (example: &lt;strong&gt;sda&lt;&#x2F;strong&gt;)&lt;&#x2F;li&gt;
&lt;li&gt;Network access during install uses a (LMDE supported) wired interface&lt;&#x2F;li&gt;
&lt;li&gt;GPT partition table with 3 partitions:&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th style=&quot;text-align: center&quot;&gt;Partition&lt;&#x2F;th&gt;&lt;th&gt;Size&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: center&quot;&gt;Format&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: center&quot;&gt;Use as&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center&quot;&gt;sda1&lt;&#x2F;td&gt;&lt;td&gt;256MB&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;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center&quot;&gt;sda2&lt;&#x2F;td&gt;&lt;td&gt;64GB&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;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center&quot;&gt;sda3&lt;&#x2F;td&gt;&lt;td&gt;-&amp;gt;END&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;luks&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;encrypted partition (home device)&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;ul&gt;
&lt;li&gt;In lieu of creating a separate &lt;code&gt;swap&lt;&#x2F;code&gt; partition, after the install I configure &lt;a href=&quot;https:&#x2F;&#x2F;www.dwarmstrong.org&#x2F;lmde-install-expert-mode&#x2F;#6-4-zram-swap&quot;&gt;zram swap&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;1-1-download-install-image&quot;&gt;1.1 Download install image&lt;&#x2F;h3&gt;
&lt;p&gt;The latest live ISO install images are available here: &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;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 &lt;code&gt;lmde-7-cinnamon-64bit.iso&lt;&#x2F;code&gt; and &lt;code&gt;sha256sum.txt&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Verify the image by running:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;sha256sum -c --ignore-missing sha256sum.txt
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;1-2-prepare-usb-install-media&quot;&gt;1.2 Prepare USB install media&lt;&#x2F;h3&gt;
&lt;p&gt;Prepare a USB storage drive as an installer using one of these two methods:&lt;&#x2F;p&gt;
&lt;h4 id=&quot;method-1-dd&quot;&gt;Method 1: dd&lt;&#x2F;h4&gt;
&lt;p&gt;Write the installer to an &lt;strong&gt;unmounted&lt;&#x2F;strong&gt; USB storage device using the &lt;code&gt;dd&lt;&#x2F;code&gt; command as root.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;WARNING&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
&lt;strong&gt;Be very careful to note the proper device. 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; (no partition number):&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;sudo dd if=&#x2F;path&#x2F;to&#x2F;lmde-7-cinnamon-64bit.iso of=&#x2F;dev&#x2F;sdx bs=4M conv=fsync oflag=direct status=progress
&lt;&#x2F;span&gt;&lt;span&gt;sync
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h4 id=&quot;method-2-ventoy&quot;&gt;Method 2: Ventoy&lt;&#x2F;h4&gt;
&lt;p&gt;Use &lt;strong&gt;Ventoy&lt;&#x2F;strong&gt; to setup a USB device to be a &lt;strong&gt;multiboot installer&lt;&#x2F;strong&gt;. Simply copy an iso to the device, reboot, and the auto-generated menu lists all the disk images available to boot. &lt;a href=&quot;&#x2F;ventoy&quot;&gt;Read more&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;2-live-environment&quot;&gt;2. Live Environment&lt;&#x2F;h2&gt;
&lt;p&gt;Insert the USB install stick into the target device and boot to desktop.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;2-1-switch-to-root&quot;&gt;2.1 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 style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;sudo -i
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;2-2-confirm-efi-support&quot;&gt;2.2 Confirm EFI support&lt;&#x2F;h3&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;cat &#x2F;sys&#x2F;firmware&#x2F;efi&#x2F;fw_platform_size
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;If the command returns &lt;code&gt;64&lt;&#x2F;code&gt;, then system is booted in 64-bit x64 UEFI and we are good to go.&lt;&#x2F;p&gt;
&lt;p&gt;If the file does not exist, the device is not using UEFI. Stop here and search online for instructions on how to install LMDE in BIOS boot mode. The partition layout detailed below assumes UEFI boot and will need to be modified accordingly if this is not so.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;2-3-define-disk-variables&quot;&gt;2.3 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 style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;lsblk -f
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Set DISK variables for either a SATA or NVMe device:&lt;&#x2F;p&gt;
&lt;h4 id=&quot;sata-example-sda&quot;&gt;SATA (example: sda)&lt;&#x2F;h4&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;DISK=&#x2F;dev&#x2F;sda
&lt;&#x2F;span&gt;&lt;span&gt;EFI_PART=1
&lt;&#x2F;span&gt;&lt;span&gt;ROOT_PART=2
&lt;&#x2F;span&gt;&lt;span&gt;HOME_PART=3
&lt;&#x2F;span&gt;&lt;span&gt;EFI_DISK=${DISK}${EFI_PART}
&lt;&#x2F;span&gt;&lt;span&gt;ROOT_DISK=${DISK}${ROOT_PART}
&lt;&#x2F;span&gt;&lt;span&gt;HOME_DISK=${DISK}${HOME_PART}
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;nvme-example-nvme0n1&quot;&gt;NVMe (example: nvme0n1)&lt;&#x2F;h3&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;DISK=&#x2F;dev&#x2F;nvme0n1
&lt;&#x2F;span&gt;&lt;span&gt;EFI_PART=1
&lt;&#x2F;span&gt;&lt;span&gt;ROOT_PART=2
&lt;&#x2F;span&gt;&lt;span&gt;HOME_PART=3
&lt;&#x2F;span&gt;&lt;span&gt;EFI_DISK=${DISK}p${EFI_PART}
&lt;&#x2F;span&gt;&lt;span&gt;ROOT_DISK=${DISK}p${ROOT_PART}
&lt;&#x2F;span&gt;&lt;span&gt;HOME_DISK=${DISK}p${HOME_PART}
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;3-prepare-disk&quot;&gt;3. Prepare DISK&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;3-1-wipe-disk&quot;&gt;3.1 Wipe DISK&lt;&#x2F;h3&gt;
&lt;p&gt;Before creating the new partition layout, wipe the DISK:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;wipefs -af $DISK
&lt;&#x2F;span&gt;&lt;span&gt;sgdisk --zap-all --clear $DISK
&lt;&#x2F;span&gt;&lt;span&gt;partprobe $DISK &amp;amp;&amp;amp; sgdisk -p $DISK
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
&lt;em&gt;If LVM was previously used on the drive, this might fail with an error such as &lt;code&gt;Device or resource busy&lt;&#x2F;code&gt;. This is because the volume group might have gotten set up on boot. In such cases, bring it down with:&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;vgchange -an
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;em&gt;After that, &lt;code&gt;wipefs -af&lt;&#x2F;code&gt; should work.&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;3-2-partition-disk&quot;&gt;3.2 Partition DISK&lt;&#x2F;h3&gt;
&lt;p&gt;List partition type codes:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;sgdisk --list-types
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Create EFI system partition:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;sgdisk -n &amp;quot;${EFI_PART}:1m:+256m&amp;quot; -t &amp;quot;${EFI_PART}:ef00&amp;quot; -c 0:esp $DISK
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Create root partition:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;sgdisk -n &amp;quot;${ROOT_PART}:0:+64g&amp;quot; -t &amp;quot;${ROOT_PART}:8300&amp;quot; -c 0:root $DISK
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Create home partition:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;sgdisk -n &amp;quot;${HOME_PART}:0:0&amp;quot; -t &amp;quot;${HOME_PART}:8309&amp;quot; -c 0:home $DISK
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Display layout:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;partprobe $DISK &amp;amp;&amp;amp; sgdisk -p $DISK
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;4-encryption-and-file-systems&quot;&gt;4. Encryption and File Systems&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;4-1-encrypt-home-partition&quot;&gt;4.1 Encrypt home partition&lt;&#x2F;h3&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;cryptsetup luksFormat --type luks2 -y $HOME_DISK
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Unlock the newly-created &lt;code&gt;home&lt;&#x2F;code&gt; device:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;cryptsetup open $HOME_DISK home
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Set variable for &lt;code&gt;home&lt;&#x2F;code&gt; device:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;HOME_DEV=&#x2F;dev&#x2F;mapper&#x2F;home
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;4-2-create-file-systems&quot;&gt;4.2 Create file systems&lt;&#x2F;h3&gt;
&lt;p&gt;Labels are optional, but helpful. They allow for easy mounting without a UUID:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;mkfs.vfat -n ESP $EFI_DISK
&lt;&#x2F;span&gt;&lt;span&gt;mkfs.ext4 -L rootfs $ROOT_DISK
&lt;&#x2F;span&gt;&lt;span&gt;mkfs.ext4 -L homefs $HOME_DEV
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;5-install-lmde&quot;&gt;5. Install LMDE&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;5-1-expert-mode&quot;&gt;5.1 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 style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;sudo live-installer-expert-mode
&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 target filesystems 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;5-2-mount-file-systems&quot;&gt;5.2 Mount file systems&lt;&#x2F;h3&gt;
&lt;p&gt;Switch back to the root terminal.&lt;&#x2F;p&gt;
&lt;p&gt;Mount the previously created filesystems:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;mount --mkdir LABEL=rootfs &#x2F;target
&lt;&#x2F;span&gt;&lt;span&gt;mount --mkdir LABEL=homefs &#x2F;target&#x2F;home
&lt;&#x2F;span&gt;&lt;span&gt;mount --mkdir LABEL=ESP &#x2F;target&#x2F;boot&#x2F;efi
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;5-3-install&quot;&gt;5.3 Install&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;&amp;lt;storage_device&amp;gt;&lt;&#x2F;code&gt; (example: &lt;code&gt;&#x2F;dev&#x2F;sda&lt;&#x2F;code&gt; with no partition number)&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;5-4-fstab&quot;&gt;5.4 Fstab&lt;&#x2F;h3&gt;
&lt;p&gt;Set filesystems that will be mounted at boot:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;echo &amp;quot;LABEL=ESP     &#x2F;boot&#x2F;efi   vfat  defaults  0 1&amp;quot; &amp;gt;&amp;gt; &#x2F;target&#x2F;etc&#x2F;fstab
&lt;&#x2F;span&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;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;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;5-5-crypttab&quot;&gt;5.5 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 style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;echo &amp;quot;home PARTLABEL=home none luks,discard&amp;quot; &amp;gt;&amp;gt; &#x2F;target&#x2F;etc&#x2F;crypttab
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;5-6-complete-installation&quot;&gt;5.6 Complete installation&lt;&#x2F;h3&gt;
&lt;p&gt;Switch back to installer window and click &lt;code&gt;Next&lt;&#x2F;code&gt; to complete installation.&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;h2 id=&quot;6-configuration&quot;&gt;6. Configuration&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;6-1-mount-virtual-file-systems&quot;&gt;6.1 Mount virtual file systems&lt;&#x2F;h3&gt;
&lt;p&gt;Mount virtual file systems for the new install environment:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;mount --bind &#x2F;dev &#x2F;target&#x2F;dev
&lt;&#x2F;span&gt;&lt;span&gt;mount --bind &#x2F;dev&#x2F;pts &#x2F;target&#x2F;dev&#x2F;pts
&lt;&#x2F;span&gt;&lt;span&gt;mount -t proc &#x2F;proc &#x2F;target&#x2F;proc
&lt;&#x2F;span&gt;&lt;span&gt;mount -t sysfs &#x2F;sys &#x2F;target&#x2F;sys
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;6-2-chroot&quot;&gt;6.2 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 style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;cp &#x2F;etc&#x2F;resolv.conf &#x2F;target&#x2F;etc&#x2F;resolv.conf
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Make changes inside the local installed system by accessing it from the LMDE live installer:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;chroot &#x2F;target&#x2F; &#x2F;bin&#x2F;bash
&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 style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;export PS1=&amp;quot;(chroot) $PS1&amp;quot;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;6-3-add-packages&quot;&gt;6.3 Add packages&lt;&#x2F;h3&gt;
&lt;p&gt;Update the package repository contents and install extra packages:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;apt update &amp;amp;&amp;amp; apt install systemd-cryptsetup zram-tools
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;6-4-zram-swap&quot;&gt;6.4 Zram swap&lt;&#x2F;h3&gt;
&lt;p&gt;Settings are modified in &lt;code&gt;&#x2F;etc&#x2F;default&#x2F;zramswap&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Uncomment &lt;code&gt;PERCENT&lt;&#x2F;code&gt; and set amount of RAM used by zram as a percentage of total memory available:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;PERCENT=25
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Uncomment &lt;code&gt;PRIORITY&lt;&#x2F;code&gt; and set the priority of the swap device:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;PRIORITY=100
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;7-finish-up&quot;&gt;7. Finish Up&lt;&#x2F;h2&gt;
&lt;p&gt;Exit the &lt;code&gt;chroot&lt;&#x2F;code&gt; environment:&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;exit
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;7-1-unmount-virtual-file-systems-and-partitions&quot;&gt;7.1 Unmount virtual file systems and partitions&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 style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;umount &#x2F;target&#x2F;dev&#x2F;pts
&lt;&#x2F;span&gt;&lt;span&gt;umount &#x2F;target&#x2F;dev
&lt;&#x2F;span&gt;&lt;span&gt;umount &#x2F;target&#x2F;proc
&lt;&#x2F;span&gt;&lt;span&gt;umount &#x2F;target&#x2F;sys
&lt;&#x2F;span&gt;&lt;span&gt;umount &#x2F;target&#x2F;home
&lt;&#x2F;span&gt;&lt;span&gt;umount -l -n -R &#x2F;target
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;7-2-remove-encrypted-home-mapping&quot;&gt;7.2 Remove encrypted home mapping&lt;&#x2F;h3&gt;
&lt;pre style=&quot;background-color:#2e3440;color:#d8dee9;&quot;&gt;&lt;code&gt;&lt;span&gt;cryptsetup close home
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Reboot system.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;7-3-first-boot&quot;&gt;7.3 First boot&lt;&#x2F;h3&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;p&gt;&lt;strong&gt;NOTE&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
&lt;em&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). After a successful first boot, possible workarounds are to switch to another built-in plymouth theme or (my choice) disable plymouth and use a text-based password prompt. To do so, edit&lt;&#x2F;em&gt; &lt;code&gt;&#x2F;etc&#x2F;default&#x2F;grub.d&#x2F;50_lmde.cfg&lt;&#x2F;code&gt; &lt;em&gt;and remove &lt;code&gt;splash&lt;&#x2F;code&gt; from&lt;&#x2F;em&gt; &lt;code&gt;GRUB_CMDLINE_LINUX_DEFAULT&lt;&#x2F;code&gt;. &lt;em&gt;Save changes and run &lt;code&gt;update-grub&lt;&#x2F;code&gt;.&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;8-resources&quot;&gt;8. Resources&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;Release notes for &lt;a rel=&quot;noopener&quot; target=&quot;_blank&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;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.debian.org&#x2F;releases&#x2F;trixie&#x2F;release-notes&#x2F;&quot;&gt;Debian 13 “Trixie”&lt;&#x2F;a&gt;. Pay particular attention to &lt;a rel=&quot;noopener&quot; target=&quot;_blank&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;5. Issues to be aware of for trixie&lt;&#x2F;a&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;I created a shell script that automates the above work in preparing the target device for the install: &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;gitlab.com&#x2F;dwarmstrong&#x2F;lmde-expert-mode-assist&quot;&gt;lmde-expert-mode-assist&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;115408909537210596&quot; target=&quot;_blank&quot;&gt;on Mastodon&lt;&#x2F;a&gt; &amp;#128172
&lt;&#x2F;p&gt;
</description>
    </item>
</channel>
</rss>
