OpenBSD Upgrade 7.6 to 7.7

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MyrinNew
    Senior Member
    • Feb 2024
    • 5175

    #1

    OpenBSD Upgrade 7.6 to 7.7

    Summary

    The OpenBSD project released 7.7 of their OS on today, 28 Apr 2025, as their 58th release 💫





    What's New | Changelog


    This post shows how to upgrade OpenBSD 7.6 to 7.7.

    The steps are based on their official great guide.

    Tutorial

    Here is a step-by-step guide with a set of command-lines to run.


    🌷 🐡 🌅
    1. Pre-upgrade: Validate and customize

    The official tutorial includes Before using any upgrade method section.


    Using sysupgrade is usually a good choice.

    Validate available disk size

    /usr should be greater than 1.1GB.






    $ df -h
    Filesystem Size Used Avail Capacity Mounted on
    (...)
    /dev/sd1e 7.6G 3.3G 3.9G 46% /usr







    OK


    Validate compatibility with the current usage

    See Configuration and syntax changes and Special packages.

    The latter this time includes PostgreSQL major upgrade:


    There was a major update to PostgreSQL 17.2. Use pg_upgrade as described in the postgresql-server pkg-readme or do a dump/restore.


    In addition, it also includes MariaDB update where "Binary logs are no longer purged by default unless a replica has connected", and minio update where "the MinIO Gateway and the related filesystem mode code have been removed".



    Backups (Optional)

    You might have to create some backups.

    Customize upgrade (Optional)

    This step is just for reference, skippable with standard upgrade.


    /auto_upgrade.conf is available as the response file.


    Of course, you can skip this and go next if it's unnecessary. The default behavior is sufficient in most cases.


    Well, the OpenBSD manual page on autoinstall says:


    If either /auto_install.conf or /auto_upgrade.conf is found on bsd.rd's built-in RAM disk, autoinstall behaves as if the machine is netbooted, but uses the local response file. In case both files exist, /auto_install.conf takes precedence.


    The whole example of /auto_upgrade.conf is like:






    Location of sets = disk
    Pathname to the sets = /home/_sysupgrade/
    Set name(s) = -x*
    Set name(s) = +xbase*
    Set name(s) = -game*
    Set name(s) = done
    Directory does not contain SHA256.sig. Continue without verification = yes







    In this case, x sets except xbase and game are excluded.


    Also, /upgrade.site can be applied.





    2. Upgrade with sysupgrade

    OK. You must be ready.


    * Caution: The command below, sysupgrade, is unable to stop once it is run.


    Let's just run it, if ready:






    $ doas sysupgrade







    It will print out like this:






    Fetching from https://cdn.openbsd.org/pub/OpenBSD/7.7/amd64/
    SHA256.sig 100% |************************************************* ********| 2324 00:00
    Signature Verified
    BUILDINFO 100% |************************************************* ********| 54 00:00
    Verifying old sets.
    INSTALL.amd64 100% |************************************************* *******| 44889 00:00
    base77.tgz 100% |************************************************* ********| 483 MB 00:38
    bsd 100% |************************************************* ********| 31152 KB 00:02
    bsd.mp 100% |************************************************* ********| 31257 KB 00:02
    bsd.rd 100% |************************************************* ********| 4687 KB 00:00
    comp77.tgz 100% |************************************************* ********| 81731 KB 00:06
    game77.tgz 100% |************************************************* ********| 2746 KB 00:00
    man77.tgz 100% |************************************************* ********| 8265 KB 00:00
    xbase77.tgz 100% |************************************************* ********| 60706 KB 00:05
    xfont77.tgz 100% |************************************************* ********| 23021 KB 00:01
    xserv77.tgz 100% |************************************************* ********| 20074 KB 00:01
    xshare77.tgz 100% |************************************************* ********| 4554 KB 00:00
    Verifying sets.
    Fetching updated firmware.
    fw_update: add none; update intel
    Upgrading.







    The machine will reboot and upgrade the system. It will reboot again and sysmerge will follow automatically. Then daemons such as sshd will be started as usual. It will print out "Checking for available binary patches...", and you will see "Run syspatch(8) to install:" if there are.


    Finally, you will see:






    starting local daemons: cron.
    Mon Apr 28 06:02:11 JST 2025

    OpenBSD/amd64 ... (ttyC0)

    login:







    After all, when login is successful, you will see the login message including "OpenBSD 7.7 (GENERIC.MP)".


    3. Post-upgrade: sysmerge if necessary

    The official documentation describes on them and helps a lot.


    In some cases, configuration files cannot be modified automatically. Run




    # sysmerge



    to check and perform these configuration changes.


    It means manually running sysmerge in addition may be sometimes necessary.

    Remember you sometimes have to manually merging conf files such as:
    • /etc/login.conf


    Run:






    $ doas sysmerge







    When there is difference to be manually merged, you will see the results first. Then you will be asked:






    Use 'd' to delete the temporary ./etc/login.conf
    Use 'i' to install the temporary ./etc/login.conf
    Use 'm' to merge the temporary and installed versions
    Use 'v' to view the diff results again

    Default is to leave the temporary file to deal with by hand

    How should I deal with this? [Leave it for later]







    Each of the top 3 options work like:
    • d: to preserve the current file.
    • i: to overwrite it with the new file sysupgrade brought.
    • m: to merge them manually and interactively.


    If you type m to start merge mode, you will be asked to type each of them at each difference:
    • l to choose the left diff,
    • r to choose the right.


    Then you will see the options to deal with the merged file:






    Use 'e' to edit the merged file
    Use 'i' to install the merged file
    Use 'n' to view a diff between the merged and new files
    Use 'o' to view a diff between the old and merged files
    Use 'r' to re-do the merge
    Use 'v' to view the merged file
    Use 'x' to delete the merged file and go back to previous menu
    Default is to leave the temporary file to deal with by hand

    ===> How should I deal with the merged file? [Leave it for later]







    If you type e, editor will run with the merged file.


    If you type i, the merged file will be installed directly:






    ===> Merging /etc/login.conf (running cap_mkdb(1), needs a relog)







    4. Apply syspatch (skippable)

    The next two tasks below are usual just in order to update the system, too.


    syspatch is an important command to install binary patches officially offered by OpenBSD successively as found to be needed.






    $ doas syspatch







    5. Update packages

    What's new section in the release page also shows "Some highlights" in "Ports and packages". For example, VMM/VMD was improved this time, too.


    The command-line below will update all of the packages installed in the machine:






    $ doas pkg_add -u







    You will see a lot printed out, but should be careful to read, especially the trailings. They may tell there are some important changes or tasks to do. As to me, I always check if fish, my default shell, starts normally, because I have experienced trouble which crashed it with Python upgrade 😅


    6. Configuration and syntax changes

    Update some conf as needed to apply what Configuration and syntax changes describes.


    There is nothing this time.


    7. Remove old files

    This is a simple step. All what to do is just follow Files to remove in the official tutorial.


    Remove old Perl files this time:






    # rm -rf /usr/libdata/perl5/*/PerlIO/scalar.pm \
    /usr/libdata/perl5/*/auto/PerlIO/scalar







    8. Special packages

    Check Special packages in the official tutorial. You may use some of:
    • courier-imap
    • mariadb
    • minio
    • postgresql
    • ttyd


    9. Reboot

    Almost done ! Finally and optionally run:






    $ doas reboot







    Conclusion

    Hope the new system and you enjoy together long


    With great appreciation to the OpenBSD project and the community.




    More...
Working...