Updating FreeBSD

Unix System Administration

Why update

Fix bugs in the OS – some of them related to security issues that could potentially leave your system vulnerable to different kinds of attack.

Get “drivers” for new hardware previously unsupported and/or updates to existing drivers.

Other features that may be interesting like better memory management, background FSCK (introduced in the 5.X versions) etc

CURRENT

The ``bleeding edge'' of FreeBSD development. FreeBSD-CURRENT users are expected to have a high degree of technical skill, and should be capable of solving difficult system problems on their own. If you are new to FreeBSD, PLEASE DO NOT install it.

STABLE

The development branch from which major releases are made. Changes go into this branch at a different pace, and with the general assumption that they have first gone into FreeBSD-CURRENT for testing. This is still a development branch, however.

Branches of FreeBSD

Users of CURRENT

Members of the FreeBSD community who are actively working on some part of the source tree and for whom keeping ``current'' is an absolute requirement.

Members of the FreeBSD community who are active testers, willing to spend time solving problems in order to ensure that FreeBSD-CURRENT remains as sane as possible. These are also people who wish to make topical suggestions on changes and the general direction of FreeBSD, and submit patches to implement them.

Those who merely wish to keep an eye on things, or to use the current sources for reference purposes (e.g. for reading, not running). These people also make the occasional comment or contribute code.

Subscribe to freebsd-current@freebsd.org

STABLE

Still developmental – but more tested than -CURRENT. Track STABLE with caution. This is what gives us the next release of FreeBSD.

Possible to track a specific version after it's been released. E.g tracking only 5.3 which should get mostly security updates and almost nothing else.

Advisable to test on a testing server before deployment in a live environment.

Subscribe to freebsd-stable@freebsd.org

How to upgrade

Reinstalling a new release from CD – this overwrites all your configuration files, settings etc. (Partition wisely for data preservation). 3rd Party applications need to be reinstalled.

Binary upgrade feature avaiable on the CDROM:

Fast and Easy

Very buggy and could break your system esp by not maintaining your configurations

Will not preserve custom options done at compile time e.g removing IPV6 from the kernel

Not optimised for your hardware – a problem if your hardware is very specific

Binary update using FreeBSD update available online from the websitehttp://www.daemonology.net/freebsd-update/ and also available in the ports

Tracks only security problems

Fast and easy to run

Still loses your compile time customisations

Potentially puts part of the system out of sync with the rest of the system if it doesn't handle changes to configuration files

Does not play nice if you upgrade your system any other way.

Updating through source (using cvsup)

Most flexible – maintaining your run-time modifications.

Allows you to maintain your configuration files and/or update them manually when needed

Slowest method and requires some knowledge of cvsup

cvsup worksheet

Installing cvsup

cd

ftp	noc.e0.ws.afnog.org

cd	/pub/FreeBSD/releases/i386/5.3-RELEASE/packages/All

mget cvsup-without*

quit

pkg_add	cvsup-without-gui-16.1h.tbz

Edit the supfile

cp	/usr/share/examples/cvsup/stable-supfile	./.

joe	./stable-supfile

type <CONTROL>+T O

scroll down to *default host=CHANGE_THIS.FreeBSD.org and change it to
*default host=noc.e0.ws.afnog.org.

type <CONTROL>+K X to save and quite the file

At this point we would update source but previous “magic cvsup command” handled in previous session took care of that.

Do source update

cd /usr/src

less /usr/src/UPDATING

make buildworld

make buildkernel KERNCONF=AFNOG2005

make installkernel KERNCONF=AFNOG2005

[reboot in single user mode]

cd /usr/src

/etc/rc.d/preseedrandom (why?)

mergemaster -p

make installworld

mergemaster

[reboot]

CVSUP ports

cp	/usr/share/examples/cvsup/ports-supfile	./.

joe	./ports-supfile

set this line “*default host=noc.e0.ws.afnog.org” save and exit

cvsup -g -L 2 ports-supfile

2005-04-17T11:05:44