### Install New Userland - Ksh Glob Example Source: https://github.com/openbsd/www/blob/master/faq/upgrade67.html Uses a ksh loop to extract release tarballs, installing `base67.tgz` last. This method is an alternative to manual extraction for users familiar with ksh. ```shell cp /sbin/reboot /sbin/oreboot for _f in [!b]*67.tgz base67.tgz; do tar -C / -xzphf "$_f" || break; done /sbin/oreboot ``` -------------------------------- ### Install PHP Apache and SQLite Packages Source: https://github.com/openbsd/www/blob/master/faq/upgrade64.html Install the 'php-apache' package and separate SQLite extension packages if you use them. Examples shown for PHP 7.0. ```shell pkg_add php-apache%7.0 pkg_add php-sqlite3%7.0 pkg_add php-pdo_sqlite%7.0 ``` -------------------------------- ### Install New Userland (Ksh Script) Source: https://github.com/openbsd/www/blob/master/faq/upgrade63.html Installs OpenBSD release tarballs using a ksh loop. Installs base63.tgz last. Saves reboot(8) to oreboot. ```shell cp /sbin/reboot /sbin/oreboot for _f in [!b]*63.tgz base63.tgz; do tar -C / -xzphf "$_f" || break; done /sbin/oreboot ``` -------------------------------- ### Install New Userland (Manual Tarballs) Source: https://github.com/openbsd/www/blob/master/faq/upgrade64.html Installs new userland components by extracting tarballs. Installs base64.tgz last. Backs up reboot to /sbin/oreboot. ```bash cp /sbin/reboot /sbin/oreboot tar -C / -xzphf xshare64.tgz tar -C / -xzphf xserv64.tgz tar -C / -xzphf xfont64.tgz tar -C / -xzphf xbase64.tgz tar -C / -xzphf man64.tgz tar -C / -xzphf game64.tgz tar -C / -xzphf comp64.tgz tar -C / -xzphf base64.tgz # Install last! /sbin/oreboot ``` -------------------------------- ### Install New Userland (Manual Extraction) Source: https://github.com/openbsd/www/blob/master/faq/upgrade63.html Extracts and installs OpenBSD release tarballs manually. Installs base63.tgz last. Saves reboot(8) to oreboot. ```shell cp /sbin/reboot /sbin/oreboot tar -C / -xzphf xshare63.tgz tar -C / -xzphf xserv63.tgz tar -C / -xzphf xfont63.tgz tar -C / -xzphf xbase63.tgz tar -C / -xzphf man63.tgz tar -C / -xzphf game63.tgz tar -C / -xzphf comp63.tgz tar -C / -xzphf base63.tgz # Install last! /sbin/oreboot ``` -------------------------------- ### Enable and Start the ftp-proxy Service Source: https://github.com/openbsd/www/blob/master/faq/pf/ftp.html This command enables the ftp-proxy service to start on boot and then starts the service immediately. Ensure the proxy is running for the diversion rules to function correctly. ```shell # rcctl enable ftpproxy # rcctl start ftpproxy ``` -------------------------------- ### Install New Userland (Ksh Loop) Source: https://github.com/openbsd/www/blob/master/faq/upgrade64.html Installs new userland components using a ksh loop to extract tarballs. Installs base64.tgz last. Backs up reboot to /sbin/oreboot. ```bash cp /sbin/reboot /sbin/oreboot for _f in [!b]*64.tgz base64.tgz; do tar -C / -xzphf "$_f" || break; done /sbin/oreboot ``` -------------------------------- ### Install New Userland (Ksh Globbing) Source: https://github.com/openbsd/www/blob/master/faq/upgrade72.html Installs new userland components using ksh globbing for tarballs. Ensure base72.tgz is installed last. ```shell # cp /sbin/reboot /sbin/oreboot # for _f in [!b]*72.tgz base72.tgz; do tar -C / -xzphf "$_f" || break; done # /sbin/oreboot ``` -------------------------------- ### Booting Install Kernel on amd64/i386 Source: https://github.com/openbsd/www/blob/master/faq/upgrade47.html On amd64 and i386 architectures, boot the install kernel by typing 'boot bsd.rd' at the boot loader prompt. ```shell boot bsd.rd ``` -------------------------------- ### Install New Userland Applications Source: https://github.com/openbsd/www/blob/master/faq/upgrade47.html Install new userland applications using tar. Note that base47.tgz is installed last due to its tar utility. Configuration files are handled separately. ```shell tar -C / -xzphf xserv47.tgz tar -C / -xzphf xfont47.tgz tar -C / -xzphf xshare47.tgz tar -C / -xzphf xbase47.tgz tar -C / -xzphf game47.tgz tar -C / -xzphf misc47.tgz tar -C / -xzphf comp47.tgz tar -C / -xzphf man47.tgz tar -C / -xzphf base47.tgz # Install last! /sbin/oreboot ``` -------------------------------- ### Install New Userland Applications Source: https://github.com/openbsd/www/blob/master/faq/upgrade41.html Installs new userland applications from various file sets. Avoid installing etc41.tgz and xetc41.tgz at this stage to prevent overwriting existing configurations. ```shell export RELEASEPATH=_/usr/rel_ cd ${RELEASEPATH} tar -C / -xzpf base41.tgz tar -C / -xzpf comp41.tgz tar -C / -xzpf game41.tgz tar -C / -xzpf man41.tgz tar -C / -xzpf misc41.tgz tar -C / -xzpf xbase41.tgz tar -C / -xzpf xfont41.tgz tar -C / -xzpf xserv41.tgz tar -C / -xzpf xshare41.tgz ``` -------------------------------- ### Install New Userland Tarballs (Manual) Source: https://github.com/openbsd/www/blob/master/faq/upgrade62.html Manually extracts and installs OpenBSD 6.2 release tarballs. Ensure /sbin/reboot is backed up before extraction. Install base62.tgz last. ```shell cp /sbin/reboot /sbin/oreboot tar -C / -xzphf xshare62.tgz tar -C / -xzphf xserv62.tgz tar -C / -xzphf xfont62.tgz tar -C / -xzphf xbase62.tgz tar -C / -xzphf man62.tgz tar -C / -xzphf game62.tgz tar -C / -xzphf comp62.tgz tar -C / -xzphf base62.tgz # Install last! /sbin/oreboot ``` -------------------------------- ### Install New Userland Tarballs (Manual) Source: https://github.com/openbsd/www/blob/master/faq/upgrade71.html Manually extracts and installs release tarballs for the new userland. Install base71.tgz last. ```shell # cp /sbin/reboot /sbin/oreboot # tar -C / -xzphf xshare71.tgz # tar -C / -xzphf xserv71.tgz # tar -C / -xzphf xfont71.tgz # tar -C / -xzphf xbase71.tgz # tar -C / -xzphf man71.tgz # tar -C / -xzphf game71.tgz # tar -C / -xzphf comp71.tgz # tar -C / -xzphf base71.tgz # Install last! # /sbin/oreboot ``` -------------------------------- ### Install New Userland Tarballs (Ksh Loop) Source: https://github.com/openbsd/www/blob/master/faq/upgrade62.html Installs OpenBSD 6.2 release tarballs using a ksh loop for automation. Backs up reboot and installs base62.tgz last. ```shell cp /sbin/reboot /sbin/oreboot for _f in [!b]*62.tgz base62.tgz; do tar -C / -xzphf "$_f" || break; done /sbin/oreboot ``` -------------------------------- ### Install New Userland (Manual Tar Extraction) Source: https://github.com/openbsd/www/blob/master/faq/upgrade75.html Manually extracts release tarballs for userland components. Save a copy of reboot(8) before starting. Install base75.tgz last. ```shell # cp /sbin/reboot /sbin/oreboot # tar -C / -xzphf xshare75.tgz # tar -C / -xzphf xserv75.tgz # tar -C / -xzphf xfont75.tgz # tar -C / -xzphf xbase75.tgz # tar -C / -xzphf man75.tgz # tar -C / -xzphf game75.tgz # tar -C / -xzphf comp75.tgz # tar -C / -xzphf base75.tgz # Install last! # /sbin/oreboot ``` -------------------------------- ### Install New Userland (Manual Tar Extraction) Source: https://github.com/openbsd/www/blob/master/faq/upgrade72.html Installs new userland components by manually extracting tarballs. Ensure base72.tgz is installed last. ```shell # cp /sbin/reboot /sbin/oreboot # tar -C / -xzphf xshare72.tgz # tar -C / -xzphf xserv72.tgz # tar -C / -xzphf xfont72.tgz # tar -C / -xzphf xbase72.tgz # tar -C / -xzphf man72.tgz # tar -C / -xzphf game72.tgz # tar -C / -xzphf comp72.tgz # tar -C / -xzphf base72.tgz # Install last! # /sbin/oreboot ``` -------------------------------- ### Install New Boot Blocks Source: https://github.com/openbsd/www/blob/master/faq/upgrade57.html Execute this command to install new boot blocks. Ensure sd0 is your boot disk. ```shell installboot -v sd0 ``` -------------------------------- ### Install New Userland (Ksh Script) Source: https://github.com/openbsd/www/blob/master/faq/upgrade75.html Installs release tarballs using a ksh loop. Saves a copy of reboot(8) and installs base75.tgz last. Note that tar(1) expands only one archive per invocation. ```shell # cp /sbin/reboot /sbin/oreboot # for _f in [!b]*75.tgz base75.tgz; do tar -C / -xzphf "$_f" || break; done # /sbin/oreboot ``` -------------------------------- ### Install New Userland (Ksh Globbing) Source: https://github.com/openbsd/www/blob/master/faq/upgrade65.html This method uses ksh globbing to install userland tarballs, with 'base65.tgz' being installed last. It includes backing up the reboot command and then rebooting the system. Note that tar(1) can only expand one archive per invocation, so a simple glob is not sufficient. ```shell cp /sbin/reboot /sbin/oreboot for _f in [!b]*65.tgz base65.tgz; do tar -C / -xzphf "$_f" || break; done /sbin/oreboot ``` -------------------------------- ### Install New Kernels (Single Processor) Source: https://github.com/openbsd/www/blob/master/faq/upgrade62.html Steps to install a new single-processor kernel during a manual upgrade. Ensure you are in the release directory. ```shell cd /usr/rel # where you put the release files ln -f /bsd /obsd && cp bsd /nbsd && mv /nbsd /bsd cp bsd.rd bsd.mp / # may give a harmless warning ``` -------------------------------- ### Install New Userland Tarballs (Ksh Loop) Source: https://github.com/openbsd/www/blob/master/faq/upgrade71.html Installs release tarballs using a ksh loop. Installs base71.tgz last. Note that tar(1) expands only one archive per invocation. ```shell # cp /sbin/reboot /sbin/oreboot # for _f in [!b]*71.tgz base71.tgz; do tar -C / -xzphf "$_f" || break; done # /sbin/oreboot ``` -------------------------------- ### Install New Kernels (Multiprocessor) Source: https://github.com/openbsd/www/blob/master/faq/upgrade62.html Steps to install a new multiprocessor kernel during a manual upgrade. Ensure you are in the release directory. ```shell cd /usr/rel # where you put the release files ln -f /bsd /obsd && cp bsd.mp /nbsd && mv /nbsd /bsd cp bsd.rd / cp bsd /bsd.sp ``` -------------------------------- ### Configure SNMPv3 User Source: https://github.com/openbsd/www/blob/master/faq/upgrade70.html Example configuration for setting up a SNMPv3 user with authentication and encryption. ```text user "manager" authkey "XblueQ300ZyAbUIbndmWjfl" auth hmac-sha1 enc aes enckey "tVadj9jxq8rdJ" ``` -------------------------------- ### Install New Userland (Ksh Scripted Tarball Extraction) Source: https://github.com/openbsd/www/blob/master/faq/upgrade70.html Uses a ksh loop to extract release tarballs, excluding 'b*' archives until last. Installs base70.tgz last. Reboots afterward. ```shell # cp /sbin/reboot /sbin/oreboot # for _f in [!b]*70.tgz base70.tgz; do tar -C / -xzphf "$_f" || break; done # /sbin/oreboot ``` -------------------------------- ### Install Single Processor Kernel Source: https://github.com/openbsd/www/blob/master/faq/upgrade47.html Steps to install a new single-processor kernel during an in-place upgrade. This involves copying the new kernel and ensuring a valid bootable kernel remains. ```shell export RELEASEPATH=_/usr/rel_ _# where you put the files_ cd ${RELEASEPATH} rm /obsd ; ln /bsd /obsd && cp bsd /nbsd && mv /nbsd /bsd cp bsd.rd bsd.mp / ``` -------------------------------- ### Install New Kernel (Single Processor) Source: https://github.com/openbsd/www/blob/master/faq/upgrade57.html Commands to install a new single-processor kernel. Adjust RELEASEPATH to your file location. This process ensures a valid kernel is available after potential interruptions. ```shell export RELEASEPATH= /usr/rel/ # where you put the files cd ${RELEASEPATH} rm /obsd ; ln /bsd /obsd && cp bsd /nbsd && mv /nbsd /bsd cp bsd.rd bsd.mp / ``` -------------------------------- ### Download Signature File Source: https://github.com/openbsd/www/blob/master/opensmtpd/announces/release-5.7.1.txt Download the signature file corresponding to the tarball you're installing. ```bash $ wget https://www.opensmtpd.org/archives/opensmtpd-5.7.1.sum.sig ``` -------------------------------- ### Create and Set Permissions for DESTDIR Source: https://github.com/openbsd/www/blob/master/faq/faq5.html Creates the prototype DESTDIR directories, sets ownership to 'build', and applies 700 permissions. ```bash mkdir -p /var/dest/{,x}base chown -R build /var/dest chmod -R 700 /var/dest ``` -------------------------------- ### Configure mfs Partition for DESTDIR Source: https://github.com/openbsd/www/blob/master/faq/faq5.html Example fstab entry for mounting an mfs partition as DESTDIR with specific options. ```text swap /dest mfs rw,nosuid,noperm,-P/var/dest,-s1.5G,noauto 0 0 ``` -------------------------------- ### Install New Userland - Manual Tarball Extraction Source: https://github.com/openbsd/www/blob/master/faq/upgrade67.html Manually extracts release tarballs to install the new userland. It's crucial to install `base67.tgz` last. A backup of `reboot` is made before extraction. ```shell cp /sbin/reboot /sbin/oreboot tar -C / -xzphf xshare67.tgz tar -C / -xzphf xserv67.tgz tar -C / -xzphf xfont67.tgz tar -C / -xzphf xbase67.tgz tar -C / -xzphf man67.tgz tar -C / -xzphf game67.tgz tar -C / -xzphf comp67.tgz tar -C / -xzphf base67.tgz # Install last! /sbin/oreboot ``` -------------------------------- ### Loading ipsec.conf Immediately Source: https://github.com/openbsd/www/blob/master/faq/upgrade67.html Load the ipsec configuration file immediately. ```shell # ipsecctl -f /etc/ipsec.conf ``` -------------------------------- ### Save Old Reboot and Install Userland Source: https://github.com/openbsd/www/blob/master/faq/upgrade57.html Save the current reboot command before installing new userland applications. Install base57.tgz last as it contains a potentially incompatible tar utility. Reboot immediately after unpacking. ```shell cp /sbin/reboot /sbin/oreboot tar -C / -xzphf xserv57.tgz tar -C / -xzphf xfont57.tgz tar -C / -xzphf xshare57.tgz tar -C / -xzphf xbase57.tgz tar -C / -xzphf game57.tgz tar -C / -xzphf comp57.tgz tar -C / -xzphf man57.tgz tar -C / -xzphf base57.tgz # Install last! /sbin/oreboot ``` -------------------------------- ### Enable Process Accounting on Boot Source: https://github.com/openbsd/www/blob/master/faq/upgrade41.html Set the 'accounting=YES' variable in rc.conf to enable process accounting when the system boots. The presence of the /var/account/acct file is no longer sufficient. ```sh accounting=YES ``` -------------------------------- ### Create DESTDIR Directories Source: https://github.com/openbsd/www/blob/master/faq/faq5.html Ensures the necessary DESTDIR directories for base and xenocara are created before building. ```bash mkdir /dest/{,x}base ``` -------------------------------- ### SSH2 RSA Public Key with Subject Example Source: https://github.com/openbsd/www/blob/master/openssh/txt/draft-ietf-secsh-publickeyfile-02.txt An example of an SSH2 RSA public key file that includes both a Subject and a Comment field. ```plaintext ---- BEGIN SSH2 PUBLIC KEY ---- Subject: galb Comment: 1024-bit rsa, created by galb@shimi Mon Jan 15 08:31:24 2001 AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt459 6k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4soW6 NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0= ---- END SSH2 PUBLIC KEY ---- ``` -------------------------------- ### Set Release Path and Copy New Kernel Source: https://github.com/openbsd/www/blob/master/faq/upgrade41.html Sets the path to the installation files and copies the new kernel, ensuring a fallback option exists in case of system failure during the upgrade. ```shell export RELEASEPATH=_/usr/rel_ _# where you put the files_ cd ${RELEASEPATH} rm /obsd ; ln /bsd /obsd && cp bsd /nbsd && mv /nbsd /bsd cp bsd.rd bsd.mp /** ``` -------------------------------- ### Generate Release Index File Source: https://github.com/openbsd/www/blob/master/faq/faq5.html Creates an index.txt file listing all files in the newly created release, necessary for HTTP(s) distribution. ```shell ls -nT > index.txt ``` -------------------------------- ### Install New Userland (Manual Tarball Extraction) Source: https://github.com/openbsd/www/blob/master/faq/upgrade65.html This sequence of commands manually extracts release tarballs to install the new userland. It includes backing up the reboot command, extracting various filesets, and importantly, installing 'base65.tgz' last. The system is then rebooted using the backed-up reboot command. ```shell cp /sbin/reboot /sbin/oreboot tar -C / -xzphf xshare65.tgz tar -C / -xzphf xserv65.tgz tar -C / -xzphf xfont65.tgz tar -C / -xzphf xbase65.tgz tar -C / -xzphf man65.tgz tar -C / -xzphf game65.tgz tar -C / -xzphf comp65.tgz tar -C / -xzphf base65.tgz # Install last! /sbin/oreboot ``` -------------------------------- ### Install New Userland (Manual Tarball Extraction) Source: https://github.com/openbsd/www/blob/master/faq/upgrade70.html Manually extracts release tarballs to update the userland. Save reboot command first and reboot after installation. ```shell # cp /sbin/reboot /sbin/oreboot # tar -C / -xzphf xshare70.tgz # tar -C / -xzphf xserv70.tgz # tar -C / -xzphf xfont70.tgz # tar -C / -xzphf xbase70.tgz # tar -C / -xzphf man70.tgz # tar -C / -xzphf game70.tgz # tar -C / -xzphf comp70.tgz # tar -C / -xzphf base70.tgz # Install last! # /sbin/oreboot ```