feat(rescue): bootable Debian rescue stick #1
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/rescue-image"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
rescue/image: a bootable Debian Trixie USB stick for laptop repair — disk, LVM, bcache, cryptsetup, vendor firmware (Intel WiFi, MediaTek), SSH, restic, tmux.rescue/mkosi.conf(version26.10.3viamkosi.version/mkosi.bump): two GPT partitions — 512 MiB ESP fixed, 3 GiB btrfs root — nofstab:systemd-gpt-auto-generatorfinds both by GPT type./booton the root tree stays deliberately empty; a populated one makes the generator drop the ESP.UnifiedKernelImages=none) soapt upgradekernels actually boot; root autologin on every console including serial; one sharedwpa_supplicantconfig for every adapter, started per interface by a udev rule; networkd DHCP;.bash_historyseeded from two real repair sessions; the README ships to/root.rescue/mise-tasks/buildinjects secrets from a directory argument (refuses missing or wrong-mode files) and defaults to the inert stand-ins inrescue/tests/fixtures/secrets/, so the default build is harmless.write.sh: refuses non-root and drives that are neither USB nor removable, asks for a typed confirmation,dds the newest.raw, thensgdisk -emoves the backup GPT to the end of the (larger) stick whensgdiskis present.test.sh: builds with the fixtures, checks the partition table, boots under QEMU/OVMF and runs 24 checks — shell, gpt-auto mounts, loader, networkd/wpa, firmware, snapshots, secrets, ssh key pair.README.mdcovers both images and the rescue workflow;mise.tomlgainsqemu-system-x86,ovmf,util-linux;.gitignoreignoresVARS.fd; newopencode.jsoncdenies the agent read/edit/grep/bash access to*secrets/*(fixtures explicitly allowed).Why
opencode.jsonc.apt upgradewould install kernels that never boot. Grow-on-first-boot — the image is sized at build time,systemd-growfshas nothing to do. GRUB BIOS — the target hardware boots UEFI.Verification
./test.sh(build + QEMU/OVMF boot, fixture secrets)write.shon a non-removable diskwrite.shwithoutsgdisk*secrets/*denied, fixtures allowedopencode.jsonc, by inspectionOut of scope
dd— an undersized stick fails mid-write; the README documents it.sgdiskautomatically — a missing binary warns and continues.We must add
sudo sgdisk -e /dev/sdato the readme or to the writing script.WIP: feat/rescue-imageto feat(rescue): bootable Debian rescue stickfe4ff2c073to7450123da3