From nobody Sun Aug 6 15:05:10 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 4RJjS815nRz4TsFk for ; Sun, 6 Aug 2023 15:05:28 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mail-yb1-xb30.google.com (mail-yb1-xb30.google.com [IPv6:2607:f8b0:4864:20::b30]) (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 4RJjS76S5rz3HvK for ; Sun, 6 Aug 2023 15:05:27 +0000 (UTC) (envelope-from kob6558@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-yb1-xb30.google.com with SMTP id 3f1490d57ef6-c5f98fc4237so3179816276.2 for ; Sun, 06 Aug 2023 08:05:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691334327; x=1691939127; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=ab+jtuSU1COYL6vNNGkmmd2jqZTDeqUXz6F0V0Dip5Q=; b=SPEpajGBj9/re0uraK+ToORzLxonefpmNuzedvk14VFrkndt0sYFXkpsu7zfW6J3dh 7YxksRIqiqpiLR0t+j0W9rB057vRc8c/c+GXxL0z/X707vwXF8EhioErFptjjDcnDUAX ZNlQIIYld+VVMDf8Il9GUfvCpjWUQk4TkfvhgiSK1GMI7XPLl5hQRSW/fOH2GPHz4DzR LrO56vvDcae6gUJqAd6iApqvEivKL5tzZTc7jetYZ26idKvjm0YPG4Zg5WLerFRsFCkI sxn1cGxcV1Fb9hi006B0b3JPn+m2C6KVW1AXrZkRJ7KcVDAGQ5RhRMFn1MoaCaZXTF6N a4PA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691334327; x=1691939127; h=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=ab+jtuSU1COYL6vNNGkmmd2jqZTDeqUXz6F0V0Dip5Q=; b=FxzEDbOEDDZ688UQq3LSVDDLelaAKj8HeCDsb5/tXRiX+WrBbOke51ih2wHvRdFgU+ lL9HJv3qWM3Pm3hA5VNIsQftlzPypYCdek/BOvpmLpQFWwgEavXSzwADEEgkNfY+KxNs GhC4HybNXLHACm4efLNS9pfgKlU0A3gqIa79bifH55QkQoT2dYMmm0yCG++qlOcTxu/W E3Q0e6donJwWtu8XP2Z1R/XaK2MhNaXj9FV6i29El1QmOhLE0WmHxNL59R6sQQ3hVFk2 VPK+a+mpY0WSaYvcGbqILEeqEh2e47/nCEoM46ZfTJgKh4qqbOgKZxwS9Gye5c8n6eWY lJdg== X-Gm-Message-State: AOJu0YxlQrwltGAUUtpwyfUeNCVVj8O/Y77d4dx9g/qzzJDS+dW2CThT JNUV8inuIvQDm8cahn/DI7LYg+Y1KxlOWwWFEmM8VdKm X-Google-Smtp-Source: AGHT+IFwq3/4K5eNqvM65JDorI+LsSEj9g1V5Kgetk8uXCxcKdKCc/w0sgBjbHLp9GJtvsIiTJay0iWFOqSYN7VO/tY= X-Received: by 2002:a5b:a43:0:b0:d11:254a:aa71 with SMTP id z3-20020a5b0a43000000b00d11254aaa71mr5695214ybq.44.1691334326876; Sun, 06 Aug 2023 08:05:26 -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: In-Reply-To: From: Kevin Oberman Date: Sun, 6 Aug 2023 08:05:10 -0700 Message-ID: Subject: Re: Has the update procedure changed? To: Matthias Apitz , freebsd-current@freebsd.org Content-Type: multipart/alternative; boundary="000000000000c0002506024275c9" X-Rspamd-Queue-Id: 4RJjS76S5rz3HvK 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] --000000000000c0002506024275c9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Aug 5, 2023 at 10:51=E2=80=AFPM Matthias Apitz w= rote: > 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've 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 using etcupdate(8). You also need to understand how a three-way merge is done and 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 kernel= . --=20 Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: rkoberman@gmail.com PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683 --000000000000c0002506024275c9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sat, Aug 5, 2023 at 10:51=E2= =80=AFPM Matthias Apitz <guru@unixar= ea.de> wrote:
In the past I was used to use the followi= ng procedure to 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 look= s just wrong. (Then again, so is yours in one case.)
1. &quo= t;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'= ;ve 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 using etcupdate(8). You also need to understand how = a three-way merge is done and that you=C2=A0 often need to edit the merged = file when first running it.=C2=A0 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) i= s 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 ins= talled 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 hand= led by imp@, so I tend to believe it is correct.

<= div style=3D"font-family:tahoma,sans-serif;font-size:small" class=3D"gmail_= default">OK. Everyone who knows better, please explain why. I didn't me= ntion "fsck -p" but I'm really paranoid and it really, really= should not be needed unless something goes wrong in the shutdown after ins= talling the new kernel.
-- =
Kevin Oberman= , Part time kid herder and retired Network Engineer
E-mail: rkoberman@gmail.com
PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683
--000000000000c0002506024275c9--