Following the steps given in How To Compile A Kernel - The SuSE Way | HowtoForge - Linux Howtos and Tutorials I’ve rebuilt a kernel from source and I’m wondering why the kernel image and initrd images are so large. I’d appreciate it if anybody had some pointers.
I installed openSUSE 11.4 from an .iso
Linux linux-wdux 184.108.40.206-1.2-default #1 SMP 2011-02-21 10:34:10 +0100 i686 i686 i386 GNU/Linux
In Yast, software Manager, selecting Patterns, I installed everything in Linux Kernel Development and then built the kernel source which was downloaded …
sudo make cloneconfig
sudo make rpm
This seemed to successfully create /usr/src/packages/RPMS/i386/kernel-220.127.116.11.2default-1.i386.rpm and when I extract the rpm it creates
But I notice it’s 52M. The vmlinux for my running kernel is only 3.9 M
Why is the vmlinux I built, using my running system’s .config, so large? I checked my .config and there are lots of things set to be built as modules. The .config is virtually the same as that of my running kernel.
Then when I try to run mkinitrd ( with sudo) it’s creates an initrd that’s 21M but the initrd for my running system is only 8.7M
diff config-18.104.22.168-1.2-default config-22.214.171.124-1.2-default
< # Linux/i386 2.6.37 Kernel Configuration
> # Linux Kernel Configuration
> # Fri Jun 17 11:03:22 2011