<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Chapter. Õpgrading NetBSD</title>
<link rel="stylesheet" type="text/css" href="/global.css">
<meta name="generator" content="DocBook XSL Stylesheets VX.X.X">
<link rel="home" href="index.html" title="The NetBSD Guide">
<link rel="up" href="part-install.html" title="Part ÉI. Óystem installation and related issues">
<link rel="prev" href="chap-exinst.html" title="Chapter. Åxample installation">
<link rel="next" href="part-config.html" title="Part ÉII. Óystem configuration, administration and tuning">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="navheader">
<table width="100%" summary="Navigation header">
<tr><th colspan="3" align="center">Chapter. Õpgrading NetBSD</th></tr>
<tr>
<td width="20%" align="left">
<a accesskey="p" href="chap-exinst.html">Prev</a>/td>
<th width="60%" align="center">Part ÉI. Óystem installation and related issues</th>
<td width="20%" align="right">a accesskey="n" href="part-config.html">Next</a>
</td>
</tr>
</table>
<hr>
</div>
<div class="chapter">
<div class="titlepage"><div><div><h2 class="title">
<a name="chap-upgrading"></a>Chapter. Õpgrading NetBSD</h2></div></div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl class="toc">
<dt><span class="sect1"><a href="chap-upgrading.html#upgrading-sysinst">4.1. Using sysinst</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="chap-upgrading.html#upgrading-overview">4.1.1. Overview</a></span></dt>
<dt><span class="sect2"><a href="chap-upgrading.html#upgrading-installdoc">4.1.2. The INSTALL document</a></span></dt>
<dt><span class="sect2"><a href="chap-upgrading.html#chap-upgrading-example">4.1.3. Performing the upgrade</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="chap-upgrading.html#using-sysupgrade">4.2. Using sysupgrade</a></span></dt>
</dl>
</div>
<p>This chapter describes the binary upgrade of a NetBSD system.
There are a variety of alternatives to perform this procedure, and the
following sections will guide you through them:</p>
<div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="upgrading-sysinst"></a>4.1. Õsing sysinst</h2></div></div></div>
<div class="sect2">
<div class="titlepage"><div><div><h3 class="title">
<a name="upgrading-overview"></a>4.1.1. Ïverview</h3></div></div></div>
<p>To do the upgrade, you must have some form of bootable media
(CD-ROM, USB drive, floppy, etc.) available and at least the base and
kern distribution sets. Since files already installed on the system
are overwritten in place, you only need additional free space for
files which weren't previously installed or to account for growth of
the sets between releases. Usually this is not more than a few
megabytes.</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p>Since upgrading involves replacing the kernel, boot blocks, and
most of the system binaries, it has the potential to cause data loss.
Before beginning, you are strongly advised to back up any important
data on the NetBSD partition or on any other partitions on your disk.
</p>
</div>
<p>The upgrade procedure is similar to an installation, but without
the hard disk partitioning. <span class="application">sysinst</span> will
attempt to merge the settings stored in your <code class="filename">/etc</code>
directory with the new version of NetBSD. Also, file systems are checked
before unpacking the sets. Fetching the binary sets is done in the same
manner as in the installation procedure.</p>
</div>
<div class="sect2">
<div class="titlepage"><div><div><h3 class="title">
<a name="upgrading-installdoc"></a>4.1.2. Ôhe INSTALL document</h3></div></div></div>
<p>Before doing an upgrade it is essential to read the
release information and upgrading notes in one of the
<code class="filename">INSTALL</code> files: this is the official
description of the upgrade procedure, with platform specific
information and important details. It can be found in the root
directory of the NetBSD release (on the install CD or on the FTP
server).</p>
<p>It is advisable to print the INSTALL document out. It is
available in four formats: .txt, .ps, .more, and .html.</p>
</div>
<div class="sect2">
<div class="titlepage"><div><div><h3 class="title">
<a name="chap-upgrading-example"></a>4.1.3. Ðerforming the upgrade</h3></div></div></div>
<p>The following section provides an overview of the
binary upgrade process. Most of the following
<span class="application">sysinst</span> dialogs
are similar to those of the installation process. More
verbose descriptions and explanations of the dialogs are
available in <a class="xref" href="chap-exinst.html" title="Chapter. Åxample installation">Chapter, <i>Example installation</i></a>.</p>
<p>After selecting the installation language and the keyboard
type, the main menu appears. Choosing option
<span class="quote">“<span class="quote">b: Upgrade NetBSD on a hard disk</span>”</span> will start the
the upgrade process.</p>
<div class="figure">
<a name="up-main"></a><p class="title"><b>Figure.1. Ótarting the upgrade</b></p>
<div class="figure-contents"><div class="mediaobject"><img src="../install-5.0/up-main.png" alt="Starting the upgrade"></div></div>
</div>
<br class="figure-break"><p> The dialog in <a class="xref" href="chap-upgrading.html#up-confirm" title="Figure.2. Ãontinuing the upgrade">Figure.2, “Continuing the upgrade”</a> will request
permission to continue with the upgrade. At this point nothing
has been changed yet and the upgrade can still be cancelled. This is
a good time to ask yourself whether you have made a backup, and if
you know for certain that you will be able to restore from it.
</p>
<div class="figure">
<a name="up-confirm"></a><p class="title"><b>Figure.2. Ãontinuing the upgrade</b></p>
<div class="figure-contents"><div class="mediaobject"><img src="../install-5.0/up-confirm.png" alt="Continuing the upgrade"></div></div>
</div>
<br class="figure-break"><p>After choosing to continue with <span class="quote">“<span class="quote">Yes</span>”</span>, the
next dialog will ask you to specify the hard disk with the NetBSD
system that shall be upgraded.
If more than one disk is available a list of the disks will be
displayed.</p>
<div class="figure">
<a name="up-select-disc"></a><p class="title"><b>Figure.3. Ãhoosing the hard drive</b></p>
<div class="figure-contents"><div class="mediaobject"><img src="../install-5.0/up-select-disc.png" alt="Choosing the hard drive"></div></div>
</div>
<br class="figure-break"><p>The system used for the example has only one hard disk
available: <span class="quote">“<span class="quote">wd0</span>”</span>.</p>
<p>The following dialog provides a menu to choose the installation
type. The choices are
<span class="quote">“<span class="quote">Full installation</span>”</span>,
<span class="quote">“<span class="quote">Minimal installation</span>”</span>, or
<span class="quote">“<span class="quote">Custom installation</span>”</span>.
</p>
<div class="figure">
<a name="up-install-type"></a><p class="title"><b>Figure.4. Ãhoosing the distribution filesets</b></p>
<div class="figure-contents"><div class="mediaobject"><img src="../install-5.0/inst-install-type.png" alt="Choosing the distribution filesets"></div></div>
</div>
<br class="figure-break"><p>At this point, <span class="application">sysinst</span> will perform a
check of the file system to ensure its integrity.
</p>
<div class="figure">
<a name="up-fsck"></a><p class="title"><b>Figure.5. Æile system check</b></p>
<div class="figure-contents"><div class="mediaobject"><img src="../install-5.0/up-fsck.png" alt="File system check"></div></div>
</div>
<br class="figure-break"><p>The next step is to choose which type of bootblocks to install.
</p>
<div class="figure">
<a name="up-bootblocks"></a><p class="title"><b>Figure.6. Ãhoosing bootblocks</b></p>
<div class="figure-contents"><div class="mediaobject"><img src="../install-5.0/inst-bootblocks.png" alt="Choosing bootblocks"></div></div>
</div>
<br class="figure-break"><p>The next dialog will ask how much information should
be displayed during the extraction of the distribution sets.</p>
<div class="figure">
<a name="up-verbosity"></a><p class="title"><b>Figure.7. Õpgrade process - verbosity level</b></p>
<div class="figure-contents"><div class="mediaobject"><img src="../install-5.0/inst-verbosity.png" alt="Upgrade process - verbosity level"></div></div>
</div>
<br class="figure-break"><p>The following dialog asks for the install method of choice
and provides a list of possible options. The install medium
contains the new NetBSD distribution sets. You will be prompted
for different information depending on which option you choose.
For example, a CD-ROM or DVD install requires you to specify which
device to use and which directory the sets are in, while an FTP install
requires you to configure your network and specify the hostname of an
FTP server. More details can be found in
<a class="xref" href="chap-exinst.html#exinst-choose-media" title="3.10. Ãhoosing the installation media">Section.10, “Choosing the installation media”</a>.</p>
<div class="figure">
<a name="up-medium"></a><p class="title"><b>Figure.8. Énstall medium</b></p>
<div class="figure-contents"><div class="mediaobject"><img src="../install-5.0/inst-medium.png" alt="Install medium"></div></div>
</div>
<br class="figure-break"><p><span class="application">sysinst</span> will now unpack the distribution
sets, replacing your old binaries. After unpacking these sets, it
runs the <a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?postinstall+8.i386+NetBSD-7.0"><span class="citerefentry"><span class="refentrytitle">postinstall</span>(8)</span></a> script to perform various system cleanup
and configuration update tasks. If
<span class="application">postinstall</span> produces errors, you will have
to manually resolve the issues it brings up. See postinstall's man
page for more information. Even after a successful
<span class="application">postinstall</span> run, it is advisable to use
<a class="citerefentry" href="http://netbsd.gw.com/cgi-bin/man-cgi?etcupdate+8.i386+NetBSD-7.0"><span class="citerefentry"><span class="refentrytitle">etcupdate</span>(8)</span></a> to aid in merging any other configuration changes.
You should also read the remarks in <code class="filename">INSTALL</code> about
upgrading, as specific compatibility issues are documented there.</p>
<div class="figure">
<a name="up-complete"></a><p class="title"><b>Figure.9. Õpgrade complete</b></p>
<div class="figure-contents"><div class="mediaobject"><img src="../install-5.0/up-complete.png" alt="Upgrade complete"></div></div>
</div>
<br class="figure-break"><p>When you are back at the main menu, remove the boot medium (if
applicable) and reboot. Have fun with your new version of NetBSD!</p>
</div>
</div>
<div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="using-sysupgrade"></a>4.2. Õsing sysupgrade</h2></div></div></div>
<p>The <span class="application">sysupgrade</span> utility (currently
found in <code class="filename">pkgsrc/sysutils/sysupgrade</code>) allows you
to upgrade a running system to a newer binary release.</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p>Please be aware that, as of August 2012,
<span class="application">sysupgrade</span> is a farily new tool and is
still undergoing field testing. Use with care. In particular,
upgrades across major binary releases might not work properly
yet because of the lack of a reboot between the kernel installation
and the unpacking of the sets. That said, you may find this tool
very convenient to track NetBSD-current or stable NetBSD
branches.</p>
</div>
<p>One of the benefits of <span class="application">sysupgrade</span> is
that it is an integrated and almost-unattended solution: the tool
fetches the new kernel and distribution sets from remote sites if you
desire and performs the upgrade without user intervention until new
changes to the configuration files need to be merged.</p>
<p>Let's assume you are running NetBSD/amd64 6.0 and you wish to
upgrade to NetBSD 6.1. The procedure to do so would be to run the
following command:</p>
<pre class="screen">
<code class="prompt">#</code> <strong class="userinput"><code>sysupgrade auto ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-6.1/amd64</code></strong>
</pre>
<p>And that's all that it takes. This will proceed to download
the kernel and sets appropriate for your machine, unpack them and
assist you in merging new configuration changes. Do not forget to
reboot afterwards.</p>
<p>For more details, please see the included sysupgrade(8) manual
page and the <code class="filename">/usr/pkg/etc/sysupgrade.conf</code>
configuration file.</p>
</div>
</div>
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
<a accesskey="p" href="chap-exinst.html">Prev</a>/td>
<td width="20%" align="center"><a accesskey="u" href="part-install.html">Up</a></td>
<td width="40%" align="right">a accesskey="n" href="part-config.html">Next</a>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">Chapter. Åxample installation/td>
<td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td>
<td width="40%" align="right" valign="top"> Ðart ÉII. Óystem configuration, administration and tuning</td>
</tr>
</table>
</div>
</body>
</html>