diff --git a/README.md b/README.md index 42409b6..bc6f47f 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ The scripts will take it from there, asking you for information and downloading ## How It Works -`//TODO:` Add detailed documentation +`//TODO:` Add detailed documentation of how the thing works, changes to the boot up process, and whatever other scripts are in here ## Files @@ -56,7 +56,7 @@ The scripts will take it from there, asking you for information and downloading - `install-stage2.sh`: continues setting up things after booting into the freshly installed base system - `opt/grub-config`: the custom grub config generator to be installed in /opt/void-usb - `opt/backup-fs`: helper script to regenerate the squashfs -- `procedure.txt`: notes to self, will disappear once finished +- `notes_to_self.txt`: will disappear once finished - `bootup.sh`: script that sets up the overlay - `bashrc`: just a custom bashrc - `update-squashfs.sh`: runs at shutdown, allows user to back up the system diff --git a/procedure.txt b/notes_to_self.txt similarity index 55% rename from procedure.txt rename to notes_to_self.txt index 5456a1a..5ccc327 100644 --- a/procedure.txt +++ b/notes_to_self.txt @@ -5,6 +5,15 @@ need xdg menu maker? check if there are problems with GRUB’s --disk-module=native on real USB drives on real hardware test that the (RAM) boot option allows you to install to the stick the system booted off adjust required USB stick and RAM size in README +test kernel hooks and grub-config with all sorts of weird kernel/initramfs setups + - all names + - various compressions +do not rely on the RTC + - change the message when configuring UTC/localtime to reflect that this is only for offline usage + - use ntp to get time + - only fall back to using rtc if offline + - do not set the RTC +move /boot to /container musl downsides: - no nvidia drivers @@ -23,6 +32,16 @@ system lives on squashfs swap on zram f2fs for home +boot setup + dracut configuration + - root=/dev/loop0 ro + - custom dracut modules + - udev rule for /dev/loop0 + - pre-mount script + - mount /container by UUID (possibly passed from a kernel command line parameter) + - losetup the squashfs img + - do we need one to move over the /container mount to real root? + - overlayfs gets mounted from fstab + when backing up - do not cross file system boundaries - exclude /tmp, package cache, logs @@ -31,73 +50,23 @@ when backing up - consolidate when the user requests it or when exceeding the limit Steps to install: - - (user does this:) boot Void installer - -> log in as root - -> connect to the internet - -> download and run install script - - preparations: - -> update xbps - -> install xmirror squashfs-tools - -> make our own or extract (if feasible) kb selection and time zone selection to hijack them for our purposes + - make our own or extract (if feasible) kb selection and time zone selection to hijack them for our purposes - select kb layout - - set up disk - -> select disk from a list - -> warn user about formatting and making the USB stick unusable with Windows - -> allow user to double check that it’s the USB drive - -> wipe and partition disk (new gpt) - -> 2M BIOS GRUB - -> 268M ESP - -> 1G /boot - -> rest /container - -> format partitions - -> ESP FAT32 - -> /boot and /container F2FS - - mount them things - -> set up plain tmpfs as / for now - install base system - -> select mirror - -> just use xmirror and get the result from the file - -> if musl repo, remove that bit from repo url -> select installation type (x86_32/x86_64/aarch64, glibc/musl) -> if musl, add that bit to repo url - -> install packages - -> linux bash shadow f2fs-tools dosfstools dbus NetworkManager iana-etc iw wpa_supplicant util-linux which tar man-pages iproute2 iputils wifi-firmware traceroute grep gzip file sed gawk less coreutils findutils diffutils pciutils usbutils tzdata base-files ncurses mdocml procps-ng kbd xbps sudo ethtool kmod eudev runit-void removed-packages nano acpid squashfs-tools grub grub-i386-efi grub-x86_64-efi - -> configure XBPS mirror - -> configure sudo - -> drop a file with "%wheel ALL=(ALL:ALL) ALL" in /etc/sudoers.d/sudo_group -> configure overlayfs setup -> startup script -> shutdown squashfs updater -> rc.shutdown? - -> configure fstab - -> /boot, /boot/efi - -> /home (bind mount) - -> NOT /, /container - -> configure rc.conf - -> keyboard layout - -> hardware clock set to UTC? - -> configure time zone while we’re at it + -> configure time zone -> selection dialog? -> symlink /etc/localtime - -> configure host name - -> install and configure bootloader - -> install GRUB for i386-pc, i386-efi, x86_64-efi - -> --removable and --no-nvram for EFI - -> --boot-directory set to /boot/loader to prevent grub-mkconfig kernel hook from running - -> state as much in a text file in there - -> add kernel hooks - -> script to run /opt/void-usb/grub-config - -> a script that updates vmlinu{z,x} and initramfs.img symlinks - -> add symlinks for newly installed kernel - -> guess best choice when removing the currently symlinked kernel - -> ask whether to run vkpurge if disk space is low - -> download grub-config and its resources and drop them in /opt/void-usb - -> xbps-reconfigure -fa + -> set up an initramfs to mount the squashfs/overlayfs at boot time -> prepare 2nd stage installation - -> auto login root - -> put script in .bashrc + -> auto login root and put script in .bashrc + -> better method? -> build squashfs - -> (if needed) set up an initramfs with busybox to mount the squashfs/overlayfs at boot time - prompt user to reboot to finish installation - second stage installation -> configure services