rhoekman
Verified User
(WORK IN PROGRESS!)
Disclaimer: I'm not responsable if this howto renders your machine inoperable! Use at your own risk! This is also not for the inexperienced even though I use pictures
wdv asked me to write a little howto on upgrading FreebSD 5.2.1 running DA to 5.3 so here we go:
Preperation:
MAKE A FULL SYSTEM BACKUP FIRST!
SSH: (thanks to Chrysalis)
If you use openssh in the FreeBSD base then 5.3 by default disables password authentication, so edit /etc/ssh/sshd_config before you do the reboot after make installworld, and change the following 2 lines or you will be locked out if you relying on password login. You dont need to do this if you use openssh-portable port.
PasswordAuthentication yes
PermitEmptyPasswords no
DNS:
To avoid dns to be chrooted when you have to reboot the machine put this in your /etc/rc.conf
named_chrootdir=""
You also need to make sure that there are 2 groups present in /etc/group:
proxy:*:1049:
authpf:*:1050:
the last number is the group ID on my system so check the file and pick a follow up number that is free on your machine
Optional preparation:
As FreeBSD 5.3 is fully cleaned of debug and test codes it now makes sense to optimize it when the kernel and the system compiles for you architecture.
In /etc/make.conf I put this in:
CPUTYPE=p4
COPTFLAGS= -O2 -pipe -funroll-loops -ffast-math
Please be aware that you use the right architecture when you specify CPUTYPE!
More information on what all the flags do can be found here:
http://silverwraith.com/papers/freebsd-kernel.php
Commencing the upgrade:
This is also something that is subscribed very well in the FreeBSD Handbook here:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/cvsup.html
I consider myself a very lazy admin and I found a perfect script that uses all that is described in the handbook http://lvl.sourceforge.net/readme.php?txt=update/README
This script uses CVSup so if you do not have CVSup installed please do so by using:
pkg_add -r cvsup-without-gui
now get the script: http://prdownloads.sourceforge.net/lvl/update.tar.gz?download
unpack it and launch it with ./update.sh -m
It will check for latest version and permissions then it will prompt you with a nice menu. If you follow the instructions in the exact order your system will be upgraded to 5.3 RELEASE!
(if you make a mistake you can clear the setting using ./update.sh -C restart again with ./update.sh -m)
- After probably 2 hours you will be prompted for a reboot. So reboot.
- After the reboot run the script again with ./update -m
- After this it will install the compiled system files.
The tricky part is that mergemaster will be called after installing the system files. Here you are on you own because you have to review every file that needs merging or not! This usually takes about 20 minutes.
Depending if your machine took all the beating it should work.
Now it is time to rebuild DA (custom apache)
cd /usr/local/directadmin/customapache/
./build clean
./build update
./build all
Portupgrading (thanks to Chrysalis)
Using portupgrade to recompile all ports with the new libraries and compiler:
After upgrading to 5.3 all multi threading ports are supposed to be rebuilt but since there is no easy way to tell which are the correct ports to do just rebuild all your ports, I used the following command (requires the sysutils/portupgrade port).
'portupgrade -afvrR', this will reinstall all currently installed ports (can take a long while, took nearly 4 hours on my celeron 2ghz). Note tho that if you have built ports with custom options then you need to either add the options to /usr/local/etc/pkgtools.conf in the 'make args' section or recompile the port yourself manually.
--
personal note: Though everything is running smoothly here at my end. I'm not really happy with the enormous change this upgrade has taken on the machine. A lot of files during mergemaster still need reviewing. A full fresh install is advised if you have the chance!
Disclaimer: I'm not responsable if this howto renders your machine inoperable! Use at your own risk! This is also not for the inexperienced even though I use pictures
wdv asked me to write a little howto on upgrading FreebSD 5.2.1 running DA to 5.3 so here we go:
Preperation:
MAKE A FULL SYSTEM BACKUP FIRST!
SSH: (thanks to Chrysalis)
If you use openssh in the FreeBSD base then 5.3 by default disables password authentication, so edit /etc/ssh/sshd_config before you do the reboot after make installworld, and change the following 2 lines or you will be locked out if you relying on password login. You dont need to do this if you use openssh-portable port.
PasswordAuthentication yes
PermitEmptyPasswords no
DNS:
To avoid dns to be chrooted when you have to reboot the machine put this in your /etc/rc.conf
named_chrootdir=""
You also need to make sure that there are 2 groups present in /etc/group:
proxy:*:1049:
authpf:*:1050:
the last number is the group ID on my system so check the file and pick a follow up number that is free on your machine
Optional preparation:
As FreeBSD 5.3 is fully cleaned of debug and test codes it now makes sense to optimize it when the kernel and the system compiles for you architecture.
In /etc/make.conf I put this in:
CPUTYPE=p4
COPTFLAGS= -O2 -pipe -funroll-loops -ffast-math
Please be aware that you use the right architecture when you specify CPUTYPE!
More information on what all the flags do can be found here:
http://silverwraith.com/papers/freebsd-kernel.php
Commencing the upgrade:
This is also something that is subscribed very well in the FreeBSD Handbook here:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/cvsup.html
I consider myself a very lazy admin and I found a perfect script that uses all that is described in the handbook http://lvl.sourceforge.net/readme.php?txt=update/README
This script uses CVSup so if you do not have CVSup installed please do so by using:
pkg_add -r cvsup-without-gui
now get the script: http://prdownloads.sourceforge.net/lvl/update.tar.gz?download
unpack it and launch it with ./update.sh -m
It will check for latest version and permissions then it will prompt you with a nice menu. If you follow the instructions in the exact order your system will be upgraded to 5.3 RELEASE!
(if you make a mistake you can clear the setting using ./update.sh -C restart again with ./update.sh -m)
- After probably 2 hours you will be prompted for a reboot. So reboot.
- After the reboot run the script again with ./update -m
- After this it will install the compiled system files.
The tricky part is that mergemaster will be called after installing the system files. Here you are on you own because you have to review every file that needs merging or not! This usually takes about 20 minutes.
Depending if your machine took all the beating it should work.
Now it is time to rebuild DA (custom apache)
cd /usr/local/directadmin/customapache/
./build clean
./build update
./build all
Portupgrading (thanks to Chrysalis)
Using portupgrade to recompile all ports with the new libraries and compiler:
After upgrading to 5.3 all multi threading ports are supposed to be rebuilt but since there is no easy way to tell which are the correct ports to do just rebuild all your ports, I used the following command (requires the sysutils/portupgrade port).
'portupgrade -afvrR', this will reinstall all currently installed ports (can take a long while, took nearly 4 hours on my celeron 2ghz). Note tho that if you have built ports with custom options then you need to either add the options to /usr/local/etc/pkgtools.conf in the 'make args' section or recompile the port yourself manually.
--
personal note: Though everything is running smoothly here at my end. I'm not really happy with the enormous change this upgrade has taken on the machine. A lot of files during mergemaster still need reviewing. A full fresh install is advised if you have the chance!
Last edited: