Page MenuHomeFreeBSD

bectl: Improve error message when libbe_init() fails
ClosedPublic

Authored by gallatin on Mar 30 2023, 8:05 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sep 23 2024, 9:22 PM
Unknown Object (File)
Sep 18 2024, 10:19 PM
Unknown Object (File)
Sep 18 2024, 7:33 PM
Unknown Object (File)
Sep 18 2024, 4:51 PM
Unknown Object (File)
Sep 18 2024, 9:39 AM
Unknown Object (File)
Sep 9 2024, 11:45 PM
Unknown Object (File)
Sep 7 2024, 5:37 AM
Unknown Object (File)
Aug 5 2024, 9:46 PM
Subscribers

Details

Summary

I spent a long time trying to recover a remote machine where it was booting into a bad BE. Using a rather old rescue image already on the box, I encountered the error libbe_init(\"%s\") failed. I stupidly assumed the rescue image was too old to be compatible, when the problem was really that I was booted from a UFS root on the rescue image, so the tool could not deduce the rootfs I wanted to operate on. An error message like the one in this change would have prompted me that I needed to specify a ZFS rootfs in this scenario, and would have saved me hours.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Mar 30 2023, 8:06 PM

I'm OK with this, but I note that the -r option isn't documented at all because it wasn't actually supposed to be generally useful. We should probably fix that so that this message makes sense, since it *is* generally useful (for precisely scenarios like this).