OpenBSD – How to install sets after installation

How do I install a package set after install under OpenBSD operating systems? I forgot to add a file set comp63.tgz package. How do I install the same after installing the operating system?

Tutorial details
Difficulty level Intermediate
Root privileges Yes
Requirements OpenBSD
Est. reading time N/A
Introduction:A file set is nothing but part of OpenBSD operating system. Each set is dedicated for one purpose such as the kernel, man pages, games, compilers and more. The complete OpenBSD installation is broken up into many file sets. New OpenBSD users may install all of them to avoid problems. This page shows how to install an OpenBSD file set if you chose to skip some file sets at install time.

OpenBSD – How to install sets after installation

The OpenBSD project recommends two methods as follows to install sets after the initial install.

Method # 1: Upgrade

  1. Reboot your OpenBSD system using the reboot command.
  2. Inset your install media / CD-ROM (you can also boot using PXE network boot option)
  3. Choose Upgrade rather than Install.
  4. When you get to the lists of file sets to install, choose the sets you neglected to install first time around, select your source, and let it install them for you.

The official docs recommend this following way too:

If you chose to skip some file sets at install time, you might realize later that you really do need them after all. Simply boot bsd.rd from your root file system and choose (U)pgrade. When you get to the list of file sets, select the ones you need. The bsd.rd ramdisk kernel is a live OpenBSD environment that runs entirely in memory. It contains the install script and a small number of utilities needed to perform a complete installation. These utilities can also be useful for disaster recovery. The installation media automatically boots into bsd.rd and starts the install script for you.


You will boot the kernel named bsd.rd from the a partition of the first recognized hard disk and select U to upgrade:

Provide needed information and you should arrive the following screen to install missing sets for OpenBSD:

After sometimes you should get the following message on screen:

CONGRATULATIONS! Your OpenBSD upgrade has been successfully completed!
To boot the new system, enter ‘reboot’ at the command prompt.

# reboot

Method # 2: Use tar command

Use wget or ftp client to download a file set called comp63.tgz:
$ cd /tmp
## [ set these are per your needs ] ##
$ PKG="comp63.tgz"
$ ARCH="amd64"
$ VER="6.3"
## [ use wget from ports ] ##
$ wget http://mirror.switch.ch/ftp/pub/OpenBSD/$VER/$ARCH/$PKG
## [ OR use ftp client which installed by default on an OpenBSD ] ##
$ ftp https://cloudflare.cdn.openbsd.org/pub/OpenBSD/$VER/$ARCH/$PKG

Type the following tar command to extract files:
# cd /
# pwd
# PKG="comp63.tgz"
# tar xzvphf /tmp/$PKG

Sample outputs:

./usr/lib/libasn1.a
./usr/lib/libasn1_p.a
./usr/lib/libasn1_pic.a
./usr/lib/libc.a
....
...
...

The comp63.tgz ($PKG) file set is simply compressed tar file, and you can expand them manually from the root of the filesystem using the tar command. Do NOT forget the p option in the above tar command in order to restore the file permissions properly.

Conclusion

You just learned how to install sets after installation on an OpenBSD desktop or server using various methods. I suggest you read the following documents:


🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 1 comment so far... add one


CategoryList of Unix and Linux commands
Disk space analyzersdf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
1 comment… add one
  • Tommy Nov 12, 2017 @ 19:40

    This page saved me some time. I used method #2 on my OpenBSD 6.0 laptop.

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum