mirror of
https://github.com/theupriser/steamify-cachyos-dev.git
synced 2026-10-05 12:45:56 +02:00
docs: vm-install skill, TESTPLAN section B and TODO for the boot loader test and the full automated suite
This commit is contained in:
1 parent
ed12ecb57d
commit
38a50ab57d
3 files changed
+160
-7
No files matched your search
@@ -70,12 +70,93 @@ and wait with an until-loop on the log, e.g.
|
||||
on); `fatal library error, lookup self` in the chroot is harmless.
|
||||
- QMP screenshots don't work (virgl, "no surface"): watch the window, the
|
||||
serial log, or the install log.
|
||||
- `pkill -f`/`pgrep -f` with a pattern that also appears in your own command
|
||||
line kills or matches your own shell (exit 144). Use `[q]emu` bracket
|
||||
patterns, or kill by PID from `ps -eo pid,args`, in a separate command.
|
||||
- A wait loop that runs `pgrep -f "x"` over ssh matches its own ssh command:
|
||||
write `"[x]"`. And `systemctl --wait start` on a unit that already
|
||||
finished waits for ever; poll `systemctl is-active` instead.
|
||||
- The live script must not wait for `systemctl is-system-running --wait`: it
|
||||
is itself the running `kernel-command-line.service` job (deadlock). It waits
|
||||
for `pacman-init.service` to be active instead (else "no secret key
|
||||
available to sign with").
|
||||
- Only one VM at a time (port 2222); a second `vminstall.sh` refuses while
|
||||
qemu runs. Run several installs one after the other from a script, and
|
||||
give `--force` runs a terminal or delete `disk.qcow2` first (the YES
|
||||
prompt reads /dev/tty).
|
||||
- The guest's login shell is fish: send bash through stdin
|
||||
(`ssh ... 'bash -s' < script.sh`), not loops on the command line.
|
||||
- `/boot` is root-only: use `sudo` for `ls`/`cat` there, or checks report
|
||||
"no entries" for nothing.
|
||||
- `ssh` "timed out during banner exchange" only means QEMU accepted the
|
||||
forwarded port: the guest's sshd isn't answering (still booting, waiting in
|
||||
a boot menu, or a firewall). It says nothing more.
|
||||
- Never run `systemctl reboot --firmware-setup --dry-run` to "check": it
|
||||
still sets the EFI flag and the next boot lands in the UEFI setup menu.
|
||||
`bootctl status` shows `Boot into FW: supported` normally, `active` = set.
|
||||
|
||||
## The Steamify CachyOS ISO (later)
|
||||
## The Steamify CachyOS ISO
|
||||
|
||||
`--iso <steamify iso>` installs it the same way if it's archiso-based with
|
||||
`cachyos-installer`. The headless installer doesn't run Calamares, so the
|
||||
ISO's Steamify step (`steamify-install`) doesn't run by itself: run it in the
|
||||
live script after the install (`/usr/local/bin/steamify-install /mnt
|
||||
$VM_USER <options>`) when testing the ISO, and check
|
||||
`/var/log/steamify-install.log` in the installed system.
|
||||
`--iso <steamify iso>` (archiso with `cachyos-installer`). The headless
|
||||
installer doesn't run Calamares, so `vminstall-live.sh` runs the ISO's
|
||||
`steamify-install /mnt $VM_USER "$VM_STEAMIFY"` itself after the install
|
||||
(empty `VM_STEAMIFY` = the Steamify page's default, everything on; ids to
|
||||
narrow; `skip` = plain CachyOS) and fails the install if its log doesn't end
|
||||
`exit: 0`. The log ends up in `/var/log/steamify-install.log`. The post script
|
||||
keeps Steamify's gaming-mode login (SDDM,
|
||||
`/etc/sddm.conf.d/10-gamescope-autologin.conf`) instead of forcing the Plasma
|
||||
autologin, and the first-boot check then wants the display manager, not
|
||||
plasmashell (gamescope doesn't render in the VM: a black window is normal).
|
||||
|
||||
## Other options
|
||||
|
||||
- `VM_BOOTLOADER=limine|systemd-boot|grub` (default limine) goes into the
|
||||
installer's settings. Use one `VM_DIR` per loader (`~/vms/bl-grub`, ...).
|
||||
cachyos-installer leaves systemd-boot with `#timeout 3` and no default (it
|
||||
waits in the menu for ever): the post script writes `timeout 3` and
|
||||
`default linux-cachyos.conf`, like it sets Limine's `default_entry`.
|
||||
- The installer enables **ufw**, which drops the host's ssh
|
||||
(`[UFW BLOCK] DPT=22` in the kernel log): the post script runs
|
||||
`ufw allow 22/tcp`.
|
||||
- `VM_CACHE=<dir>` (default `~/vms/pkg-cache`, empty = off) is a host package
|
||||
cache shared as 9p tag `cache`, bound over pacman's cache in the live system
|
||||
and in the new one (Steamify's packages): the first install fills it.
|
||||
|
||||
## Testing a boot loader: `scripts/vmtest.sh`
|
||||
|
||||
Run this instead of doing the steps below by hand: `scripts/vmtest.sh [--install] [--window] [loader...]`
|
||||
(default: every loader the ISO advertises, read from `calamares-online.sh`; it fails when an advertised
|
||||
loader has no test). One VM per loader in `~/vms/bl-<loader>` (`--install` builds them from the newest
|
||||
Steamify ISO, ~8 min each, ~3 min per test), headless with a Konsole on the logs (`--window` shows the VMs),
|
||||
one summary line per loader, `~/vms/bl-<loader>.test.log`, exit status = failed checks. Checks live in
|
||||
`share/bootloader-test/*.sh` (one PASS/FAIL line each); the driver is `scripts/vmbootloadertest.sh`.
|
||||
Last result: Limine 41, systemd-boot 40, GRUB 40 checks, 0 failed.
|
||||
What only shows up per loader: Limine keeps its images under `/boot/<machine-id>/<kernel>/` and copies one
|
||||
only when its content changed (same version = untouched), and `remember_last_entry: yes` overrides
|
||||
`default_entry` (the test turns it off and restores it); GRUB's other kernel is picked with
|
||||
`GRUB_DEFAULT="1>N"` + `grub-mkconfig` (key presses miss its 5 s menu); systemd-boot with
|
||||
`bootctl set-oneshot <entry>.conf`. The "kernel update" reinstalls what the installed system's database lists,
|
||||
which can be older than what the installer got (mirror skew: 7.2.8 installed, 7.2.7 in the database): a
|
||||
downgrade, but still a version change through the same hooks.
|
||||
|
||||
Manual version of the same, for one loader:
|
||||
|
||||
Steamify's kernel-side parts (`steamify-fremont-poweroff`, `steamify-cros-ec-cec`,
|
||||
`leds-valve-dkms`) are DKMS modules for every installed kernel, only installed
|
||||
when the VM reports Fremont: start the VM with `./run.sh --fremont`, then run
|
||||
`steamify.sh --defaults --options gaming,theme,glyphs,single,launcher,notify,vram,cec,machine,poweroff`
|
||||
from the shared repo (`sudo mount -t 9p -o trans=virtio,version=9p2000.L repo /mnt`).
|
||||
Then per loader: `dkms status` (3 modules x each kernel), reinstall both kernels
|
||||
+ headers (`pacman -S linux-cachyos linux-cachyos-lts` + headers: rebuilds
|
||||
DKMS, initramfs, and for GRUB the config), reboot into the default kernel and
|
||||
into the other one (systemd-boot: `bootctl set-oneshot <entry>.conf`; GRUB or
|
||||
Limine: send keys with `scripts/qmpkey.py <vm>/qmp.sock down ret ...`, or
|
||||
change `default_entry`), and check `uname -r`, `lsmod`, and `dmesg | grep steamify`.
|
||||
The legacy `drm.edid_firmware` removal (`hdmi_remove_boot_param`) is the code
|
||||
that differs per loader: seed the parameter in `/etc/default/grub`,
|
||||
`/etc/sdboot-manage.conf` or `/etc/default/limine`, source `lib/common.sh`,
|
||||
`state.sh`, `hdmi-refresh.sh` from `/mnt`, and run it. To see why a VM won't
|
||||
boot without a console, stop it, `qemu-img dd` the first 2 GB to a raw file,
|
||||
`dd skip=1M` to cut the ESP, `udisksctl loop-setup` + `mount` it (no root),
|
||||
and read `loader/loader.conf` and the entries; or boot the kernel directly with
|
||||
`VM_KERNEL/VM_INITRD/VM_APPEND=... console=ttyS0` and `VM_SERIAL=` for a log.
|
||||
Reference in new issue
Block a user