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)
Jan 14 2024, 7:38 AM
Unknown Object (File)
Dec 20 2023, 7:25 AM
Unknown Object (File)
Sep 3 2023, 10:09 AM
Unknown Object (File)
Aug 27 2023, 6:54 PM
Unknown Object (File)
Jul 24 2023, 8:50 PM
Unknown Object (File)
May 28 2023, 11:14 AM
Unknown Object (File)
May 2 2023, 6:32 AM
Unknown Object (File)
Apr 5 2023, 7:44 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).