FreeBSD upgrade from 7.0 to 7.1
It is possible to do a binary upgrade to 7.1.Reference http://www.cyberciti.biz/faq/freebsd-update-70-to-71/
http://www.freebsd.org/doc/en/books/handbook/updating-freebsdupdate.html
freebsd-update upgrade -r 7.1-RELEASE freebsd-update install reboot freebsd-update install
Do this when your existing install is not a release version?
env UNAME_r=7.0-RELEASE freebsd-update upgrade -r 7.2
Portsnap vs Cvsup
Portsnap is a system for securely updating the ports tree by distributing signed compressed snapshots. This is the client half of that system; it downloads compressed snapshots into /usr/local/portsnap ("portsnap fetch") and uses those to extract a ports tree into /usr/ports ("portsnap extract") or update an existing tree ("portsnap update").
In addition to operating entirely over HTTP, portsnap can use under a tenth of the bandwidth required by CVSup if a copy of the ports tree is being updated every few days.
FreeBSD upgrade with Portsnap
First, install portmanager
cd /usr/ports/sysutils/portmanager && make all install clean
Install portsnap too (if running FreeBSD older than 6.2, which includes portsnap in base system)
cd /usr/ports/sysutils/portsnap make all install clean /usr/local/etc # mv portsnap.conf.sample portsnap.conf
Populates /usr/ports
mkdir /usr/ports portsnap fetch portsnap extract # or portsnap update
Update installed applications
portmanager -u
To update a specific port only
portmanager sysutils/screen
Make world
# cd /usr/src # make -j2 buildworld # make buildkernel # make installkernel # reboot # mergemaster -p # make installworld # mergemaster # cd /dev && sh MAKEDEV all # reboot
FreeBSD upgrade with CVSUP
Assuming cvsup is already installed, copy a subfile file from the example directorycp /usr/share/examples/cvsup/stable-supfile /etc/
Edit the stable-supfile, change the followings:
cvsup mirrors: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/cvsup.html#CVSUP-MIRRORS
*default tag=. *default host=cvsup.cn.FreeBSD.org *default prefix=/usr *default base=/var/db *default release=cvs delete use-rel-suffix compress ports-all src-all
FromBSD7
*default host=cvsup.freebsd.org
*default base=/var/db
*default prefix=/usr
*default release=cvs tag=.
*default delete use-rel-suffix
*default compress
ports-www
*default base=/var/db
*default prefix=/usr
*default release=cvs tag=.
*default delete use-rel-suffix
*default compress
ports-www
If your freebsd is a fresh install, or that cvsup does not exist, install it from ports
cd /usr/ports/net/cvsup make install clean
Now fetch the latest source code. This DOES take a long time.
cvsup stable-supfile
Make config
You might want to create /etc/make.conf with the followings
NO_MAILWRAPPER=true NO_SENDMAIL=true COMPAT3X=yes COMPAT4X=yes
Building kernel
Edit the kernel config file as you wish. The followings are recommended:
options IPFIREWALL options IPFIREWALL_DEFAULT_TO_ACCEPT options SMP device apic
When done, compile the kernel
cd /usr/src make buildworld KERNCONF=CUSTOM make buildkernel KERNCONF=CUSTOM
Backup the old kernel just in case
cp -R /boot/kernel /boot/kernel.GOOD cp -R /boot/modules /boot/modules.GOOD
On to installing the new kernel and compiling all other packages
cd /usr/src make installkernel KERNCONF=CUSTOM make installworld KERNCONF=CUSTOM mergemaster -v # at the end of mergemaster, it runs MAKEDEV all automatically. If you skipped mergemaster, make sure the following is ran: cd /dev && /bin/sh MAKEDEV all
After the annoying interactive process above, I rebooted the server and it did come back up. Don't know why it's became FreeBSD8.0 (current 7.0 is still in beta2). Anyway, onto ports update
Add X to ld search path
/etc/profile
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib:/lib:/usr/X11R6/lib:/usr/local/lib
Update ports.
# uname -a FreeBSD Temp.temp.com 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Fri Nov 23 04:02:53 UTC 2007 root@Temp.temp.com:/usr/obj/usr/src/sys/CUSTOM i386 # cvsup /etc/cvsup
CVS tags
The cvs tag represents which files you will be fetching. There are some special tags not mentioned in http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/cvs-tags.html| cvs tag | explain |
| RELEASE_4_EOL / RELENG_4 | FreeBSD 4.x most updated version |
| RELENG_6 | FreeBSD 6.x latest |
FreeBSD upgrade ports
Install portupgrade if not alreadycd /usr/ports/ports-mgmt/portupgrade make install clean
Scan the list of installed ports with the pkgdb -F command and fix all the inconsistencies it reports. It is a good idea to do this regularly, before every upgrade.
pkgdb -F
Upgrade all outdated ports
portupgrade -a
Upgrade all using binary packages only (i.e. do not use ports)
portupgrade -aPP
Upgrade just 1 package and its dependencies
portupgrade -ri apache22
There are no comments on this page. [Add comment]