OpenBSD 7.6 Upgrade Guide
This is an interactive upgrade guide for OpenBSD 7.6 using bsd.rd. It assumes you have OpenBSD 7.6 installed and working networking. It can also be used to repair OpenBSD 7.6.
This guide was written for upgrading openbsd 7.5 to 7.6, but the same idea can be used for upgrading the versions thereafter. Upgrades must be done one version at a time, so upgrading from 7.4 to 7.6 would require upgrading first to 7.5, then to 7.6.
NOTE: This guide is no substitute for reading the OpenBSD FAQ. In particular, you should read the 7.6 Upgrade Guide.
ALSO SEE: Sysupgrade is an easier, mostly unattended upgrade process.
First, check to see if you need to upgrade your OS. To find out your operating
system version, type: uname -a
. If it says OpenBSD example.com 7.5
, you
can upgrade to 7.6 using this guide. If it says OpenBSD example.com 7.6
,
you can follow this guide to repair your OS.
- Make sure to back up any files. Use dump and restore.
- Make sure to notify all your users in advance that there will be downtime during the upgrade.
- You will need a way to view the serial console. If you are using VMM, you can view it using the serial console?. If you are using another provider, you may need to use VNC. Make sure to have the serial console open so you can interrupt the normal bootup process during the upgrade.
- First, download bsd.rd and the SHA256 signature file from an OpenBSD mirror.
- Verify the signature with signify:
$ ftp https://ftp.openbsd.org/pub/OpenBSD/7.6/amd64/bsd.rd $ ftp https://ftp.openbsd.org/pub/OpenBSD/7.6/amd64/SHA256.sig $ signify -C -p /etc/signify/openbsd-76-base.pub -x SHA256.sig bsd.rd Signature Verified bsd.rd: OK
Do NOT proceed with the upgrade if you cannot verify the signature. The file may be corrupt. - Replace /bsd.rd with the new bsd.rd, then reboot:
$ doas cp bsd.rd /bsd.rd $ doas shutdown -r now *** FINAL System shutdown message from username@example.com *** System going down IMMEDIATELY System shutdown time has arrived
- After the reboot, you must immediately boot from bsd.rd:
Using drive 0, partition 3. Loading...... probing: pc0 com0 mem[638K 2046M a20=on] disk: hd0+ hd1+ hd2 >> OpenBSD/amd64 BOOT 3.65 \ com0: 115200 baud switching console to com0 >> OpenBSD/amd64 BOOT 3.65 boot> boot /bsd.rd
NOTE: You must type something before the timeout (default 5 seconds), or else bootup will continue automatically. If bootup happens automatically, login and reboot again by typing doas shutdown -r now
.
NOTE: You can change the default timeout by editing /etc/boot.conf.
- At the serial console (either cu? or VNC), before automatic bootup, type
boot /bsd.rd
.
# If you did everything correctly, you should see OpenBSD 7.6 (RAMDISK_CD) in the boot screen. If you see OpenBSD 7.5, you did not follow the above steps correctly.booting hd0a:/bsd.rd: 4101039+1721344+3887112+0+704512 [109+465408+318888]=0xab0b98 entry point at 0xffffffff81001000 Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. Copyright (c) 1995-2024 OpenBSD. All rights reserved. https://www.OpenBSD.org OpenBSD 7.6 (RAMDISK_CD) #326: Mon Sep 30 09:00:03 MDT 2024 ... Welcome to the OpenBSD/amd64 7.6 installation program. (I)nstall, (U)pgrade, (A)utoinstall or (S)hell?
- Type u for (U)pgrade. Upgrading will allow you to install OpenBSD 7.6. You can use this to either upgrade from 7.5 or to repair an existing 7.6 system.
At any prompt except password prompts you can escape to a shell by typing '!'. Default answers are shown in []'s and are selected by pressing RETURN. You can exit this program at any time by pressing Control-C, but this can leave your system in an inconsistent state. Terminal type? [vt220]
- Press enter for vt220.
Available disks are: sd0. Which disk is the root disk? ('?' for details) [sd0]
- To check which root disk, press ? for details. NOTE: Be careful to install to the correct disk.
Checking root filesystem (fsck -fp /dev/sd0a)... OK. Mounting root filesystem (mount -o ro /dev/sd0a /mnt)... OK. Force checking of clean non-root filesystems? [no]
- There is no probably need to force check clean non-root filesystems, so just press enter.
Let's upgrade the sets! Location of sets? (cd0 disk http nfs or 'done') [http]
- You can get the base sets from cd0 (ISO), disk (such as USB flash drive), or http. For this tutorial, we will use http.
HTTP proxy URL? (e.g. 'http://proxy:8080', or 'none') [none] HTTP Server? (hostname, list#, 'done' or '?') [cdn.openbsd.org] ftp.openbsd.org Server directory? [pub/OpenBSD/7.6/amd64] Select sets by entering a set name, a file name pattern or 'all'. De-select sets by prepending a '-', e.g.: '-game*'. Selected sets are labelled '[X]'. [X] bsd [X] comp76.tgz [X] xbase76.tgz [X] xserv76.tgz [X] bsd.rd [X] man76.tgz [X] xshare76.tgz [X] base76.tgz [X] game76.tgz [X] xfont76.tgz Set name(s)? (or 'abort' or 'done') [done]
- For this tutorial, we will not use a proxy. Press enter for none.
- For the HTTP server, press ? to show a list of servers. Choose the one closest to your location.
- Leave the server directory as pub/OpenBSD/7.6/amd64 and press enter.
- It's recommended you install all the sets. It is not possible to install missing sets using pkg_add; you will be required to re-run the installer. So, we don't recommend skipping any sets. Missing sets may cause issues later.
- In the OpenBSD FAQ:
New users are recommended to install all of them.Some libraries from xbase76.tgz, like freetype or fontconfig, can be used outside of X by programs that manipulate text or graphics. Such programs will usually need fonts, either from xfont76.tgz or font packages. For the sake of simplicity, the developers decided against maintaining a minimal xbase76.tgz set that would allow most non-X ports to run.
- The X sets are often needed even if you don't run X. If you skip it now, you may later need to reboot the server and run bsd.rd to upgrade the installation. This would require downtime. The X packages are only a few hundred megabytes and present minimal security risk so long as X is disabled.
- If downloading sets over http, make sure that the SHA256.sig file is verified.
Get/Verify SHA256.sig 100% |**************************| 2324 00:00 Signature Verified Get/Verify bsd 100% |**************************| 28007 KB 00:04 ... Installing xserv76.tgz 100% |**************************| 20070 KB 00:02 Installing BUILDINFO 100% |**************************| 54 00:00 Location of sets? (cd0 disk http nfs or 'done') [done] Making all device nodes... done. fw_update: add none; update intel Relinking to create unique kernel... CONGRATULATIONS! Your OpenBSD upgrade has been successfully completed! Exit to (S)hell, (H)alt or (R)eboot? [reboot]
- Press enter to reboot.
- NOTE: If you booted from ISO, flash drive, or some other external install media, you will need to make sure that the bootloader boots from the proper hard disk.
- The system will automatically boot OpenBSD 7.6.
>> OpenBSD/amd64 BOOT 3.67 boot> booting hd0a:/bsd: 19912661+4318224+409472+0+1236992 [1540351+128+1395768+1092498]=0x1c86d50 entry point at 0xffffffff81001000 [ using 4029776 bytes of bsd ELF symbol table ] Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. Copyright (c) 1995-2024 OpenBSD. All rights reserved. https://www.OpenBSD.org OpenBSD 7.6 (GENERIC) #332: Mon Sep 30 08:45:17 MDT 2024 ... Mon Nov 11 18:49:32 CST 2024 OpenBSD/amd64 (example.com) (tty00)
- You will see a list of patches that need to be installed and conf files that need to be updated.
- At this point, you can now use ssh to log in. Make sure to read and fix any error messages that you may see.
- To check if installation succeeded:
$ uname -a OpenBSD example.com 7.6 GENERIC#332 amd64
- If you see 7.5, installation did not succeed.
- You will want to patch the system:
$ doas syspatch
- Then, you'll want to run sysmerge(8) to merge any configuration files:
$ doas sysmerge
- Then, make sure to upgrade your packages:
$ doas pkg_add -u
- You may optionally install any firmware by running fw_update?:
$ doas fw_update -a
NOTE: some of the firmware may be proprietary. - You may want to reboot after installing patches:
$ doas shutdown -r now
See Also:
- Sysupgrade OpenBSD (unattended)
- Install, Upgrade, Repair with OpenBSD ramdisk