Re: Has the update procedure changed?
- Reply: Matthias Apitz : "Re: Has the update procedure changed?"
- Reply: Graham Perrin : "etcupdate -p, and other uses of etcupdate(8) (was: Has the update procedure changed?)"
- In reply to: Tim Kellers : "Re: Has the update procedure changed?"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 07 Aug 2023 15:51:55 UTC
On Sun, Aug 6, 2023 at 9:51 AM Tim Kellers <smsdtv@gmail.com> wrote: > > > On Aug 6, 2023, at 11:05 AM, Kevin Oberman <rkoberman@gmail.com> wrote: > > > On Sat, Aug 5, 2023 at 10:51 PM Matthias Apitz <guru@unixarea.de> 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, ✉ 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. > -- > Kevin Oberman, Part time kid herder and retired Network Engineer > E-mail: rkoberman@gmail.com > PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683 > > > I’ve 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. -- Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: rkoberman@gmail.com PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683