OpenBSD – How to install sets after installation

last updated in Categories , ,

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?

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.

Boot OpenBSD bsd.rd from your root file system and choose Upgrade
You will boot the kernel named bsd.rd from the a partition of the first recognized hard disk and select U to upgrade:
OpenBSD - How to install sets after installation
Provide needed information and you should arrive the following screen to install missing sets for OpenBSD:
Installing OpenBDS sets after installation
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:

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

Start the discussion at www.nixcraft.com

Historical Comment Archive

1 comment

    Have a question? Post it on our forum!