Upgrading OpenBSD From 6.3 To 6.4
Tags: openbsd, os, upgrade, migration
Published: 2018-12-07 03:05:16

---
title: Upgrading OpenBSD From 6.3 To 6.4
published: true
description: This post is about upgrading OpenBSD from 6.3 to 6.4. What is necessary is to locate bsd.rd of the target version in the root directory and run it on boot. bsd.rd is a special ramdisk kernel.
tags: openbsd, os, upgrade, migration
series: OpenBSD Upgrade
---

# Summary

This post is about upgrading OpenBSD from [6.3](https://www.openbsd.org/63.html) to [6.4](https://www.openbsd.org/64.html).
What is necessary is to **locate bsd.rd of the target version in the root directory and run it on boot**.
bsd.rd is "a special ramdisk kernel."

This tutorial is available with not only computers at hand but also VPS services providing OpenBSD image with VNC (Virtual Network Computing) such as [Vultr](https://vultr.com/) and [CloudSigma](https://www.cloudsigma.com/).

### Official Documents

[The OpenBSD project](https://www.openbsd.org/) always provides rich documentation about their products.
This is also the case of [upgrading the OS](https://www.openbsd.org/faq/upgrade64.html):

> Upgrades are only supported from one release to the release immediately following it. Read through and understand this process before attempting it. For critical or physically remote machines, test it on an identical, local system first.
>
> Start by performing the pre-upgrade steps. Next, boot from the install kernel, bsd.rd: use bootable install media, or place the 6.4 version of bsd.rd in the root of your filesystem and instruct the boot loader to boot this kernel. Once this kernel is booted, choose the (U)pgrade option and follow the prompts. Apply the configuration changes and finish up by upgrading the packages: pkg_add -u.
>
> Alternatively, you can use the manual upgrade process.
>
> You may wish to check the errata page or upgrade to the stable branch to get any post-release fixes.

To my sadness, however, I wasn't matured enough to understand how to "instruct the boot loader to boot this kernel"...
It was found an easy way; I just had to **type something while the screen was waiting for some seconds showing "boot>" on boot**.

<center>✿ ✿ ✿</center>

# Tutorial

### Step 1: Preparation

Get bsd.rd of the target version:

```shell-session
# # get bsd.rd
# wget https://cdn.openbsd.org/pub/OpenBSD/6.4/amd64/bsd.rd
# wget https://cdn.openbsd.org/pub/OpenBSD/6.4/amd64/SHA256.sig
# # verify it
# signify -C -p /etc/signify/openbsd-64-base.pub -x SHA256.sig bsd.rd
Signature Verified
bsd.rd: OK
```

Replace it with that of the previous version in the root directory:

```shell-session
# # create backup of the previous version
# cp /bsd.rd ./bsd.rd.63
# # replace /bsd.rd
# cp bsd.rd /

# # remove downloaded files as needed
# rm ./bsd.rd
# rm ./SHA256.sig
```

*\* Note: If you upgraded your system from all the way back 2013 and never deleted the user and group:*

```shell-session
# userdel _btd
# # "userdel: No such user `_btd'" is echoed if not applicable to the above
# groupdel _btd
# # "groupdel: No such group: `_btd'" is echoed if not applicable to the above
```

### Step 2: Running bsd.rd

Be sure to connect with the server via direct or VNC connection.

*\* Note: Using VNC connection, [Reminna](https://remmina.org/) is one of the useful tools as a client.*

Reboot the OS:

```shell-session
# reboot
```

Wait for the booting console shows "boot>":

![booting-console](https://thepracticaldev.s3.amazonaws.com/i/v2qy8nz6kr0ijq0l67pc.png)

Now, be quick to type something so the automatic process stops.

And type `boot /bsd.rd` as above. That's it!

### Step 3: Upgrading

OpenBSD 6.4 installation program starts like this:

```console
Welcome to the OpenBSD/amd64 6.4 installation program.
(I)nstall, (U)pgrade, (A)utoinstall or (S)hell? u
```

Choose "u" so questions which are very similar to the initial installation are given.

*\* Note: Choosing "i" will give the way to install OpenBSD 6.4 in the existing disk or empty space.*

Answer them like these ways:

| Question                                     | Answer                |
| -------------------------------------------- | --------------------- |
| Which disk is the root disk                  | sd0                   |
| Force checking of clean non-root filesystems | no                    |
| Location of sets                             | http                  |
| HTTP proxy URL                               | none                  |
| HTTP Server                                  | cdn.openbsd.org       |
| Server directory                             | pub/OpenBSD/6.4/amd64 |
| Set name(s)                                  | -game* done (which is better than "-game* -x* done" if php is used in various scenes) |
| Location of sets                             | done                  |

Of course, they are up to the environment.

After installation, you will get the congratulations message:

![](https://thepracticaldev.s3.amazonaws.com/i/tyeua2q2vkxqkiwwrevj.png)

Let's reboot it and OpenBSD 6.4 will be in your hands!

### Step 4: Upgrading

I recommend the additional operations when starting the new OS for the first time:

```shell-session
# # apply base system binary patches
# syspatch
# # upgrade packages
# pkg_add -u
```

<center>✿ ✿ ✿</center>

Happy serving 🕊