HowTo: Upgrade FreeBSD 7.2 To FreeBSD 8 Using csup

How do I upgrade FreeBSD 7.2 to FreeBSD 8 stable using csup source code method including all ports?

csup is a general-purpose network file updating package. It is extremely fast program. Make sure you backup all data, MySQL / PGSQL database, and configuration file before attempting upgrade procedure.

Source-based upgrades from previous versions are well supported and recommend to gain full control of your FreeBSD 8 kernel and base systems. I’m going to assume that the:

[a] You are root user

[b] You are using portsnap and portmaster to manage FreeBSD ports .

[c] You made a backup of existing data.

Step # 1: Edit supfile

Make a copy of existing supfile, enter:
# cp /usr/share/examples/cvsup/standard-supfile /root/supfile.8
# vi /root/supfile.8

Set host name which specifies the server host which will supply the file updates to your computer. You must set it to one of the CVSup mirror sites listed in the FreeBSD page


Set release tag to stable 8:

*default release=cvs tag=RELENG_8_0

Save and close the file.

Step # 2: Grab FreeBSD 8 Base System

Type the following command:
# csup /root/supfile.8
Read all last minute updating information for FreeBSD 8, enter:
# vi /usr/src/UPDATING

Step # 3: Build FreeBSD 8 Base System

You can enable or disable certain features such as NIS, ATM, BLUETOOTH and much more (see src.conf(5) man page). Edit /etc/src.conf and disable required features from base system:


Note you can skip /etc/src.conf and build the entire system. To build FreeBSD 8 system, enter:
# cd /usr/src
# make cleanworld && make cleandir
# make buildworld

Step # 4: Build FreeBSD 8 Kernel

You need to edit your kernel config file which is located at /usr/src/sys/`uname -p`/conf, enter:
# cd /usr/src/sys/`uname -p`/conf
# ls -l

The default file name is GENERIC. Edit GENERIC or your own custom kernel file (e.g., NIXCRAFT), enter:
My sample kernel config file:

include GENERIC
ident www303
options SMP
nodevice ugen
nodevice uhid
nodevice ulpt
nodevice umass
nodevice ums
nodevice ural
nodevice urio
nodevice uscanner
nodevice aue
nodevice axe
nodevice cdce
nodevice cue
nodevice kue
nodevice rue
options CONSPEED=19200
options QUOTA
# pf firewall specific
device pf
device pflog
device pfsync
options         ALTQ
options         ALTQ_CBQ        # Class Bases Queuing (CBQ)
options         ALTQ_RED        # Random Early Detection (RED)
options         ALTQ_RIO        # RED In/Out
options         ALTQ_HFSC       # Hierarchical Packet Scheduler (HFSC)
options         ALTQ_PRIQ       # Priority Queuing (PRIQ)
options         ALTQ_NOPCC      # Required for SMP build
# Turn on device polling for em driver
options HZ=1000

Make changes as per your setup. Finally, build and install the FreeBSD 8 kernel, run:
# make buildkernel
# make installkernel

OR use your custom kernel config name (e.g., NIXCRAFT), run:
# make buildkernel KERNCONF=NIXCRAFT
# make installkernel KERNCONF=NIXCRAFT

Step # 5: Reboot And Boot Into A Single User Mode

To reboot the system, enter:
# reboot
To boot into a single user hit 4 key at boot loader prompt:

Fig.01: FreeBSD Boot Loader Menu

Fig.01: FreeBSD Boot Loader Menu

A Note About Remote FreeBSD Server Using KVM

You need to boot into a single user mode using KVM to finish entire upgrade procedure. KVM will not work in a single user mode. However, you can load usb.ko and other modules to get kvm support under single user mode. Press [Enter] key at the boot loader. Connect to your remote FreeBSD box using KVM client and issue reboot command. At FreeBSD boot menu press [Spacebar] key to pause default booting. Press 6 to boot to loader prompt. Type the following commands to load KVM support and boot into a single user mode:

load usb.ko
set boot_serial=NO
set boot_multicons=NO
set console=vidconsole
boot -s

Once logged into a single user mode, mount all your ufs partitions, enter:
# mount -a -t ufs

Step # 6: Merge Configuration Files

The mergemaster utility is designed to aid you in updating the various configuration and other files associated with FreeBSD. To install sys configuration files that are required by the new base system. To compare only files known to be essential to the success of install world, enter:
# mergemaster -p

Step # 7: Install FreeBSD 8 Base System

Type the following commands:
# cd /usr/src
# make installworld

Finally merge your configuration files, enter:
# mergemaster -i

WARNING! Be careful with /etc/passwd, /etc/group and other files in base system. Verify each file before installing new version or merging exiting configuration files.

Finally, reboot the box:
# reboot

Step # 8: Verify New Installation

Type the following command:
# uname -a
# tail -f /var/log/messages
# grep 'something' /path/to/log/file

Step # 9: Upgrade Ports (Applications)

Type the following command:
# portsnap fetch update
# vi /usr/ports/UPDATING
# portmaster -Da

Reboot the box again and make sure everything is working fine, enter:
# reboot
Finally, delete old libraries, enter:
# cd /usr/src
# make delete-old


  • Read /usr/src/Makefile, /usr/src/UPDATING, and /usr/ports/UPDATING.
  • man pages: portsnap, make, mergemaster, and src.conf
  • FreeBSD handbook – Rebuilding “world” chapter.

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

🐧 7 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersncdu pydf
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig 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
7 comments… add one
  • tangram Nov 24, 2009 @ 13:37

    Nice article.

    Notice a small snag in the supfile section:
    *default release=cvs tag=RELENG_8_0
    means that you are following the errata branch not stable.

    To follow Stable:
    *default release=cvs tag=RELENG_8

    Take care.

  • Andrew Terekhov Nov 24, 2009 @ 23:09

    In single user mode run:
    /sbin/adjkerntzl -i
    to set system time correctly before running “make installworld”. Source – the Handbook.

  • tangram Nov 25, 2009 @ 11:04

    Also don’t edit the GENERIC configuration file. Copy it over and then edit or else next time you fetch the source code you’ll loose your customizations.

  • Aaron Toponce Nov 27, 2009 @ 20:37

    Nevermind that this will take several, several hours to run through completion. I love FreeBSD, but managing ports is a royal PITA.

  • xer Dec 5, 2009 @ 11:23

    Yes Vivek, fix your how to, RELENG_8_0 is for RELEASE and not for STABLE, infact for RELEASE is better to use freebsd-update, see this table:

    I read always your blog, and i like too much your how tos

  • Rex Jan 22, 2010 @ 14:37

    I think you should go through and correct this post after reading the comments.

    One other thing you should add is that make buildkernel needs to be done in /usr/src, not in /usr/src/sys/`uname -p`/conf like your directions imply.

    thanks for the outline, though, it’s handy.

  • bill Dec 8, 2011 @ 21:10

    options SCHED_ULE ULE scheduler
    options PREEMPTION Enable kernel thread preemption
    options INET InterNETworking
    options INET6 IPv6 communications protocols
    options SCTP Stream Control Transmission Protocol
    options FFS Berkeley Fast Filesystem
    options SOFTUPDATES Enable FFS soft updates support
    options UFS_ACL # Support for access control lists
    options UFS_DIRHASH Improve performance on big directories
    options UFS_GJOURNAL # Enable gjournal-based UFS journaling
    options MD_ROOT # MD is a potential root device
    options NFSCLIENT Network Filesystem Client
    GENERIC: 334 lines, 13004 characters.
    192# make buildkernel
    make: don’t know how to make buildkernel. Stop
    192# make installkernel
    Please Help

    this is what I am getting… It will not build!

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum