docs(meta): Adjust for UEFI/legacy BIOS difference (#5)

This commit is contained in:
hygienic-books 2023-10-27 02:49:03 +02:00
parent 9f0f19355e
commit edd104ed1c

View File

@ -80,13 +80,15 @@ NAME SIZE FSTYPE PARTTYPE PARTTYPENAME PTTYPE
└─/dev/sda2 9.5G 0xbf Solaris dos
```
## ZFS dataset layout
# Partition naming
The script will create a single ZFS zpool `zpool` on the `BF00` partition with dataset child `zpool/root` which itself has one child `zpool/root/archlinux`, that's where Arch Linux gets installed. Parallel to `zpool/root` it'll create `zpool/data` with a `zpool/data/home` child dataset that gets mounted at `/home`.
Since this script works with UEFI and legacy BIOS mode we'll be addressing both disk layout schemes with umbrella terms for better readability: "The zpool partition" will be GPT `BF00` partition and MBR `bf` partition. You'll parse the text accordingly. "The boot partition" will be GPT `EF00` partition as well as the MBR `83` partition.
The script will use the `EF00` partition to install a ZFSBootMenu EFI executable if `efibootmgr` says that no such `ZFSBootMenu` entry exists. If ZFSBootMenu gets added to the EFI partition it'll become primary boot option.
# ZFS dataset layout
## How to run this?
The script will create a single ZFS zpool `zpool` on the zpool partition with dataset child `zpool/root` which itself has one child `zpool/root/archlinux`, that's where Arch Linux gets installed. Parallel to `zpool/root` it'll create `zpool/data` with a `zpool/data/home` child dataset that gets mounted at `/home`.
# How to run this?
- Boot an Arch Linux live CD ISO image
- Run:
@ -95,9 +97,9 @@ The script will use the `EF00` partition to install a ZFSBootMenu EFI executable
```
During execution the script will call itself when it changes into its `chroot`, that's why we `export SCRIPT_URL`. Feel free to update `"${SCRIPT_URL}"` with whatever branch or revision you want to use from [quico.space/quico-os-setup/arch-zbm](https://quico.space/quico-os-setup/arch-zbm). Typically `.../branch/main/setup.sh` as shown above is what you want.
### Options
## Options
#### Compression
### Compression
By default we create a zpool with ZFS property `compression=on`. If the `lz4_compress` pool feature is active this will by default enable `compression=lz4`. See `man 7 zfsprops` for example in ZFS 2.1.9 for details. See `zpool get feature@lz4_compress <pool>` to check this feature's status on your `<pool>`.
@ -106,7 +108,7 @@ To get a zpool with uncompressed datasets export the shell variable `ARCHZBM_ZFS
export ARCHZBM_ZFSPROPS_NO_COMPRESSION=yesplease
```
#### Encryption
### Encryption
By default we encrypt the zpool with ZFS property `encryption=on`. In ZFS 2.1.9 this defaults to `encryption=aes-256-gcm`.
@ -115,19 +117,23 @@ To get a zpool with unencrypted datasets export the shell variable `ARCHZBM_ZFSP
export ARCHZBM_ZFSPROPS_NO_ENCRYPTION=yup
```
## Steps
# Steps
The script takes the following installation steps.
1. Install ZFS tools and kernel module with [github.com/eoli3n/archiso-zfs](https://github.com/eoli3n/archiso-zfs)
1. Create one ZFS zpool on top of `BF00` partition, encrypted and compressed datasets, password `password`
1. Create one ZFS zpool on top of zpool partition, encrypted and compressed datasets, password `password`
1. _See paragraphs [Compression](#compression)/[Encryption](#encryption) to optionally disable properties_
1. Create dataset for Arch Linux and `/home`
1. Install Arch Linux into pool
1. Add ZFSBootMenu to `EF00` partition if it doesn't exist already
1. Add ZFSBootMenu to boot partition
1. Configure boot method
- Either an EFI image with EFI boot order entries on a UEFI machine
- Or Syslinux with `extlinux` for a legacy BIOS computer
1. Add `pacman` hooks to keep ZFSBootMenu images (and `extlinux`) updated
1. Exit into Arch Linux live CD ISO image shell for you to `reboot` and frolick
## Flavor choices
# Flavor choices
We make the following opinionated flavor choices. Feel free to change them to your liking.
@ -139,7 +145,7 @@ We make the following opinionated flavor choices. Feel free to change them to yo
- Timezone is `Etc/UTC`
- Check `timedatectl set-timezone <tzdata-zone>`
## Post-run manual steps
# Post-run manual steps
After installation you're going to want to at least touch these points in your new Arch Linux install: