LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   *BSD (https://www.linuxquestions.org/questions/%2Absd-17/)
-   -   System update (https://www.linuxquestions.org/questions/%2Absd-17/system-update-38187/)

J_Szucs 12-12-2002 11:20 PM

System update
 
I think it is time for a complete system update of our FreeBSD 4.4-stable production servers. Never did such thing before, so I have some questions:
- I think I have to download the new kernel sources and compile a new kernel. Is that so?
- If so, how do I know what modules to compile in the new kernel? The contents of the present kernel would be a good starting point, but how can I find out what it contains?
- I suppose the old kernel can be kept, and used if there is something wrong with the new one. Is that so?
- Once the new kernel is installed, do I have to re-configure programs like sendmail, samba, squid, ssh, and any possible firewalls, and localisation on that machine, or are these not concerned by the system update?
- Are there any special precautions to take while doing the system update?
- Later I will have to update sendmail, samba, squid, OpenSSH, etc. When I change these to the new versions, are their configurations reset, or the new versions will automatically work using the old configuration?

dazk 12-13-2002 05:53 AM

All your questions are answered in the FreeBSD Manual. Check it out. It gives step by step instructions on how to configure the new kernel, how to get the new sources, how to upgrade the world etc.

J_Szucs 12-13-2002 03:31 PM

Well, I read the manual but it seems quite a complicated matter to me.
If I miss a single issue in the manual and consequently the server (or just e-mail) will be out of service just for an hour then life will stop and I will be kicked in the ass (or worse).
So I think I leave that server alone. Actually, 4.4-stable is not that old...
(Besides noone asked me to do the update since noone cares how old versions of sendmail, ssh or samba are installed there as long as they work).
It was just an idea. Thanks.

dazk 12-13-2002 03:40 PM

Well sure, that sounds a lot like never change a running system ;)

From my experiences world updates in freebsd work like a charm. Before I got my Dual CPU workstation I used FreeBSD for around a year. I switched because FreeBSD doesn't like 2 CPUs that much. Well anyways, I kept my System fairly current on the stable branch, doing world updates at least once a month and I never had a problem. Of course that doesn't mean there won't be one. I guess the best way to do things for you would be to mirror the bsd installation to a seperate system and do the update there. Maybe you can do it a couple of times to get comfortable with the process. If it works, you can try on the real server. That should reduce the risk a little. If you have access to large tape drives or some other means of backup, you could create a complete image of the harddisk or the relevant partitions before you start working on the server. Then you can revert your changes in case of the worst case happening.

llama_meme 12-20-2002 11:00 AM

Just to answer your original questions (although you'll find better answers in The Handbook)...

I'm assuming you have the 4.4-RELEASE system source installed in /usr/src. If you don't, you can still use cvsup to get the 4.7 source, but it won't be as quick as downloading and installing the 4.7-RELEASE source packages.

Quote:

- I think I have to download the new kernel sources and compile a new kernel. Is that so?
Sort of - you need to download source code for the whole base system, not just the kernel. This is very easy using cvsup. For example, this supfile:
Code:

*default tag=RELENG_4
*default host=cvsup.uk.FreeBSD.org
*default prefix=/usr
*default base=/usr/local/etc/cvsup
*default release=cvs delete use-rel-suffix compress

src-all

is what I use to get the sources. The RELENG_4 tag is 4-STABLE; you may want RELENG_4.7.0 (4.7-RELEASE).

Quote:

- If so, how do I know what modules to compile in the new kernel? The contents of the present kernel would be a good starting point, but how can I find out what it contains?
FreeBSD seems to compile all the dynamically loadable and unloadable modules (even the ones you don't need), so you can always load a module you've missed out of the kernel if you find you need it. As for deciding what to build into the kernel, either start from your old kernel config file, or use the GENERIC (/sys/i386/conf/GENERIC) file to start with. If you've never compiled the FreeBSD kernel before, The Handbook has a nice explanation.

Quote:

- I suppose the old kernel can be kept, and used if there is something wrong with the new one. Is that so?
No - you're upgrading the kernel and the userland; using an old kernel with a new userland is a bad idea. You're very unlikely to get an unbootable system if the kernel compiles without errors.

Quote:

- Once the new kernel is installed, do I have to re-configure programs like sendmail, samba, squid, ssh, and any possible firewalls, and localisation on that machine, or are these not concerned by the system update?
Any prgrams that are part of the FreeBSD base system may need a certain amount of reconfiguration; see the sections on the mergemaster utility in The Handbook (and man mergemaster).

Quote:

- Are there any special precautions to take while doing the system update?
I think you're supposed to do "make installworld" in single user mode.

Quote:

- Later I will have to update sendmail, samba, squid, OpenSSH, etc. When I change these to the new versions, are their configurations reset, or the new versions will automatically work using the old configuration?
Depends on the individual programs.

Alex


All times are GMT -5. The time now is 11:29 AM.