updating FreeBSD process

bjseiler

Verified User
Joined
Jun 19, 2003
Messages
197
I am curious how many of you do the "recommended" method of upgrading FreeBSD which includes dropping into single user mode versus just doing everything through SSH and hoping for the best.

I am lucky in that I only work about 4 blocks from the data center but I am sure most people don't have this luxury (and are then unable to do anything from single user).

I just updated two servers from 5.3 to 5.4 without any problem but I have a few others at 5.1 or 5.2.1 that need updating and I am not sure what my odds are of having a smooth upgrade without standing in front of the box in single user mode.
 
bjseiler said:
I am curious how many of you do the "recommended" method of upgrading FreeBSD which includes dropping into single user mode versus just doing everything through SSH and hoping for the best.

Personally, I follow the recommended method for our FreeBSD systems. I worry about the things that I didn't think about before taking a shortcut.

Getting a quality console server can make your life a lot easier for things like this - heck, even four blocks away can be a pain...

Andy
 
edit sshd_config so only myself can login
kill sshd, restart sshd

buildworld, buildkernel, installkernel

then I comment out the startup lines for DirectAdmin from the crontab

reboot
halt all services except ssh
mergemaster -p
make installworld
mergemaster

reboot
uncomment crontab lines
uncomment sshd_config lines so people can login again
kill and restart sshd

then depending on how I feel or how quickly the server actually reboots I might reboot it again.


the hosting company I work for now has a KVMoIP device which I could use to do it in single user mode, but as long as you make sure
 
Last edited:
bjseiler said:
Do you have a console server or one of those KVM over IP solutions?

We have a console server - it lets us get to switches and firewalls along with servers in one box - but I imagine a KVM over IP setup could work just as well for FreeBSD upgrades.

Andy
 
bjseiler said:
Do you mind sharing what make/model you use for the console server?

Logical Solutions' SCS line. We also have an HP with a Remote Insight card, but we're moving off that machine.

Andy
 
It sounds scarier then what it is.

5.2.1 to 5.3/5.4 is the same procedure except you have to recompile the ports afterwards because of bump in lib versions.

cvsup
mergemaster -p
make buildworld
make buildkernel
make installkernel
reboot
make installworld
mergemaster
reboot

I think the best thing is to do at home first without using console then once confident of the routine can do it online.
 
Chrysalis --

Do you do your updates through SSH or from console (or at the server)?

I have been using FreeBSD since about 4.2 I believe and normally things go well.....except for a few 4.9 -> 5.3 attempts.

Scary? Well, I don't know if I have ever NOT prayed when I do that last reboot after installworld and mergemaster ai :)
 
I do it all using SSH, none of my servers I have console access, and when it comes to datacentre help they tend to panic at things like this.

Dont attempt 4.9 -> 5.3 if you want to do such a jump then backup,format and reinstall as its a major version jump for a start you wouldnt be using UFS2 since you have to stick with the 4.9 filesystem.

but minor version jumps, are quite possible with only using ssh.
 
I also do all mine by SSH, I live in Texas and the servers are in Florida though I have techs that are 10 minutes away from the DC.

I just stop all services not needed while doing the upgrades and do not have problems.

I did a 5.21 system to 5.4 the other day and after installing the 5.4 kernel it would not find the file system. I messed with it for a good while and do not know what the issue was. It was quicker on this system to just reinstall with 5.4. I have run into this kind of thing a couple times over the years. The is an hsphere server not DA but I do not think that had anything to do with it.

I also have to admit that I have issued shutdown now (over SSH) and as soon as I hit enter had a few choice words directed at myself, then called one of my admins to go reboot the server LOL
 
Chrysalis said:
5.2.1 to 5.3/5.4 is the same procedure except you have to recompile the ports afterwards because of bump in lib versions.

Is there a quick way to do this automaticly in a reliable way? I don't really like to manually recompile 79 ports :)
 
Last edited:
wdv said:
Is there a quick way to do this automaticly in a reliable way? I don't really like to manually recompile 79 ports :)

Well, if you're using portupgrade, take a look at the man page - giving it "-afrR" flags should do the trick, but make sure that you're familiar with what portupgrade does, first.

On the other hand, I upgraded a 5.2.1 system to 5.3 without rebuilding any ports; instead, I put the following in /etc/libmap.conf:

Code:
libc_r.so.5             libpthread.so.1
libc_r.so               libpthread.so

without encountering any problems (although you will need to be careful about mixing old versions of libraries from your previous install with new ones - for instance, libm.so.2 and libm.so.3 with libmysqlclient.so and PHP).

Andy
 
Last edited:
Hmm, cool, thanks for the tip :)

portupgrade should indeed do the trick, but it'll probably get stuck at something and then you have a half working system :)
 
Last edited:
Back
Top