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.