From nobody Mon Aug 7 15:51:55 2023 X-Original-To: freebsd-current@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 4RKLRc4jKrz4TnZG for ; Mon, 7 Aug 2023 15:52:12 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mail-yb1-xb2e.google.com (mail-yb1-xb2e.google.com [IPv6:2607:f8b0:4864:20::b2e]) (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 "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RKLRc2kDLz4Xt7 for ; Mon, 7 Aug 2023 15:52:12 +0000 (UTC) (envelope-from kob6558@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-yb1-xb2e.google.com with SMTP id 3f1490d57ef6-c5ffb6cda23so5093682276.0 for ; Mon, 07 Aug 2023 08:52:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691423531; x=1692028331; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=n5PKr37OyNGRzxsuG5RWLZuaKV5vkq+YCexKK+iAuu8=; b=rELY6x+hMFKbH5bPonO2TabyVivkgN0QQ81eZ6Ab74y4Jgl2xwHOrlynfhAGDE1Yec yRl2gpbPo5g482atIDkY00+pGAvlowhfxM3YXFw5JQrbCoVeA4FtIfjauYEeAYjao2aO ahM/rp//o0GKTbBRGRs6/q1abCJpMVGnI8AdJi0djUlG7pxmIZmR//bHN/aRcKUeYgDD iClooZJ9fZPMZgrBZf9wUWZg0tS+qN/e03KA36iiEo53NiDSiJJej6PzRjE2GirXy2uW R9gU0LE/kJP1PcHdJDNtIpI+RU1Wes/5CW1OiF2c3AFe8dUeijgnYKg4kTT+f7symgft EBTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691423531; x=1692028331; 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=n5PKr37OyNGRzxsuG5RWLZuaKV5vkq+YCexKK+iAuu8=; b=lr3WcZF9xwiUFGlOxKxDLZx9IIivDPqAeIjSF+5RsOi26TMEPvUFnbFfcEX+VUf26d 0wyE+KOUzUH95SvsVjdy/EbPL1qGIQk6LLaXzw1jslZz9kZDHIR2k2YoQiS44zG7mmaR C7QLFODQH5QKqEbPipRAmx5k2eDX4OCg6HgAldnl8kx+eKvrpEbmbFu9JE+jT3Eiwtyc p7xVolWp0Z/SX6x+eRTrfX2z2nEhIijVPsHr1Htxd54g1tQQQni0nOGfYt61bAo39TI+ wH5+Xap3vlgrZ3ym1vxHP2cX7he/eeTEfnMMOtyBXUZj1Hl2RkGQBwUtKMLzr/t7AlWv o4VQ== X-Gm-Message-State: AOJu0YwlVdcL5m+N8R1J03gGlqrbatt5kAkvnSqfePoYhdLX74awGoAy U6Sw+D558EegJEdELYIw7eMLG4qh+kG9fePaGkRgOamy7bI= X-Google-Smtp-Source: AGHT+IHHkUTVjSAlqjsy8d93Riugt7C4ntiRO0Xga6+gcXXYiH3WS6WKynycGjck37GjsfRzUa34sPu6XL5GPR7nMIo= X-Received: by 2002:a5b:547:0:b0:d13:babb:fcf0 with SMTP id r7-20020a5b0547000000b00d13babbfcf0mr8709170ybp.12.1691423531445; Mon, 07 Aug 2023 08:52:11 -0700 (PDT) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 References: <7A0E604D-EF40-4F10-B597-F1F076507192@gmail.com> In-Reply-To: <7A0E604D-EF40-4F10-B597-F1F076507192@gmail.com> From: Kevin Oberman Date: Mon, 7 Aug 2023 08:51:55 -0700 Message-ID: Subject: Re: Has the update procedure changed? To: Tim Kellers Cc: Matthias Apitz , freebsd-current@freebsd.org Content-Type: multipart/alternative; boundary="000000000000c1b3290602573a22" X-Rspamd-Queue-Id: 4RKLRc2kDLz4Xt7 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] --000000000000c1b3290602573a22 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Aug 6, 2023 at 9:51=E2=80=AFAM Tim Kellers wrote= : > > > On Aug 6, 2023, at 11:05 AM, Kevin Oberman wrote: > > =EF=BB=BF > On Sat, Aug 5, 2023 at 10:51=E2=80=AFPM Matthias Apitz = wrote: > >> In the past I was used to use the following procedure to install a new >> kernel and world: >> >> # cd /usr/src >> # make installkernel >> # shutdown -r now >> >> boot -s from the loader prompt >> >> # adjkerntz -i >> # mount -a -t ufs >> # mergemaster -p >> # cd /usr/src >> # make installworld >> # mergemaster >> # yes | make delete-old >> # yes | make delete-old-libs >> >> # reboot >> >> Now the handbook >> https://docs.freebsd.org/en/books/handbook/cutting-edge/#makeworld >> says only: >> >> # cd /usr/src >> # make installkernel >> # shutdown -r now >> # cd /usr/src >> # make installworld >> # shutdown -r now >> >> Has this changed in past two years? >> >> Thanks >> >> matthias >> -- >> Matthias Apitz, =E2=9C=89 guru@unixarea.de, http://www.unixarea.de/ >> +49-176-38902045 >> Public GnuPG key: http://www.unixarea.de/key.pub >> > > Wow! Several obvious reasons that this looks just wrong. (Then again, so > is yours in one case.) > 1. "mergemaster -p" MUST be run before you build the kernel. (Actually, > hte man page says it should be run BEFORE buildworld and that is what I'v= e > always done although I have never seen a case where it was needed until > buildkernel. > 2. While mergemaster(8) is still in the system, you really should be usin= g > etcupdate(8). You also need to understand how a three-way merge is done a= nd > that you often need to edit the merged file when first running it. It's > pretty simple to run and rarely is needed after the first run, but it is > critical to do this for /etc files that you have modified. It's generally > just picking which of the two (original/yours) you want in the final file= . > The big win with etcupdate(8) is that it only needs to be run once for > modified files in almost all cases. > 3. Where is "make check-old" and the other tests to get rid of old files. > Leaving these around can lead to serious issues. > 4. If you don't do adjkerntz -i, you might find files installed in the > future which can get REALLY confusing! > > Historically, the final source of truth for all of this is > /usr/src/UPDATING. It has been updated for etcupdate(8) and is handled by > imp@, so I tend to believe it is correct. > > OK. Everyone who knows better, please explain why. I didn't mention "fsck > -p" but I'm really paranoid and it really, really should not be needed > unless something goes wrong in the shutdown after installing the new kern= el. > -- > Kevin Oberman, Part time kid herder and retired Network Engineer > E-mail: rkoberman@gmail.com > PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683 > > > I=E2=80=99ve always used the procedure listed at line 90 of the Makefile = in > /usr/src as the source of truth. Has that changed? > > Tim > UPDATING seems to match the Makefile except that Makefile is far less detailed. The Makefile even says "See src/UPDATING `COMMON ITEMS' for more complete information." I am more confused about "etcupdate -p". Both files put it after the kernel installation and reboot but before the installworld. The man page for etcupdate says that '-p' it should be run before "make buildworld" and I have always followed the man pages. --=20 Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: rkoberman@gmail.com PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683 --000000000000c1b3290602573a22 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sun, Aug 6, 2023 at 9:51=E2= =80=AFAM Tim Kellers <smsdtv@gmail.c= om> wrote:
<= div dir=3D"ltr">

On= Aug 6, 2023, at 11:05 AM, Kevin Oberman <rkoberman@gmail.com> wrote:

=EF=BB=BF
On Sat, Aug 5, 2023 at 10:51=E2=80=AFPM Matthias Apitz <guru@unixarea.de> = wrote:
In the past I was used to use the following procedure t= o install a new
kernel and world:

=C2=A0 =C2=A0 # cd /usr/src
=C2=A0 =C2=A0 # make installkernel
=C2=A0 =C2=A0 # shutdown -r now

=C2=A0 =C2=A0 boot -s from the loader prompt

=C2=A0 =C2=A0 # adjkerntz -i
=C2=A0 =C2=A0 # mount -a -t ufs
=C2=A0 =C2=A0 # mergemaster -p
=C2=A0 =C2=A0 # cd /usr/src
=C2=A0 =C2=A0 # make installworld
=C2=A0 =C2=A0 # mergemaster
=C2=A0 =C2=A0 # yes | make delete-old
=C2=A0 =C2=A0 # yes | make delete-old-libs

=C2=A0 =C2=A0 # reboot

Now the handbook https://docs.free= bsd.org/en/books/handbook/cutting-edge/#makeworld
says only:

=C2=A0 =C2=A0 # cd /usr/src
=C2=A0 =C2=A0 # make installkernel
=C2=A0 =C2=A0 # shutdown -r now
=C2=A0 =C2=A0 # cd /usr/src
=C2=A0 =C2=A0 # make installworld
=C2=A0 =C2=A0 # shutdown -r now

Has this changed in past two years?

Thanks

=C2=A0 =C2=A0 =C2=A0 =C2=A0 matthias
--
Matthias Apitz, =E2=9C=89 guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub
<= div>=C2=A0
Wow! Several obvious reasons that this looks just wrong. (Then agai= n, so is yours in one case.)
1. "mergemaster -p" MUST be run before you bu= ild the kernel. (Actually, hte man page says it should be run BEFORE buildw= orld and that is what I've always done although I have never seen a cas= e where it was needed until buildkernel.
2. While mergemaster(8) is still in the sys= tem, you really should be using etcupdate(8). You also need to understand h= ow a three-way merge is done and that you=C2=A0 often need to edit the merg= ed file when first running it.=C2=A0 It's pretty simple to run and rare= ly is needed after the first run, but it is critical to do this for /etc fi= les that you have modified. It's generally just picking which of the tw= o (original/yours) you want in the final file. The big win with etcupdate(8= ) is that it only needs to be run once for modified files in almost all cas= es.
3. Wh= ere is "make check-old" and the other tests to get rid of old fil= es. Leaving these around can lead to serious issues.
4. If you don't do adjkernt= z -i, you might find files installed in the future which can get REALLY=C2= =A0 confusing!

Historically, the final source of truth for all of this is /usr/src/= UPDATING. It has been updated for etcupdate(8) and is handled by imp@, so I= tend to believe it is correct.

OK. Everyone who knows better, please explain why. I did= n't mention "fsck -p" but I'm really paranoid and it real= ly, really should not be needed unless something goes wrong in the shutdown= after installing the new kernel.
--
Kev= in Oberman, Part time kid herder and retired Network Engineer
E-mail: rkoberman@gmail.com<= /a>
PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683=

I=E2=80=99ve always used the procedure listed a= t line 90 of the Makefile in /usr/src as the source of truth. Has that chan= ged?

Tim
=C2=A0
=
UPDATING seems to match the Makefile except that Makefile i= s far less detailed. The Makefile even says "See src/UPDATING `COMMON = ITEMS' for more complete information."

I am more confused about=C2=A0 "etcupdate -p". Both files= put it after the kernel installation and reboot but before the installworl= d. The man page for etcupdate says that '-p' it should be run befor= e "make buildworld" and I have always followed the man pages.
= --
Kevin Oberman, Part time kid herder and = retired Network Engineer
E-mail: rkoberman@gmail.com
PGP Fingerprint: D0= 3FB98AFA78E3B78C1694B318AB39EF1B055683
<= /div>
--000000000000c1b3290602573a22--