Hi,
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
uname -a
Linux linux-wdux 2.6.37.1-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 …
cd /usr/src/linux
sudo make cloneconfig
sudo make rpm
This seemed to successfully create /usr/src/packages/RPMS/i386/kernel-2.6.37.61.2default-1.i386.rpm and when I extract the rpm it creates
/boot/vmlinux-2.6.37.6-1.2-default.bz2
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-2.6.37.1-1.2-default config-2.6.37.6-1.2-default
3c3,4
< # Linux/i386 2.6.37 Kernel Configuration
> # Linux Kernel Configuration
> # Fri Jun 17 11:03:22 2011
4891d4891
< CONFIG_SAMSUNG_LAPTOP=m
5003a5004
> CONFIG_SAMSUNG_LAPTOP=m
–John