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.



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.

  • 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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