Date: Mon, 7 Aug 2023 08:51:55 -0700 From: Kevin Oberman <rkoberman@gmail.com> To: Tim Kellers <smsdtv@gmail.com> Cc: Matthias Apitz <guru@unixarea.de>, freebsd-current@freebsd.org Subject: Re: Has the update procedure changed? Message-ID: <CAN6yY1teCLbtaN6V-fQqa0WTvrbWaOjy%2BB7F=bSq3t0Ue_ROVw@mail.gmail.com> In-Reply-To: <7A0E604D-EF40-4F10-B597-F1F076507192@gmail.com> References: <CAN6yY1tiq4XQT_apnLo_aDgoMPEZ%2BZ4PfB8uqfMw3PeJbMGMqw@mail.gmail.com> <7A0E604D-EF40-4F10-B597-F1F076507192@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 <smsdtv@gmail.com> wrote= : > > > 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 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 <div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon= t-family:tahoma,sans-serif;font-size:small">On Sun, Aug 6, 2023 at 9:51=E2= =80=AFAM Tim Kellers <<a href=3D"mailto:smsdtv@gmail.com">smsdtv@gmail.c= om</a>> wrote:</div></div><div class=3D"gmail_quote"><blockquote class= =3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rg= b(204,204,204);padding-left:1ex"><div dir=3D"auto"><div dir=3D"ltr"></div><= div dir=3D"ltr"><br></div><div dir=3D"ltr"><br><blockquote type=3D"cite">On= Aug 6, 2023, at 11:05 AM, Kevin Oberman <<a href=3D"mailto:rkoberman@gm= ail.com" target=3D"_blank">rkoberman@gmail.com</a>> wrote:<br><br></bloc= kquote></div><blockquote type=3D"cite"><div dir=3D"ltr">=EF=BB=BF<div dir= =3D"ltr"><div dir=3D"ltr"><div style=3D"font-family:tahoma,sans-serif;font-= size:small">On Sat, Aug 5, 2023 at 10:51=E2=80=AFPM Matthias Apitz <<a h= ref=3D"mailto:guru@unixarea.de" target=3D"_blank">guru@unixarea.de</a>> = wrote:</div></div><div class=3D"gmail_quote"><blockquote class=3D"gmail_quo= te" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204= );padding-left:1ex">In the past I was used to use the following procedure t= o install a new<br> kernel and world:<br> <br> =C2=A0 =C2=A0 # cd /usr/src<br> =C2=A0 =C2=A0 # make installkernel<br> =C2=A0 =C2=A0 # shutdown -r now<br> <br> =C2=A0 =C2=A0 boot -s from the loader prompt<br> <br> =C2=A0 =C2=A0 # adjkerntz -i<br> =C2=A0 =C2=A0 # mount -a -t ufs<br> =C2=A0 =C2=A0 # mergemaster -p<br> =C2=A0 =C2=A0 # cd /usr/src<br> =C2=A0 =C2=A0 # make installworld<br> =C2=A0 =C2=A0 # mergemaster<br> =C2=A0 =C2=A0 # yes | make delete-old<br> =C2=A0 =C2=A0 # yes | make delete-old-libs<br> <br> =C2=A0 =C2=A0 # reboot<br> <br> Now the handbook <a href=3D"https://docs.freebsd.org/en/books/handbook/cutt= ing-edge/#makeworld" rel=3D"noreferrer" target=3D"_blank">https://docs.free= bsd.org/en/books/handbook/cutting-edge/#makeworld</a><br> says only:<br> <br> =C2=A0 =C2=A0 # cd /usr/src<br> =C2=A0 =C2=A0 # make installkernel<br> =C2=A0 =C2=A0 # shutdown -r now<br> =C2=A0 =C2=A0 # cd /usr/src<br> =C2=A0 =C2=A0 # make installworld<br> =C2=A0 =C2=A0 # shutdown -r now<br> <br> Has this changed in past two years?<br> <br> Thanks<br> <br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 matthias<br> -- <br> Matthias Apitz, =E2=9C=89 <a href=3D"mailto:guru@unixarea.de" target=3D"_bl= ank">guru@unixarea.de</a>, <a href=3D"http://www.unixarea.de/" rel=3D"noref= errer" target=3D"_blank">http://www.unixarea.de/</a> +49-176-38902045<br> Public GnuPG key: <a href=3D"http://www.unixarea.de/key.pub" rel=3D"norefer= rer" target=3D"_blank">http://www.unixarea.de/key.pub</a><br></blockquote><= div>=C2=A0</div></div><div style=3D"font-family:tahoma,sans-serif;font-size= :small">Wow! Several obvious reasons that this looks just wrong. (Then agai= n, so is yours in one case.)</div><div style=3D"font-family:tahoma,sans-ser= if;font-size:small">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.</div><div style=3D"font-family:tah= oma,sans-serif;font-size:small">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.</div><div style=3D"font-family:tahoma,sans-serif;font-size:small">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.</div><div style=3D"fon= t-family:tahoma,sans-serif;font-size:small">4. If you don't do adjkernt= z -i, you might find files installed in the future which can get REALLY=C2= =A0 confusing! <br></div><div style=3D"font-family:tahoma,sans-serif;font-s= ize:small"><br></div><div style=3D"font-family:tahoma,sans-serif;font-size:= small">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.</div><div style=3D"font-family:tahoma,sans-= serif;font-size:small"><br></div><div style=3D"font-family:tahoma,sans-seri= f;font-size:small">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.<br></div><span class=3D"gmail_signature_p= refix">-- </span><br><div dir=3D"ltr" class=3D"gmail_signature"><div dir=3D= "ltr"><div><div dir=3D"ltr"><div><div dir=3D"ltr"><div><div dir=3D"ltr">Kev= in Oberman, Part time kid herder and retired Network Engineer<br>E-mail: <a= href=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></div> </div></blockquote><br><div>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?</div><div><br></div><div>Tim</div></div></blockquote><div>=C2=A0</div>= </div><div style=3D"font-family:tahoma,sans-serif;font-size:small" class=3D= "gmail_default">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."</div><div style=3D"font-fam= ily:tahoma,sans-serif;font-size:small" class=3D"gmail_default"><br></div><d= iv style=3D"font-family:tahoma,sans-serif;font-size:small" class=3D"gmail_d= efault">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.<br>= </div><span class=3D"gmail_signature_prefix">-- </span><br><div dir=3D"ltr"= class=3D"gmail_signature"><div dir=3D"ltr"><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 href=3D"mailto:rkoberman@gmail.com" = target=3D"_blank">rkoberman@gmail.com</a><br></div><div>PGP Fingerprint: D0= 3FB98AFA78E3B78C1694B318AB39EF1B055683</div></div></div></div></div></div><= /div></div></div> --000000000000c1b3290602573a22--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAN6yY1teCLbtaN6V-fQqa0WTvrbWaOjy%2BB7F=bSq3t0Ue_ROVw>