Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Jan 2024 15:50:05 +0300
From:      Odhiambo Washington <odhiambo@gmail.com>
To:        questions@freebsd.org
Subject:   Re: Upgrade 8.4-STABLE to 14-STABLE
Message-ID:  <CAAdA2WPocrL_gJ8Edt_Oj7NqfZteJv85xnC3a_nSyX6iHQr1FQ@mail.gmail.com>
In-Reply-To: <CO1PR11MB4770952A9947D3851A1D0BBFE6782@CO1PR11MB4770.namprd11.prod.outlook.com>
References:  <CAAdA2WNLg19usv2ryO-s=EavDw%2BA1BQq_m_xUTu8RYCTVpbDzg@mail.gmail.com> <CO1PR11MB477085FF2A427126ED5A07C7E6782@CO1PR11MB4770.namprd11.prod.outlook.com> <CAAdA2WOyv4G7dDn=0UiqdBr_oEXCDtDKbZrzPaLBkhkmNYHMMg@mail.gmail.com> <CO1PR11MB4770952A9947D3851A1D0BBFE6782@CO1PR11MB4770.namprd11.prod.outlook.com>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
On Sat, Jan 27, 2024 at 3:45 PM Edward Sanford Sutton, III <
mirror176@hotmail.com> wrote:

> On 1/27/24 04:00, Odhiambo Washington wrote:
> > On Sat, Jan 27, 2024 at 12:59 PM Edward Sanford Sutton, III <
> > mirror176@hotmail.com> wrote:
> >
> >> On 1/27/24 00:55, Odhiambo Washington wrote:
> >>> Is there a way to upgrade 8.4-STABLE to 14-STABLE, or even change it to
> >>> 14-RELEASE?
> >>
> >>     Hopefully others have better things to say or a more brief summary,
> >> but for now...
> >>     "Maybe" other ways work but from a build+install source approach I
> >> presume the intended way was to build then install the most up to date
> >> 8-STABLE, then 9-STABLE, etc. until you are on 14-STABLE. Where
> >> mergemaster used to be used for cvs & svn updates, etcupdate became a
> >> thing and I think required once you are on versions only available
> >> through git; you will need to run etcupdate starting with a source tree
> >> matching the currently installed version before updating the source tree
> >> as you start to use it. I do not recall what versions introduced or
> >> required it but it is required when working from a git source repository
> >> instead of cvs/svn.
> >>     Binary packages require you start and end with a more formal release
> >> such as 13.2-RELEASE (or whatever last 13 release was) => 14.0-RELEASE.
> >> If using ZFS, my understanding is that binary updates across major
> >> versions seem to be painfully slow. You would need to switch to and
> >> install the nearest -RELEASE version. If using a custom kernel then you
> >> would still be stuck building it from source but otherwise can use
> >> binary updates for it too.
> >>     Obviously as there would be many updates+reboots happening with a #
> >> of API revisions, I'd make sure 3rd party kernel modules that aren't
> >> necessary for the update are not being loaded until after the updates to
> >> FreeBSD + the modules are completed. For good measure, just shut down
> >> unneeded software from startup, cron, etc. as the won't likely be API
> >> compatible until reinstalled or compatibility libraries are installed.
> >>     Maybe it would be wise to consider 'replacing' the install instead
> of
> >> binary updating if not for speed of its multiple steps alone. I presume
> >> such drastic action is the only single step process but would be
> >> interested if others have suggestions otherwise.
> >>     If you have ZFS as root and are planning to upgrade to newer
> >> filesystem/pool versions (performed with zfs related commands, not with
> >> source installs or FreeBSD's update tool), you should make sure you take
> >> steps to upgrade the boot loader code before that operation is
> performed.
> >>     If you have backups, you always have a way to undo what has been
> done
> >> in case anything goes wrong or doesn't work. /usr/src/UPDATING is also
> >> wise to read/follow for any -STABLE user in addition to the -STABLE
> >> mailing list. Nothing comes to mind of what to be aware of from it
> >> despite that I probably have done that same upgrade path on the machine
> >> I am typing this reply on though I migrated when each -STABLE branch was
> >> new rather than old. I have not yet upgraded to 14 though.
> >>     'Maybe' pkg switched through pkgng within this timeframe; it has a
> >> database conversion process that you can go through though I think it
> >> leaves behind the old data layout for you to manually dispose of. Could
> >> also just uninstall 'all' packages then reinstall/replace with what is
> >> now available once upgraded. Handbook at least used to talk of this
> >> conversion which I 'think' was a thing around v9 or so. Tools can output
> >> a list of installed packages including pkgng's `pkg prime-list` command
> >> which can then help reinstall after a bulk removal and portmaster has a
> >> documented set of steps which can aid in that too.
> >>
> >> And for a brief command summary and/or comments I'd use for source
> >> upgrades (over and over and...modify as your system needs):
> >>
> >> cd /usr/src
> >> #if using etcupdate for the first time, you must use its preparation
> >> step before updating the source tree; see other documentation.
> >> #update the source tree using git, svn, or whatever tool...
> >> #git switch releng/14.0
> >> git switch stable/13
> >> #remove vendor branches; at least one of the updates has requires this
> >> git remote prune origin
> >> #update source tree with git
> >> git pull --ff-only
> >> #cleanup the build path; I had to perform this to even go from 13-STABLE
> >> to 14-STABLE and have the build not fail, possibly because I accelerate
> >> my updates by using things like 'WITH_META_MODE=yes'
> >> chflags -R noschg /usr/obj/usr;rm -rf /usr/obj/usr;cd /usr/src&&make
> >> cleandir&&make cleandir
> >> #slower but more reliable build with a kernel install if successful
> >> make buildworld&&make buildkernel&&make installkernel
> >> #faster build, run in background, provide less output. This will hang if
> >> PORTS_MODULES is used and a dialog comes up during any port build as
> >> jobs count is incompatible with PORTS_MODULES + `make comfig` dialog
> boxes.
> >> /usr/bin/nice -n 18 /usr/sbin/idprio 31 make -sj8 buildworld
> >> buildkernel&&make installkernel
> >> shutdown now
> >> fsck -p
> >> mount -u /
> >> mount -a
> >> sh /etc/rc.d/zfs start
> >> cd /usr/src
> >> #adjkerntz -i # if CMOS is not UTC
> >> #mergemaster -iUFp #disabled as I use etcupdate now
> >> etcupdate -p
> >> cd /usr/src&&make installworld&&make delete-old&&etcupdate
> >> shutdown -r now
> >>
> >> #These steps should only need to be done at the end.
> >> #update bootcode for ZFS on root; UEFI requires different steps. This
> >> must be done before zpool/zfs changes for bootable root pools. If the
> >> partition is too small, this will fail; I stole swap space with
> >> deletes+recreates to work past that. This should be repeated for every
> >> disk that could be asked upon to boot the system.
> >> gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada1
> >> #next up, upgrade/replace packages with up to date copies. I have used
> >> different ways of doing this over time such as manually uninstalling
> >> then running `make install clean` in a ports directory, simplified with
> >> portupgrade and I was never a big user of portmaster as I found failures
> >> of one sort or another too common and it aborts midtask on those, and
> >> now currently use pkg form a custom built repository using poudriere.
> >> #once packages are all updated one way or another
> >> cd /usr/src;make delete-old-libs
> >>
> >
> > Thank you very much for the detailed procedure.
> > By the look of things, this is quite involving and I believe requires one
> > to have the machine right next to them.
> > I am not using ZFS at all.
> > I was hoping there is a way to switch from STABLE to RELEASE and then
> just
> > use freebsd-update.
>
>    Don't see why you couldn't do one last source tree update to
> 8.4-RELEASE (if doing the work, "I'd" go to 9.3-RELEASE with this step
> myself; doubt you really need to do 9.0 first), rebuild+reinstall so you
> are now on a -RELEASE as freebsd-update would want to work from, then
> proceed with its steps. Somewhere after 9 (or was it 10) there were
> compiler changes that have /usr/src/UPDATING saying what steps to take
> first (so at least that oneintermediate build would be needed).
>    I thought steps would then be upgrade through each major next major
> version, which is safest to perform by reaching the #.0, then go to the
> latest #.# (9.0>9.4>10.0>10.4>11.0>11.4>...) but the #.0 seems like a
> useless step to me as it technically means you would be rolling between
> older and newer releases. If you cannot just do an upgrade by stating
> the final desired version, even if multiple reboots & runs would be
> needed if intermediate versions are required, that seems like a bug to me.
>    Would be wise to refer to release notes and errata (or was it
> elsewhere) as they have documented issues with upgrades that people need
> to be aware of such as 12.4p6 and 13.2p3 having a fix for freebsd-update
> corrupting files since moving to git.
>

Might you have time to detail the steps for this?



-- 
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223
 In an Internet failure case, the #1 suspect is a constant: DNS.
"Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)
[How to ask smart questions:
http://www.catb.org/~esr/faqs/smart-questions.html]

[-- Attachment #2 --]
<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jan 27, 2024 at 3:45 PM Edward Sanford Sutton, III &lt;<a href="mailto:mirror176@hotmail.com">mirror176@hotmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 1/27/24 04:00, Odhiambo Washington wrote:<br>
&gt; On Sat, Jan 27, 2024 at 12:59 PM Edward Sanford Sutton, III &lt;<br>
&gt; <a href="mailto:mirror176@hotmail.com" target="_blank">mirror176@hotmail.com</a>&gt; wrote:<br>
&gt; <br>
&gt;&gt; On 1/27/24 00:55, Odhiambo Washington wrote:<br>
&gt;&gt;&gt; Is there a way to upgrade 8.4-STABLE to 14-STABLE, or even change it to<br>
&gt;&gt;&gt; 14-RELEASE?<br>
&gt;&gt;<br>
&gt;&gt;     Hopefully others have better things to say or a more brief summary,<br>
&gt;&gt; but for now...<br>
&gt;&gt;     &quot;Maybe&quot; other ways work but from a build+install source approach I<br>
&gt;&gt; presume the intended way was to build then install the most up to date<br>
&gt;&gt; 8-STABLE, then 9-STABLE, etc. until you are on 14-STABLE. Where<br>
&gt;&gt; mergemaster used to be used for cvs &amp; svn updates, etcupdate became a<br>
&gt;&gt; thing and I think required once you are on versions only available<br>
&gt;&gt; through git; you will need to run etcupdate starting with a source tree<br>
&gt;&gt; matching the currently installed version before updating the source tree<br>
&gt;&gt; as you start to use it. I do not recall what versions introduced or<br>
&gt;&gt; required it but it is required when working from a git source repository<br>
&gt;&gt; instead of cvs/svn.<br>
&gt;&gt;     Binary packages require you start and end with a more formal release<br>
&gt;&gt; such as 13.2-RELEASE (or whatever last 13 release was) =&gt; 14.0-RELEASE.<br>
&gt;&gt; If using ZFS, my understanding is that binary updates across major<br>
&gt;&gt; versions seem to be painfully slow. You would need to switch to and<br>
&gt;&gt; install the nearest -RELEASE version. If using a custom kernel then you<br>
&gt;&gt; would still be stuck building it from source but otherwise can use<br>
&gt;&gt; binary updates for it too.<br>
&gt;&gt;     Obviously as there would be many updates+reboots happening with a #<br>
&gt;&gt; of API revisions, I&#39;d make sure 3rd party kernel modules that aren&#39;t<br>
&gt;&gt; necessary for the update are not being loaded until after the updates to<br>
&gt;&gt; FreeBSD + the modules are completed. For good measure, just shut down<br>
&gt;&gt; unneeded software from startup, cron, etc. as the won&#39;t likely be API<br>
&gt;&gt; compatible until reinstalled or compatibility libraries are installed.<br>
&gt;&gt;     Maybe it would be wise to consider &#39;replacing&#39; the install instead of<br>
&gt;&gt; binary updating if not for speed of its multiple steps alone. I presume<br>
&gt;&gt; such drastic action is the only single step process but would be<br>
&gt;&gt; interested if others have suggestions otherwise.<br>
&gt;&gt;     If you have ZFS as root and are planning to upgrade to newer<br>
&gt;&gt; filesystem/pool versions (performed with zfs related commands, not with<br>
&gt;&gt; source installs or FreeBSD&#39;s update tool), you should make sure you take<br>
&gt;&gt; steps to upgrade the boot loader code before that operation is performed.<br>
&gt;&gt;     If you have backups, you always have a way to undo what has been done<br>
&gt;&gt; in case anything goes wrong or doesn&#39;t work. /usr/src/UPDATING is also<br>
&gt;&gt; wise to read/follow for any -STABLE user in addition to the -STABLE<br>
&gt;&gt; mailing list. Nothing comes to mind of what to be aware of from it<br>
&gt;&gt; despite that I probably have done that same upgrade path on the machine<br>
&gt;&gt; I am typing this reply on though I migrated when each -STABLE branch was<br>
&gt;&gt; new rather than old. I have not yet upgraded to 14 though.<br>
&gt;&gt;     &#39;Maybe&#39; pkg switched through pkgng within this timeframe; it has a<br>
&gt;&gt; database conversion process that you can go through though I think it<br>
&gt;&gt; leaves behind the old data layout for you to manually dispose of. Could<br>
&gt;&gt; also just uninstall &#39;all&#39; packages then reinstall/replace with what is<br>
&gt;&gt; now available once upgraded. Handbook at least used to talk of this<br>
&gt;&gt; conversion which I &#39;think&#39; was a thing around v9 or so. Tools can output<br>
&gt;&gt; a list of installed packages including pkgng&#39;s `pkg prime-list` command<br>
&gt;&gt; which can then help reinstall after a bulk removal and portmaster has a<br>
&gt;&gt; documented set of steps which can aid in that too.<br>
&gt;&gt;<br>
&gt;&gt; And for a brief command summary and/or comments I&#39;d use for source<br>
&gt;&gt; upgrades (over and over and...modify as your system needs):<br>
&gt;&gt;<br>
&gt;&gt; cd /usr/src<br>
&gt;&gt; #if using etcupdate for the first time, you must use its preparation<br>
&gt;&gt; step before updating the source tree; see other documentation.<br>
&gt;&gt; #update the source tree using git, svn, or whatever tool...<br>
&gt;&gt; #git switch releng/14.0<br>
&gt;&gt; git switch stable/13<br>
&gt;&gt; #remove vendor branches; at least one of the updates has requires this<br>
&gt;&gt; git remote prune origin<br>
&gt;&gt; #update source tree with git<br>
&gt;&gt; git pull --ff-only<br>
&gt;&gt; #cleanup the build path; I had to perform this to even go from 13-STABLE<br>
&gt;&gt; to 14-STABLE and have the build not fail, possibly because I accelerate<br>
&gt;&gt; my updates by using things like &#39;WITH_META_MODE=yes&#39;<br>
&gt;&gt; chflags -R noschg /usr/obj/usr;rm -rf /usr/obj/usr;cd /usr/src&amp;&amp;make<br>
&gt;&gt; cleandir&amp;&amp;make cleandir<br>
&gt;&gt; #slower but more reliable build with a kernel install if successful<br>
&gt;&gt; make buildworld&amp;&amp;make buildkernel&amp;&amp;make installkernel<br>
&gt;&gt; #faster build, run in background, provide less output. This will hang if<br>
&gt;&gt; PORTS_MODULES is used and a dialog comes up during any port build as<br>
&gt;&gt; jobs count is incompatible with PORTS_MODULES + `make comfig` dialog boxes.<br>
&gt;&gt; /usr/bin/nice -n 18 /usr/sbin/idprio 31 make -sj8 buildworld<br>
&gt;&gt; buildkernel&amp;&amp;make installkernel<br>
&gt;&gt; shutdown now<br>
&gt;&gt; fsck -p<br>
&gt;&gt; mount -u /<br>
&gt;&gt; mount -a<br>
&gt;&gt; sh /etc/rc.d/zfs start<br>
&gt;&gt; cd /usr/src<br>
&gt;&gt; #adjkerntz -i # if CMOS is not UTC<br>
&gt;&gt; #mergemaster -iUFp #disabled as I use etcupdate now<br>
&gt;&gt; etcupdate -p<br>
&gt;&gt; cd /usr/src&amp;&amp;make installworld&amp;&amp;make delete-old&amp;&amp;etcupdate<br>
&gt;&gt; shutdown -r now<br>
&gt;&gt;<br>
&gt;&gt; #These steps should only need to be done at the end.<br>
&gt;&gt; #update bootcode for ZFS on root; UEFI requires different steps. This<br>
&gt;&gt; must be done before zpool/zfs changes for bootable root pools. If the<br>
&gt;&gt; partition is too small, this will fail; I stole swap space with<br>
&gt;&gt; deletes+recreates to work past that. This should be repeated for every<br>
&gt;&gt; disk that could be asked upon to boot the system.<br>
&gt;&gt; gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada1<br>
&gt;&gt; #next up, upgrade/replace packages with up to date copies. I have used<br>
&gt;&gt; different ways of doing this over time such as manually uninstalling<br>
&gt;&gt; then running `make install clean` in a ports directory, simplified with<br>
&gt;&gt; portupgrade and I was never a big user of portmaster as I found failures<br>
&gt;&gt; of one sort or another too common and it aborts midtask on those, and<br>
&gt;&gt; now currently use pkg form a custom built repository using poudriere.<br>
&gt;&gt; #once packages are all updated one way or another<br>
&gt;&gt; cd /usr/src;make delete-old-libs<br>
&gt;&gt;<br>
&gt; <br>
&gt; Thank you very much for the detailed procedure.<br>
&gt; By the look of things, this is quite involving and I believe requires one<br>
&gt; to have the machine right next to them.<br>
&gt; I am not using ZFS at all.<br>
&gt; I was hoping there is a way to switch from STABLE to RELEASE and then just<br>
&gt; use freebsd-update.<br>
<br>
   Don&#39;t see why you couldn&#39;t do one last source tree update to <br>
8.4-RELEASE (if doing the work, &quot;I&#39;d&quot; go to 9.3-RELEASE with this step <br>
myself; doubt you really need to do 9.0 first), rebuild+reinstall so you <br>
are now on a -RELEASE as freebsd-update would want to work from, then <br>
proceed with its steps. Somewhere after 9 (or was it 10) there were <br>
compiler changes that have /usr/src/UPDATING saying what steps to take <br>
first (so at least that oneintermediate build would be needed).<br>
   I thought steps would then be upgrade through each major next major <br>
version, which is safest to perform by reaching the #.0, then go to the <br>
latest #.# (9.0&gt;9.4&gt;10.0&gt;10.4&gt;11.0&gt;11.4&gt;...) but the #.0 seems like a <br>
useless step to me as it technically means you would be rolling between <br>
older and newer releases. If you cannot just do an upgrade by stating <br>
the final desired version, even if multiple reboots &amp; runs would be <br>
needed if intermediate versions are required, that seems like a bug to me.<br>
   Would be wise to refer to release notes and errata (or was it <br>
elsewhere) as they have documented issues with upgrades that people need <br>
to be aware of such as 12.4p6 and 13.2p3 having a fix for freebsd-update <br>
corrupting files since moving to git.<br></blockquote><div><br></div><div>Might you have time to detail the steps for this?</div><div> </div></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div dir="ltr"><div>Best regards,<br>Odhiambo WASHINGTON,<br>Nairobi,KE<br>+254 7 3200 0004/+254 7 2274 3223</div><div><span style="color:rgb(34,34,34)"> In </span><span style="color:rgb(34,34,34)">an Internet failure case, the #1 suspect is a constant: DNS.</span><br>&quot;<span style="font-size:12.8px">Oh, the cruft.</span><span style="font-size:12.8px">&quot;, </span><span style="font-size:12.8px">egrep -v &#39;^$|^.*#&#39; </span><span style="background-color:rgb(34,34,34);color:rgb(238,238,238);font-family:&quot;Lucida Console&quot;,Consolas,&quot;Courier New&quot;,monospace;font-size:13.6px">¯\_(ツ)_/¯</span><span style="font-size:12.8px"> :-)</span></div><div><span style="font-size:12.8px">[How to ask smart questions: </span><span style="font-size:12.8px"><a href="http://www.catb.org/~esr/faqs/smart-questions.html" target="_blank">http://www.catb.org/~esr/faqs/smart-questions.html</a>]</span></div></div></div></div></div>;

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAAdA2WPocrL_gJ8Edt_Oj7NqfZteJv85xnC3a_nSyX6iHQr1FQ>