Date: Fri, 19 Jul 2024 08:40:46 -0700 From: Kevin Oberman <rkoberman@gmail.com> To: Dave Cottlehuber <dch@skunkwerks.at> Cc: "freebsd-questions@freebsd.org" <questions@freebsd.org> Subject: Re: Finding the git hash for a build Message-ID: <CAN6yY1tqSv1UiusTaeVQFhV1Wr6LfKaj5f_SZiSxsn6CxLkoBw@mail.gmail.com> In-Reply-To: <5569eeed-411a-48c8-b1e1-638d608610a6@app.fastmail.com> References: <CAN6yY1tY1-OgAqVYOzhXGtYKe8Ef1Yrx3%2BGj5h1D7ONjgKEUTw@mail.gmail.com> <5569eeed-411a-48c8-b1e1-638d608610a6@app.fastmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000e403a1061d9b85d9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks to both of you! I am baffled as to what I did wrong yesterday. How can I type "git reset --hard" wrong? I cut and pasted the hash. And I still kept getting a hash not found. In any case, it worked perfectly today and buildworld should be complete in about an hour. Thanks so much! On Fri, Jul 19, 2024 at 6:58=E2=80=AFAM Dave Cottlehuber <dch@skunkwerks.at= > wrote: > 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=3D5654b42142e1 > 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 on= e > 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 > --=20 Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: rkoberman@gmail.com PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683 --000000000000e403a1061d9b85d9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:tahoma,s= ans-serif;font-size:small">Thanks to both of you! I am baffled as to what I= did wrong yesterday. How can I type "git reset --hard" wrong? I = cut and pasted the hash. And I still kept getting a hash not found.</div><d= iv class=3D"gmail_default" style=3D"font-family:tahoma,sans-serif;font-size= :small"><br></div><div class=3D"gmail_default" style=3D"font-family:tahoma,= sans-serif;font-size:small">In any case, it worked perfectly today and buil= dworld should be complete in about an hour.</div><div class=3D"gmail_defaul= t" style=3D"font-family:tahoma,sans-serif;font-size:small"><br></div><div c= lass=3D"gmail_default" style=3D"font-family:tahoma,sans-serif;font-size:sma= ll">Thanks so much!<br></div></div><br><div class=3D"gmail_quote"><div dir= =3D"ltr" class=3D"gmail_attr">On Fri, Jul 19, 2024 at 6:58=E2=80=AFAM Dave = Cottlehuber <<a href=3D"mailto:dch@skunkwerks.at">dch@skunkwerks.at</a>&= gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0= px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fr= i, 19 Jul 2024, at 06:13, Kevin Oberman wrote:<br> > I need to roll back my system to main-n271000-5654b42142e1. After an <= br> > update of the system today, it crashes in network startup and I need t= o <br> > get back to a working system while I try to figure out why it won'= t <br> > boot. Probably by bisecting the source. <br> ><br> > Right now, I am getting an error from 'geli attach' of:<br> > geli: Invalid class name 'eli'.<br> > This is probably the result of kernel and world not being in sync as I= <br> > had to restore the boot/modules directory to the state of the old <br> > kernel.<br> ><br> > I had assumed that the version was a hash that I could use to get my <= br> > kernel and world back to a working state. I could restore from backup,= <br> > but would like to get back to the exact system of the kernel.old.<br> ><br> > I am just a git newby and trying to use 5654b42142e1 reports that the = <br> > hash is not found. I'lladmit that I'm lost!<br> <br> <br> Hi Kevin<br> <br> you're correct, you can check via <a href=3D"https://cgit.freebsd.org/s= rc/commit/?id=3D5654b42142e1" rel=3D"noreferrer" target=3D"_blank">https://= cgit.freebsd.org/src/commit/?id=3D5654b42142e1</a><br> for example.<br> <br> Assuming you are already on main branch:<br> <br> cd /usr/src<br> ### switch to the main branch if not already on it<br> git switch main<br> ### make sure we have all the recent commits, hopefully including that one<= br> git fetch origin main<br> ### reset our "main" reference to that commit<br> git reset --hard 5654b42142e1<br> ### clean up any stray rubbish<br> git clean -fdx<br> <br> and then rebuild as usual.<br> <br> A lazier way would be to grab base & kernel from <a href=3D"https://dow= nload.freebsd.org/ftp/snapshots/amd64/amd64/15.0-CURRENT/" rel=3D"noreferre= r" target=3D"_blank">https://download.freebsd.org/ftp/snapshots/amd64/amd64= /15.0-CURRENT/</a> there's a GITBRANCH and REVISION file in there you c= an compare from.<br> <br> An even lazier way would be boot environments, if you have zfs.<br> <br> A+<br> Dave<br> </blockquote></div><br clear=3D"all"><br><span class=3D"gmail_signature_pre= fix">-- </span><br><div dir=3D"ltr" class=3D"gmail_signature"><div dir=3D"l= tr"><div><div dir=3D"ltr"><div><div dir=3D"ltr"><div><div dir=3D"ltr">Kevin= Oberman, Part time kid herder and retired Network Engineer<br>E-mail: <a h= ref=3D"mailto:rkoberman@gmail.com" target=3D"_blank">rkoberman@gmail.com</a= ><br></div><div>PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683</= div></div></div></div></div></div></div></div> --000000000000e403a1061d9b85d9--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAN6yY1tqSv1UiusTaeVQFhV1Wr6LfKaj5f_SZiSxsn6CxLkoBw>