diff --git a/void/reference/file-system.md b/void/reference/file-system.md new file mode 100644 index 0000000..f76bf4d --- /dev/null +++ b/void/reference/file-system.md @@ -0,0 +1,42 @@ +# File system management + +## Traditional partitioning + +Create EFI partition. + +Create other partitions. F2FS and ext4 support per folder encryption (important +in multi-user systems). BtrFS does transparent compression. + +### Encryption + +``` +cryptsetup --type luks2 luksFormat /path/to/device + +cryptsetup open /path/to/device mappername + +mkfs.filesystem /dev/mapper/mappername [-O encrypt] +``` + + +### Swap file + +``` +# create file +dd if=/dev/zero of= bs=1024 count= + +chmod 600 + +mkswap +swapon +``` + +From `/etc/fstab`: + +``` + none swap defaults,nofail 0 0 +``` + +#### Encrypted swap + +For an ephemeral encrypted swap (no password, no hibernation), waiting on a +`void-runit` commit. diff --git a/void/reference/system-configuration.md b/void/reference/system-configuration.md new file mode 100644 index 0000000..5ca437b --- /dev/null +++ b/void/reference/system-configuration.md @@ -0,0 +1,26 @@ +# System configuration + +Running `void.sh base_env` installs the stuff that's the bare minimum for my +setup. + +Inside `void.d` configuration files for dracut and the kernel tasks in Void can +also be found, as well as a file for setting up all the necessary system +services. + +## Configuring chroot installation + +Using `xvoidstrap` and `xchroot`, it is easy to install and enter a chroot +installation. Might require installing the `linux` package and generating +initramfs. + +- Allow `wheel` group to use `sudo`. Example file in `void.d`. +- Create user in `wheel` (superuser) and `video` (backlight) groups. +- If using `fscrypt` (F2FS and ext4), init it (rules and commands in Arch Wiki). +- Configure Dracut in `/etc/dracut.conf.d/`. + +## Configuring any installation + +- Configure locales in `/etc/default/libc-locales`. +- Configure AppArmor in `/etc/default/apparmor`. + +- Stow stuff and good to go. diff --git a/void/void.md b/void/void.md deleted file mode 100644 index a594299..0000000 --- a/void/void.md +++ /dev/null @@ -1,56 +0,0 @@ -# Facilitating the installation of Void Linux - -Running `void.sh install_most` installs the stuff that's the bare minimum for my -setup. - -Inside `void.d` configuration files for dracut and the kernel tasks in Void can -also be found, as well as a file for setting up all the necessary system -services. - -## Installation steps - -### Partitioning and creating filesystems - -Partitioning was manual. A UEFI setup can have only an ESP partition and the -main user one. Partitioning can be done with either `gdisk` (more CLI-y) or -`cfdisk` (more TUI-y). The ESP partition should be formatted as FAT32, and the -user one should be made into a LUKS2 volume via - -```````` -cryptsetup --type luks2 luksFormat /path/to/device -```````` - -This will ask you for the desired password and encryption scheme. - -To open the LUKS volume, run - -```````` -cryptsetup open /path/to/device mappername -```````` - -This will create a device in `/dev/mapper` named `mappername`. This device can -then de formatted with your filesystem of choice. I tend to go either with -Brtfs, ext4 or F2FS. The last two support per folder encryption if you want to -have another layer of protection (can be specially relevant in a multi-user -setup). Formatting is done by - -```````` -mkfs.filesystem /path/to/device [-O encrypt] -```````` - -The filesystem should now be ready to be used! - -### Installing the root filesystem - -The current installation setup was made by downloading a ROOTFS image from the -[Void Linux download page](https://a-hel-fi.m.voidlinux.org/live/current/) and -untarring it into the root of the desired filesystem. - -```````` -tar xvf void-x86_64-ROOTFS-20191109.tar.xz -```````` - -TODO: chroot into, DNS, install basic stuff (iwd and neovim, mostly), install -Linux, create initramfs, reboot, log into root, allow wheel to access stuff, -create user with certain groups, init fscrypt (copy rules from Arch Wiki), git -clone package, stow stuff, run startsway.