How do I upgrade FreeBSD 7.2 to FreeBSD 8 stable using csup source code method including all ports?
csup is a general-purpose network file updating package. It is extremely fast program. Make sure you backup all data, MySQL / PGSQL database, and configuration file before attempting upgrade procedure.
Source-based upgrades from previous versions are well supported and recommend to gain full control of your FreeBSD 8 kernel and base systems. I’m going to assume that the:
[a] You are root user
[b] You are using portsnap and portmaster to manage FreeBSD ports .
[c] You made a backup of existing data.
Make a copy of existing supfile, enter:
# cp /usr/share/examples/cvsup/standard-supfile /root/supfile.8
# vi /root/supfile.8
Set host name which specifies the server host which will supply the file updates to your computer. You must set it to one of the CVSup mirror sites listed in the FreeBSD page
Set release tag to stable 8:
*default release=cvs tag=RELENG_8_0
Save and close the file.
Type the following command:
# csup /root/supfile.8
Read all last minute updating information for FreeBSD 8, enter:
# vi /usr/src/UPDATING
You can enable or disable certain features such as NIS, ATM, BLUETOOTH and much more (see src.conf(5) man page). Edit /etc/src.conf and disable required features from base system:
WITHOUT_ATM=yes WITHOUT_CALENDAR=yes WITHOUT_GAMES=yes WITHOUT_I4B=yes WITHOUT_IPFILTER=yes WITHOUT_IPX=yes WITHOUT_LPR=yes WITHOUT_NETCAT=yes WITHOUT_NIS=yes WITHOUT_RCMDS=yes WITHOUT_SENDMAIL=yes WITHOUT_WPA_SUPPLICANT_EAPOL=yes WITHOUT_ZFS=yes WITHOUT_BLUETOOTH=yes
Note you can skip /etc/src.conf and build the entire system. To build FreeBSD 8 system, enter:
# cd /usr/src
# make cleanworld && make cleandir
# make buildworld
You need to edit your kernel config file which is located at /usr/src/sys/`uname -p`/conf, enter:
# cd /usr/src/sys/`uname -p`/conf
# ls -l
The default file name is GENERIC. Edit GENERIC or your own custom kernel file (e.g., NIXCRAFT), enter:
# vi GENERIC
# vi NIXCRAFT
My sample kernel config file:
include GENERIC ident www303 options SMP nodevice ugen nodevice uhid nodevice ulpt nodevice umass nodevice ums nodevice ural nodevice urio nodevice uscanner nodevice aue nodevice axe nodevice cdce nodevice cue nodevice kue nodevice rue options CONSPEED=19200 options QUOTA # pf firewall specific device pf device pflog device pfsync options ALTQ options ALTQ_CBQ # Class Bases Queuing (CBQ) options ALTQ_RED # Random Early Detection (RED) options ALTQ_RIO # RED In/Out options ALTQ_HFSC # Hierarchical Packet Scheduler (HFSC) options ALTQ_PRIQ # Priority Queuing (PRIQ) options ALTQ_NOPCC # Required for SMP build # Turn on device polling for em driver options DEVICE_POLLING options HZ=1000
Make changes as per your setup. Finally, build and install the FreeBSD 8 kernel, run:
# make buildkernel
# make installkernel
OR use your custom kernel config name (e.g., NIXCRAFT), run:
# make buildkernel KERNCONF=NIXCRAFT
# make installkernel KERNCONF=NIXCRAFT
To reboot the system, enter:
To boot into a single user hit 4 key at boot loader prompt:
A Note About Remote FreeBSD Server Using KVM
You need to boot into a single user mode WARNING! Be careful with /etc/passwd, /etc/group and other files in base system. Verify each file before installing new version or merging exiting configuration files.