mirror of https://github.com/ericonr/dotfiles.git
Split setting up documentation.
This commit is contained in:
parent
5da6674a12
commit
99a965c1a4
|
@ -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=<partition or file> bs=1024 count=<number of KiB>
|
||||||
|
|
||||||
|
chmod 600 <partition or file>
|
||||||
|
|
||||||
|
mkswap <partition or file>
|
||||||
|
swapon <partition or file>
|
||||||
|
```
|
||||||
|
|
||||||
|
From `/etc/fstab`:
|
||||||
|
|
||||||
|
```
|
||||||
|
<partition or file> none swap defaults,nofail 0 0
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Encrypted swap
|
||||||
|
|
||||||
|
For an ephemeral encrypted swap (no password, no hibernation), waiting on a
|
||||||
|
`void-runit` commit.
|
|
@ -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.
|
56
void/void.md
56
void/void.md
|
@ -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.
|
|
Loading…
Reference in New Issue