make world best practices

synergy

Verified User
Joined
Nov 8, 2003
Messages
48
Location
Australia
Just curious what most DA users, who do not have physical access to their DA server, do for upgrades. Do you run

buildworld / buildkernel / installkernel
reboot then
installworld / mergemaster

through ssh most of the time, or do you have some kind of console access from another server near by? Any particular gotchas to watch out for?

Thanks.
 
While I am in the Data Center at my company I usually go up to my office (since it is quite). To do the upgrades I always it is exactly like this...

I do a cvsup to whatever release I am going to upgrade to. Lately I have been doing my 5.x boxes to 5.2.1-RELEASE. I would not go from 4.x to 5.x but aparently some people do.

cd /usr/src
make buildworld *
make buildkernel
make installkernel

Reboot the box

cd /usr/src
make installworld
mergemaster -ai

Reboot the box

* Now this is trick that I have used for a while. It is probably not the best idea in every situation and could cause problems! Now that you are warned...Launch 2 consoles (ssh sessions whatever) and once buildworld gets going about 5 minutes later also start buildkernel, I do this (especially on MP boxes) to make the process a bit faster. The idea is that you need to have buildworld to build anything that the kernel needs before it builds the kernel. What this also allows me to do is leave it doing what it is doing while I get other stuff done without much interaction.
 
I was just thinking (because I am doing a upgrade right now) and forgot to tell you, you SHOULD be in single user mode for installworld. I am lazy and hardly do, but I do make sure as few deamons as possible are running.
 
Is there anyway to be in single user mode through ssh or other, without a second server and tip or some other terminal with serial port access?

Or is running it in multi user really the only option at that point?

Thanks for your help this far.
 
I would not worry about it. Many people do it without single user mode. Just shutdown DA and anything else major you are running. The idea behind that is it goes faster and since you are going to be messing with alot of crap it better.
 
Last edited:
This is what I do if i'm sticking with the same version. eg. Freebsd 4.9 system updating to the latest 4.9 source.

Cvsup the source

make buildworld
make buildkernel
make installkernel
make installworld

And if everything goes well then a reboot.

The only gotcha I have found is if you have the /tmp directory mounted as:

nosuid, noexec, nodev

One of these options causes either the buildworld or installworld not to work (I can't remember which one) so make sure you remove these options before you do it.

I do this remotely without physical access to the server and it works fine. Just to be sure though, make sure you are in a decent datacenter who will help out if the server fails to wake up after the update.

*NOTE* - If any newbies with a freebsd server are reading this and your server is on the internet and hasn't been updated make sure you either do it now or hire someone to do it as your server is most likely vulnerable.


vetrun
 
Last edited:
I do encourage you use the manual way to understand what's needed to do a upgrade. On the other hand I like things a bit more streamlined. I use a shell script to update ports/cvs/kernel in multiuser mode. It will popup with a ncurses menu to select mirrors, the distribution, if you want ports to be upgraded, install a custom kernel etc. After that it will remember these preferences!

http://lvl.sourceforge.net/update.php

Rick
 
rhoekman said:
I do encourage you use the manual way to understand what's needed to do a upgrade. On the other hand I like things a bit more streamlined. I use a shell script to update ports/cvs/kernel in multiuser mode. It will popup with a ncurses menu to select mirrors, the distribution, if you want ports to be upgraded, install a custom kernel etc. After that it will remember these preferences!

http://lvl.sourceforge.net/update.php

Rick

I've looked at this script before but was unsure if I should use it or not. I might check it out just to see if it makes things a little easier since it works well for you.
 
It works fine for me.. But if you are unsure and want to try it on a production server then please don't! Try it out on a test server first.

I never had any problems with the script. It will halt on errors etc checks for permissions and newer versions at startup, cute things like that..

Rick
 
Back
Top