Rabu, 08 Maret 2006

Binary Upgrade of FreeBSD 5.4 to 6.0

Yesterday I took control of a system running FreeBSD 5.4. I wanted to upgrade it to FreeBSD 6.0. I considered using cvsup to upgrade the userland and kernel, but I wanted an easier way. I also wanted to end up with a completely GENERIC system that would work well with freebsd-update.

I decided to follow Colin Percival's FreeBSD 5.4 to FreeBSD 6.0 binary upgrade instructions. This process worked flawlessly. I am not going to repeat the steps here, but I will point out a few details.

In step 2 of his process, Colin uses freebsd-update to create a base-modified file. Mine had these contents:


# cat base-modified
/.cshrc
/boot/defaults/loader.conf
/boot/kernel/kernel
/boot/kernel/linker.hints
/etc/group
/etc/hosts
/etc/manpath.config
/etc/master.passwd
/etc/motd
/etc/passwd
/etc/pwd.db
/etc/shells
/etc/spwd.db
/etc/ttys
/root/.cshrc
/usr/share/man/cat1/crontab.1.gz
/usr/share/man/cat1/tcpdump.1.gz
/usr/share/man/cat1/uname.1.gz
/usr/share/man/cat8/ifconfig.8.gz
/usr/share/man/whatis
/var/db/locate.database
/var/log/auth.log
/var/log/cron
/var/log/debug.log
/var/log/lastlog
/var/log/maillog
/var/log/sendmail.st
/var/log/wtmp
/var/run/utmp

The first three files are associated with this system running a modified 5.4 kernel. I did not want to preserve those changes. I wanted to preserve all of the changes to files in /etc/, as those are important -- password files and the like. I did not care about changes to files in /usr. I preserved files in /var that related to logs.

I decided to make a new version with these contents.

# cat base-modified.final
/.cshrc
/etc/group
/etc/hosts
/etc/manpath.config
/etc/master.passwd
/etc/motd
/etc/passwd
/etc/pwd.db
/etc/shells
/etc/spwd.db
/etc/ttys
/root/.cshrc
/var/log/auth.log
/var/log/cron
/var/log/debug.log
/var/log/lastlog
/var/log/maillog
/var/log/sendmail.st
/var/log/wtmp
/var/run/utmp

In step 14, Colin recommends recompiling all installed ports. I decided to simply pkg_delete all of them. I will add back new packages when the upgrade process is finished.

After following Colin's directions, I ended up with a system running FreeBSD 6.0 RELEASE. I was able to use freebsd-update to apply binary updates of the kernel and userland. I did all of this remotely over OpenSSH. Very cool -- thanks Colin!

0 komentar:

Posting Komentar