EDIT: MY BAD, it was NOT the update. Further digging showed the real cause: I had grown the root filesystem online (growfs / on a mounted UFS root) about a minute before the update. The firewall log, which is written constantly, has entries every minute up to 19:38 and then nothing until the reboot at 19:56. So after the growfs, no writes reached the disk. The 26.7.10p2 update was just the first big write that got lost when the VM shut down. Sorry for the noise. 26.7.10p2 is fine.
Lesson: after growing a UFS root online, reboot right away and check that writes are still landing (e.g. the logs keep growing). Better still, do the resize from single-user mode. And snapshot the qcow2 first.
-------
Setup: OPNsense 26.7.10p1 as a VM on Debian 13 (libvirt/KVM), qcow2 on virtio, UFS root. Disk uses libvirt's default cache mode (no `cache=` set, so not `unsafe`) with `discard='unmap'`. WAN is PPPoE, so the VM is also the host's only way to the internet.
What happened:
- Today I updated 26.7.10p1 -> 26.7.10p2 (the "patch release 2" in the 26.7.10 announcement thread: openssl35 3.5.10, openvpn 2.7.10, dnsmasq 2.93_2, opnsense 26.7.10p2). The update log finished cleanly, with no errors.
- On the next boot, rc.bootup died with:
`Fatal error: Uncaught Error: Call to undefined function convert_config() in /usr/local/etc/rc.bootup:63`
When I commented that line out, it failed on `system_devd_configure()` instead.
- The cause turned out to be that `/usr/local/etc/inc/system.inc`, `config.inc` and `util.inc` were 0 bytes, all timestamped at the moment of the update.
- `pkg check -s -a` showed checksum mismatches only in the 4 packages from this update (~2500 files in opnsense, ~6700 in openssl35, a few in openvpn and dnsmasq). Every other package was fine.
- `fsck` also found UFS inconsistencies (incorrect block counts, bad summary information, blocks missing from the bitmaps).
So the update created the package files, but their contents never made it to disk.
What it was not: earlier that evening I had grown the disk (20 -> 32 GB) and freed a few GB of Netflow and AdGuard data. The box kept running normally after that, `df` looked right, and the only damaged files were the ones written by the update. config.xml and everything else on the system was intact.
How I recovered (no internet, no keyboard on the console):
- Typed into the VGA console from the host with `virsh send-key` (a small wrapper script) and read the output with `virsh screenshot`.
- At the shell after the failed boot: `mount -ur /`, `fsck -fy /dev/gpt/rootfs`, then `reboot -n`.
- Copied `/conf/config.xml` to the host for safety.
- Gave the LAN NIC a temporary IP, downloaded the 4 .pkg files on another machine, served them from the host with `python3 -m http.server`, and pulled them into the VM with `fetch`.
- Ran `pkg add -f` for openssl35, dnsmasq, openvpn and opnsense. After that `pkg check -s -a` showed 0 mismatches, and after a reboot everything works again.