Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I accidentally deleted the kernel config file found in /boot. So I have 2 questions.

Does this affect the system by any means?

and I am trying to compile the Linux kernel now and was looking to using the Ubuntu config file and build on it so where can I get a valid config file?

I am on Ubuntu 14.04 LTS using kernel 3.13

share|improve this question
    
Try this: askubuntu.com/a/253246/2973 –  wojox Jul 18 at 1:51

2 Answers 2

For files provided by packages, you can always look up which package provided them and either reinstall that package or download the package file and extract the file. The config files found /boot are provided by linux-image-* packages:

$ dpkg -S /boot/config-3.13.0-26-generic 
linux-image-3.13.0-26-generic: /boot/config-3.13.0-26-generic

Note how the config files' names all follow the pattern config-$(uname -r). uname -r is the kernel release, and looks like 3.13.0-26-generic. Since dpkg stores information on which currently installed packages added which files, as long as those packages are present, even deleted files can be look up. So you can do:

dpkg -S /boot/config-$(uname -r)

which will likely show that the file is owned by linux-image-$(uname -r). And then either reinstall that kernel package:

sudo apt-get install --reinstall linux-image-$(uname -r)

Or download the package and extract it manually:

apt-get download linux-image-$(uname -r)
ar x linux-image-$(uname -r)*.deb
tar -xf data.tar.* ./boot/config-$(uname -r)

Now the config file will be in boot/ in the directory where you extracted it.

share|improve this answer

I think that the config file does not any affect the system now.

It is used only build a kernel image and modules. Perhaps, when you build new kernel module, The config file can be referred.

Due to read the config file, you can look the modules the kernel includes or dynamic loads or unused.

For example, At the config file,

CONFIG_EXT3_FS=y

The ext3fs module is embedded in the kernel image.

CONFIG_EXT3_FS=m

The ext3fs module is not embedded in the kernel image, but have runtime module loading.

CONFIG_EXT3_FS=n

The ext3fs module is not used in the kernel.

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.