From f48e4a59714242ad272ab0d2cd68ad31fef7da9b Mon Sep 17 00:00:00 2001
From: jultty
BOOT_DISK="/dev/nvme0n1"BOOT_PART="1"BOOT_DEVICE="${POOL_DISK}p${POOL_PART}"
+BOOT_DEVICE="${BOOT_DISK}p${BOOT_PART}"
/dev/nvme0n1p1-o autotrim=on Automatically reclaims unused blocks
from time to time. Can put the filesystem under some stressIf 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.
-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.
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.
Reconfiguring packages
-After chrooting, it might be a good idea to run +
After chrooting, it may be a good idea to run
xbps-reconfigureto 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
passwdand set the root password.-
rc.conf+
runitreads the/etc/rc.confduring startup -to configure the system, setting up things like the keymap, hardware -clock and terminal font.
runitreads the/etc/rc.conffile 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+accomplished by creating
dracutgenerates 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.confto:/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/fstabentry and mount:Now we can add an
/etc/fstabentry 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@baselineNote 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
+the contents inside and under/home/home(which at this point +should be empty anyways).You can access the contents of a snapshot at any time in the
.zfsdirectory at the root of a given dataset. For the ones we previously set up, those would be/.zfsand @@ -822,8 +826,8 @@ class="sourceCode sh">