Wednesday, January 31, 2018

FIx inconsistant upgrade instructions

I noticed a couple of inconsistencies between upgradexx.html and
INSTALL.platform. They don't state to remove man pages and include
files. Here is a patch to fix upgradexx but I'm not sure how to
go about fixing all INSTALL.<platform> so here is just the amd64
fix (based on -release, not -current).

And, the upgrade instructions always kind of bugged me that they
weren't a list. I've added the above corrections and made it
more of a list of things to do in-order.

Note that I also include "pkg_delete -a" which might be controversial.

--John


--- /export/cache/6.2/amd64/INSTALL.amd64 Tue Oct 3 20:27:48 2017
+++ /tmp/INSTALL.amd64 Wed Jan 31 17:38:32 2018
@@ -872,7 +872,7 @@
The best solution, whenever possible, is to backup your data and
reinstall
from scratch. As a minimum, if the toolchain (the ``comp'' set) was
installed,
you should remove all files within /usr/include before attempting to
-upgrade.
+upgrade. You should always remove all of /usr/share/man as well.

To upgrade OpenBSD 6.2 from a previous version, start with the general
instructions in the section "Installing OpenBSD".


Index: upgrade62.html
===================================================================
RCS file: /cvs/www/faq/upgrade62.html,v
retrieving revision 1.6
diff -u -r1.6 upgrade62.html
--- upgrade62.html 19 Nov 2017 00:48:48 -0000 1.6
+++ upgrade62.html 1 Feb 2018 01:47:06 -0000
@@ -57,11 +57,14 @@

<hr>

+<h2 id="WithInstKern">Upgrade using the install kernel</h2>
+
<h3 id="BeforeUpdate">Before rebooting into the install kernel</h3>

<ul>
- <li><b>clean out <tt>/usr/share/man</tt>.</b>
- To remove all outdated manuals, issue <tt><b>rm -rf
/usr/share/man</b></tt>.
+ <li><b>clean out <tt>/usr/share/man</tt> and
<tt>/usr/include</tt>.</b>
+ To remove all outdated manuals and .h files, issue
+ <tt><b>rm -rf /usr/share/man /usr/include</b></tt>.

<p>
<li><b>ksh plaintext history file.</b>
@@ -112,6 +115,17 @@
<blockquote><pre>
# <b>chgrp -R crontab /var/cron/atjobs</b> <!--
--></pre></blockquote>
+ <li><b>stop and/or disable any appropriate applications.</b>
+ During this process, all the userland applications will be replaced
but
+ may not be runnable, and strange things may happen as a result.
+ You may also have issues with DNS resolution during the first
reboot, so
+ PF rules and NFS mounts dependent upon DNS may cause boot-up
problems.
+ There may be other applications which you wish to keep from running
+ immediately after the upgrade, such as databases, so stop and
disable them as well.
+ (Use <tt><b>rcctl stop</b></tt> and <tt><b>rcctl disable</b></tt>.)
+
+ <p>
+
</ul>


@@ -332,6 +346,31 @@
migration quick start</a> for more details.
</ul>

+<h3 id="UpReboot">Upgrade and update packages and reboot</h3>
+
+<ul>
+ <li><b>Upgrade</b>
+ Boot the 6.2 version of the install kernel <tt><b>bsd.rd</b></tt>
from media,
+ network or the root directory of your current disk. Select the
<tt>(U)pgrade</tt>
+ option and follow the prompts. Then reboot.
+
+ <p>
+ <li><b>Check your work</b>
+ Review the console output from boot (using <tt><b>dmesg
-s</b></tt>)
+ and correct any failures as necessary (such as sysmerge-related
corrections).
+ Verify the steps in <a href="#ConfigChanges">configuration
changes</a>
+ above are applied.
+
+ <p>
+ <li><b>Update packages</b>
+ Finally, remove obsolete package dependencies (using
<tt><b>pkg_delete -a</b></tt>) and
+ update packages: <tt><b>pkg_add -u</b></tt>.
+ Reenable any packages at startup (<tt><b>rcctl enable</b></tt>)
that you previously disabled.
+
+ <p>
+ <li><b>Reboot</b>
+ Reboot once more and ensure everything is working.
+</ul>

<hr>
<h2 id="NoInstKern">Upgrade without the install kernel</h2>
@@ -417,7 +456,8 @@
--></pre></blockquote>

<li><b>Install new userland.</b>
- Save a copy of reboot(8), extract and install the release tarballs,
reboot.
+ Clean out old man pages and include files. Save a copy of
reboot(8),
+ extract and install the release tarballs, reboot.
Install <tt>base62.tgz</tt> last, because the new base system, in
particular
<a href="https://man.openbsd.org/OpenBSD-6.2/tar">tar(1)</a>,
<a href="https://man.openbsd.org/OpenBSD-6.2/gzip">gzip(1)</a> and
@@ -425,6 +465,7 @@
will not work with the old kernel.
Either untar the needed filesets manually
<blockquote><pre>
+ <b>rm -rf /usr/share/man /usr/include</b>
<b>cp /sbin/reboot /sbin/oreboot</b>
<b>tar -C / -xzphf xshare62.tgz</b>
<b>tar -C / -xzphf xserv62.tgz</b>
@@ -439,6 +480,7 @@
or, if you use
<a href="https:man.openbsd.org/OpenBSD-6.2/ksh">ksh(1)</a>, you can
do
<blockquote><pre>
+ <b>rm -rf /usr/share/man /usr/include</b>
<b>cp /sbin/reboot /sbin/oreboot</b>
<b>for _f in [!b]*62.tgz base62.tgz; do tar -C / -xzphf "$_f" ||
break; done</b>
<b>/sbin/oreboot</b><!--

No comments:

Post a Comment