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.

Recently I have come across a security module for the Linux kernel called Linux-VServer which allows you to virtualize many things and "partition" the OS to reduce the effects of a compromise. I was surprised to see that it required a re-compilation of the kernel as most of these types of things are simply modules that can be loaded at run time (selinux, apparmor).

My problem with recompiling the kernel to enable Linux-VServer is I am a beginner when it comes to compiling my own kernel. I use the Ubuntu package repositories to update my kernel which gives me the peace of mind that whoever compiled it, configured it properly so there won't be too many problems down the road. Is there a way to obtain the kernel configuration file (the thing created from running make menuconfig) that Ubuntu uses for their kernel distributions? I have tried looking at kernel compilation guides but most just explain how to download, extract and run make on the kernel, documentation about the actual configuration seems to be sparse.

I tried running apt-get source linux-image-3.2.0-generic on my Ubuntu box in hopes of grabbing the "configuration file", but I am presented with the error Unable to find a source package for linux-image-3.2.0-generic. Any ideas? Thank you!

share|improve this question

1 Answer 1

up vote 2 down vote accepted

I'm not sure about Ubuntu, but on Red Hat systems they put the kernel config in /boot/config-[kernel version], which you can feed directly into a kernel recompile.

share|improve this answer
    
Ah, good call. I noticed that Ubuntu has something in /boot/config-3.2.0-17-generic which when cated, prints things like CONFIG_DECOMPRESS_LZMA=Y. Does this look like the right thing? –  user99545 May 18 '12 at 5:06
    
@user99545 Yes, that's a kernel compilation config file. –  Jeff Ferland May 18 '12 at 5:08

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.