Add cleanup for bind mounts (/dev, /proc, /sys, /run) created during post-install phase. Without this, failures in post-install leave bind mounts active, preventing subsequent cleanup of the main filesystem mounts. Clean bind mounts first (innermost to outermost), then regular mounts, then LUKS mapping to ensure proper teardown order. Decision: Check each bind mount individually rather than relying on umount -R to handle everything, for better error reporting and partial cleanup capability. Context: Bind mounts are only created if post-install phase is reached, but rollback must handle cleanup from any failure point.
Void Bootstrapp Wrapper
Ein Bash-Wrapper, der die kritischen Vorarbeiten fuer eine verschluesselte Void-Linux-Installation erledigt und danach den offiziellen void-installer nutzt.
Ablauf
- Sanity Checks (Root, UEFI, Zielplatte)
- Partitionierung (GPT, ESP + Root)
- LUKS-Verschluesselung und Mapping
- Dateisysteme (btrfs oder ext4)
- Mounts fuer den Installer
- Installer-Handoff (manuelle Mountpoints, kein Reformat)
- Post-Install (crypttab, dracut, GRUB, optional Swapfile)
Usage
sudo ./src/main.sh [--dry-run] [--skip-installer]
Flags
--dry-run: Zeigt die Konfiguration und bricht ohne Aenderungen ab.--skip-installer: Laesst den Start vonvoid-installeraus (manuell starten).
Installer Bedienung nach dem Script
Im void-installer musst du die vorbereiteten Mounts uebernehmen und darfst nichts formatieren.
- Waehle die manuelle Partitionierung.
- Setze nur die Mountpoints, ohne Formatierung.
- Root:
- Device:
/dev/mapper/cryptroot - Label:
void-root(btrfs und ext4) - Mountpoint:
/ - Format: aus
- Device:
- ESP:
- Device: erste Partition der Disk (meist
...1) - Label:
EFI - Mountpoint:
/boot/efi - Format: aus
- Device: erste Partition der Disk (meist
Wenn Labels nicht angezeigt werden, pruefe mit lsblk -f, welches Device void-root bzw. EFI traegt.
Bei btrfs sind Subvolumes bereits angelegt und gemountet: @, @home, @var, @log, @snapshots, @swap.
Der Installer soll keine neuen Subvolumes anlegen oder formatieren, sondern die vorhandenen Mounts unveraendert lassen.
Es reicht, im Installer nur / und /boot/efi zu setzen; die Subvolumes werden im Post-Install in /etc/fstab eingetragen.
Mapping der Subvolumes (gesetzt durch den Wrapper/Post-Install):
@->/@home->/home@var->/var@log->/var/log@snapshots->/.snapshots@swap->/swap
Hinweise
- Der Wrapper ist destruktiv und loescht die Zielplatte nach expliziter Bestaetigung.
- UEFI ist Pflicht; BIOS-Installationen sind nicht unterstuetzt.
- Logs landen unter
/tmp/void-wrapper-YYYY-MM-DD-HHMMSS.log.