From nobody Fri Jul 19 15:40:46 2024 X-Original-To: questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WQYmd3Qpmz5RrYN for ; Fri, 19 Jul 2024 15:41:05 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mail-yb1-xb2b.google.com (mail-yb1-xb2b.google.com [IPv6:2607:f8b0:4864:20::b2b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQYmc6T21z4v69 for ; Fri, 19 Jul 2024 15:41:04 +0000 (UTC) (envelope-from kob6558@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-yb1-xb2b.google.com with SMTP id 3f1490d57ef6-e05e2b2d88bso2098606276.0 for ; Fri, 19 Jul 2024 08:41:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721403664; x=1722008464; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=w1dVcTFIqkltCFUR2NdA4H7fH5A2yQWX7PmiaXxhHhY=; b=FjL5KwgFaYQGBojMytv/LAmRyOIKCKG86KD9jls08Nrj6IB1yw2Uk1LrW0DCFT8wjx Hxf23GrYy9eRr39MMqFcCVv6FGhQ1u0bDrKONp2uN/GpUzTk8MB3xetX41riT+5Au4RR gzKPObPEKD3PWzIpwDlFj6yw0Q+wecA5aOf7pm2bvUCH0vL2i9/xwra9kHFFyzizyyd3 UW24TPHB2UjGX7BTjJ48Kq/d22mD5ii+N9vTVGTa3X/pR+xsBPy/pu9YWHWoI44vIFHU F45QTPlALXclsSHey/2OmiGDTjLR99rnv/3Y/l55bCo0zjyKVEp3KdFweMSVYewps8do Fngg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721403664; x=1722008464; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=w1dVcTFIqkltCFUR2NdA4H7fH5A2yQWX7PmiaXxhHhY=; b=w1dVNAdROI1SoYLUyKBCEo2bnkF7SxXH8cwrF9UZsR8mWSkB1MtxZsrpAI7Xi89cMk fu7NUXhfog+K+DU21yp9VmXmcJDUF7VXY8Dy3otf6vrx9S8cXM+z8gsewZzIEVA4L2cF FEuQ80jfQP5xlxW+0KKpZjqJDaIzg6+axWIRrLT1HMZbL6NftS7TMr5hIvkSbbBEJbbK NqyPrfrZ1usoaF/Hmizs38OPE0CD9Zop0D8fQ1qpH6NyXQjFj7OXJBStS3AkI0kytE/q bq53XWFpWJy5a+4S/tugZWqJBEke+rmNIRa3B4puqMq5P/hV/1LU0jVJGBBHg5rOQ7UZ SEjw== X-Gm-Message-State: AOJu0YxqqsSTbInQEkKz1iLKfQxjXRY2mZffis/bCd5ZM8fh9qWaLA2d My71/H+c9FvarWdKj5e3g4F3jZlKAfKR2b4K79n407wEM2X9KZo8cTgQWg4ay/3UVe5i/O3n6kI bGGqHUr5TsNHltTXXrckokoE24xBKMjN7 X-Google-Smtp-Source: AGHT+IFDzKY9/NQKVA5J948rSKgebl6ieUnEcpBK1YxaE52dhyln0b9Q7ae3Khdg3g002ndzfFFAP7adII28QJDQ/QY= X-Received: by 2002:a05:6902:2313:b0:e06:1bd:976 with SMTP id 3f1490d57ef6-e086092d0cfmr2882749276.22.1721403663710; Fri, 19 Jul 2024 08:41:03 -0700 (PDT) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-questions@freebsd.org Sender: owner-freebsd-questions@FreeBSD.org MIME-Version: 1.0 References: <5569eeed-411a-48c8-b1e1-638d608610a6@app.fastmail.com> In-Reply-To: <5569eeed-411a-48c8-b1e1-638d608610a6@app.fastmail.com> From: Kevin Oberman Date: Fri, 19 Jul 2024 08:40:46 -0700 Message-ID: Subject: Re: Finding the git hash for a build To: Dave Cottlehuber Cc: "freebsd-questions@freebsd.org" Content-Type: multipart/alternative; boundary="000000000000e403a1061d9b85d9" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4WQYmc6T21z4v69 --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 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
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 buil= dworld 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&= gt; wrote:
On Fr= i, 19 Jul 2024, at 06:13, Kevin Oberman wrote:
> 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
> 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 <= br> > 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 one<= br> 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 c= an compare from.

An even lazier way would be boot environments, if you have zfs.

A+
Dave


--