From f48e4a59714242ad272ab0d2cd68ad31fef7da9b Mon Sep 17 00:00:00 2001 From: jultty Date: Mon, 10 Jun 2024 08:47:45 -0300 Subject: [PATCH] Void on ZFS: Regenerate HTML --- posts/void-on-zfs.html | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/posts/void-on-zfs.html b/posts/void-on-zfs.html index 44d4e99..9792338 100644 --- a/posts/void-on-zfs.html +++ b/posts/void-on-zfs.html @@ -324,7 +324,7 @@ have:

@@ -584,7 +584,7 @@ imported as long as a sufficient number of devices are present.”

If zfs import is used without any arguments, it will list the exported pools available to be imported.

The -N root option imports the pool without mounting any -of its file systems, and the -R option “sets the +of its file systems, the -R option “sets the cachefile property to none and the altroot property to root”. In this case, that root will be /mnt.

@@ -619,13 +619,14 @@ package manager to fetch the Void base system.

-S takes care of synchronizing the data from the mirror so that package data is fetched, -R allows us to manually specify the repository for this run, and -r allows choosing -a different root directory.

+a different root directory to act upon.

Here, I chose the Fastly mirror over the ServerCentral one. Any working mirror should do.

-

Note that not all mirrors have the same directory structure. You can -access the mirror in a browser or otherwise inspect it to find the path -to the current directory.

+

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 +current directory.

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.

 

A block of paper with some notes scribbled: “check connection first of all”, “reconfigure after chroot”, “see /usr/share/doc/efibootmgr/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.

Reconfiguring packages

-

After chrooting, it might be a good idea to run +

After chrooting, it may be a good idea to run xbps-reconfigure 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 @@ -664,9 +665,9 @@ installing the base system.

As early as possible is a good time to run passwd and set the root password.

rc.conf

-

runit reads the /etc/rc.conf during startup -to configure the system, setting up things like the keymap, hardware -clock and terminal font.

+

runit reads the /etc/rc.conf file during +startup to configure the system, setting up things like the keymap, +hardware clock and terminal font.

For your reference, here is what I added to mine during the installation:

dracut
 

dracut 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 editing /etc/dracut.conf.d/zol.conf to:

+accomplished by creating /etc/dracut.conf.d/zol.conf +with:

nofsck="yes"
 add_dracutmodules+=" zfs "
 omit_dracutmodules+=" btrfs "
-

Notice the spaces surrounding the module names

+

Notice the spaces surrounding the module names.

Installing and configuring ZFSBootMenu

We are now ready to install both ZFS and ZFSBootMenu. Let’s start @@ -713,7 +715,8 @@ class="sourceCode sh">

mkfs.vfat -F32 "$BOOT_DEVICE"
-

And an /etc/fstab entry and mount:

+

Now we can add an /etc/fstab entry pointing to it, and +mount:

echo "$(blkid | grep "$BOOT_DEVICE" | cut -d ' ' -f 2) /boot/efi vfat defaults 0 0" >> /etc/fstab
 
@@ -786,7 +789,8 @@ you make important changes that could potentially break the system.

class="sourceCode sh">zfs snapshot -r zroot/ROOT/void@baseline

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 /home

+the contents inside and under /home (which at this point +should be empty anyways).

You can access the contents of a snapshot at any time in the .zfs directory at the root of a given dataset. For the ones we previously set up, those would be /.zfs and @@ -822,8 +826,8 @@ class="sourceCode sh">