Re: Finding the git hash for a build
- Reply: Kevin Oberman : "Re: Finding the git hash for a build"
- In reply to: Kevin Oberman : "Finding the git hash for a build"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 19 Jul 2024 13:58:08 UTC
On Fri, 19 Jul 2024, at 06:13, Kevin Oberman wrote: > I need to roll back my system to main-n271000-5654b42142e1. After an > update of the system today, it crashes in network startup and I need to > get back to a working system while I try to figure out why it won't > boot. Probably by bisecting the source. > > Right now, I am getting an error from 'geli attach' of: > geli: Invalid class name 'eli'. > This is probably the result of kernel and world not being in sync as I > had to restore the boot/modules directory to the state of the old > kernel. > > I had assumed that the version was a hash that I could use to get my > kernel and world back to a working state. I could restore from backup, > but would like to get back to the exact system of the kernel.old. > > I am just a git newby and trying to use 5654b42142e1 reports that the > hash is not found. I'lladmit that I'm lost! Hi Kevin you're correct, you can check via https://cgit.freebsd.org/src/commit/?id=5654b42142e1 for example. Assuming you are already on main branch: cd /usr/src ### switch to the main branch if not already on it git switch main ### make sure we have all the recent commits, hopefully including that one git fetch origin main ### reset our "main" reference to that commit git reset --hard 5654b42142e1 ### clean up any stray rubbish git clean -fdx and then rebuild as usual. A lazier way would be to grab base & kernel from https://download.freebsd.org/ftp/snapshots/amd64/amd64/15.0-CURRENT/ there's a GITBRANCH and REVISION file in there you can compare from. An even lazier way would be boot environments, if you have zfs. A+ Dave