Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have an openvz server, currently running on linux-2.6.27-openvz-kiprensky.1-r1

Now, I'm upgrading server and part of the upgrade is kernel upgrade. Now, I'm offered linux-2.6.32-openvz-feoktistov.1

Question, if I'm recompiling the kernel, can I reuse the configuration from the 2.6.27? What is best practice for kernel upgrade?

I'm running on gentoo distr.

Thanks.

share|improve this question

2 Answers 2

up vote 5 down vote accepted

The best-practice is to use whatever kernel that comes with your distribution-channels.

But if you're compiling your own, you certainly can use the old .config file for the basis of your new config. The tricky part is all the added modules between 2.6.27 and 2.6.32. The way I see it you have two options

Option 1: Do all the research

What's new in each kernel changes, of course. New drivers, new options on existing modules, deprecated options and modules change. These are documented in the kernel itself as well as in various other places. Some give a nice high-level overview, others are more bolts-level.

Option 2: Just go with defaults and recompile until you get something that works

Use make oldconfig with your old .config file copied into the kernel source directory and take all the default answers to all the new options. This assumes that new modules aren't likely to be critical for a system that was working on an older kernel. If this doesn't work the first time, it's time to go to option 1 and try again.

share|improve this answer
3  
The key is to keep the older kernel and add the new kernel as a separate boot option in grub. Once everything is tested and working, then you fix grub to boot the new kernel by default. –  DerfK Oct 15 '11 at 13:07
1  
Yep make oldconfig + @DerfK comment is just about how I've been doing kernel upgrades for a long time now. For make oldconfig, my experience is that usually you just want to say N to all sorts of obscure new drivers and categories, then if something doesn't work, start enabling what you actually need through regular (n|menu)config. I also keep my .config history in a git repo. What you want to watch out for is occasional radical changes in some really core architecture stuff, like storage controller (IDE, ATA) drivers. –  lkraav Oct 18 '11 at 9:46

It looks like Gentoo has 2.6.32 packaged http://packages.gentoo.org/package/sys-kernel/openvz-sources However, I'm not familiar with Gentoo. Can you upgrade the kernel via packages?

On Debian, OpenVZ is well packaged http://packages.debian.org/squeeze/linux-image-openvz-amd64 I have been using that for all the kernel security upgrades. I would also trust that for OpenVZ kernel a major upgrade is also done through the package manager.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.