Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

BSD Cafe Billboard

  1. Home
  2. BSD
  3. FreeBSD
  4. Modernised use of freebsd-update for minor and major upgrades to FreeBSD

Modernised use of freebsd-update for minor and major upgrades to FreeBSD

Scheduled Pinned Locked Moved FreeBSD
freebsdrfcupgradeupdatekernel modules
4 Posts 1 Posters 168 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • grahamperrinG Online
    grahamperrinG Online
    grahamperrin
    wrote last edited by grahamperrin
    #1

    A major upgrade example: 14.4-RELEASE to 15.1-RELEASE

    All commands should be run as root.

    1. pkg update
    2. pkg upgrade -Uy -r FreeBSD pkg
    3. freebsd-update fetch
    4. freebsd-update install
    5. freebsd-update upgrade -r 15.1-RELEASE
    6. freebsd-version -kru ; uname -mvKU
    7. freebsd-update install
    8. do not reboot the operating system – ignore the on-screen advice from freebsd-update
    9. freebsd-version -kru ; uname -KU
    10. /bin/sh
    11. export abi=FreeBSD:15:$(uname -p)
    12. export osversion=1501000
    13. pkg-static -o ABI=$abi -o OSVERSION=$osversion -o IGNORE_OSVERSION=yes update
    14. pkg-static -o ABI=$abi -o OSVERSION=$osversion -o IGNORE_OSVERSION=yes upgrade -Fqy
    15. ignore all on-screen recommendations to force a bootstrap of pkg
    16. pkg-static -o ABI=$abi -o OSVERSION=$osversion -o IGNORE_OSVERSION=yes upgrade -Fqy
    17. pkg-static -o ABI=$abi -o OSVERSION=$osversion -o IGNORE_OSVERSION=yes upgrade -U -r FreeBSD-kmods
    18. pkg-static -o ABI=$abi -o OSVERSION=$osversion -o IGNORE_OSVERSION=yes upgrade -U -g 'virtualbox-ose-additions*'
    19. exit
    20. upgrade the boot loader
    21. shutdown -r +10min "restarting with the upgraded kernel and boot loader"
    22. after this restart, if software such as Discover invites you to upgrade software, ignore the invitation
    23. freebsd-version -kru
    24. freebsd-update install
    25. be patient
    26. freebsd-version -kru
    27. if /usr/local/etc/pkg/repos/FreeBSD.conf includes FreeBSD and FreeBSD-kmods, change the names to FreeBSD-ports and FreeBSD-ports-kmods
    28. pkg bootstrap -fy
    29. pkg upgrade -fFqy -r FreeBSD-ports -r FreeBSD-ports-kmods
    30. pkg upgrade -fFqy -r FreeBSD-ports -r FreeBSD-ports-kmods
    31. pkg upgrade -fU -r FreeBSD-ports -r FreeBSD-ports-kmods
    32. if the previous run of freebsd-update install asked you to rerun the command, do so
    33. shutdown -r +10min "restarting with the upgraded userland"
    grahamperrinG 1 Reply Last reply
    2
    7
    • grahamperrinG Online
      grahamperrinG Online
      grahamperrin
      wrote last edited by grahamperrin
      #2

      The guide above should help to avoid kernel panics and other issues with kernel modules.

      Relevant documentation includes:

      • freebsd-update(8)
      • FreeBSD 15.1-RELEASE Upgrading Instructions | The FreeBSD Project (2026-06-15) – bugged.

      TomAoki notes the importance of upgrading the boot loader before – not after – the first boot of 15.1-RELEASE.

      Thanks to Emrion in The FreeBSD Forums for inspiring the sh(1)-specific export lines.


      Cross-post: Modernised use of freebsd-update … : r/freebsd

      1 Reply Last reply
      0
      • grahamperrin@mastodon.bsd.cafeG grahamperrin@mastodon.bsd.cafe shared this topic
        dkade@mastodon.bsd.cafeD dkade@mastodon.bsd.cafe shared this topic
      • grahamperrinG grahamperrin

        A major upgrade example: 14.4-RELEASE to 15.1-RELEASE

        All commands should be run as root.

        1. pkg update
        2. pkg upgrade -Uy -r FreeBSD pkg
        3. freebsd-update fetch
        4. freebsd-update install
        5. freebsd-update upgrade -r 15.1-RELEASE
        6. freebsd-version -kru ; uname -mvKU
        7. freebsd-update install
        8. do not reboot the operating system – ignore the on-screen advice from freebsd-update
        9. freebsd-version -kru ; uname -KU
        10. /bin/sh
        11. export abi=FreeBSD:15:$(uname -p)
        12. export osversion=1501000
        13. pkg-static -o ABI=$abi -o OSVERSION=$osversion -o IGNORE_OSVERSION=yes update
        14. pkg-static -o ABI=$abi -o OSVERSION=$osversion -o IGNORE_OSVERSION=yes upgrade -Fqy
        15. ignore all on-screen recommendations to force a bootstrap of pkg
        16. pkg-static -o ABI=$abi -o OSVERSION=$osversion -o IGNORE_OSVERSION=yes upgrade -Fqy
        17. pkg-static -o ABI=$abi -o OSVERSION=$osversion -o IGNORE_OSVERSION=yes upgrade -U -r FreeBSD-kmods
        18. pkg-static -o ABI=$abi -o OSVERSION=$osversion -o IGNORE_OSVERSION=yes upgrade -U -g 'virtualbox-ose-additions*'
        19. exit
        20. upgrade the boot loader
        21. shutdown -r +10min "restarting with the upgraded kernel and boot loader"
        22. after this restart, if software such as Discover invites you to upgrade software, ignore the invitation
        23. freebsd-version -kru
        24. freebsd-update install
        25. be patient
        26. freebsd-version -kru
        27. if /usr/local/etc/pkg/repos/FreeBSD.conf includes FreeBSD and FreeBSD-kmods, change the names to FreeBSD-ports and FreeBSD-ports-kmods
        28. pkg bootstrap -fy
        29. pkg upgrade -fFqy -r FreeBSD-ports -r FreeBSD-ports-kmods
        30. pkg upgrade -fFqy -r FreeBSD-ports -r FreeBSD-ports-kmods
        31. pkg upgrade -fU -r FreeBSD-ports -r FreeBSD-ports-kmods
        32. if the previous run of freebsd-update install asked you to rerun the command, do so
        33. shutdown -r +10min "restarting with the upgraded userland"
        grahamperrinG Online
        grahamperrinG Online
        grahamperrin
        wrote last edited by
        #3

        upgrade the boot loader

        sysutils/loaders-update

        Update bootcodes and loaders

        This utility is a tool designed to keep the FreeBSD bootcodes and loaders up-to-date. It's useful because the FreeBSD upgrade process doesn't update them. It verifies if they are up to date and updates them if desired.

        1 Reply Last reply
        0
        • grahamperrinG Online
          grahamperrinG Online
          grahamperrin
          wrote last edited by grahamperrin
          #4

          14.4-RELEASE to 15.0-RELEASE

          Tested successfully with:

          • 1500500 as the osversion
          • latest for FreeBSD and FreeBSD-kmods.

          I hope that 1500500 is appropriate. I took it from the FreeBSD 15 Versions section of Chapter 8 of the FreeBSD Porter's Handbook.

          1 Reply Last reply
          0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          Powered by NodeBB Contributors
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups