I've run across this a few times, where I've improperly shut down
a VM (tapped the wrong button for power off vs ACPI shutdown) and
this lead to an unbootable image with the message before boot:

booting hd0a:/bsd: hd0a:/bsd: Inappropriate file type or format
failed(79). will try /bsd
boot>

To recover, I usually boot into bsd.rd and fsck the filesystems,
but in most cases the cause is a corrupted /bsd. Indeed, the last
encounter with this, /bsd had a size of only a few dozen kilobytes.

To fix, I rm /bsd && cp /bsd.booted /bsd - reboot, re-calculate
the checksum and I'm on my way again. I'd like to understand why
this is happening. Is this plain unlucky FFS corruption or did I
trigger the power-off during the kernel reorder sequence and it
had only partially written out the file to disk?

Since I have encountered this more than once now, is there a way
to increase the resiliency?  The host is on UPS power, so the
cause is almost always user error (accidental power off). Could
disabling kernel relinking in the image improve the situation?

Reply via email to