On Sun, 2025-05-11 at 16:25 +0000, H. Hartzer wrote: > Lloyd wrote: > > 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? > > Hi Llyod, > > I definitely think a server should be able to boot after a hard > reboot > like that. This sounds frustrating. > > To be clear, fscking does not correct the issue with /bsd? It's still > just several KB? Is this random, or do you have the ability to > readily > reproduce it? > > I think softupdates was pulled (somewhat) recently, and disabled for > a > while, so I'm assuming softupdates aren't at play. > > I'm not sure if this is related or not, but I recall Solene's post > about > FFS corruption: > https://dataswamp.org/~solene/2024-11-15-why-i-stopped-using-openbsd.html#_Reliability > > I've had no corruption on OpenBSD yet. I am using older hardware. I > wonder if the cause of corruption in her case is similar to yours? > > I assume that your / is not mounted with wxallowed? I can't really > see > either way why /bsd would have changes. > > Not sure how often people run into FFS corruption issues on OpenBSD > and > if there are any trends. > > -Henrich >
My anecdote is for my OpenBSD machines at my house, including some vmm(4) VMs over the last 4 years. I don't have any UPS power, so there are occasional power outages, maybe once every month or two. I did set the bios settings so my machines don't autoboot on power restoration. I also use the default OpenBSD partioning. The hardware I use is an assortment of Intel small form factor PCs. Usually, my machines are pretty lightly loaded, but I did have the power go out while Shotwell was indexing my photo's once. I thought I might have a problem, but fsck was able to fix /home without any noticeable issues. I'm ready for failures, with offsite backups, but I've never had to recover a system, or re-install. So far, so good.