How To Upgrade FreeBSD 6.2 to FreeBSD 6.3 ( Minor Update ) using freebsd-update utility

Q. I've FreeBSD 6.2 p9 installed and I'd like to upgrade my box to latest FreeBSD 6.3 release using binary update method. How do I upgrade my box over an ssh session?

A. FreeBSD 6.3 has new updated tool called freebsd-update which supports binary upgrades of i386 and amd64 systems systems running earlier FreeBSD releases, release candidates, and betas. Users upgrading to FreeBSD 6.3 from older releases (in particular, older than 6.3-RC1) will need to download an updated version of freebsd-update(8) that supports upgrading to a new release.

WARNING! These examples may crash your FreeBSD computer if executed or interrupted over ssh session. Backup both data and configuration file before attempting these instructions.

Step # 1: Find out current FreeBSD version

$ uname -mrs
Output:

FreeBSD 6.2-RELEASE-p9 i386

Step # 2: Download updated freebsd-update

Download an updated version of freebsd-update utility that supports upgrading to a new release.

Download freebsd-update-upgrade package:
# fetch http://people.freebsd.org/~cperciva/freebsd-update-upgrade.tgz
Download gpg key to verify package:
# fetch http://people.freebsd.org/~cperciva/freebsd-update-upgrade.tgz.asc
Verify package:
# gpg --verify freebsd-update-upgrade.tgz.asc freebsd-update-upgrade.tgz
Extract package:
# tar -xf freebsd-update-upgrade.tgz

Step #3: Start update procedure with freebsd-update

Start upgrade procedure and download all lates files / packages, enter:
# sh freebsd-update.sh -f freebsd-update.conf -r 6.3-RELEASE upgrade
Output:

Looking up update.FreeBSD.org mirrors... 1 mirrors found.
Fetching metadata signature for 6.2-RELEASE from update1.FreeBSD.org... done.
Fetching metadata index... done.
Fetching 1 metadata files... done.
Inspecting system...
The following components of FreeBSD seem to be installed:
kernel/generic world/base world/dict world/doc world/manpages

The following components of FreeBSD do not seem to be installed:
kernel/smp src/base src/bin src/contrib src/crypto src/etc src/games
src/gnu src/include src/krb5 src/lib src/libexec src/release src/rescue
src/sbin src/secure src/share src/sys src/tools src/ubin src/usbin
world/catpages world/games world/info world/proflibs

Does this look reasonable (y/n)? y

Fetching metadata signature for 6.3-RELEASE from update1.FreeBSD.org... done.
Fetching metadata index... done.
Fetching 1 metadata patches. done.
Applying metadata patches... done.
Fetching 1 metadata files... done.
Inspecting system...
done.
Preparing to download files... done.
Fetching 6150 patches.....10....20....30....40....50....60....70....80....90....100....110....120....130....140....150....160....170....180....190....200....210....220....230....240....250....260....270....280....290....300....310....320....330....340....350....360....370....380....390....400....410....420....430....440....450....460....470....480....490....500....510....520....530....540....550....560....570....580....590....600....610....620....630....640....650....660....670....680....690....700....710....720....730....740....750....760....770....780....790....800....810....820....830....840....850....860....870....880....890....900....910....920....930....940....950....960....970....980....990....1000....1010....1020....1030....1040....1050....1060....1070....1080....1090....1100....1110....1120....1130....1140....1150....1160....1170....1180....1190....1200....1210....1220....
.......
..
....
/bin/rcp
/bin/realpath
/bin/red
/bin/rm
/bin/rmail
/bin/rmdir
/bin/setfacl
/bin/sh

Install downloaded files:
# sh freebsd-update.sh -f freebsd-update.conf install
Output:

Installing updates...
Kernel updates have been installed.  Please reboot and run
"freebsd-update.sh install" again to finish installing updates.

Reboot the box:
# reboot

Step #4: Install userland updates

You also need to upgrade other userland packages:
# sh freebsd-update.sh -f freebsd-update.conf install
Output:

Installing updates...

Again reboot the box, enter:
# reboot

Step #5: Verify updates

Make sure there are no error reported on console or log files:
$ uname -mrs
Output:

FreeBSD 6.3-RELEASE i386

Step #6: Update applications / port tree

Finally, you may need to upgrade running application such as php, apache, openssh and others. Simply use portsnap and portmanager commands to update all installed packages:
# portsnap fetch extract
# pkg_version -vIL=

Now upgrade installed ports:
# portmanager -u
OR
# portupgrade -a

References:

Want to read Linux tips and tricks, but don't have time to check our blog everyday? Subscribe to our daily email newsletter to make sure you don't miss a single tip/tricks. Subscribe to our weekly newsletter here!

{ 7 comments… read them below or add one }

1 Oliver 02.02.08 at 5:15 pm

freebsd-update which supports binary upgrades of i386 and amd64 systems systems running earlier FreeBSD releases,

If it is doing binary upgrades will it still upgrade a system built from the ports tree and not from packages? What is the meaning of binary in this case?

2 vivek 02.02.08 at 5:56 pm

What is the meaning of binary in this case?
Only update kernel and userland binaries such as /bin/ls and others. You don’t have to do build world.

To update packages installed from tree follow step # 6.

3 Valentino 02.06.08 at 8:15 pm

Hi

After first reboot, I received this message:

Trying to mount root from ufs: /dev/mf1d0s1a
Segmentation fault
Starting file system check:
/dev/mfid0s1a: file system clean; skipping checks

pid 84 (fsck), uid0: exited on signal 11
Segmentation fault

Unknow error: help!

Feb 6 21:19:39 init: /bin/sh on /etc/rc terminated abnormaly, going to single mode
Enter full pathname of shell or Return for /bin/sh

What does it mean? What am I doing now?
Help me, thank’s.

4 DarkAxi0m 08.26.08 at 12:22 am

Hi
I found this guide after a quick google seach,
i followed the steps in the guide but every time i get to step five it reports

FreeBSD 6.2-RELEASE i386

Any idea what when wrong?

it was release “FreeBSD 6.2-RELEASE i386″ first not “FreeBSD 6.2-RELEASE-p9 i386″ does that matter?

Thankyou DarkAxi0m.

5 DarkAxi0m 08.26.08 at 1:53 am

Never mind about that last last cry for help… i forgot i was using a custom kernel… quick rebuild kernel later i see

FreeBSD 6.3-RELEASE-p3 i386

Thankyou DarkAxi0m.

6 noisex 09.26.08 at 4:29 pm

After update from 6.0 to 6.3-p4 i Got error: Unable to load kernel :(

7 Chris Sheppard 12.23.08 at 2:58 pm

I also got this “Unable to load kernel” message after going from 6.0 straight to 7.0 on a major update release. I don’t know what happened but had a terrible 2 weeks on struggle trying to recover all the data from the disk. (Obviously the backups failed too) Got most of it back from a specialist recovery tool. I think its to do with jumping several releases in one go. It looks as if the developers have not tested all situations. Anyway, since then I only upgrade in small increments, 6.0 -> 6.1, 6.1 -> 6.2 etc

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Tagged as: , , , , , , , , , , , , , , ,

Previous post: FreeBSD Install gnupg Cryptographic Software

Next post: kpartx: Linux Create Device Maps From Partition Tables ( mpath devices for partitions )