STOP! HAMMER TIME! #2 - Upgrading to FreeBSD 6.2

FreeBSD Logo

Now It’s time to get your hands on upgrading that old version of your FreeBSD. There is a lot of documentation on this subject, but I’d like to give my shot, since it’s fresh in my mind and I’ve already started. I’ll be exploring the new features available on 6.2-RELEASE for upgrading in the next few days, inc. csup and freebsd-update in order to find out if it fits or improves my need when I have to deal with this.

So let’s play God.

If don’t have FreeBSD already running on your machine you can download the ISO file at the FreeBSD downloads section. But before installing please read the Installation Docs for installation tips.

If you’re already running FreeBSD on your system I suggest you to:

BACKUP YOUR SYSTEM (Just a reminder for enthusiasts :) )

Install and configure (if you haven’t done it yet) cvsup_without_gui and fastest_cvsup ports with:

$ cd /usr/ports/net/cvsup-without-gui && make install clean

$ cd /usr/ports/sysutils/fastest_cvsup &&  make install clean

(If you don’t have the ports tree installed take a look at portsnap because you may want to upgrade your applications more often)

OK. Now, find your local CVS to provide you with a faster download. Replace YOUR_LOCAL_CVS_MIRROR line below with the fastest result you get.

$ fastest_cvsup -c YOUR_TWO_LETTER_COUNTRY_CODE

Edit your /etc/make.conf file around line 240 and uncomment the lines

SUP_UPDATE=     yes
SUP=                /usr/local/bin/cvsup
SUPFLAGS=       -g -L 2
SUPHOST=      YOUR_LOCAL_CVS_MIRROR
SUPFILE=        /usr/share/examples/cvsup/standard-supfile
PORTSSUPFILE=   /usr/share/examples/cvsup/ports-supfile
DOCSUPFILE=     /usr/share/examples/cvsup/doc-supfile
REFUSEFILE=     /var/db/sup/refuse

Then change your cvsup tag to RELENG_6_2 under /usr/share/examples/cvsup/standard-supfile changing the “default release” line to

*default release=cvs tag=RELENG_6_2
To finally update your source tree:
$ cd /usr/src && make update
After updating your source tree edit your kernel file by:
$ cd /usr/src/sys/[your arquitecture]/conf/

$ cp GENERIC YOUR_KERNEL_NAME
Edit YOUR_KERNEL_NAME with your favorite editor, doublecheck on success building and installing with mergemaster and let the machine do its work :)
$ vim YOUR_KERNEL_NAME

$ mergemaster -p  

$ cd /usr/src && make cleandir && make cleandir

$ make buildworld && make kernel KERNCONF=YOUR_KERNEL

FreeBSD Postcard - More than Creation

Go have a beer with your friends and when you come back your work will be almost done.

[...]

Are you still reading this? BEAT IT! When you come back this post will be on the same spot where you found it. :)

[...]

Are you drunk? It’s time to go to bed because maybe you don’t want to plant the seeds of your new world in that state. :)

If not, it’s time to put make your cup of Rooibos and come back to work. But before check if everything went OK and reboot your machine:

 
$ fastboot *

Ok now we can go on.

Login to your machine and go to /usr/src to install your new world.

$ cd /usr/src && make installworld

and enjoy your tea while the land, the sea, the plants and the animals grow :)

Don’t you just feel like a God? :)

But Gods have work to do too. Please be careful with this step.

When the new world is installed,

$ mergemaster

to check for the differences from your previous not so good world to make it a better one.

Then,

$ fastboot *

and you’re done. You’ve made your world a better place. Even had time to be with your friends and taste the power of Rooibos Tea.

Now Explore, Dream, Discover!

For more information I recommend you to read the WHOLE FreeBSD Handbook and the other Documentation


STOP! HAMMER TIME...