// post · 368

upgrading to FreeBSD 5 STABLE

·

One of the great things (and also a downfall, because often you need to stay up to date) about freebsd and most other *nix systems is that you can completely upgrade them without the need to reinstall the entire operating system; they also don't get bloated up with junky software (as you can easily remove most of this).
FreeBSD web server
FreeBSD has a great ports system that allows you to install just about any piece of software (and it will go and get the dependencies too).

Most new users to FreeBSD will install a RELEASE version (the first new point release or major release ready for general use). Although changes are always happening to FreeBSD (new software, patches, security releases etc).

Often the ports stop getting upgraded for older versions of FreeBSD (and even quite new releases, i.e 5.4) and so you need to stay up to date with things. Often this comes in the case of a STABLE or CURRENT upgrade.

STABLE is seen as a stable version of FreeBSD with many of the upgrades.
CURRENT is the work in progress version and isn’t guaranteed to be stable.

Today I upgraded my web server to FreeBSD 5 STABLE (I was running 5.4 RELEASE).

I followed the information from
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/cvsup.html
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html

The first link talks about pulling down the latest source files, while the next link shows you how to compile them.

The first step is to setup the supfile. This tells FreeBSD what files to pull down. Mine is below (pretty much download everything):

*default tag=RELENG_5
*default host=cvsup.au.FreeBSD.org
*default base=/var/db
*default prefix=/usr
*default release=cvs
*default delete use-rel-suffix
*default compress
Src-all
Ports-all
Doc-all
www
cvsroot-all


After than I ran as root:

cvsup -g -L 2 /path/to/supfile


Once that was done I compiled the source (with custom kernel)

# make buildworld
# make buildkernel KERNCONF=DGKERN2
# make installkernel KERNCONF=DGKERN2
# reboot


I rebooted into single user mode and ran this (mounts file system and checks some stuff):

# fsck -p
# mount -u /
# mount -a -t ufs
# swapon -a
# adjkerntz –i


And then this:

# mergemaster -p
# make installworld
# mergemaster

Mergemaster compares some of the configuration files that are different in the newer version of FreeBSD. Some files you will want to overwrite (general untouched config stuff) but others you will not (master.passwd etc).

# reboot

We’re now running the latest “stable” version of FreeBSD. Now you should be able to install all the new ports and stuff.

// comments

// leave a comment

> click for comments help

HTML allowed: <a href="" title="" rel=""></a> <b></b> <blockquote cite=""></blockquote> <em></em> <i></i> <strike></strike> <strong></strong> <li></li> <ol></ol> <ul></ul>
ie: <b>bold</b>

Your comment may need to be reviewed before it is published.