| FreeBSDUpgrade |
WebHome | UnixGeekTools | Geekfarm | About This Site
Notes for upgrading a FreeBSD box.
Pointers
Warning
This is just my checklist for upgrading my FreeBSD 6 servers. Please
see the instructions here.
Getting the release source
- if you don't already have /usr/src, install source packages using /usr/sbin/sysinstall
- saves a lot of time (and bandwidth) when you go to run cvsup for the first time.
Tracking Stable
- pkg_add -r cvsup-no-gui
- cp /usr/share/examples/cvsup/stable-supfile /root/
- edit /root/stable-supfile - host=cvsup2.FreeBSD.org - remove unneeded lines
- cvsup /root/stable-supfile
Building
- check backups
- read /usr/src/UPDATING
- Check /etc/make.conf
- Logging output
# script /var/tmp/world_make.out
pre-buildworld mergemaster
- anything necessary for buildworld or installworld, e.g. /etc/group
cd /usr/src/usr.sbin/mergemaster
./mergemaster.sh -p
Remove /usr/obj
- do this only if immutable flag set on files in /usr/obj
cd /usr/obj
chflags -R noschg *
rm -rf *
build the world
cd /usr/src
make -j4 buildworld
chflags -R noschg /usr/obj/usr
rm -rf /usr/obj/usr
cd /usr/src
make cleandir
make cleandir
kernel
make -j4 buildkernel [KERNCONF=MYKERNEL]
make installkernel [KERNCONF=MYKERNEL]
reboot in single user mode
reboot
# choose single user mode
fsck -p
mount -u /
mount -a -t ufs
swapon -a
log output
script /var/tmp/world_install.out
check date command to see if time is correct, if not...
adjkerntz -i
finish up the install
mergemaster -p
cd /usr/src
make installworld
mergemaster
reboot
update ports
- for jails: mount_nullfs /usr/ports /jailroot/usr/ports
- See FreeBSDPorts
portupgrade -fR portupgrade
portupgrade -af
- If necessary to upgrade perl, see CPAN
- move jails to upgraded server
- shut down all jails
- stop mirroring filesystem with jails - keeps old jails around in case of problems
- run following on upgraded server for each jail
cd /usr/src
# i've seen build errors several times when i didn't do this next step :(
make -j4 buildworld DESTDIR=/jailroot
mergemaster -p -D /jailroot
make installworld DESTDIR=/jailroot
mergemaster -D /jailroot
- start jail and test
- re-enable mirroring
Updated Sat Jan 20, 2007 3:29 PM