r/opnsense • u/StorageSystemPT • 29m ago
26.7.10p2 (patch release 2) left core files at 0 bytes -> boot fails with "Call to undefined function convert_config()"
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.
Questions:
- Has anyone else had 0-byte files after the 26.7.10p2 update, especially on VMs?
- Is there a known way for the updater to end up with files that aren't flushed to disk (e.g. a reboot/restart triggered too soon after extraction)?
Lessons learned: snapshot the qcow2 before every update, enable the serial console so `virsh console` works when boot fails, and keep a copy of config.xml off the box.



