Upgrading NetBSD using sysupgrade
The sysupgrade utility (currently found in pkgsrc/sysutils/sysupgrade) allows you to upgrade a running system to a newer binary release.
Before doing an upgrade it is essential to read the release information and upgrading notes in one of the INSTALL 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).
One of the benefits of sysupgrade 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.
In this tutorial, we will upgrade a system with the following configuration.
IP Address : 192.168.234.152/24
Hostname : server01.example.com
Operating System: NetBSD 7.1.1
Please Note Internet Access is required for the whole activity
step 1: Setup
The system we have is running and with the realease of NetBSD 7.1.2 in March 15, 2018,its important that we upgrade our system to the latest one.It is the second security/critical update of the NetBSD 7.1 release branch and its represents a selected subset of fixes deemed important for security or stability reasons.
There are a variety of alternatives to perform this upgrade but we use the sysupgrade utility. We have to check the current version by runing the command:
strings /netbsd | grep NetBSD
Output from NetBSD 7.1.1 system should be similar to the below with the OS highlighted:
or
# uname -a
Output should be similar to the below
NetBSD 7.1.1 NetBSD 7.1.1 (GENERIC.201712222334Z) amd64
Before we can go ahead to upgrade,we need to install our utility sysupgrade.
- Using pkgin
# pkgin install sysupgrade
or
- Using pkgsrc
#cd /usr/pkgsrc/sysutils/sysupgrade/
# make install clean
Step 2: Installation
Since we are running NetBSD/amd64 7.1.1 and we wish to upgrade to NetBSD 7.1.2. The procedure to do so would be to run the following command:
sysupgrade auto ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-7.1.2/amd64
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.
Step 3: Testing
After Installation is done,run
uname -a
to confirm if system has been upgraded.
From my system, i have :
# uname -a NetBSD 7.1.2 NetBSD 7.1.2 (GENERIC.201803151611Z) amd64
Congratulations! NetBSD 7.1.1 has been upgraded to NetBSD 7.1.2 .