Upgrade FreeBSD 7.x to 7.2 Stable Release

I tried a binary upgrade method, but it failed due to custom kernel installed on my FreeBSD 7.1_p5 64 bit AMD systems. How do I upgrade my FreeBSD server using source code method?

The procedure for doing a source code based update is described below:

Step # 1: Get updated source code

WARNING! These examples may crash your computer if not executed properly. Make a backup of your system, Sql and configuration before you do this.

You need to use cvsup command to get latest source code.
# cp /usr/share/examples/cvsup/standard-supfile /root/supfile
# vi /root/supfile

Set host as follows:


CVSup servers for FreeBSD are running at the various sites around the world. Finally, update cvs tag to 7.2:

release=cvs tag=RELENG_7_2

Save and close the file. Get updated source tree, enter:
# cd /usr/src
# csup /root/supfile

Open /usr/src/UPDATING and read important information regarding upgrade procedure including known issues, bugs and workaround.
# vi /usr/src/UPDATING

Step # 2: Build new compiler and related tools

First compiles the new compiler and a few related tools, then uses the new compiler to compile the rest of the system.
# cd /usr/src/
# make buildworld

Step # 3: Build and install new kernel

Now, you have latest compiler and other tools, just build kernel:
# make buildkernel
# make installkernel

You can also specify kernel custom name using KERNCONF. If your kernel config file name is onetouch, enter:
# make buildkernel KERNCONF=onetouch
# make installkernel KERNCONF=onetouch

Finally, you need to reboot system and boot into a single user mode using boot -s from the loader prompt:
# shutdown -r now

Step # 4: Install the base system 7.2

First, mount the system:
# mount -a -t ufs
To install some system configuration files that are required by the new base system, enter :
# mergemaster -p
Accept the changes as promoted as per your configuration. Finally, install the base system:
# cd /usr/src
# make installworld

Finally, merge your 7.2 configuration files, enter:
# mergemaster -i
Now, you have FreeBSD 7.2 new kernel and base system installed. Just reboot the server:
# shutdown -r now
Make sure everything is working:
# sockstat -6
# sockstat -4
# tail -f /var/log/messages
# more /var/run/dmesg.boot
# tail -f /path/to/app/log/file

Update FreeBSD Applications

Now you are running new FreeBSD 7.2 stable environment. All you have to do is upgrade installed ports tree using portsnap, enter:
# portsnap fetch update
List outdated applications, enter:
# pkg_version -vl '
Finally, check all ports, update as necessary (portmaster is not part of base system, you need to grab it from /usr/ports/ports-mgmt/portmaster) :
# portmaster -a

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

🐧 12 comments so far... add one

CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig 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
12 comments… add one
  • robert May 5, 2009 @ 7:43

    Hi, thanks for this guide.

    Are you sure that you can upgrade from 7.0 to 7.2, like this? So, you can jump minor versions.
    Or should I first go from 7.0 to 7.1 and after that from 7.1 to 7.2?

  • Mike May 12, 2009 @ 10:10

    You can jump from 3.x to 7.2 -> Read /usr/src/UPDATING

  • Aigars Aug 17, 2009 @ 22:15

    Just be aware – this is a loooong process ;)

  • SCSI Aug 18, 2009 @ 0:54

    Vary USEFULL !!! There are thousands of do this do that…this simple works…THANKS man.

  • Richard Bejtlich Aug 22, 2009 @ 20:02

    If you use tag=RELENG_7_2 you’re not running STABLE. You’re running the “release” or security branch for 7.2.


    If you want to run STABLE you should set tag=RELENG_7 . Is that what you wanted instead?

  • Bakhtiyor Sep 28, 2009 @ 5:02

    Hello everybody!
    This guide help me to restore my FreeBSD machine. Many Thanks!

  • khentiamentiu Oct 7, 2009 @ 1:54

    I am trying to upgrade from 6.3 to 7.2. Is this too much of a jump to use a procedure like the above?

  • adeknaga Oct 7, 2009 @ 17:59

    thank’s work for me

  • adeknaga Oct 7, 2009 @ 18:00

    how to update from 6.4 stable to 7.2 pls give me clue

  • jim Oct 7, 2009 @ 19:25

    Of course the “single user mode” kills this for remote machines. Possibly useful link –

  • jay Nov 8, 2009 @ 21:20

    i never reboot into single user mode when updating across minor versions. never lost a colo’d box either.

  • Luke Hollins Nov 30, 2009 @ 14:55

    That upgrade method worked great, one thing that caught me after rebooting: something changed with alias IPs on similar networks – in 7.2 any alias IPs on an existing network need to have the netmask changed to 0xffffffff

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Problem posting comment? Email me @ webmaster@cyberciti.biz