3.74 KB
Newer Older
Benjamin Slade's avatar
Benjamin Slade committed
1 2

Benjamin Slade's avatar
Benjamin Slade committed
This is a rough but working set of scripts to set up [[][Void Linux]] running on pure [[][ZFS]], =/=, =/home=, =/boot= and all on a fully [[][LUKS-encrypted]] partition.
Benjamin Slade's avatar
Benjamin Slade committed

* PSAs
Benjamin Slade's avatar
Benjamin Slade committed
** Dracut Breaking Change [2019:08:11T20:56:17:06:00]
*You will need to fix the post-install =dracut= script; otherwise future installed kernels will not properly locate your LUKS ZFS partition.*
8 9 10 11 12

Do so by running as root:

=sed -i 's/--force/--force --hostonly --include \/boot\/rootkey.bin \/rootkey.bin/' /etc/kernel.d/post-install/20-dracut=

Benjamin Slade's avatar
Benjamin Slade committed
13 14 15 16
NOTICE: basically the first thing that these scripts do (in is to wipe the drive you're installing to. 


Benjamin Slade's avatar
Benjamin Slade committed
So DON'T use this unless you're prepared to lose all data on the drive you're installing to. *The entire drive* (e.g. =/dev/sda=) will be wiped by 

Benjamin Slade's avatar
Benjamin Slade committed
20 21 22
The scripts are released under GPLv3, and come with absolutely no warranty, no refunds.

*  Basic Instructions
Run each script in order with =. <scriptname>= (in order to make variables available to next stage).

Benjamin Slade's avatar
Benjamin Slade committed
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
You need to somehow get the scripts over to the machine you're installing on. This may involve installing =git= and/or =rsync= on that machine.

For your installation medium, you might use either the [[][hrmpf rescue system]], itself built on Void Linux, or else an [[][Ubuntu Live CD]] (the latter having the advantage of not having to recompile ZFS DKMS modules twice (one for the chroot-host, once in the chroot), and having an easier-to-get-working WiFi, so that is what I'd actually recommend).

* Caveats, Limitations
** ZFS pool dimensions
The scripts assume that you have a single drive that you're creating a single LUKS partition on for your ZFS pool which will be your Void Linux =/=, =/home=, =/boot= &c. 

If you have something more complex in mind, it shouldn't be too hard to modify the scripts accordingly, though LUKS encryption means you'll have to worry about multiple LUKS-encrypted device UUIDs and this information is made use of at several points in the scripts. Hopefully a future, more sophisticated version will have built in support for using mirrored, raidz, &c. groups of drives.

The scripts assume a 'BIOS', i.e. non-(U)EFI, set-up. This should be even easier to modify than the ZFS pool configuration, but I don't use UEFI on any of my current Void machines, so this is set up for a 'BIOS', Coreboot/Libreboot-compatible installation.

** libc, architecture
The scripts assume that the glibc flavour of Void will be installed. Installing musl libc instead should be relatively easy: just specify the relevant musl rootfs in and comment out the locale setup in In theory it should work on ARM as well, though I don't think the ZFS DKMS modules currently build against the =rpi-kernel=.

Benjamin Slade's avatar
Benjamin Slade committed
41 42
** Post-installation configuration
The installation scripts have you set timezone, language(s), keyboard, system-name/hostname, root password, and a single non-root user account (& password). And there's some 'courtesy' stuff to make first-boot WiFi a bit easier (i.e. setting up NetworkManager), including a final first-boot script which (if the NetworkManager option is selected earlier in the installation) will enable the relevant services. But =sudo= access for the =wheel= group is not set up for you, nor is any graphical user interface set up. But, if you have internet access, the remainder of the post-installation configuration can be conducted as desired, perhaps following [[][the relevant bits of the Void Wiki]].