From Chaos
| This article is part of the HOWTO series.
|
Summary
The object of this article is to clearly lay out the steps needed to migrade a FreeBSD 5.x system to FreeBSD 6.x (6.0 in my case). Be warned, that doing this has the ability to severly hose your system, proceed at your own risk!
Caveats
You must be familiar the general buildworld process, and know how to get around in FreeBSD.
Getting Ready
1. Using 'script' is an excellent way to keep a running log of your console session. Make sure to put it on a partition that has at least 50-100MB of free space; the file can get quite big during the buildworld. Run the following:
| root@localhost:~# script -t 0 /root/buildworld.`date +%m-%d-%Y_%H%M%S`.log
|
2. Now, remove /usr/obj/*:
| root@localhost:~# rm -rf /usr/obj/*
|
Update Source
1. Locate your supfile (standard-supfile if you are running 5.x), and copy it to /root. Edit it, and then cvsup the source.
| root@localhost:~# cp /usr/share/examples/cvsup/standard-supfile /root
|
| root@localhost:~# vi /root/standard-supfile
|
2. Make sure to change 'CHANGE_THIS' to a cvsup mirror that's close to you. For FreeBSD 6.0, change the default release tag to 'RELENG_6_0'. Save and exit the file.
Build World/Kernel
1. Now, run the following. It does pretty much everything you need. First we 'cd' to the right dir, 'date > time.txt' & 'date >> time.txt' gives us a relative time for how long it takes to run (most) everything. Then we clean the world, build it, build the kernel and install the kernel. 'exit' kills the previous 'script' command from above. Once this is completed, you need to reboot your system into single-user mode.
| root@localhost:~# rm -rf /usr/obj/* && cvsup -g -L 2 /root/standard-supfile && cd /usr/src && date > time.txt && make clean && make cleandir && make buildworld && make includes && make buildkernel KERNCONF=GENERIC && make installkernel KERNCONF=GENERIC && date >> time.txt
|
| root@localhost:~# shutdown -r now
|
Install the World and Merge it
- Reboot the PC, and enter single-user mode.
WARNING
| THIS STEP IS REQUIRED: YOU MUST BOOT INTO SINGLE-USER MODE. Once you are in single-user mode (boot -s at the boot prompt), you can continue with the steps to the left.
|
WARNING
| BE WARNED THAT YOU WILL NEED TO REBUILD EVERY PORT ON YOUR SYSTEM IF YOU RUN make delete-old && make delete-old-libs!!. This can become a huge headache. Don't say I didn't warn you!
|
| root@localhost:~# boot -s
|
| root@localhost:~# fsck -p
|
| root@localhost:~# mount -u /
|
| root@localhost:~# mount -a
|
| root@localhost:~# adjkerntz -i
|
| root@localhost:~# script -t 0 /root/installworld.`date +%m-%d-%Y_%H%M%S`.log
|
| root@localhost:~# cd /usr/src && mergemaster -p && make delete-old && make delete-old-libs && make installworld && mergemaster -vai && cp /usr/src/etc/rc /etc/ && cp /usr/src/etc/rc.subr /etc/ && cp /usr/src/etc/defaults/rc.conf /etc/defaults/
|
| root@localhost:~# shutdown -r now
|
Done! Enjoy your newly updated system!