disable kernel debugging before using ubuntu’s kernel config
Posted on July 30, 2008
Filed Under system administration | Leave a Comment
if you ever need to rebuild an ubuntu kernel beware when using their supplied config file from /boot/config-$(uname -r)
i went through this exercise recently and wasted quite a bit of time trying to figure out why my new kernel package including modules was over 700mb uncompressed when the original package is around 60mb uncompressed.
once i found out that debugging symbols were to blame this was the process i used to rebuild the kernel:
cd /usr/src
apt-get install build-essential kernel-package linux-kernel-devel
apt-get build-dep linux-image-$(uname -r)
apt-get source linux-image-$(uname -r)
cd linux-* # might fail if there's more than one match
make-kpkg clean
cp /boot/config-$(uname -r) .config
make-kpkg configure
make menuconfig
# disable kernel debugging under "kernel hacking"
# not sure how my copy keeps getting this sticky bit set but it causes a failure
chmod -s debian
make-kpkg -us -uc binary
if everything works you should end up with some .deb files in the parent directory.
Comments
Leave a Reply