<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>jutty.dev - Posts</title>
    <subtitle>Computer nerd memory leaks</subtitle>
    <link rel="self" type="application/atom+xml" href="https://blog.jutty.dev/posts/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://blog.jutty.dev/posts/"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2025-08-31T20:05:26-03:00</updated>
    <id>https://blog.jutty.dev/posts/atom.xml</id>
    <entry xml:lang="en">
        <title>Half an year on Alpine: just musl aside</title>
        <published>2025-08-31T20:05:26-03:00</published>
        <updated>2025-08-31T20:05:26-03:00</updated>
        
        <author>
          <name>
            
              Juno Takano
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.jutty.dev/posts/half-an-year-on-alpine/"/>
        <id>https://blog.jutty.dev/posts/half-an-year-on-alpine/</id>
        
        <content type="html" xml:base="https://blog.jutty.dev/posts/half-an-year-on-alpine/">&lt;p&gt;&lt;em&gt;&lt;strong&gt;Warning&lt;&#x2F;strong&gt;: Contains tongue-in-cheek language that might feel provocative if you have invested part of your identity into your software choices.&lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-1-1&quot;&gt;&lt;a href=&quot;#fn-1&quot;&gt;[1]&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;p&gt;For roughly six months now, I’ve been running &lt;a href=&quot;https:&#x2F;&#x2F;alpinelinux.org&#x2F;&quot;&gt;Alpine&lt;&#x2F;a&gt; on my laptop as a daily driver.&lt;&#x2F;p&gt;
&lt;p&gt;Before that, I was running &lt;a href=&quot;https:&#x2F;&#x2F;voidlinux.org&#x2F;&quot;&gt;Void&lt;&#x2F;a&gt;. I like how blazing fast Void is to start up and shut down, has an excellent package management system and its init system, runit, is beautifully integrated. Alpine also fits this description.&lt;&#x2F;p&gt;
&lt;p&gt;When I first learned about Void, I read it described itself as &lt;em&gt;“rolling but stable”&lt;&#x2F;em&gt;, meaning you get new package versions often, but not to the point of breakage. While I never had an upgrade break a system, it still bothered me to upgrade and suddenly have sound or Bluetooth not work anymore, or have the system Python version change frequently, leading to all sorts of complaints from this or that application I didn’t even know was a Python program.&lt;&#x2F;p&gt;
&lt;p&gt;I wanted to go back to  a more stable distribution, but I also wanted a simpler, faster init system than systemd. Alpine, which has fixed releases every six months, eventually rose as an alternative.&lt;&#x2F;p&gt;
&lt;details&gt;
&lt;summary&gt;
    Expand for an overly detailed rundown of how I narrowed down my options
&lt;&#x2F;summary&gt;
&lt;h2 id=&quot;how-many-options-really&quot;&gt;How many options, really?&lt;&#x2F;h2&gt;
&lt;p&gt;Preferably not rolling. Preferably without systemd. At first glance it may seem like the choices of operating systems and distributions are endless, but turns out these two requirements are enough to nearly wipe them out.&lt;&#x2F;p&gt;
&lt;p&gt;My main reason to not like systemd is not that I believe Red Hat is involved in a deep state conspiracy to turn frogs gay. In fact, I’d take systemd over SysV-style init on a heartbeat. What I prefer are the sweet spots between them, not the regression into the previous mess.&lt;&#x2F;p&gt;
&lt;p&gt;My reasoning is actually mostly around speed. Call me impatient, and I know it can be tweaked to improve this, but I don’t like it when a machine is coming up or going down and you get a timer from some random process saying it will wait X &lt;em&gt;minutes&lt;&#x2F;em&gt; to exit. I’d rather have a simpler tool tackling initialization and shutdown, and have learned to compose the operating system with various programs that fill in for systemd’s vast feature set.&lt;&#x2F;p&gt;
&lt;p&gt;Admittedly, I also have an insatiable curiosity for getting to know and experiment with how different operating systems work. Before this experience, I knew nothing about OpenRC and several other peculiarities Alpine brings to the table. So no regrets there.&lt;&#x2F;p&gt;
&lt;p&gt;I also did not want a distribution that is too new or too niche, as I don’t appreciate being stuck in dead ends too often. Just sometimes. I am curious about fringe operating systems, but I am looking for something to daily drive and work on, not experiment with.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;the-systemd-realm&quot;&gt;The systemd realm&lt;&#x2F;h3&gt;
&lt;p&gt;There’s a plethora of Linux distributions. But the vast majority are based on some other one. I don’t mean that this isn’t meaningful for whatever use case they are suited for — some derivatives do go the extra mile and increment their bases in more advanced ways — but when you are looking for a distribution that &lt;em&gt;you&lt;&#x2F;em&gt; want to set up your way, it makes less sense to go for one whose selling point is how it’s already set up for something.&lt;&#x2F;p&gt;
&lt;p&gt;If we drop the derivatives and focus on some arbitrary measure of adoption, we end up with Debian, Fedora, Arch, OpenSUSE and Nix.&lt;&#x2F;p&gt;
&lt;p&gt;I never seriously tried OpenSUSE or Fedora. Among these three, I think I prefer Debian simply because its governance model seems (feels?) healthier and more independent&#x2F;resilient.&lt;&#x2F;p&gt;
&lt;p&gt;NixOS is its own kind of hell. It truly sets it apart. If you are grasping my preference for compatibility and ease of running experimental programs, you can probably guess how I felt about not even having a standard filesystem hierarchy.&lt;&#x2F;p&gt;
&lt;p&gt;What I am saying about stability and preferring fixed over rolling release should also explain why Arch is not an option either, although I’d say its cultural issues far outweigh anything else for me.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;the-non-systemd-realm&quot;&gt;The non-systemd realm&lt;&#x2F;h3&gt;
&lt;p&gt;Then, for all the other ways to summon an operating system from its slumber, we have the BSDs, Gentoo, Slackware, Guix, Void and Alpine. And because changing the init system is significantly more effort than just providing some configuration on top of another system, I think it’s fair to include derivatives here, such as Devuan and antiX.&lt;&#x2F;p&gt;
&lt;p&gt;I run FreeBSD on a separate, desktop machine. I use it a lot over SSH and have also set up a graphical session there. It is a delight to use and learn about, particularly because of its Unix heritage, first-class ZFS support and how different its ecosystem is in comparison. But compatibility-wise (hardware and software), it doesn’t fit the bill for this laptop either. Something (roughly) similar can be said of the other BSDs.&lt;&#x2F;p&gt;
&lt;p&gt;I have tried Gentoo, with binary packages enabled and all, but who has time for compiling a browser? Certainly not me, with my old refurbished computers. There is Guix, but my experience with Nix was a portability nightmare that, while not as wasteful of my time as Gentoo, gets close. And while definitely a control freak, I am not at the Slackware level of control freakiness. As you can see, usability and practicality have grown on me with all this messing around, so now I’d rather not have “just install everything” proposed as the solution to dependency resolution.&lt;&#x2F;p&gt;
&lt;p&gt;You see, it’d be much easier not to be such a nerd. When I set up a computer for someone else, it’s Windows or LMDE or Fedora. It’s such a no-brainer. The relationship with a computer can be simple: like&#x2F;dislike, works&#x2F;doesn’t work, can fix&#x2F;can’t fix. One can actually &lt;em&gt;accept&lt;&#x2F;em&gt; that something can’t be fixed or changed! Really admirable. But that’s not me. I actually care what is the DHCP daemon, who’s resolving the DNS queries and how aggressive the OOM killer is going to be.&lt;&#x2F;p&gt;
&lt;p&gt;And because Void is a rolling release distribution, the only survivor of all this begging and choosing is Alpine.&lt;&#x2F;p&gt;
&lt;&#x2F;details&gt;
&lt;h2 id=&quot;choosing-a-path-forward&quot;&gt;Choosing a path forward&lt;&#x2F;h2&gt;
&lt;p&gt;So, prompted by a charger dying in the beginning of this year, which put a machine out of work, I decided to take the opportunity to try another system with a slower release cycle and started weighing my options.&lt;&#x2F;p&gt;
&lt;p&gt;What remained in the end were Devuan, antiX and Alpine. And I briefly tried all three during this experiment before settling on Alpine.&lt;&#x2F;p&gt;
&lt;p&gt;Devuan and antiX do offer options besides SysV-style init, but they  don’t really integrate them very well in their systems. While with Void you will really use runit to manage any services installed through the distribution’s package manager, because when a package has a relevant service to ship it will ship a runit service, Devuan and antiX have other init systems as &lt;em&gt;options&lt;&#x2F;em&gt; rather than &lt;em&gt;the&lt;&#x2F;em&gt; distribution’s init system.&lt;&#x2F;p&gt;
&lt;p&gt;What you really get then is a mixture of runit&#x2F;OpenRC and SysV-style init, leaning a lot more towards SysV-style and leveraging the runit&#x2F;OpenRC ability to also run SysV-style init scripts.&lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-2-1&quot;&gt;&lt;a href=&quot;#fn-2&quot;&gt;[2]&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt; If you like managing SysV-style init, that should not be a problem, although in that case you might as well get the SysV-style version then! Alpine, on the other hand, just like Void, has OpenRC as &lt;em&gt;the&lt;&#x2F;em&gt; way to run services.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;alpine-it-is&quot;&gt;Alpine it is&lt;&#x2F;h2&gt;
&lt;p&gt;For starters, I wanted to learn a little bit more about this unknown-to-me init system, OpenRC, since I’d be spending some time setting up services with it.&lt;&#x2F;p&gt;
&lt;p&gt;OpenRC can be used alongside or in place of SysV-style init. I will not get into the different roles played by so-called init systems and process supervisors, but OpenRC provides &lt;code&gt;openrc-init&lt;&#x2F;code&gt;, which can replace &lt;code&gt;&#x2F;sbin&#x2F;init&lt;&#x2F;code&gt; for a fully OpenRC-powered system.&lt;&#x2F;p&gt;
&lt;p&gt;I could not find explicit information on whether this is the case with Alpine, but an actual inspection of the running system shows it is not. Mind you, even Alpine’s &lt;code&gt;&#x2F;sbin&#x2F;init&lt;&#x2F;code&gt; is actually BusyBox:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;&lt;span class=&quot;z-meta z-group z-expansion z-job z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-job z-shell&quot;&gt;%&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; file &lt;span class=&quot;z-meta z-group z-expansion z-command z-parens z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-section z-parens z-begin z-shell&quot;&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;which&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; init&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-section z-parens z-end z-shell&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;&#x2F;sbin&#x2F;init:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; symbolic link to &#x2F;bin&#x2F;busybox&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;I then checked out BusyBox’s manual page to try and understand more:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;Init is the first process started during boot. It never exits.
It (re)spawns children according to &#x2F;etc&#x2F;inittab.&lt;&#x2F;p&gt;
&lt;p&gt;Signals:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;HUP: reload &#x2F;etc&#x2F;inittab&lt;&#x2F;li&gt;
&lt;li&gt;TSTP: stop respawning until CONT&lt;&#x2F;li&gt;
&lt;li&gt;QUIT: re-exec another init&lt;&#x2F;li&gt;
&lt;li&gt;USR1&#x2F;TER, &#x2F;USR2&#x2F;INT: run halt&#x2F;reboot&#x2F;poweroff&#x2F;Ctrl-Alt-Del script&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;I knew Alpine heavily leaned on BusyBox, but didn’t realize it was to this extent. So, following this trail, there was Alpine’s &lt;code&gt;&#x2F;etc&#x2F;inittab&lt;&#x2F;code&gt;, where I found this:&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;::sysinit:&#x2F;sbin&#x2F;openrc sysinit
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;::sysinit:&#x2F;sbin&#x2F;openrc boot
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;::wait:&#x2F;sbin&#x2F;openrc default
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Meaning, Alpine’s init is BusyBox’s init, which in turn calls on OpenRC to bring services up.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;working-around-musl&quot;&gt;Working around musl…&lt;&#x2F;h2&gt;
&lt;p&gt;Willing to give OpenRC a try, I had to clear up my only concern with Alpine: lack of compatibility with glibc software.&lt;&#x2F;p&gt;
&lt;p&gt;This took a long time to evaluate, because you need to actually try to do what you usually do in real situations to see if things will work out or not.&lt;&#x2F;p&gt;
&lt;p&gt;If you are questioning whether Alpine &lt;em&gt;can&lt;&#x2F;em&gt; reliably run a full desktop environment or window manager, play and record audio, share your screen, run GUI applications including the latest browsers, act as the host of virtualization and development environments, the answer is an unwavering &lt;em&gt;yes&lt;&#x2F;em&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;If you are questioning whether on top of that Alpine can play DRM video and games (e.g., Netflix and Steam), the answer is &lt;em&gt;also&lt;&#x2F;em&gt; yes, but you’ll need a glibc layer around it. If you like Flatpak, that might actually be trivial.&lt;&#x2F;p&gt;
&lt;p&gt;But for more involved usage of software that requires glibc, in particular novel and experimental stuff you are compiling yourself or exploring and prototyping with, your mileage may vary. It is more likely that a vendor will &lt;em&gt;not&lt;&#x2F;em&gt; provide a musl build of their software.&lt;&#x2F;p&gt;
&lt;p&gt;Some stuff works just by installing &lt;code&gt;gcompat&lt;&#x2F;code&gt;, a compatibility layer that will make glibc software run as-is. Some however won’t work with it.&lt;&#x2F;p&gt;
&lt;p&gt;Sometimes I’d just compile something myself, meaning I made my own musl-linked executable of something that was available only for glibc. That works, but compilation for musl is often less documented and may not be possible at all depending on whether or not musl provides all the needed features. The latter case was however quite rare in my experience.&lt;&#x2F;p&gt;
&lt;p&gt;Some other options are running things through Flatpak, or Nix, or Distrobox. But sometimes, if all failed, I just had to accept it wasn’t possible. Or it would work and then crash when using a specific feature at runtime.&lt;&#x2F;p&gt;
&lt;p&gt;And that’s great, having ways to circumvent musl. But you could also just… run stuff directly? It’s nice to have options, but it’s also a lot of friction. And sadly that is what ended up exhausting me from using Alpine as a daily driver.&lt;&#x2F;p&gt;
&lt;p&gt;I think that, if you have a very consistent usage of Alpine, where you are mostly doing the same thing and using the same tools, you could find a comfy workflow there. But I am extremely moved by experimentation and curiosity. And something tells me that I could devise a more fluid workflow to run my experiments and try different tools inside isolated glibc-friendly environments, but in the end it’s still friction. And it’s hard to shake the feeling that, if you were running a more compatible system to begin with, that wouldn’t even be something to think about.&lt;&#x2F;p&gt;
&lt;p&gt;Getting software from the distribution’s package manager is the way to go for numerous reasons. But sometimes that is just not an option. Sometimes the package is just nonexistent in the repositories. Sometimes you need to compile it yourself because you need a specific version. Or because you don’t trust the provided pre-compiled binary. Sometimes you need a specific compilation with a specific feature. Sometimes you are in a hurry, or just curious to try something you can securely run in isolation.&lt;&#x2F;p&gt;
&lt;p&gt;So not being able to install it the conventional way is friction in itself. Having to compile something every time is extra friction. Having to recompile on upgrades is more friction. And to not be able to compile or run it even by compiling it yourself, that is just compounded friction with some frustration sprinkled on top.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;though-i-d-rather-not&quot;&gt;… though I’d rather not&lt;&#x2F;h2&gt;
&lt;p&gt;This is not &lt;em&gt;about&lt;&#x2F;em&gt; Alpine, but it’s also inseparable from Alpine.&lt;&#x2F;p&gt;
&lt;p&gt;Alpine has an excellent, fast package manager that never broke my setup. When things did break, it was able to fix them by itself. The six months release cycle is to me a really sweet spot at which to space versions — not too often, not too seldom. A lot of software is available. Developers are security conscious. It’s extremely lean on resources.&lt;&#x2F;p&gt;
&lt;p&gt;And in the spirit of being so lightweight, Alpine shines on virtualized and embedded systems. This focus on being small is why musl is a great fit, since it’s a lot lighter than glibc, &lt;a href=&quot;https:&#x2F;&#x2F;musl.libc.org&#x2F;about.html#:~:text=Key%20Principles&quot;&gt;among other advantages&lt;&#x2F;a&gt;. For me though, while I appreciate the smaller size, it’s not that critical that I’d sacrifice compatibility and versatility over it.&lt;&#x2F;p&gt;
&lt;p&gt;So I have zero complaints about Alpine, musl aside. It is perfect in everything I signed up for when I decided to try it. It delivered on every feature and never lied to me. It never said to me it was going to be smooth and easy to run glibc programs. So it’s not so much that I didn’t like Alpine, it’s that I wish there were a glibc Alpine just like there is a glibc Void. But I’m well aware that’s not happening.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;choosing-a-path-beyond&quot;&gt;Choosing a path beyond&lt;&#x2F;h2&gt;
&lt;p&gt;It was excellent to learn hands-on about how Alpine works and what it can offer. I learned a lot about not just its components, such as OpenRC and BusyBox, which were basically strangers to me, known only conceptually. Alpine also taught me a lot about all the things it &lt;em&gt;doesn’t&lt;&#x2F;em&gt; have.&lt;&#x2F;p&gt;
&lt;p&gt;Because, seriously, if you do a chroot installation of Alpine and don’t even run its setup scripts, you’ll end up with something so trimmed down you’ll wonder if you’re midway through &lt;a href=&quot;https:&#x2F;&#x2F;www.linuxfromscratch.org&#x2F;&quot;&gt;LFS&lt;&#x2F;a&gt;. You’ll have to work your way up to a usable system piece by piece, finding out what you need, why you need it and how to set it up. And that is a huge learning opportunity for those interested&lt;&#x2F;p&gt;
&lt;p&gt;For now though, I decided to backtrack a little bit and then fully reverse course if I can’t find a working compromise. That means giving Void another try and, if stability keeps being a problem, go further back and land on Debian. If I shed the non-systemd preference aside, Debian would deliver on the stability and compatibility that I am looking for.&lt;&#x2F;p&gt;
&lt;p&gt;You see, I am not looking for the &lt;em&gt;next&lt;&#x2F;em&gt; distribution to try as if it were a hobby and I wanted to try novelty out of FOMO. This is actually a lot of work! I’d rather do other things &lt;em&gt;with&lt;&#x2F;em&gt; the operating system rather than install and configure it, &lt;a href=&quot;https:&#x2F;&#x2F;blog.jutty.dev&#x2F;posts&#x2F;void-on-zfs&#x2F;#:~:text=I%20don%E2%80%99t%20really%20enjoy%20distro%2Dhopping%2E&quot;&gt;as I mentioned before&lt;&#x2F;a&gt;. And if at the other end of the bell curve it’s Debian, whatever. Perfect is the enemy of good and being picky is exhausting.&lt;&#x2F;p&gt;
&lt;p&gt;I mentioned curiosity is a big factor in wanting to try things too. And frankly, after a while holding this preference for non-systemd operating systems and using systems without it, I might as well seize the opportunity to learn more about systemd as well. At my current internship, systemd is what all the distros we have in production are using. In future work, that is very likely to be the case too. So there is nothing to lose.&lt;&#x2F;p&gt;
&lt;p&gt;I really wish, though, that package managers were more capable of differentiating between security and feature upgrades. If they were, we could run a rolling distro in “Debian mode” at will. This thought may not sit well with some rolling distributions, say, in Arch Linux you have the notion that &lt;a href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;title&#x2F;System_maintenance#Partial_upgrades_are_unsupported&quot;&gt;“Partial upgrades are unsupported”&lt;&#x2F;a&gt;. There may be the expectation that the whole repository at any given time is the end state for all machines subscribed to it, but if dependencies could also be at the version and not only package level, that could also be solved, though I won’t undersell the consequences and added complexity in such a change.&lt;&#x2F;p&gt;
&lt;p&gt;Just like mail clients, all operating systems suck. Some just suck less for some specific use case.&lt;&#x2F;p&gt;
&lt;hr&gt;&lt;ol class=&quot;footnotes-list&quot;&gt;
&lt;li id=&quot;fn-1&quot;&gt;
&lt;p&gt;Also, if you find out how to reclaim that identity, do share. Asking for a friend. &lt;a href=&quot;#fr-1-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li id=&quot;fn-2&quot;&gt;
&lt;p&gt;It’s no surprise a distribution’s main init system has better support, as it sure is a lot of work for packagers to support and test multiple init systems. &lt;a href=&quot;#fr-2-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>On self-hosting being a patch</title>
        <published>2024-11-23T15:00:00-03:00</published>
        <updated>2024-11-23T15:00:00-03:00</updated>
        
        <author>
          <name>
            
              Juno Takano
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.jutty.dev/posts/self-hosting-patch/"/>
        <id>https://blog.jutty.dev/posts/self-hosting-patch/</id>
        
        <content type="html" xml:base="https://blog.jutty.dev/posts/self-hosting-patch/">&lt;p&gt;Recently the blog post &lt;a href=&quot;https:&#x2F;&#x2F;matduggan.com&#x2F;self-hosting-isnt-a-solution-its-a-patch&#x2F;&quot;&gt;Self-Hosting Isn’t a Solution; It’s A Patch&lt;&#x2F;a&gt; landed in my reading list via &lt;a href=&quot;https:&#x2F;&#x2F;lobste.rs&#x2F;s&#x2F;eisgx0&#x2F;self_hosting_isn_t_solution_it_s_patch&quot;&gt;Lobsters&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;It was an interesting read and I recommend anyone interested in tech decentralization and regulation to check it out, but two thoughts came to mind:&lt;&#x2F;p&gt;
&lt;p&gt;First, perhaps most of the blame is in the concept of “self-hosting” itself. It is too narrow for what it really represents. Something described as self-hosted can most of the times not only be individually-hosted but community-hosted. You can host it yourself and bear all the associated burdens alone, yes, but the way the article portrays this as the only possibility is a bit of a straw man. “Self-hosting” also implies open-source software that you could run for a whole community, a town, a country, a continent, or the planet if you can.&lt;&#x2F;p&gt;
&lt;p&gt;It implies that not only the software’s source is available and its license is a free software license, but that it is designed in a way that you should be able to run it to its full capacity yourself. How large that scale will be, how many people are running it, and how it gets funded and managed can take multiple forms and, if regulation is to be the answer, that is one possible structure (government) that can fund such projects, though it doesn’t have to be.&lt;&#x2F;p&gt;
&lt;p&gt;The second thought is that regulation and self-hosting are not opposed to each other. In fact, they are not at odds at all. So to point to regulation as the better solution and self-hosting as a limited one may pose the illusion that we have to choose – we miss that they actually are far more effective together. That is, unless your goal is just to reform the big-technology-corporation-owns-everything model. For that, regulation alone is much better, with all the long-winded bureaucracy, ceremony and always-open possibility of a reversal.&lt;&#x2F;p&gt;
&lt;p&gt;The regulations in Europe during the past years have surprised in how strong they are in favoring interoperability and some decentralization. Also, more then a few stories about European tech funds putting money into open source projects have crossed the same channels that landed this article among my browser tabs.&lt;&#x2F;p&gt;
&lt;p&gt;Neither of them is, alone, the solution, as you could also see regulation as a lubricant, a way of legitimizing the predatory practices of everyday capitalism by putting it into a nice, confined setting and stamping it with the seal of compliance, however you are able to ascertain it, while still allowing most of the damage to happen, be it a loophole, a cover-up or simply something that didn’t happen to bother the regulators to begin with.&lt;&#x2F;p&gt;
&lt;p&gt;In this sense, the act of building completely independent platforms, able to operate using their own software and infrastructure, comes from a whole different angle and a much more incisive one at that. It works not simply on the level of “how can we make these companies play nice” but of “how can we not depend on these companies to begin with”. This is not solely a concern about reliability, as seen when the article notices how small and underfunded decentralized projects can simply vanish due to lack of funds or inability to stand up to legal threats, it is a concern about privacy and autonomy too.&lt;&#x2F;p&gt;
&lt;p&gt;While it is always sad to see an open-source project or community close down, this is also a community that was built on foundations of interoperability and that values the capacity of taking your data out and moving it elsewhere when needed. I do think platforms like the Fediverse could improve in this regard, as, for instance you can’t always move your content with you as easily as more portable data such as follows and followers, but that is one of many issues we can work on and move past.&lt;&#x2F;p&gt;
&lt;p&gt;Conversely, when a company goes out of business or sells out, a completely different situation is presented to you. Your data may simply be “transitioned” to the infrastructure of another company and the way you interface with it may completely change. Or it may have been built on fully proprietary software and data formats that will essentially become useless a few years after the company shuts down. Or it may simply vanish and you never had a way to get your data to begin with.&lt;&#x2F;p&gt;
&lt;p&gt;Our systems do not need to be high-maintenance, intensive on resources and energy needs. They don’t have to answer every request with availability and latency that measures up to however many nines or zeroes are the current industry standard. They have to attend to the needs of those who are using them, which can be much less demanding. We can run both infrastructure and software at more human scales and learn other ways of growing or shrinking, and we can also scale to high performance and availability too. This is what the concept of a network enables after all, but it is often used to centralize and create dependency instead.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>[Meta] Notice on RSS feeds</title>
        <published>2024-09-01T00:00:00+00:00</published>
        <updated>2024-09-01T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Juno Takano
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.jutty.dev/posts/notice-on-rss-feeds/"/>
        <id>https://blog.jutty.dev/posts/notice-on-rss-feeds/</id>
        
        <content type="html" xml:base="https://blog.jutty.dev/posts/notice-on-rss-feeds/">&lt;p&gt;For those subscribing to this blog’s RSS feeds:&lt;&#x2F;p&gt;
&lt;p&gt;First, if you are getting links but would rather only be notified about posts, you are probably subscribed to an “all content” feed. You can find all feed options in the &lt;a href=&quot;&#x2F;feeds&quot;&gt;feeds&lt;&#x2F;a&gt; page.&lt;&#x2F;p&gt;
&lt;p&gt;Second, as per a &lt;a href=&quot;https:&#x2F;&#x2F;mastodon.bsd.cafe&#x2F;@jutty&#x2F;113013450769036273&quot;&gt;recent thread&lt;&#x2F;a&gt; I started on Mastodon, I am planning on keeping only the Atom feeds in the future.&lt;&#x2F;p&gt;
&lt;p&gt;Currently, all feeds are served in two formats, for example:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;blog.jutty.dev&#x2F;posts&#x2F;rss.xml&quot;&gt;https:&#x2F;&#x2F;blog.jutty.dev&#x2F;posts&#x2F;rss.xml&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;blog.jutty.dev&#x2F;posts&#x2F;atom.xml&quot;&gt;https:&#x2F;&#x2F;blog.jutty.dev&#x2F;posts&#x2F;atom.xml&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;On a much later date, I plan on retiring the &lt;code&gt;rss.xml&lt;&#x2F;code&gt; feeds, so if that’s what you are subscribed to, consider changing to the equivalent &lt;code&gt;atom.xml&lt;&#x2F;code&gt; feed sometime in the future.&lt;&#x2F;p&gt;
&lt;p&gt;Both formats will keep working for now. The only immediate change will be that only the &lt;code&gt;atom.xml&lt;&#x2F;code&gt; ones will be advertised on the &lt;a href=&quot;&#x2F;feeds&quot;&gt;feeds&lt;&#x2F;a&gt; page and on HTML meta tags.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Giving up simplicity</title>
        <published>2024-08-10T00:00:00+00:00</published>
        <updated>2024-08-10T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Juno Takano
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.jutty.dev/posts/unwinding/"/>
        <id>https://blog.jutty.dev/posts/unwinding/</id>
        
        <content type="html" xml:base="https://blog.jutty.dev/posts/unwinding/">&lt;p&gt;&lt;em&gt;or&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;unwinding&quot;&gt;Unwinding&lt;&#x2F;h1&gt;
&lt;p&gt;Due to a worker strike, the university semester ended late this year. That meant everything had to be compressed into little more than a month in order to wrap up what would have taken four. Now that we’re almost through it, my mind wanders to writing. It is almost always what springs from the void in me, what has been winded up loosens and the scattered meaning starts to recollect into the drain of language and swirl through the piping of my nervous system.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;em&gt;Wind&lt;&#x2F;em&gt; is air that has been somehow compressed. If there was no pressure pushing it anywhere, it would be just expansive air, floating in peace with the atmosphere.&lt;&#x2F;p&gt;
&lt;p&gt;If you’d entertain this thought further, consider a work of visual art. It can be more figurative, clearly depicting shapes that mean something, and therefore able to convey an array of ideas to whatever extent of detail the artist wants. Conversely, it can be more abstract, where ideas will be a lot more sparse, possibly to the point where nothing at all is conveyed other than the appearance, whatever aesthetic is employed being the whole message in itself. Very little is packed into the work, just like the air you can’t even feel weighing on you.&lt;&#x2F;p&gt;
&lt;p&gt;In computing, and more specifically in the realm of programming – a craft presently overshadowed by the semantically starved jargon of whatever the department responsible for inflating public perception numbers is called these days – simplicity is often emphasized. Code is supposed to be clear, expressive and clean. A software application is supposed to have as few dependencies as possible, and strive to keep it simple, or risk stupidity.&lt;&#x2F;p&gt;
&lt;p&gt;While that is a lofty goal, and while clear, expressive and clean code is a refreshing and tranquilizing sight, more often than not software just can’t be simple.&lt;&#x2F;p&gt;
&lt;p&gt;Not having dependencies means implementing more and more yourself. There are corner cases to cover, tests to run, different architectures and operating systems to support. Even the simplest of software ideas, say, a calculator, a program that prints back a sentence in reverse, that displays a picture you give it, whatever you conceive as the simplest use case, is hardly ever implemented with simplicity in the naïve sense of something that is, quite literally, simplistic.&lt;&#x2F;p&gt;
&lt;p&gt;More often than not, simplicity is actually abstraction. The breaking apart of complexity behind a simpler facade. More so a way to manage complexity by conveying it simply than to enact simplicity in its actual sense. Each step in abstraction is actually a layer deeper into intricacy. And yet, it makes things immensely easier to manage and understand.&lt;&#x2F;p&gt;
&lt;p&gt;For some reason, I have always felt very drawn to abstract works. Staring into them, there is no expectation to understand, get, or argue about. Interestingly, to me that also means they couldn’t be any more clear. It does not mean a specific, intelligible message is conveyed from the artist to me, rather, it means whatever impression is caused on the viewer was never intended to reach too deep anyways. It never intended to carry that much through its medium.&lt;&#x2F;p&gt;
&lt;p&gt;Sometimes, too much detail, no matter how specific, can draw an idea so far out that it becomes harder and harder to grasp. In contrast to that, a brisk exposition can get the message across like lightning.&lt;&#x2F;p&gt;
&lt;p&gt;So detail does not always convey meaning, although it can convey a specific meaning to someone who will bear with you as you build the context for it. Otherwise, you could convey your message just as effectively in an abstract manner if your receiver already has that context from the outset.&lt;&#x2F;p&gt;
&lt;p&gt;In computing, such possibility is simply absent from us. No context whatsoever can be assumed, and if it is present, that is because some other structure is providing it.&lt;&#x2F;p&gt;
&lt;p&gt;Complexity produces confusion, confusion produces frustration, and frustration can lead to either surrender or a rebound. So the interesting thing about this pressurizing of ideas is that it springs back into action a process that may reverse it or deflect into something else entirely.&lt;&#x2F;p&gt;
&lt;p&gt;Instead of surrendering to the frustration of complexity, sometimes I actually take the time to recollect myself and analyze it into understanding. This feeling of winning over something that had me on my knees and ready to give up is a very gratifying one. It convinces me I can squeeze grit from despair if I bet on it and willingly risk desperation in order to see it through.&lt;&#x2F;p&gt;
&lt;p&gt;Yet, after chasing the deadline of effort all of it relaxes back into this state. In it, the only way to rest is to embrace complexity as the whole, and simplicity as one of its manifestations. It is so cold right now in the south, but in the north it is not. Four days and nine hours ago it was the peak of the winter. I’m wrapped in blankets and the room is dark like the depths of a submarine cave, LED lights here and there like fluorescent eyes blinking in silence.&lt;&#x2F;p&gt;
&lt;p&gt;The professor had us build games and then present them to the whole faculty. Among the outputs, one algorithm I produced stuck with me for what I deem is simplicity. It is responsible for causing an enemy to chase the player by finding the difference between their positions and lowering it:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;Python&quot; class=&quot;language-Python z-code&quot;&gt;&lt;code class=&quot;language-Python&quot; data-lang=&quot;Python&quot;&gt;&lt;span class=&quot;z-source z-python&quot;&gt;&lt;span class=&quot;z-meta z-qualified-name z-python&quot;&gt;&lt;span class=&quot;z-meta z-generic-name z-python&quot;&gt;func&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; &lt;span class=&quot;z-meta z-function-call z-python&quot;&gt;&lt;span class=&quot;z-meta z-qualified-name z-python&quot;&gt;&lt;span class=&quot;z-variable z-function z-python&quot;&gt;&lt;span class=&quot;z-meta z-generic-name z-python&quot;&gt;move_to&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-python&quot;&gt;&lt;span class=&quot;z-punctuation z-section z-arguments z-begin z-python&quot;&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-qualified-name z-python&quot;&gt;&lt;span class=&quot;z-meta z-generic-name z-python&quot;&gt;x&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-arguments z-python&quot;&gt;,&lt;&#x2F;span&gt; &lt;span class=&quot;z-meta z-qualified-name z-python&quot;&gt;&lt;span class=&quot;z-meta z-generic-name z-python&quot;&gt;y&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-section z-arguments z-end z-python&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-separator z-annotation z-variable z-python&quot;&gt;:&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-python&quot;&gt;	&lt;span class=&quot;z-meta z-qualified-name z-python&quot;&gt;&lt;span class=&quot;z-meta z-generic-name z-python&quot;&gt;var&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; &lt;span class=&quot;z-meta z-qualified-name z-python&quot;&gt;&lt;span class=&quot;z-meta z-generic-name z-python&quot;&gt;x_difference&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; &lt;span class=&quot;z-keyword z-operator z-assignment z-python&quot;&gt;=&lt;&#x2F;span&gt; &lt;span class=&quot;z-meta z-qualified-name z-python&quot;&gt;&lt;span class=&quot;z-variable z-language z-python&quot;&gt;self&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-accessor z-dot z-python&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-generic-name z-python&quot;&gt;global_position&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-accessor z-dot z-python&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-generic-name z-python&quot;&gt;x&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; &lt;span class=&quot;z-keyword z-operator z-arithmetic z-python&quot;&gt;-&lt;&#x2F;span&gt; &lt;span class=&quot;z-meta z-qualified-name z-python&quot;&gt;&lt;span class=&quot;z-meta z-generic-name z-python&quot;&gt;x&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-python&quot;&gt;	&lt;span class=&quot;z-meta z-qualified-name z-python&quot;&gt;&lt;span class=&quot;z-meta z-generic-name z-python&quot;&gt;var&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; &lt;span class=&quot;z-meta z-qualified-name z-python&quot;&gt;&lt;span class=&quot;z-meta z-generic-name z-python&quot;&gt;y_difference&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; &lt;span class=&quot;z-keyword z-operator z-assignment z-python&quot;&gt;=&lt;&#x2F;span&gt; &lt;span class=&quot;z-meta z-qualified-name z-python&quot;&gt;&lt;span class=&quot;z-variable z-language z-python&quot;&gt;self&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-accessor z-dot z-python&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-generic-name z-python&quot;&gt;global_position&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-accessor z-dot z-python&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-generic-name z-python&quot;&gt;y&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; &lt;span class=&quot;z-keyword z-operator z-arithmetic z-python&quot;&gt;-&lt;&#x2F;span&gt; &lt;span class=&quot;z-meta z-qualified-name z-python&quot;&gt;&lt;span class=&quot;z-meta z-generic-name z-python&quot;&gt;y&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-python&quot;&gt;	
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-python&quot;&gt;	&lt;span class=&quot;z-meta z-statement z-conditional z-if z-python&quot;&gt;&lt;span class=&quot;z-keyword z-control z-conditional z-if z-python&quot;&gt;if&lt;&#x2F;span&gt; &lt;span class=&quot;z-meta z-function-call z-python&quot;&gt;&lt;span class=&quot;z-meta z-qualified-name z-python&quot;&gt;&lt;span class=&quot;z-variable z-function z-python&quot;&gt;&lt;span class=&quot;z-support z-function z-builtin z-python&quot;&gt;abs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-python&quot;&gt;&lt;span class=&quot;z-punctuation z-section z-arguments z-begin z-python&quot;&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-qualified-name z-python&quot;&gt;&lt;span class=&quot;z-meta z-generic-name z-python&quot;&gt;x_difference&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-section z-arguments z-end z-python&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; &lt;span class=&quot;z-keyword z-operator z-comparison z-python&quot;&gt;&amp;gt;&lt;&#x2F;span&gt; &lt;span class=&quot;z-meta z-qualified-name z-python&quot;&gt;&lt;span class=&quot;z-meta z-generic-name z-python&quot;&gt;chase_speed&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-section z-block z-conditional z-if z-python&quot;&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-python&quot;&gt;		&lt;span class=&quot;z-meta z-statement z-conditional z-if z-python&quot;&gt;&lt;span class=&quot;z-keyword z-control z-conditional z-if z-python&quot;&gt;if&lt;&#x2F;span&gt; &lt;span class=&quot;z-meta z-qualified-name z-python&quot;&gt;&lt;span class=&quot;z-meta z-generic-name z-python&quot;&gt;x_difference&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; &lt;span class=&quot;z-keyword z-operator z-comparison z-python&quot;&gt;&amp;gt;&lt;&#x2F;span&gt; &lt;span class=&quot;z-constant z-numeric z-integer z-decimal z-python&quot;&gt;0&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-section z-block z-conditional z-if z-python&quot;&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-python&quot;&gt;			&lt;span class=&quot;z-meta z-qualified-name z-python&quot;&gt;&lt;span class=&quot;z-variable z-language z-python&quot;&gt;self&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-accessor z-dot z-python&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-generic-name z-python&quot;&gt;global_position&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-accessor z-dot z-python&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-generic-name z-python&quot;&gt;x&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; &lt;span class=&quot;z-keyword z-operator z-assignment z-augmented z-python&quot;&gt;-=&lt;&#x2F;span&gt; &lt;span class=&quot;z-meta z-qualified-name z-python&quot;&gt;&lt;span class=&quot;z-meta z-generic-name z-python&quot;&gt;chase_speed&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-python&quot;&gt;		&lt;span class=&quot;z-meta z-statement z-conditional z-else z-python&quot;&gt;&lt;span class=&quot;z-keyword z-control z-conditional z-else z-python&quot;&gt;else&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-section z-block z-conditional z-else z-python&quot;&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-python&quot;&gt;			&lt;span class=&quot;z-meta z-qualified-name z-python&quot;&gt;&lt;span class=&quot;z-variable z-language z-python&quot;&gt;self&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-accessor z-dot z-python&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-generic-name z-python&quot;&gt;global_position&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-accessor z-dot z-python&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-generic-name z-python&quot;&gt;x&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; &lt;span class=&quot;z-keyword z-operator z-assignment z-augmented z-python&quot;&gt;+=&lt;&#x2F;span&gt; &lt;span class=&quot;z-meta z-qualified-name z-python&quot;&gt;&lt;span class=&quot;z-meta z-generic-name z-python&quot;&gt;chase_speed&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-python&quot;&gt;	&lt;span class=&quot;z-meta z-statement z-conditional z-else z-python&quot;&gt;&lt;span class=&quot;z-keyword z-control z-conditional z-else z-python&quot;&gt;else&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-section z-block z-conditional z-else z-python&quot;&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-python&quot;&gt;		&lt;span class=&quot;z-meta z-qualified-name z-python&quot;&gt;&lt;span class=&quot;z-variable z-language z-python&quot;&gt;self&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-accessor z-dot z-python&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-generic-name z-python&quot;&gt;global_position&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-accessor z-dot z-python&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-generic-name z-python&quot;&gt;x&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; &lt;span class=&quot;z-keyword z-operator z-assignment z-augmented z-python&quot;&gt;+=&lt;&#x2F;span&gt; &lt;span class=&quot;z-meta z-qualified-name z-python&quot;&gt;&lt;span class=&quot;z-meta z-generic-name z-python&quot;&gt;x_difference&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-python&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-python&quot;&gt;	&lt;span class=&quot;z-meta z-statement z-conditional z-if z-python&quot;&gt;&lt;span class=&quot;z-keyword z-control z-conditional z-if z-python&quot;&gt;if&lt;&#x2F;span&gt; &lt;span class=&quot;z-meta z-function-call z-python&quot;&gt;&lt;span class=&quot;z-meta z-qualified-name z-python&quot;&gt;&lt;span class=&quot;z-variable z-function z-python&quot;&gt;&lt;span class=&quot;z-support z-function z-builtin z-python&quot;&gt;abs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-python&quot;&gt;&lt;span class=&quot;z-punctuation z-section z-arguments z-begin z-python&quot;&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-qualified-name z-python&quot;&gt;&lt;span class=&quot;z-meta z-generic-name z-python&quot;&gt;y_difference&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-section z-arguments z-end z-python&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; &lt;span class=&quot;z-keyword z-operator z-comparison z-python&quot;&gt;&amp;gt;&lt;&#x2F;span&gt; &lt;span class=&quot;z-meta z-qualified-name z-python&quot;&gt;&lt;span class=&quot;z-meta z-generic-name z-python&quot;&gt;chase_speed&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-section z-block z-conditional z-if z-python&quot;&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-python&quot;&gt;		&lt;span class=&quot;z-meta z-statement z-conditional z-if z-python&quot;&gt;&lt;span class=&quot;z-keyword z-control z-conditional z-if z-python&quot;&gt;if&lt;&#x2F;span&gt; &lt;span class=&quot;z-meta z-qualified-name z-python&quot;&gt;&lt;span class=&quot;z-meta z-generic-name z-python&quot;&gt;y_difference&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; &lt;span class=&quot;z-keyword z-operator z-comparison z-python&quot;&gt;&amp;gt;&lt;&#x2F;span&gt; &lt;span class=&quot;z-constant z-numeric z-integer z-decimal z-python&quot;&gt;0&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-section z-block z-conditional z-if z-python&quot;&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-python&quot;&gt;			&lt;span class=&quot;z-meta z-qualified-name z-python&quot;&gt;&lt;span class=&quot;z-variable z-language z-python&quot;&gt;self&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-accessor z-dot z-python&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-generic-name z-python&quot;&gt;global_position&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-accessor z-dot z-python&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-generic-name z-python&quot;&gt;y&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; &lt;span class=&quot;z-keyword z-operator z-assignment z-augmented z-python&quot;&gt;-=&lt;&#x2F;span&gt; &lt;span class=&quot;z-meta z-qualified-name z-python&quot;&gt;&lt;span class=&quot;z-meta z-generic-name z-python&quot;&gt;chase_speed&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-python&quot;&gt;		&lt;span class=&quot;z-meta z-statement z-conditional z-else z-python&quot;&gt;&lt;span class=&quot;z-keyword z-control z-conditional z-else z-python&quot;&gt;else&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-section z-block z-conditional z-else z-python&quot;&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-python&quot;&gt;			&lt;span class=&quot;z-meta z-qualified-name z-python&quot;&gt;&lt;span class=&quot;z-variable z-language z-python&quot;&gt;self&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-accessor z-dot z-python&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-generic-name z-python&quot;&gt;global_position&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-accessor z-dot z-python&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-generic-name z-python&quot;&gt;y&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; &lt;span class=&quot;z-keyword z-operator z-assignment z-augmented z-python&quot;&gt;+=&lt;&#x2F;span&gt; &lt;span class=&quot;z-meta z-qualified-name z-python&quot;&gt;&lt;span class=&quot;z-meta z-generic-name z-python&quot;&gt;chase_speed&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-python&quot;&gt;	&lt;span class=&quot;z-meta z-statement z-conditional z-else z-python&quot;&gt;&lt;span class=&quot;z-keyword z-control z-conditional z-else z-python&quot;&gt;else&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-section z-block z-conditional z-else z-python&quot;&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-python&quot;&gt;		&lt;span class=&quot;z-meta z-qualified-name z-python&quot;&gt;&lt;span class=&quot;z-variable z-language z-python&quot;&gt;self&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-accessor z-dot z-python&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-generic-name z-python&quot;&gt;global_position&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-accessor z-dot z-python&quot;&gt;.&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-generic-name z-python&quot;&gt;y&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; &lt;span class=&quot;z-keyword z-operator z-assignment z-augmented z-python&quot;&gt;+=&lt;&#x2F;span&gt; &lt;span class=&quot;z-meta z-qualified-name z-python&quot;&gt;&lt;span class=&quot;z-meta z-generic-name z-python&quot;&gt;y_difference&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;It could be further abstracted. The logic is repetitive. The math could be condensed. But should it? Would that make it harder or easier to understand? And to whom? There is no single answer, and yet I would really appreciate knowing.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Introducing tori</title>
        <published>2024-06-30T00:00:00+00:00</published>
        <updated>2024-06-30T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Juno Takano
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.jutty.dev/posts/introducing-tori/"/>
        <id>https://blog.jutty.dev/posts/introducing-tori/</id>
        
        <content type="html" xml:base="https://blog.jutty.dev/posts/introducing-tori/">&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https:&#x2F;&#x2F;tori.jutty.dev&#x2F;&quot;&gt;tori&lt;&#x2F;a&gt;&lt;&#x2F;strong&gt; is a tool to track your personal systems’ configurations and replicate them.&lt;&#x2F;p&gt;
&lt;p&gt;For the past 5 months, I’ve been simultaneously using and writing it to manage my main machine’s configuration. By “manage the configuration” what I mean is keeping track of installed packages, configuration files, symlinks, and other settings that can be queried and set through command line interfaces.&lt;&#x2F;p&gt;
&lt;p&gt;After installing a given system, I wanted to get it to the same configuration state I was used to, or to a certain configuration specific to its purpose. Just copying backups would certainly be a very manual task, namely because:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Not all settings live in &lt;code&gt;&#x2F;etc&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Some settings must be set using a specific CLI utility&lt;&#x2F;li&gt;
&lt;li&gt;Backups usually carry an overwhelming amount of redundant default configuration you never even touched&lt;&#x2F;li&gt;
&lt;li&gt;It does not track what is changing as you are still using the system&lt;&#x2F;li&gt;
&lt;li&gt;I actually wanted to &lt;em&gt;know&lt;&#x2F;em&gt; what I was tracking&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Configuring a system can become a very vague process as you start to lose track of where the changes are being made and what is the specific configuration needed for something to work.&lt;&#x2F;p&gt;
&lt;p&gt;Every time you change some configuration file, every time you create a symlink somewhere, that’s all having effects on the system that you may expect to be there in the future, but you may not remember how to accomplish that. This drift between what you have and what you are able to replicate only grows as you keep using your system.&lt;&#x2F;p&gt;
&lt;p&gt;To get a better idea, see the code snippet below. It’s from the main file that I use to manage all function calls:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;  &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;xbps_get_many&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; packages&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;  &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;check_service&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; dbus&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;  &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;check_group&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; audio&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;  &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;check_group&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; video&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;  &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;copy&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; dhcpcd.conf &#x2F;etc&#x2F;dhcpcd.conf&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;  &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;place&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; kernel-cmd-line.conf &#x2F;etc&#x2F;dracut.conf.d&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;  &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;check_link&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; &#x2F;etc&#x2F;localtime &#x2F;usr&#x2F;share&#x2F;zoneinfo&#x2F;America&#x2F;Sao_Paulo&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;  &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;get_nix&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; tailspin tspin&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;  &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;get_cargo&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; taplo-cli taplo&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; --&lt;&#x2F;span&gt;locked&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;  &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;get_bun&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; bash-language-server&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;  &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;get_bin&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; &lt;span class=&quot;z-string z-quoted z-single z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;https:&#x2F;&#x2F;raw.githubusercontent.com&#x2F;hackerb9&#x2F;lsix&#x2F;master&#x2F;lsix&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; lsix&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;  &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;check_gsettings&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; gtk-theme &lt;span class=&quot;z-string z-quoted z-single z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;Plata-Noir&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;  &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;check_gsettings&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; font-name &lt;span class=&quot;z-string z-quoted z-single z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;Mononoki Nerd Font Regular&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;What is happening here:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;A file named &lt;code&gt;packages&lt;&#x2F;code&gt; containing package names is parsed and all packages are queried and installed by the &lt;code&gt;xbps&lt;&#x2F;code&gt; package manager, if not already installed&lt;&#x2F;li&gt;
&lt;li&gt;Service &lt;code&gt;dbus&lt;&#x2F;code&gt; is enabled if not already enabled&lt;&#x2F;li&gt;
&lt;li&gt;The user is added to groups &lt;code&gt;audio&lt;&#x2F;code&gt; and &lt;code&gt;video&lt;&#x2F;code&gt;, unless already in them&lt;&#x2F;li&gt;
&lt;li&gt;File &lt;code&gt;dhcpcd.conf&lt;&#x2F;code&gt; from the configuration directory’s &lt;code&gt;base&lt;&#x2F;code&gt; directory is checked against the one in the passed path and overwrites it if the user chooses to do so&lt;&#x2F;li&gt;
&lt;li&gt;File &lt;code&gt;kernel-cmd-line.conf&lt;&#x2F;code&gt; from the configuration directory’s &lt;code&gt;base&lt;&#x2F;code&gt; directory is copied into the passed path. If the file already exists or differs, tori will present an error&lt;&#x2F;li&gt;
&lt;li&gt;A symlink is checked to be on &lt;code&gt;&#x2F;etc&#x2F;localtime&lt;&#x2F;code&gt; pointing to the passed path. If it doesn’t, it is created or fixed&lt;&#x2F;li&gt;
&lt;li&gt;If not installed, a few packages are installed using different package managers: &lt;code&gt;tailspin&lt;&#x2F;code&gt;, &lt;code&gt;taplo&lt;&#x2F;code&gt; and &lt;code&gt;bash-language-server&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;If absent, an executable for &lt;code&gt;lsix&lt;&#x2F;code&gt; is downloaded from a URL and placed at &lt;code&gt;~&#x2F;.local&#x2F;bin&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Some &lt;code&gt;gsettings&lt;&#x2F;code&gt; values are read and set if they differ: &lt;code&gt;gtk-theme&lt;&#x2F;code&gt; and &lt;code&gt;font-name&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;Notice how everything is conditioned to the system not already presenting that state? tori aims to be idempotent. Running it twice should do nothing the second time it runs so you can run it multiple times while making changes without any doubled effects.&lt;&#x2F;p&gt;
&lt;p&gt;I mentioned a &lt;code&gt;base&lt;&#x2F;code&gt; directory. This is what a sample tori directory would look like in its present state:&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;.
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;├── base
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;│   ├── dhcpcd.conf
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;│   ├── kernel-cmd-line.conf
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;│   ├── packages
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;│   └── vars.sh
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;├── .bkp
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;│   ├── canonical
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;│   │   ├── etc
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;│   │   └── opt
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;│   └── ephemeral
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;│       └── etc
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;├── src
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;│   ├── checks.sh
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;│   ├── copy.sh
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;│   └── get.sh
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;└── strap
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;What you are seeing in this sample of the directory are the following files and directories:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;base&lt;&#x2F;code&gt;: Where you place the configuration files that functions like &lt;code&gt;copy&lt;&#x2F;code&gt; and &lt;code&gt;place&lt;&#x2F;code&gt; will look for and copy into the desired locations&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;.bkp&#x2F;canonical&lt;&#x2F;code&gt;: Where tori will look for initial backups and create them if none exists&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;.bkp&#x2F;ephemeral&lt;&#x2F;code&gt;: Where tori will place timestamped backups every time a file is modified or overwritten&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;src&lt;&#x2F;code&gt;: Where the source files live, mostly containing function definitions&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;strap&lt;&#x2F;code&gt;: The main file used to call the functions&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Because I developed tori for my own purposes initially, I didn’t really care to separate the actual source files from the context-sensitive data. While a mistake from a higher level, it allowed me to just keep developing the whole system configuration and the code that tracked it from a single, version-controlled location, amounting to very little complexity. I can’t deny to have enjoyed it so far, but going forward that is going to change.&lt;&#x2F;p&gt;
&lt;p&gt;Currently, tori is able to install several package managers and their packages, including xbps, apt, nix, opam, stack, cargo, go, sdkmanager, npm, flatpak and pipx.&lt;&#x2F;p&gt;
&lt;p&gt;It can also perform several other tasks:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;setup programming runtimes for OCaml, Scala (via Coursier), Go, JavaScript (node and bun), Rust (via rustup)&lt;&#x2F;li&gt;
&lt;li&gt;generate GPG certificates&lt;&#x2F;li&gt;
&lt;li&gt;query and set options with &lt;code&gt;update-alternatives&lt;&#x2F;code&gt; and &lt;code&gt;gsettings&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;change the user shell&lt;&#x2F;li&gt;
&lt;li&gt;check and enable services (systemd and runit)&lt;&#x2F;li&gt;
&lt;li&gt;download pre-built binaries from tarballs and (g)zip files, unpacking and making them executable&lt;&#x2F;li&gt;
&lt;li&gt;get files through the network using rsync&lt;&#x2F;li&gt;
&lt;li&gt;several other things likely not worth mentioning&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;The application slowly grew to accommodate many of my needs, but I also made it very hard to share with the world in the process, since I never really meant to go public with it.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;portability-issues&quot;&gt;Portability issues&lt;&#x2F;h2&gt;
&lt;p&gt;Despite it being very useful to me in its current state and still being something I actively use every day, a lot of it is hard-coded for my very personal use. It was not written with portability in mind and therefore requires a lot of source-code editing to use in a different system.&lt;&#x2F;p&gt;
&lt;p&gt;For instance, when I switched from Debian to Void Linux, most of it broke. I certainly would not expect the package list to be compatible between them, but I realized at that point how tightly it was coupled to Debian.&lt;&#x2F;p&gt;
&lt;p&gt;When I started delving deeper into FreeBSD and setting up the system, I kept reaching out to something like tori. But it wasn’t there, and it wouldn’t work even if it were.&lt;&#x2F;p&gt;
&lt;p&gt;Something that certainly influenced my desire to write tori was my experience using NixOS, which was full of mixed feelings, but undeniably had good feelings that stuck.&lt;&#x2F;p&gt;
&lt;p&gt;I really liked being able to manage the system configuration and packages from a single file. But, at the same time, I felt it was overkill. It was limiting because most of the time you were &lt;strong&gt;forced&lt;&#x2F;strong&gt; to configure things through its interfaces. It was basically incompatible with what every other Unix system expects, and therefore what people who write software for these systems also expect.&lt;&#x2F;p&gt;
&lt;p&gt;I appreciated bringing the system configuration to a centralized file, but I certainly did not want to manage all my &lt;code&gt;~&#x2F;.config&lt;&#x2F;code&gt; configuration files from that same place. After writing tori, I can choose what to place under its tracking and what not to. Third-party software still works as both me and its creators expect it to, instead of my system breaking things and needing them to work the way &lt;em&gt;it&lt;&#x2F;em&gt; expects.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;glad-to-reinvent-the-wheel&quot;&gt;Glad to reinvent the wheel&lt;&#x2F;h2&gt;
&lt;p&gt;While I understand there are very mature and powerful tools to manage a system’s state and reproduce it, I am aiming here for a much simpler use case. I have no intention to see it used in enterprise or distributed systems. It is all about managing how your personal computing is set up and having a backup of how you did it.&lt;&#x2F;p&gt;
&lt;p&gt;What I need is not a tool that can orchestrate a fleet of containers running a given configuration. What I need is a tool that can run in a bare system that just got installed and get it to a state that feels useful to me. I do not want it to run instructions over a range of IPs, I just want to be able to check at any time if the system state has diverged from the configuration I am using to track it. I wanted a tool that would help me develop a different habit when I need to make system-level changes.&lt;&#x2F;p&gt;
&lt;p&gt;And finally, I suppose I just really wanted to build this. I really enjoy the process of configuring operating systems and learning how they work and differ. And I really wanted to learn more about portable, POSIX-compatible shell scripting.&lt;&#x2F;p&gt;
&lt;p&gt;So I decided to rewrite it with portability in mind. I am doing this rewrite in FreeBSD, to put the portability to the test. Once some basic functionality is done, the next step will be bringing it to Void Linux, Debian and NetBSD.&lt;&#x2F;p&gt;
&lt;p&gt;tori is a bird that has just hatched, so everything is still very, very crude. At this stage, the docs often show intentions rather than implemented functionality. Still, because it is something I’ve come to depend on, it has this rewarding sense of usefulness behind it.&lt;&#x2F;p&gt;
&lt;p&gt;If it sounds interesting to you, take a look. You can follow development at the main &lt;a href=&quot;https:&#x2F;&#x2F;brew.bsd.cafe&#x2F;tori&#x2F;tori&quot;&gt;Git repository&lt;&#x2F;a&gt; in BSD.Cafe’s Git forge or through its mirrors on &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;tori-nest&#x2F;tori&quot;&gt;GitHub&lt;&#x2F;a&gt; and &lt;a href=&quot;https:&#x2F;&#x2F;codeberg.org&#x2F;tori&#x2F;tori&quot;&gt;Codeberg&lt;&#x2F;a&gt;. Going forward, I will also probably be talking a lot about it on my &lt;a href=&quot;https:&#x2F;&#x2F;mastodon.bsd.cafe&#x2F;@jutty&quot;&gt;Mastodon profile&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Void on ZFS</title>
        <published>2024-06-09T00:00:00+00:00</published>
        <updated>2024-06-09T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Juno Takano
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.jutty.dev/posts/void-on-zfs/"/>
        <id>https://blog.jutty.dev/posts/void-on-zfs/</id>
        
        <content type="html" xml:base="https://blog.jutty.dev/posts/void-on-zfs/">&lt;p&gt;&lt;img src=&quot;&#x2F;assets&#x2F;img&#x2F;posts&#x2F;void-on-zfs&#x2F;desk.jpg&quot; alt=&quot;An L-shaped desk with two laptops, an external monitor, a router and a third headless computer in a tower case with several power cables connected to a power strip on top of it. Next to the power strip are two cellphones, a long red box, and a charging case for Bluetooth headphones with a red LED on. The tower case has three stickers on it: one with the machine specifications, one the FreeBSD logo, and one reading “platform feodalism (sic) is so 1492”. Scattered around the machines are some office supplies, medicine containers, a screwdriver, a notepad, a small notebook, an NVMe SSD card on top of its packaging, a mug, a water bottle and a scarf. Hanging on the wall are a small painting of a dead tree before the twilight, prayer beads, a sunflower-pattern keychain and a calendar. Between the desk and the camera, a green plastic chair has a pillow and blanket on top of it. A few wires and cardboard boxes are visible under the desk.&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;June is here. It brings the usual cold weather and some extra rhinitis complications. With that I find myself in a recovery mood Sunday, wrapped in a blanket with a mug of tea, a screwdriver, some notes on paper, a flash drive, a couple of NVMe cards and the trio of Unix-powered machines that will help me get this done.&lt;&#x2F;p&gt;
&lt;p&gt;The mission is to get a root-on-ZFS EFI installation of Void Linux with ZFSBootMenu on a Dell Latitude 7480.&lt;&#x2F;p&gt;
&lt;p&gt;To my left, a ceiling-collapse-survivor Sony VAIO is running NetBSD with spectrwm. It’s split with sakura and tmux on a terminal to one side, where Neovim is storing these words, and Firefox on the other, ready to fetch all the docs. In the middle, the object of today’s operation. And to my right, a headless PC board runs FreeBSD with ZFS, holding all the backups needed for the post-install tasks.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;&#x2F;assets&#x2F;img&#x2F;posts&#x2F;void-on-zfs&#x2F;duo.jpg&quot; alt=&quot;Two laptops side-by-side on a desk, each with a USB keyboard plugged in. Writing utensils inside a holder and post-its are between the two. A sunflower-patterned keychain and prayer beads hang from the wall. The computer on the left has a brown cloth for a wrist rest in front of its USB keyboard, to the left of which lies a small blue Campus notebook.&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;This lengthy post, written not after the fact but during it, is my way of documenting and also sharing how it all went. Additionally, it’s a way to delve deeper into many of the things the ZFSBootMenu docs leave unexplained, an urge I already had yesterday as I just tried it out without much modification.&lt;&#x2F;p&gt;
&lt;p&gt;Last night, I ran through the &lt;a href=&quot;https:&#x2F;&#x2F;docs.zfsbootmenu.org&#x2F;en&#x2F;latest&#x2F;guides&#x2F;void-linux&#x2F;uefi.html&quot;&gt;ZFSBootMenu documentation guide for Void&lt;&#x2F;a&gt; and followed it both on a VM and then on an external SATA HDD plugged through a USB case, taking some notes and getting a general idea of the process.&lt;&#x2F;p&gt;
&lt;p&gt;The Void installer does not support ZFS out of the box, so the &lt;a href=&quot;https:&#x2F;&#x2F;docs.voidlinux.org&#x2F;&quot;&gt;Void Handbook&lt;&#x2F;a&gt; itself recommends the ZFSBootMenu documentation before &lt;a href=&quot;https:&#x2F;&#x2F;docs.voidlinux.org&#x2F;installation&#x2F;guides&#x2F;zfs.html&quot;&gt;its own&lt;&#x2F;a&gt; (a manual chroot installation) when it comes to doing a ZFS-on-root install. This guide from ZFSBootMenu is what we’ll be following throughout this post.&lt;&#x2F;p&gt;
&lt;p&gt;Do note that, while comprehensive, my account is no replacement for &lt;a href=&quot;https:&#x2F;&#x2F;docs.zfsbootmenu.org&#x2F;en&#x2F;latest&#x2F;guides&#x2F;void-linux&#x2F;uefi.html&quot;&gt;the original guide&lt;&#x2F;a&gt;. Although more concise, it contains certain notes not included in this post and covers a larger set of possibilities than I did here. Some of the code blocks you’ll see here are identical to the ones from the guide, but many others are specific to how I did things, so keep that in mind and try things before going with your final installation.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;why-void&quot;&gt;Why Void?&lt;&#x2F;h2&gt;
&lt;p&gt;I don’t really enjoy distro-hopping. I usually will spend a few years on the same OS and only switch for good reason and after some thorough testing. And after some Debian time, I felt interested in trying Void for a few reasons:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;rolling, but stable&lt;&#x2F;li&gt;
&lt;li&gt;runit init system&lt;&#x2F;li&gt;
&lt;li&gt;BSD-like rc files&lt;&#x2F;li&gt;
&lt;li&gt;BSD-like handbook documentation&lt;&#x2F;li&gt;
&lt;li&gt;numerous, up to date, but stable packages&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;After trying it, some other features made me settle:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;fast and feature-packed package manager&lt;&#x2F;li&gt;
&lt;li&gt;very fast startup time (kudos to runit)&lt;&#x2F;li&gt;
&lt;li&gt;first-class support in ZFSBootMenu&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;The Void package manager, &lt;a href=&quot;https:&#x2F;&#x2F;docs.voidlinux.org&#x2F;xbps&#x2F;index.html&quot;&gt;xbps&lt;&#x2F;a&gt;, has several interesting features. One of my favorites, for a taste, is &lt;code&gt;xbps-query --cat&lt;&#x2F;code&gt;, which shows the original contents of a given file in a package.&lt;&#x2F;p&gt;
&lt;p&gt;For example, &lt;code&gt;xpbps-query --cat &#x2F;etc&#x2F;zfsbootmenu&#x2F;config.yaml zfsbootmenu&lt;&#x2F;code&gt; will show you the original content of the &lt;code&gt;config.yaml&lt;&#x2F;code&gt; file in the &lt;code&gt;zfsbootmenu&lt;&#x2F;code&gt; package. You can use it for very core packages like &lt;code&gt;base-system&lt;&#x2F;code&gt; or &lt;code&gt;runit-void&lt;&#x2F;code&gt; to determine the original version of files shipped by them.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;and-why-zfs&quot;&gt;And why ZFS?&lt;&#x2F;h2&gt;
&lt;p&gt;My first contact with ZFS was when using FreeBSD, which provides it as an option in its installer, making it a bit too easy not to try. Having a server on ZFS means all the data it holds can be safeguarded and transferred in robust ways, and mistakes are also easier to recover from.&lt;&#x2F;p&gt;
&lt;p&gt;Aside from all the data integrity features and flexibility it brings, the features that interest me the most are the ones for managing snapshots.&lt;&#x2F;p&gt;
&lt;p&gt;ZFS snapshots allow you to store the filesystem state at a given point in time, and to compare against, access the content of, and fully revert to this state. After the guide has been followed throughout, an extra section at the end of this post has some snapshot basics.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;getting-in&quot;&gt;Getting in&lt;&#x2F;h2&gt;
&lt;p&gt;So, first things first, open the machine up and swap the NVMe cards. For me, that means getting my 128 GB NVMe stick, which I use basically for tests, and replace it with the 256 GB one which currently has Debian on it. Yes, I get by just fine with that much.&lt;&#x2F;p&gt;
&lt;p&gt;While a bit dusty, the machine was overall in good state. The release date for the model is 2017, which for my computing standards is very recent.&lt;&#x2F;p&gt;
&lt;p&gt;It has a single NVMe slot, one 16 GB RAM stick and one unused RAM slot. If you look closely, you can notice a dent on the vent tube connecting the cooler to the CPU. Despite this, it very rarely heats up.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;&#x2F;assets&#x2F;img&#x2F;posts&#x2F;void-on-zfs&#x2F;karu-inside.jpg&quot; alt=&quot;The Dell laptop seen from above, lid closed, with the screen against the desk and the bottom cover removed, exposing the motherboard.&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Next up is to boot up &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;leahneukirchen&#x2F;hrmpf&quot;&gt;hrmpf&lt;&#x2F;a&gt; in EFI mode.&lt;&#x2F;p&gt;
&lt;p&gt;hrmpf is a Void-based rescue system maintained by a Void team member and distributed as a bootable image that can accomplish many things, some of them being a full Void installation, entering a proper chroot, and being ZFS-ready with the needed drivers and tools.&lt;&#x2F;p&gt;
&lt;p&gt;Once booted into it, EFI support can be confirmed by filtering the output of &lt;code&gt;dmesg&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;dmesg&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; &lt;span class=&quot;z-keyword z-operator z-logical z-pipe z-shell&quot;&gt;|&lt;&#x2F;span&gt; &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;grep&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;i&lt;&#x2F;span&gt; efivars&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The output should contain “Registered efivars operations”.&lt;&#x2F;p&gt;
&lt;p&gt;Make sure you have an Internet connection at this point. Most of the following steps will run fine without one, but closer to the end, when installing the Void base system, it will all go to waste if we can’t reach a package mirror.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;setting-up-the-installation-environment&quot;&gt;Setting up the installation environment&lt;&#x2F;h2&gt;
&lt;p&gt;The ZFSBootMenu guide uses some variables in order to avoid mistakes and make the instructions more portable across the different storage types and supported operating systems.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;etc-os-release&quot;&gt;&lt;code&gt;&#x2F;etc&#x2F;os-release&lt;&#x2F;code&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;The &lt;code&gt;&#x2F;etc&#x2F;os-release&lt;&#x2F;code&gt; file typically contains information on the operating system you are running.&lt;&#x2F;p&gt;
&lt;p&gt;In the hrmpf live system, these are its contents:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-assignment z-shell&quot;&gt;NAME&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-assignment z-shell&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-unquoted z-shell&quot;&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;Void&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-assignment z-shell&quot;&gt;ID&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-assignment z-shell&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-unquoted z-shell&quot;&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;void&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-assignment z-shell&quot;&gt;PRETTY_NAME&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-assignment z-shell&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-unquoted z-shell&quot;&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;Void Linux&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-assignment z-shell&quot;&gt;HOME_URL&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-assignment z-shell&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-unquoted z-shell&quot;&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;https:&#x2F;&#x2F;voidlinux.org&#x2F;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-assignment z-shell&quot;&gt;DOCUMENTATION&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-assignment z-shell&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-unquoted z-shell&quot;&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;https:&#x2F;&#x2F;docs.voidlinux.org&#x2F;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-assignment z-shell&quot;&gt;LOGO&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-assignment z-shell&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-unquoted z-shell&quot;&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;void-logo&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-assignment z-shell&quot;&gt;ANSI_COLOR&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-assignment z-shell&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-unquoted z-shell&quot;&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;0;38;2;71;128;97&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-assignment z-shell&quot;&gt;DISTRIB_ID&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-assignment z-shell&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-unquoted z-shell&quot;&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;void
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;For comparison, here is FreeBSD’s &lt;code&gt;os-release&lt;&#x2F;code&gt; file:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-assignment z-shell&quot;&gt;NAME&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-assignment z-shell&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-unquoted z-shell&quot;&gt;FreeBSD&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-assignment z-shell&quot;&gt;VERSION&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-assignment z-shell&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-unquoted z-shell&quot;&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;14.0-RELEASE&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-assignment z-shell&quot;&gt;VERSION_ID&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-assignment z-shell&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-unquoted z-shell&quot;&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;14.0&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-assignment z-shell&quot;&gt;ID&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-assignment z-shell&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-unquoted z-shell&quot;&gt;freebsd&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-assignment z-shell&quot;&gt;ANSI_COLOR&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-assignment z-shell&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-unquoted z-shell&quot;&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;0;31&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-assignment z-shell&quot;&gt;PRETTY_NAME&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-assignment z-shell&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-unquoted z-shell&quot;&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;FreeBSD 14.0-RELEASE&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-assignment z-shell&quot;&gt;CPE_NAME&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-assignment z-shell&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-unquoted z-shell&quot;&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;cpe:&#x2F;o:freebsd:freebsd:14.0&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-assignment z-shell&quot;&gt;HOME_URL&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-assignment z-shell&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-unquoted z-shell&quot;&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;https:&#x2F;&#x2F;FreeBSD.org&#x2F;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-assignment z-shell&quot;&gt;BUG_REPORT_URL&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-assignment z-shell&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-unquoted z-shell&quot;&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;https:&#x2F;&#x2F;bugs.FreeBSD.org&#x2F;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;In contrast, NetBSD has no such file.&lt;&#x2F;p&gt;
&lt;p&gt;For the purposes of the ZFSBootMenu guide, only the &lt;code&gt;$ID&lt;&#x2F;code&gt; value appears to be used. And because the file already is structured as shell-compatible variable assignments, we just source it:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-support z-function z-source z-shell&quot;&gt;source&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; &#x2F;etc&#x2F;os-release&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-storage z-modifier z-shell&quot;&gt;export&lt;&#x2F;span&gt; &lt;span class=&quot;z-variable z-other z-readwrite z-assignment z-shell&quot;&gt;ID&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;hostid&quot;&gt;&lt;code&gt;hostid&lt;&#x2F;code&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Required by ZFS intallations, a host ID is a 32-bit hexadecimal value that, supposedly, will uniquely identify a machine. Considering the number of existing machines and the 32-bit range, you might guess why I say &lt;em&gt;supposedly&lt;&#x2F;em&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;If your machine has the &lt;code&gt;hostid&lt;&#x2F;code&gt; utilities, you can see the host ID by simply running &lt;code&gt;hostid&lt;&#x2F;code&gt;. Prior to generation, my hrmpf live system reports &lt;code&gt;00000000&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;It can’t provide a real guarantee that it will be unique, so it’s up to you to take care that it is unique among &lt;em&gt;your&lt;&#x2F;em&gt; machines. Read on for why that’s hardly an issue.&lt;&#x2F;p&gt;
&lt;p&gt;From the &lt;code&gt;gethostid(3)&lt;&#x2F;code&gt; man page:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;[…] a unique 32-bit identifier for the current machine. The 32-bit identifier was intended to be unique among all UNIX systems in existence. This normally resembles the Internet address for the local machine, as returned by &lt;code&gt;gethostbyname(3)&lt;&#x2F;code&gt;, and thus usually never needs to be set.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;This seems to be more or less a legacy feature. In Void’s man page for &lt;code&gt;gethostid(3)&lt;&#x2F;code&gt;, you see this in the history section:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;4.2BSD; dropped in 4.4BSD. SVr4 and POSIX.1-2001 include gethostid() but not sethostid().&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;Still, it is something that OpenZFS requires to be set:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;At time of import or creation, the pool stores the system’s unique host ID and for the purposes of supporting multipath, import into other systems will fail unless forced. &lt;br&#x2F;&gt;&lt;br&#x2F;&gt;
— &lt;a href=&quot;https:&#x2F;&#x2F;openzfs.readthedocs.io&#x2F;en&#x2F;latest&#x2F;introduction.html&quot;&gt;OpenZFS docs, Introduction to ZFS: Storage pools&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;&lt;code&gt;zgenhostid&lt;&#x2F;code&gt;, which is shipped by OpenZFS, according to its man page “emulates the &lt;code&gt;genhostid(1)&lt;&#x2F;code&gt; utility and is provided for use on systems which do not include the utility or do not provide the &lt;code&gt;sethostid(3)&lt;&#x2F;code&gt; function.”&lt;&#x2F;p&gt;
&lt;p&gt;When used without arguments, these commands will generate a random host ID. But they can also be passed a hexadecimal value, which gets stored by default in &lt;code&gt;&#x2F;etc&#x2F;hostid&lt;&#x2F;code&gt; unless another path is given with &lt;code&gt;-o&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Considering this information, it threw me off a bit that the ZFSBootMenu guide tells you to specify an arbitrary host ID rather than generate a random one:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;zgenhostid&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;f&lt;&#x2F;span&gt; 0x00bab10c&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;If they must be unique, that seems odd.&lt;&#x2F;p&gt;
&lt;p&gt;The value &lt;code&gt;0x00bab10c&lt;&#x2F;code&gt; actually has significance in the context of OpenZFS as an identifier (and leetspeak) for its uberblock. However, it apparently is totally unrelated to host IDs.&lt;&#x2F;p&gt;
&lt;p&gt;Should you be curious still, you can refer to &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;zbm-dev&#x2F;zfsbootmenu&#x2F;discussions&#x2F;465&quot;&gt;this GitHub discussion&lt;&#x2F;a&gt; where a ZFSBootMenu user brought this exact question to the developers.&lt;&#x2F;p&gt;
&lt;p&gt;According to the answer given above, the uniqueness of host IDs is useful for “multipathed SAS enclosures with two discrete head unis attached”, which is an enterprise-grade storage solution.&lt;&#x2F;p&gt;
&lt;p&gt;The value &lt;code&gt;0x00bab10c&lt;&#x2F;code&gt; is indeed unrelated and chosen for easy identification. Any value may be used, but when using the pre-built ZFSBootMenu images it may make the process slightly slower (around 250ms) as ZFSBootMenu will have to “discover the hostid every boot”.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;disk-variables&quot;&gt;Disk variables&lt;&#x2F;h3&gt;
&lt;p&gt;Here too, the ZFSBootMenu guide &lt;a href=&quot;https:&#x2F;&#x2F;docs.zfsbootmenu.org&#x2F;en&#x2F;latest&#x2F;guides&#x2F;void-linux&#x2F;uefi.html#define-disk-variables&quot;&gt;works with a set of variables&lt;&#x2F;a&gt; to make it easier covering different possible storage types:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;BOOT_DISK&lt;&#x2F;code&gt;, &lt;code&gt;BOOT_PART&lt;&#x2F;code&gt; and &lt;code&gt;BOOT_DEVICE&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;POOL_DISK&lt;&#x2F;code&gt;, &lt;code&gt;POOL_PART&lt;&#x2F;code&gt; and &lt;code&gt;POOL_DEVICE&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;My target device is an NVMe at &lt;code&gt;nvme0n1&lt;&#x2F;code&gt;, so I’ll have:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;BOOT_DISK=&quot;&#x2F;dev&#x2F;nvme0n1&quot;&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;BOOT_PART=&quot;1&quot;&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;BOOT_DEVICE=&quot;${BOOT_DISK}p${BOOT_PART}&quot;&lt;&#x2F;code&gt;
&lt;ul&gt;
&lt;li&gt;which evaluates to &lt;code&gt;&#x2F;dev&#x2F;nvme0n1p1&lt;&#x2F;code&gt;
&lt;br&#x2F;&gt;&lt;br&#x2F;&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;POOL_DISK=&quot;&#x2F;dev&#x2F;nvme0n1&quot;&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;POOL_PART=&quot;2&quot;&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;POOL_DEVICE=&quot;${POOL_DISK}p${POOL_PART}&quot;&lt;&#x2F;code&gt;
&lt;ul&gt;
&lt;li&gt;which evaluates to &lt;code&gt;&#x2F;dev&#x2F;nvme0n1p2&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;While this may seem silly at first, it allows using the values separately in the next steps. It also makes the docs a lot more concise while covering several possible disk setups.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;confirming-the-environment-setup&quot;&gt;Confirming the environment setup&lt;&#x2F;h3&gt;
&lt;p&gt;At this point, we should be able to print something like this in our environment:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-comment z-line z-number-sign z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-begin z-shell&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment z-line z-number-sign z-shell&quot;&gt; env | grep ID&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment z-line z-number-sign z-shell&quot;&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-assignment z-shell&quot;&gt;ID&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-assignment z-shell&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-unquoted z-shell&quot;&gt;void&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-comment z-line z-number-sign z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-begin z-shell&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment z-line z-number-sign z-shell&quot;&gt; hostid&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment z-line z-number-sign z-shell&quot;&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;00bab10c&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-comment z-line z-number-sign z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-begin z-shell&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment z-line z-number-sign z-shell&quot;&gt; echo $BOOT_DEVICE&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment z-line z-number-sign z-shell&quot;&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;&#x2F;dev&#x2F;nvme0n1p1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-comment z-line z-number-sign z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-begin z-shell&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment z-line z-number-sign z-shell&quot;&gt; echo $POOL_DEVICE&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment z-line z-number-sign z-shell&quot;&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;&#x2F;dev&#x2F;nvme0n1p2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Take care to keep this same environment for all the next steps as they depend on it. For instance, the hrmpf live system ships tmux. While that is great  and I have used it throughout, you must be careful to use a single pane for all the actual steps, and the other panes just for secondary things like looking up man pages or checking file contents.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;filesystem-setup&quot;&gt;Filesystem setup&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;wiping&quot;&gt;Wiping&lt;&#x2F;h3&gt;
&lt;p&gt;The first step is to clear the current ZFS label information from the device:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;zpool&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; labelclear&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;f&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-shell&quot;&gt;POOL_DISK&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The &lt;code&gt;-f&lt;&#x2F;code&gt; option will “treat exported or foreign devices as inactive”, per the man page.&lt;&#x2F;p&gt;
&lt;p&gt;This step fails consistenly for me, which I assume is because the previous filesystem was not ZFS to begin with.&lt;&#x2F;p&gt;
&lt;p&gt;Next, we will use &lt;code&gt;wipefs&lt;&#x2F;code&gt; to erase the current filesystem signature.&lt;&#x2F;p&gt;
&lt;p&gt;This command is not ZFS-specific, but part of the kernel utilities. It does not erase the filesystems themselves, nor their content, but the signatures that aid in their detection.&lt;&#x2F;p&gt;
&lt;p&gt;Without any options, it will list all the filesystems that are still visible:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-comment z-line z-number-sign z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-begin z-shell&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment z-line z-number-sign z-shell&quot;&gt; wipefs &amp;quot;$BOOT_DISK&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment z-line z-number-sign z-shell&quot;&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;DEVICE&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;  OFFSET          TYPE    UUID    LABEL&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;nvme0n1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; 0x200           gpt&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;nvme0n1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; 0x3d9e655e00    gpt&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;nvme0n1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; 0x1fe           PMBR&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The &lt;code&gt;-a&lt;&#x2F;code&gt; option is for erasing all signatures. This means it will “scan the device again after each modification until no magic string [signature] is found”, as per its man page.&lt;&#x2F;p&gt;
&lt;p&gt;In my case:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;wipefs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;a&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-shell&quot;&gt;POOL_DISK&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;wipefs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;a&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-shell&quot;&gt;BOOT_DISK&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Along the guide, commands are sometimes repeated for both &lt;code&gt;$POOL_DISK&lt;&#x2F;code&gt; and &lt;code&gt;$BOOT_DISK&lt;&#x2F;code&gt;. If you are using the same disk for both, this may be redundant, although also harmless.&lt;&#x2F;p&gt;
&lt;p&gt;This is my case, so I am not typically running it twice. I’ll still leave it as is however, so as not to mislead the reader.&lt;&#x2F;p&gt;
&lt;p&gt;Now, when listing the signatures again with &lt;code&gt;wipefs &quot;$BOOT_DISK&quot;&lt;&#x2F;code&gt;, there should be no output.&lt;&#x2F;p&gt;
&lt;p&gt;Finally, the current MBR and GPT tables must be destroyed. For this, the ZFSBootMenu guide uses &lt;code&gt;sgdisk&lt;&#x2F;code&gt;. This is also not ZFS-specific.&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;sgdisk&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; --&lt;&#x2F;span&gt;zap-all&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-shell&quot;&gt;POOL_DISK&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;sgdisk&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; --&lt;&#x2F;span&gt;zap-all&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-shell&quot;&gt;BOOT_DISK&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The &lt;code&gt;--zap-all&lt;&#x2F;code&gt; option contrasts with &lt;code&gt;--zap&lt;&#x2F;code&gt; in that it will destroy both MBR and GPT partition tables.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;partitioning&quot;&gt;Partitioning&lt;&#x2F;h3&gt;
&lt;p&gt;In the ZFSBootMenu guide, &lt;code&gt;sgdisk&lt;&#x2F;code&gt; is used again for creating the partitions:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;sgdisk&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; &lt;span class=&quot;z-punctuation z-separator z-continuation z-line z-shell&quot;&gt;\
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt;    -&lt;&#x2F;span&gt;n&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-section z-expansion z-parameter z-begin z-shell&quot;&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-shell&quot;&gt;BOOT_PART&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-section z-expansion z-parameter z-end z-shell&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;:1m:+512m&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; &lt;span class=&quot;z-punctuation z-separator z-continuation z-line z-shell&quot;&gt;\
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt;    -&lt;&#x2F;span&gt;t&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-section z-expansion z-parameter z-begin z-shell&quot;&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-shell&quot;&gt;BOOT_PART&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-section z-expansion z-parameter z-end z-shell&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;:ef00&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-shell&quot;&gt;BOOT_DISK&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;sgdisk&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; &lt;span class=&quot;z-punctuation z-separator z-continuation z-line z-shell&quot;&gt;\
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt;    -&lt;&#x2F;span&gt;n&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-section z-expansion z-parameter z-begin z-shell&quot;&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-shell&quot;&gt;POOL_PART&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-section z-expansion z-parameter z-end z-shell&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;:0:-10m&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; &lt;span class=&quot;z-punctuation z-separator z-continuation z-line z-shell&quot;&gt;\
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt;    -&lt;&#x2F;span&gt;t&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-section z-expansion z-parameter z-begin z-shell&quot;&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-shell&quot;&gt;POOL_PART&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-section z-expansion z-parameter z-end z-shell&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;:bf00&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-shell&quot;&gt;POOL_DISK&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;In the commands above, option &lt;code&gt;-n&lt;&#x2F;code&gt; is short for &lt;code&gt;--new&lt;&#x2F;code&gt;, and is specifying the start and end sectors by using relative kibibyte measures. The format is &lt;code&gt;--new partnum:start:end&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Breaking it down:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;1m&lt;&#x2F;code&gt; 1 mebibyte from the start of the disk&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;+512m&lt;&#x2F;code&gt; 512 mebibytes after the default start sector&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;-10m&lt;&#x2F;code&gt; 10 mebibytes before the last available sector&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;0&lt;&#x2F;code&gt; the default value&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;In the list above, “default” is “the start of the largest available block for the start sector and the end of the same block for the end sector”, as per the &lt;code&gt;sgdisk&lt;&#x2F;code&gt; man page.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;1:1m:+512m&lt;&#x2F;code&gt;, therefore, means that partition 1 will start 1 mebibyte from the start of the disk and end 512 mebibytes after the start of the largest available block.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;2:0:-10m&lt;&#x2F;code&gt;, in turn, means partition 2 will begin at the start of the largest available block and end 10 mebibytes before the last available sector.&lt;&#x2F;p&gt;
&lt;p&gt;Option &lt;code&gt;-t&lt;&#x2F;code&gt; is for setting the typecode for each partition. Typecode &lt;code&gt;ef00&lt;&#x2F;code&gt; is for the EFI system partition, and typecode &lt;code&gt;bf00&lt;&#x2F;code&gt; is for “Solaris root”, the Unix system upon whose ZFS implementation OpenZFS was based.&lt;&#x2F;p&gt;
&lt;p&gt;For a list of typecodes, see &lt;code&gt;sgdisk -L&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;While just running these commands as-is is your safest option, you might have a different layout in mind or prefer an interactive UI.&lt;&#x2F;p&gt;
&lt;p&gt;For one thing, I’ve had issues in the past with the boot partition being too small, so I’ll be using &lt;code&gt;2g&lt;&#x2F;code&gt; instead of &lt;code&gt;512m&lt;&#x2F;code&gt; for it.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;sgdisk&lt;&#x2F;code&gt; has a friendlier counterpart named &lt;code&gt;gdisk&lt;&#x2F;code&gt;, which you can use just by passing it the disk path, as in &lt;code&gt;gdisk &#x2F;dev&#x2F;sda&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;At this point, you should be safe to try partitioning and going back to wiping as needed until you are satisfied.&lt;&#x2F;p&gt;
&lt;p&gt;When you are done, you can use &lt;code&gt;lsblk&lt;&#x2F;code&gt; to confirm the results. The following will show you the options just configured:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;lsblk&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;o&lt;&#x2F;span&gt; NAME,SIZE,TYPE,PARTTYPENAME&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;creating-the-pool&quot;&gt;Creating the pool&lt;&#x2F;h3&gt;
&lt;p&gt;This part of the guide was the one that actually made me want to delve deeper and understand what each option meant.&lt;&#x2F;p&gt;
&lt;p&gt;With little knowledge about ZFS still, I wanted to understand precisely what was happening here, but also what a pool even is and what its creation meant.&lt;&#x2F;p&gt;
&lt;p&gt;Here’s the &lt;code&gt;zpool(8)&lt;&#x2F;code&gt; man page:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;A storage pool is a collection of devices that provides physical storage and data replication for ZFS datasets. All datasets within a storage pool share the same space.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;The definition of a dataset is then indicated to be at &lt;code&gt;zfs(8)&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;A dataset is identified by a unique path within the ZFS namespace: &lt;br&#x2F;&gt;
&lt;code&gt;pool[&#x2F;component]&#x2F;component&lt;&#x2F;code&gt; for example: &lt;code&gt;rpool&#x2F;var&#x2F;log&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;Here, it’s also explained that a dataset can be a file system, logical volume, snapshot or bookmark.&lt;&#x2F;p&gt;
&lt;p&gt;Further information is also hinted to be found at &lt;code&gt;zpoolconcepts(7)&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;At this point you start to notice the breadth of knowledge available in the documentation. The man pages are not only comprehensible, but sometimes contain several examples on how to apply their concepts. Each command has their own man page  named with a hyphen for separation, as in &lt;code&gt;zpool-create&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;We’ll be exploring only the &lt;code&gt;zpool-create(8)&lt;&#x2F;code&gt; command in depth, in particular the options used in the ZFSBootMenu guide:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;-f&lt;&#x2F;code&gt; force the use of virtual devices, even if they appear in use&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;-o feature=value&lt;&#x2F;code&gt; set a pool feature&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;-O property=value&lt;&#x2F;code&gt; set a file system property in the root file system of the pool&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;-o compatibility=off|legacy|file[,file]&lt;&#x2F;code&gt; specify a compatibility feature set&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;-m mountpoint&lt;&#x2F;code&gt; the mountpoint (default: &lt;code&gt;&#x2F;pool&lt;&#x2F;code&gt;)&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;pool&lt;&#x2F;code&gt; the pool&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;vdev&lt;&#x2F;code&gt; the virtual device&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;The listing with pool features (including compatibility feature sets) is at &lt;code&gt;zpool-features(7)&lt;&#x2F;code&gt;. Pool properties are at &lt;code&gt;zpoolprops(7)&lt;&#x2F;code&gt; and file system properties at &lt;code&gt;zfsprops(7)&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;In the guide, these are the options given:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;zpool&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; create&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;f&lt;&#x2F;span&gt; &lt;span class=&quot;z-punctuation z-separator z-continuation z-line z-shell&quot;&gt;\
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;o&lt;&#x2F;span&gt; ashift=12 &lt;span class=&quot;z-punctuation z-separator z-continuation z-line z-shell&quot;&gt;\
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;O&lt;&#x2F;span&gt; compression=lz4 &lt;span class=&quot;z-punctuation z-separator z-continuation z-line z-shell&quot;&gt;\
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;O&lt;&#x2F;span&gt; acltype=posixacl &lt;span class=&quot;z-punctuation z-separator z-continuation z-line z-shell&quot;&gt;\
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;O&lt;&#x2F;span&gt; xattr=sa &lt;span class=&quot;z-punctuation z-separator z-continuation z-line z-shell&quot;&gt;\
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;O&lt;&#x2F;span&gt; relatime=on &lt;span class=&quot;z-punctuation z-separator z-continuation z-line z-shell&quot;&gt;\
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;o&lt;&#x2F;span&gt; autotrim=on &lt;span class=&quot;z-punctuation z-separator z-continuation z-line z-shell&quot;&gt;\
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;o&lt;&#x2F;span&gt; compatibility=openzfs-2.1-linux &lt;span class=&quot;z-punctuation z-separator z-continuation z-line z-shell&quot;&gt;\
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;m&lt;&#x2F;span&gt; none zroot &lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-shell&quot;&gt;POOL_DEVICE&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Among the options above, several pool features and system properties are set:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;-o ashift=12&lt;&#x2F;code&gt; “Alignment shift”, used to calculate physical sector sizes.This is discussed at greater length in the &lt;a href=&quot;https:&#x2F;&#x2F;openzfs.github.io&#x2F;openzfs-docs&#x2F;Performance%20and%20Tuning&#x2F;Workload%20Tuning.html#alignment-shift-ashift&quot;&gt;online documentation on Workload Tuning&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;-O compression=lz4&lt;&#x2F;code&gt; Sets the compression algorithm used (&lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;LZ4_(compression_algorithm)&quot;&gt;LZ4&lt;&#x2F;a&gt;)&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;-O acltype=posixacl&lt;&#x2F;code&gt; Whether &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Access-control_list&quot;&gt;ACLs&lt;&#x2F;a&gt; are enabled and what type to use. The value &lt;code&gt;posixacl&lt;&#x2F;code&gt; is equivalent to &lt;code&gt;posix&lt;&#x2F;code&gt; (default on Linux: off)&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;-O xattr=sa&lt;&#x2F;code&gt; Enables extended attributes. If value is &lt;code&gt;on&lt;&#x2F;code&gt;, uses directory-based extended attributes, while &lt;code&gt;sa&lt;&#x2F;code&gt; uses system-attribute-based. The latter has performance benefits, and is important for ACLs and SELinux usage&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;-O relatime=on&lt;&#x2F;code&gt; “Causes the access time to be updated relative to the modify or change time.” Also, “access time is only updated if the previous access time was earlier than the current modify or change time or if the existing access time hasn’t been updated within the past 24hours”&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;-o autotrim=on&lt;&#x2F;code&gt; Automatically reclaims unused blocks from time to time. Can put the filesystem under some stress&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;The last option, the compatibility feature set, specifies in this case a relative filename to &lt;code&gt;&#x2F;usr&#x2F;share&#x2F;zfs&#x2F;compatibility.d&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;-o compatibility=openzfs-2.1-linux&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;&lt;code&gt;zpool-create(8)&lt;&#x2F;code&gt; also states:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;By default, all supported features are enabled on the new pool. The &lt;code&gt;-d&lt;&#x2F;code&gt; option and the &lt;code&gt;-o&lt;&#x2F;code&gt; compatibility property […] can be used to restrict the features that are enabled, so that the pool can be imported on other releases of ZFS.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;The compatibility option &lt;code&gt;openzfs-2.1-linux&lt;&#x2F;code&gt; is described as a “conservative” choice in the ZFSBootMenu guide and in my tests had little impact, so I decided to not use it for this installation.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;creating-the-filesystems&quot;&gt;Creating the filesystems&lt;&#x2F;h3&gt;
&lt;p&gt;Once the pool is ready, the filesystems can be created.&lt;&#x2F;p&gt;
&lt;p&gt;For this task, the &lt;code&gt;zfs&lt;&#x2F;code&gt; command is used with &lt;code&gt;create&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;zfs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; create&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;o&lt;&#x2F;span&gt; mountpoint=none zroot&#x2F;ROOT&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;zfs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; create&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;o&lt;&#x2F;span&gt; mountpoint=&#x2F;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;o&lt;&#x2F;span&gt; canmount=noauto zroot&#x2F;ROOT&#x2F;&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-section z-expansion z-parameter z-begin z-shell&quot;&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-shell&quot;&gt;ID&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-section z-expansion z-parameter z-end z-shell&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;zfs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; create&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;o&lt;&#x2F;span&gt; mountpoint=&#x2F;home zroot&#x2F;home&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The ZFSBootMenu guide explains at this point that if &lt;code&gt;canmount=noauto&lt;&#x2F;code&gt; is not set on file systems with the &lt;code&gt;&#x2F;&lt;&#x2F;code&gt; mountpoint, the OS will try to mount them all and fail. It goes on to say:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;Automatic mounting of &#x2F; is not required because the root file system is explicitly mounted in the boot process.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;After the filesystems have been created, the boot file system must be set.&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;zpool&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; set bootfs=zroot&#x2F;ROOT&#x2F;&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-section z-expansion z-parameter z-begin z-shell&quot;&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-shell&quot;&gt;ID&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-section z-expansion z-parameter z-end z-shell&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; zroot&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Essentially, this is saying “set &lt;code&gt;zroot&lt;&#x2F;code&gt;’s &lt;code&gt;bootfs&lt;&#x2F;code&gt; property to &lt;code&gt;zroot&#x2F;ROOT&#x2F;void&lt;&#x2F;code&gt;”&lt;&#x2F;p&gt;
&lt;h3 id=&quot;export-reimport-and-mount&quot;&gt;Export, reimport and mount&lt;&#x2F;h3&gt;
&lt;p&gt;The next steps consist in exporting and then importing the pool with a given mountpoint.&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;zpool&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; export zroot&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;zpool&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; import&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;N&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;R&lt;&#x2F;span&gt; &#x2F;mnt zroot&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;From what I gather, exporting means putting the pool in a more portable state. According to the &lt;code&gt;zpool-export(8)&lt;&#x2F;code&gt; man page, “the devices [marked as exported] can be moved between systems […] and imported as long as a sufficient number of devices are present.”&lt;&#x2F;p&gt;
&lt;p&gt;If &lt;code&gt;zfs import&lt;&#x2F;code&gt; is used without any arguments, it will list the exported pools available to be imported.&lt;&#x2F;p&gt;
&lt;p&gt;The &lt;code&gt;-N root&lt;&#x2F;code&gt; option imports the pool without mounting any of its file systems, the &lt;code&gt;-R&lt;&#x2F;code&gt; option “sets the &lt;code&gt;cachefile&lt;&#x2F;code&gt; property to &lt;code&gt;none&lt;&#x2F;code&gt; and the &lt;code&gt;altroot&lt;&#x2F;code&gt; property to &lt;code&gt;root&lt;&#x2F;code&gt;”. In this case, that &lt;code&gt;root&lt;&#x2F;code&gt; will be &lt;code&gt;&#x2F;mnt&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;altroot&lt;&#x2F;code&gt; stands for the alternate root directory. In &lt;code&gt;zpoolprops(7)&lt;&#x2F;code&gt;, this becomes clearer when it is stated that “this directory is prepended to any mount points within the pool.”&lt;&#x2F;p&gt;
&lt;p&gt;Once re-imported, we can mount:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;zfs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; mount zroot&#x2F;ROOT&#x2F;&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-section z-expansion z-parameter z-begin z-shell&quot;&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-shell&quot;&gt;ID&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-section z-expansion z-parameter z-end z-shell&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;zfs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; mount zroot&#x2F;home&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;And verify that all is mounted correctly with &lt;code&gt;mount | grep mnt&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-comment z-line z-number-sign z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-comment z-begin z-shell&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment z-line z-number-sign z-shell&quot;&gt; mount | grep mnt&lt;&#x2F;span&gt;&lt;span class=&quot;z-comment z-line z-number-sign z-shell&quot;&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;zroot&#x2F;ROOT&#x2F;void&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; on &#x2F;mnt type zfs (rw,relatime,xattr,posixacl,casesensitive&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;&#x2F;span&gt;)
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;zroot&#x2F;home&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; on &#x2F;mnt&#x2F;home type zfs (rw,relatime,xattr,posixacl,casesensitive&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;&#x2F;span&gt;)
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Lastly, we request the device events from the kernel to update the device symlinks:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;udevadm&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; trigger&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;setting-up-void&quot;&gt;Setting up Void&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;installation&quot;&gt;Installation&lt;&#x2F;h3&gt;
&lt;p&gt;So far, not much here was Void-specific. This is when we start bootstrapping the void system into the filesystem we laid out.&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-assignment z-shell&quot;&gt;XBPS_ARCH&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-assignment z-shell&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-unquoted z-shell&quot;&gt;x86_64&lt;&#x2F;span&gt; &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;xbps-install&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; &lt;span class=&quot;z-punctuation z-separator z-continuation z-line z-shell&quot;&gt;\
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt;  -&lt;&#x2F;span&gt;S&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;R&lt;&#x2F;span&gt; https:&#x2F;&#x2F;repo-fastly.voidlinux.org&#x2F;current &lt;span class=&quot;z-punctuation z-separator z-continuation z-line z-shell&quot;&gt;\
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt;  -&lt;&#x2F;span&gt;r&lt;&#x2F;span&gt; &#x2F;mnt base-system&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Here, we are passing an environment variable to set the architecture to &lt;code&gt;x86_64&lt;&#x2F;code&gt;, then use &lt;code&gt;xbps-install&lt;&#x2F;code&gt; from the xbps package manager to fetch the Void base system.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;-S&lt;&#x2F;code&gt; takes care of synchronizing the data from the mirror so that package data is fetched, &lt;code&gt;-R&lt;&#x2F;code&gt; allows us to manually specify the repository for this run, and &lt;code&gt;-r&lt;&#x2F;code&gt; allows choosing a different root directory to act upon.&lt;&#x2F;p&gt;
&lt;p&gt;Here, I chose the Fastly mirror over the ServerCentral one. &lt;a href=&quot;https:&#x2F;&#x2F;xmirror.voidlinux.org&#x2F;&quot;&gt;Any working mirror&lt;&#x2F;a&gt; should do.&lt;&#x2F;p&gt;
&lt;p&gt;Note that not all mirrors have the same content at the root of their URL. Some point directly to a Void repo, some don’t. You can access the mirror in a browser or otherwise inspect it to find the path to the  &lt;code&gt;current&lt;&#x2F;code&gt; directory.&lt;&#x2F;p&gt;
&lt;p&gt;With this done, we can copy the host ID file, which will also be required in our final system, and we are ready to chroot.&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;cp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; &#x2F;etc&#x2F;hostid &#x2F;mnt&#x2F;etc&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;chrooting&quot;&gt;chrooting&lt;&#x2F;h3&gt;
&lt;p&gt;We will chroot into the system mounted at the &lt;code&gt;&#x2F;mnt&lt;&#x2F;code&gt; directory using &lt;code&gt;xchroot&lt;&#x2F;code&gt;, which is part of the xbps &lt;code&gt;xtools&lt;&#x2F;code&gt; package and should already be available on hrmpf. It provides a &lt;a href=&quot;https:&#x2F;&#x2F;docs.voidlinux.org&#x2F;config&#x2F;containers-and-vms&#x2F;chroot.html#chroot-usage&quot;&gt;more sane&lt;&#x2F;a&gt; chroot than the plain one, in particular regarding the required mountpoints:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;xchroot&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; &#x2F;mnt&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This is a good time to get back to the notes I mentioned taking the day before.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;&#x2F;assets&#x2F;img&#x2F;posts&#x2F;void-on-zfs&#x2F;notes.jpg&quot; alt=&quot;A block of paper with some notes scribbled: “check connection first of all”, “reconfigure after chroot”, “see &#x2F;usr&#x2F;share&#x2F;doc&#x2F;efibootmgr&#x2F;README.voidlinux for automatic EFI entry management”, “superb docs”, “take the first snapshot ASAP”. An arrow points from the last note to “on chroot?” Visible above the block of paper is a keyboard. To the right, the tip of a notebook and a piece of brown cloth are visible. On top of the block, there is a mechanical pencil and a Tombow MONO One plastic eraser.&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;h4 id=&quot;reconfiguring-packages&quot;&gt;Reconfiguring packages&lt;&#x2F;h4&gt;
&lt;p&gt;After chrooting, it may be a good idea to run &lt;code&gt;xbps-reconfigure&lt;&#x2F;code&gt; to make sure packages are properly configured. This is because in the bootstrap process some packets may have tried to configure themselves while relying on directories that were not mounted anywhere.&lt;&#x2F;p&gt;
&lt;p&gt;This is particularly true for &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;OSInside&#x2F;kiwi&#x2F;issues&#x2F;1867&quot;&gt;&lt;code&gt;dracut&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;, which is a tool that generates initramfs and initrd images, therefore being critical to the early boot process. You might see error messages related to it in your first run of xbps outside of the chroot, when installing the base system.&lt;&#x2F;p&gt;
&lt;p&gt;To reconfigure &lt;strong&gt;all&lt;&#x2F;strong&gt; packages, just run &lt;code&gt;xbps-reconfigure -fa&lt;&#x2F;code&gt;. If you’d rather only reconfigure &lt;code&gt;dracut&lt;&#x2F;code&gt;, go with &lt;code&gt;xpbs-reconfigure -f dracut&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;root-password&quot;&gt;root password&lt;&#x2F;h4&gt;
&lt;p&gt;As early as possible is a good time to run &lt;code&gt;passwd&lt;&#x2F;code&gt; and set the root password.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;rc-conf&quot;&gt;&lt;code&gt;rc.conf&lt;&#x2F;code&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;&lt;code&gt;runit&lt;&#x2F;code&gt; reads the &lt;code&gt;&#x2F;etc&#x2F;rc.conf&lt;&#x2F;code&gt; file during startup to configure the system, setting up things like the keymap, hardware clock and terminal font.&lt;&#x2F;p&gt;
&lt;p&gt;For your reference, here is what I added to mine during the installation:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-assignment z-shell&quot;&gt;HARDWARECLOCK&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-assignment z-shell&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-unquoted z-shell&quot;&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;UTC&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-assignment z-shell&quot;&gt;KEYMAP&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-assignment z-shell&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-unquoted z-shell&quot;&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;br-abnt2&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-assignment z-shell&quot;&gt;FONT&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-assignment z-shell&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-unquoted z-shell&quot;&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;ter-120n&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h4 id=&quot;time-zone-and-locale&quot;&gt;Time zone and locale&lt;&#x2F;h4&gt;
&lt;p&gt;To configure your local time zone, create a symlink at &lt;code&gt;&#x2F;etc&#x2F;localtime&lt;&#x2F;code&gt; that points to the corresponding time zone in the &lt;code&gt;&#x2F;usr&#x2F;share&#x2F;zoneinfo&lt;&#x2F;code&gt; directory.&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;ln&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;sf&lt;&#x2F;span&gt; &#x2F;usr&#x2F;share&#x2F;zoneinfo&#x2F;&lt;span class=&quot;z-keyword z-operator z-assignment z-redirection z-shell&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;timezone&lt;span class=&quot;z-keyword z-operator z-assignment z-redirection z-shell&quot;&gt;&amp;gt;&lt;&#x2F;span&gt; &#x2F;etc&#x2F;localtime&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Unless you are using &lt;code&gt;musl&lt;&#x2F;code&gt;, you also want to set and generate the &lt;code&gt;glibc&lt;&#x2F;code&gt; locales. Edit &lt;code&gt;&#x2F;etc&#x2F;default&#x2F;libc-locales&lt;&#x2F;code&gt; and uncomment the desired locales, then run &lt;code&gt;xbps-reconfigure -f glibc-locales&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;dracut&quot;&gt;dracut&lt;&#x2F;h4&gt;
&lt;p&gt;&lt;code&gt;dracut&lt;&#x2F;code&gt; generates file system images used by the kernel at the very early stages of boot. We have to make it able to identify our ZFS root filesystem by enabling the proper modules. This is accomplished by creating &lt;code&gt;&#x2F;etc&#x2F;dracut.conf.d&#x2F;zol.conf&lt;&#x2F;code&gt; with:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-assignment z-shell&quot;&gt;nofsck&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-assignment z-shell&quot;&gt;=&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-unquoted z-shell&quot;&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;yes&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-assignment z-shell&quot;&gt;add_dracutmodules&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-assignment z-shell&quot;&gt;+=&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-unquoted z-shell&quot;&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt; zfs &lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-assignment z-shell&quot;&gt;omit_dracutmodules&lt;&#x2F;span&gt;&lt;span class=&quot;z-keyword z-operator z-assignment z-shell&quot;&gt;+=&lt;&#x2F;span&gt;&lt;span class=&quot;z-string z-unquoted z-shell&quot;&gt;&lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt; btrfs &lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Notice the spaces surrounding the module names.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;installing-and-configuring-zfsbootmenu&quot;&gt;Installing and configuring ZFSBootMenu&lt;&#x2F;h2&gt;
&lt;p&gt;We are now ready to install both ZFS and ZFSBootMenu. Let’s start with ZFS:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;xbps-install&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;R&lt;&#x2F;span&gt; https:&#x2F;&#x2F;repo-fastly.voidlinux.org&#x2F;current zfs&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now, before installing ZFSBootMenu, we set the kernel commandline. This is the command line that will be used by the Linux kernel, so any options you are used to go here.&lt;&#x2F;p&gt;
&lt;p&gt;The ZFSBootMenu guide has only the &lt;code&gt;quiet&lt;&#x2F;code&gt; option. In my case, I added &lt;code&gt;net.ifnames=0&lt;&#x2F;code&gt; to have the classic &lt;code&gt;eth0&lt;&#x2F;code&gt;, &lt;code&gt;wlan0&lt;&#x2F;code&gt; network interface names, and &lt;code&gt;fbcon=nodefer video=efifb:nobgrt&lt;&#x2F;code&gt;, which prevents the manufacturer’s logo from showing after boot and sometimes obscuring the boot process output.&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;zfs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; set org.zfsbootmenu:commandline=&lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;quiet net.ifnames=0 fbcon=nodefer video=efifb:nobgrt&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; zroot&#x2F;ROOT&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;We also need a &lt;code&gt;vfat&lt;&#x2F;code&gt; filesystem on our boot device:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;mkfs.vfat&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;F32&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-shell&quot;&gt;BOOT_DEVICE&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now we can add an &lt;code&gt;&#x2F;etc&#x2F;fstab&lt;&#x2F;code&gt; entry pointing to it, and mount:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-support z-function z-echo z-shell&quot;&gt;echo&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; &lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-group z-expansion z-command z-parens z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-section z-parens z-begin z-shell&quot;&gt;(&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;blkid&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; &lt;span class=&quot;z-keyword z-operator z-logical z-pipe z-shell&quot;&gt;|&lt;&#x2F;span&gt; &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;grep&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; &lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-shell&quot;&gt;BOOT_DEVICE&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; &lt;span class=&quot;z-keyword z-operator z-logical z-pipe z-shell&quot;&gt;|&lt;&#x2F;span&gt; &lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;cut&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;d&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-quoted z-single z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt; &lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;f&lt;&#x2F;span&gt; 2&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-section z-parens z-end z-shell&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; &#x2F;boot&#x2F;efi vfat defaults 0 0&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; &lt;span class=&quot;z-keyword z-operator z-assignment z-redirection z-shell&quot;&gt;&amp;gt;&amp;gt;&lt;&#x2F;span&gt; &#x2F;etc&#x2F;fstab&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;mkdir&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;p&lt;&#x2F;span&gt; &#x2F;boot&#x2F;efi&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;mount&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; &#x2F;boot&#x2F;efi&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Into this directory we just mounted, we can now install ZFSBootMenu.&lt;&#x2F;p&gt;
&lt;p&gt;The guide provides two different paths here: a prebuilt image or the Void package, which you can get through xbps.&lt;&#x2F;p&gt;
&lt;p&gt;While there are advantages to both, I decided to go with the prebuilt image since I’d rather the package manager not touch the boot manager on updating. This has the downside of you having to take care of being aware of any relevant versions and when to upgrade to them.&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;xbps-install&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; curl&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;mkdir&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;p&lt;&#x2F;span&gt; &#x2F;boot&#x2F;efi&#x2F;EFI&#x2F;ZBM&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;curl&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;o&lt;&#x2F;span&gt; &#x2F;boot&#x2F;efi&#x2F;EFI&#x2F;ZBM&#x2F;VMLINUZ.EFI&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;L&lt;&#x2F;span&gt; https:&#x2F;&#x2F;get.zfsbootmenu.org&#x2F;efi&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;cp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; &#x2F;boot&#x2F;efi&#x2F;EFI&#x2F;ZBM&#x2F;VMLINUZ.EFI &#x2F;boot&#x2F;efi&#x2F;EFI&#x2F;ZBM&#x2F;VMLINUZ-BACKUP.EFI&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;If you’d rather use the repository package, see the &lt;a href=&quot;https:&#x2F;&#x2F;docs.zfsbootmenu.org&#x2F;en&#x2F;latest&#x2F;guides&#x2F;void-linux&#x2F;uefi.html#install-zfsbootmenu&quot;&gt;corresponding instructions in the guide&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Finally, a second choice has to be made between &lt;code&gt;rEFind&lt;&#x2F;code&gt; or plain &lt;code&gt;efibootmgr&lt;&#x2F;code&gt; for managing the boot entries. I prefer to go with the simpler one, but you may find &lt;code&gt;rEFind&lt;&#x2F;code&gt; more feature-packed.&lt;&#x2F;p&gt;
&lt;p&gt;First, install &lt;code&gt;efibootmgr&lt;&#x2F;code&gt; using &lt;code&gt;xbps-install efibootmgr&lt;&#x2F;code&gt;, then run the following commands:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;efibootmgr&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;c&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;d&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-shell&quot;&gt;BOOT_DISK&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;p&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-shell&quot;&gt;BOOT_PART&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; &lt;span class=&quot;z-punctuation z-separator z-continuation z-line z-shell&quot;&gt;\
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt;  -&lt;&#x2F;span&gt;L&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;ZFSBootMenu (Backup)&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; &lt;span class=&quot;z-punctuation z-separator z-continuation z-line z-shell&quot;&gt;\
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt;  -&lt;&#x2F;span&gt;l&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-quoted z-single z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;\EFI\ZBM\VMLINUZ-BACKUP.EFI&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;efibootmgr&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;c&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;d&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-shell&quot;&gt;BOOT_DISK&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;p&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-group z-expansion z-parameter z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-variable z-shell&quot;&gt;$&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-other z-readwrite z-shell&quot;&gt;BOOT_PART&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; &lt;span class=&quot;z-punctuation z-separator z-continuation z-line z-shell&quot;&gt;\
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt;  -&lt;&#x2F;span&gt;L&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-quoted z-double z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;ZFSBootMenu&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; &lt;span class=&quot;z-punctuation z-separator z-continuation z-line z-shell&quot;&gt;\
&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt;  -&lt;&#x2F;span&gt;l&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-quoted z-single z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;\EFI\ZBM\VMLINUZ.EFI&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;If you’d prefer to use rEFInd, see the &lt;a href=&quot;https:&#x2F;&#x2F;docs.zfsbootmenu.org&#x2F;en&#x2F;latest&#x2F;guides&#x2F;void-linux&#x2F;uefi.html#configure-efi-boot-entries&quot;&gt;guide’s relevant section&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;zbm-kcl&lt;&#x2F;code&gt; is mentioned here in passing. This utility allows you, among other things, to set ZFSBootMenu options, such as the delay before automatically booting. I am not sure if it comes included with the ZFSBootMenu package, as I went for the pre-built image, but you can nonetheless get it from GitHub:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;curl&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;O&lt;&#x2F;span&gt; https:&#x2F;&#x2F;raw.githubusercontent.com&#x2F;zbm-dev&#x2F;zfsbootmenu&#x2F;master&#x2F;bin&#x2F;zbm-kcl&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;chmod&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; +x zbm-kcl&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now, if you want to change an option, you can use its &lt;code&gt;-a&lt;&#x2F;code&gt; option to append an argument to the target image’s command line:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;zbm-kcl&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;a&lt;&#x2F;span&gt; &lt;span class=&quot;z-string z-quoted z-single z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;zbm.timeout=2&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt; &#x2F;boot&#x2F;efi&#x2F;EFI&#x2F;ZBM&#x2F;VMLINUZ.EFI&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;In the example above, the timeout before automatically booting is set from its 10 seconds default to 2 seconds.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;getting-out&quot;&gt;Getting out&lt;&#x2F;h2&gt;
&lt;p&gt;We are all done. It’s time to exit the chroot, unmount and export the pool.&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-support z-function z-exit z-shell&quot;&gt;exit&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;umount&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;n&lt;&#x2F;span&gt;&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;R&lt;&#x2F;span&gt; &#x2F;mnt&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;zpool&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; export zroot&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;If all above went well, we can now run &lt;code&gt;reboot&lt;&#x2F;code&gt;, remove the flash drive used for installation, and log in for the first time into our new system.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;zfs-snapshot-basics&quot;&gt;ZFS snapshot basics&lt;&#x2F;h2&gt;
&lt;p&gt;Something you might want to do at this point is to take a snapshot of the current state, since it can serve as a baseline before any further tweaking, allowing you to go back or access the files in this state as you make important changes that could potentially break the system.&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;zfs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; snapshot&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;r&lt;&#x2F;span&gt; zroot&#x2F;ROOT&#x2F;void@baseline&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Note that, if you followed the ZFSBootMenu guide in creating a separate dataset for your home directory, this snapshot will not include the contents inside and under &lt;code&gt;&#x2F;home&lt;&#x2F;code&gt; (which at this point should be empty anyways).&lt;&#x2F;p&gt;
&lt;p&gt;You can access the contents of a snapshot at any time in the &lt;code&gt;.zfs&lt;&#x2F;code&gt; directory at the root of a given dataset. For the ones we previously set up, those would be &lt;code&gt;&#x2F;.zfs&lt;&#x2F;code&gt; and &lt;code&gt;&#x2F;home&#x2F;.zfs&lt;&#x2F;code&gt;. Note that these directories are not only hidden in the traditional way, but they won’t show up even if you use &lt;code&gt;ls -a&lt;&#x2F;code&gt;. You need to actually &lt;code&gt;cd&lt;&#x2F;code&gt; into the apparently absent directory for it to work.&lt;&#x2F;p&gt;
&lt;p&gt;ZFS snapshots start taking virtually no space at all, but grow with time as the snapshot drifts from the present system state. For that reason, keeping a snapshot of the very first moment of your system can take up significant space. Depending on your storage resources, you might eventually decide to destroy this snapshot:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;zfs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; destroy&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;r&lt;&#x2F;span&gt; zroot&#x2F;ROOT&#x2F;void@baseline&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;You may also want to list your current snapshots. While typically you can use &lt;code&gt;zfs list -t snap&lt;&#x2F;code&gt;, I tend to use the following command in order to get more relevant output:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;zfs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; list&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;t&lt;&#x2F;span&gt; snap&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;o&lt;&#x2F;span&gt; creation,name,used,written,referenced,refcompressratio&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;S&lt;&#x2F;span&gt; creation&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Finally, you might want to rename a snapshot:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;zfs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; rename&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;r&lt;&#x2F;span&gt; zroot&#x2F;ROOT&#x2F;void@baseline @day0&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Combined, these commands can get you as far as an automatic, rolling snapshot system. Say, for instance you add the following to &lt;code&gt;rc.local&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;sh&quot; class=&quot;language-sh z-code&quot;&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;zfs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; destroy&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;r&lt;&#x2F;span&gt; zroot&#x2F;ROOT&#x2F;void@fallbackBoot&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;zfs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; rename&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;r&lt;&#x2F;span&gt; zroot&#x2F;ROOT&#x2F;void@previousBoot @fallbackBoot&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;zfs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; rename&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;r&lt;&#x2F;span&gt; zroot&#x2F;ROOT&#x2F;void@currentBoot @previousBoot&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;zfs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; snapshot&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; -&lt;&#x2F;span&gt;r&lt;&#x2F;span&gt; zroot&#x2F;ROOT&#x2F;void@currentBoot&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This would give you a per-boot snapshot trail to rely on.&lt;&#x2F;p&gt;
&lt;p&gt;The &lt;code&gt;zfs-snapshot(8)&lt;&#x2F;code&gt; man page provides a similar example for daily snapshots. Considering how simple the zfs CLI is, scripting several snapshot schemes can be quite easy, be them per boot, daily, or even every so many minutes using cron. Because ZFS snapshots grow as they drift from the present state, rotating them is optimal when storage space is a concern.&lt;&#x2F;p&gt;
&lt;p&gt;That’s it! I hope this was helpful to you in either learning about ZFS or about Void installations with Root on ZFS.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;p&gt;&lt;em&gt;Originally written June 2nd, 2024&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Meeting the BSD family</title>
        <published>2024-05-20T00:00:00+00:00</published>
        <updated>2024-05-20T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Juno Takano
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.jutty.dev/posts/meeting-the-bsd-family/"/>
        <id>https://blog.jutty.dev/posts/meeting-the-bsd-family/</id>
        
        <content type="html" xml:base="https://blog.jutty.dev/posts/meeting-the-bsd-family/">&lt;p&gt;During this year I have been delving deeper and deeper in the BSD realm. Switching my home server to FreeBSD, trying NetBSD and OpenBSD on my backup machine, getting a cheap SSD to see how they’d all run on my main one, all beaming with the joy of tinkering and learning.&lt;&#x2F;p&gt;
&lt;p&gt;As a nerd who delights in reading documentation, manuals and handbooks, I feel like I have found a gigantic library to lose myself in. And to me the delight of such reading is in that it’s never a passive learning experience, but something you can act on and bring to fruition yourself.&lt;&#x2F;p&gt;
&lt;p&gt;While Linux-based operating systems, with all the popularity they have gained, have developed into a complex and extremely active ecosystem, the BSD operating systems feel less bloated and more focused on whatever their specialty is.&lt;&#x2F;p&gt;
&lt;p&gt;You can’t really complain about software availability, given the amount of pre-packaged binaries you will find. When trying FreeBSD, I could not miss anything I needed. More recently, on NetBSD, I also found most of the tools I reached for.&lt;&#x2F;p&gt;
&lt;p&gt;Though I have a mostly text-driven workflow, doing almost all things with a browser and a terminal alone – which certainly helps in making your stack more portable – I do rely on some GUI applications for the domains where they excel.&lt;&#x2F;p&gt;
&lt;p&gt;What you might experience is a slower pace of change for major things, such as on Wayland adoption, which like it or not is coming for all of us with X deprecation looming.&lt;&#x2F;p&gt;
&lt;p&gt;Running BSD is an incredible opportunity to really learn about UNIX-like systems and operating systems in general.&lt;&#x2F;p&gt;
&lt;p&gt;Recently, I’ve been learning more about NetBSD after spending some time with FreeBSD. And this inner diversity of fully-independent operating systems with their own kernels and perks keeps multiplying the learning opportunities.&lt;&#x2F;p&gt;
&lt;p&gt;If you already learned a lot about whatever OS you currently use, I’d say particularly if that OS is Linux-based, when you start to play with a BSD system you are able to realize what is similar and what is not.&lt;&#x2F;p&gt;
&lt;p&gt;Whatever is different is likely teaching you the more portable, UNIX way of doing things. Even if it isn’t, it’s teaching you how a different OS is designed and behaves.&lt;&#x2F;p&gt;
&lt;p&gt;Things that are the same, which are not few, also offer learning opportunities. You get to see what parts of a Linux-based OS perhaps didn’t really originate there, or aren’t in any way an exclusive feature of it.&lt;&#x2F;p&gt;
&lt;p&gt;Now, to lay any zealousness aside and not make this a saccharine one-sided tale, I’d also like to mention a certain social phenomenon that this endeavour reminded me of.&lt;&#x2F;p&gt;
&lt;p&gt;This is certainly not something specific to BSD, but because it has such an engaged and savvy community, you definitely get to notice it sometimes. I’m talking about the tendency to identify with and then indiscriminately defend the software you use.&lt;&#x2F;p&gt;
&lt;p&gt;One common meme you’ll find is people complaining about lack of hardware support, especially wifi. In response, I’ve seen people stating with little nuance that any difficulty to getting your hardware to work on &amp;lt;insert a BSD OS here&amp;gt; is to be explained by poor skills or lack of dedication in reading the documentation.&lt;&#x2F;p&gt;
&lt;p&gt;I see that as denial. When everyone around is just defending something to no end, no critiques allowed, it starts to feel… awkward, to say the least.&lt;&#x2F;p&gt;
&lt;p&gt;Conversely, when I see people openly pointing out weaknesses in something I value and that I can tell they also care for, I feel relief and admiration for that person and that community at large. And thankfully I have also found a lot of this among the BSD folks.&lt;&#x2F;p&gt;
&lt;p&gt;Because running a given operating system on a machine you rely on is such a big commitment, it intensifies this phenomenon where users start to identify with the software they use and defend it beyond reason.&lt;&#x2F;p&gt;
&lt;p&gt;It happens with frameworks, desktop environments and window managers, but operating systems require you to commit even more because you can’t just swap them as easily, so my guess is we identify to compensate this sense of being tied to it. And from this identification comes an urge to deny any defect.&lt;&#x2F;p&gt;
&lt;p&gt;If you are cognizant of the perils, identifying with something is not necessarily a bad thing, though. To some extent, it is inevitable, and being really into something, caring about it, nurturing immense curiosity and a desire to discuss it, are all sources of pleasure I do not excuse myself from.&lt;&#x2F;p&gt;
&lt;p&gt;Software wars aside, getting to know this family of operating systems better has been a joy. It opened up whole new avenues and perspectives to understanding operating systems as a whole, and how beyond Linux-based OSs there are numerous other free and open source operating systems that strengthen the diversity in this field.&lt;&#x2F;p&gt;
</content>
        
    </entry>
</feed>
