I just had a terrible experience of compiling kernel on Ubuntu and hope for some help from you.
I have to recompile the kernel because I needed 2 minor changes in the code without changing the kernel much, so I wanted to unpack the source suitable for the current stock kernel (2.6.20-16), apply my changes, recompile it using exactly the same configuration and install it.
What I did:
1. Updated the stock kernel to 2.6.20-16 from 2.6.20-15 that came on the CD., rebooted with no problems
2. Installed build-essential etc.
3. installed linux-source-2.6.20 , unpacked it in /usr/src , made a symlink
4. make-kpgk clean ; make-kpkg --append-to-version=-mychanges --initrd kernel-image modules-image
5. 3 hours compile time later... resulted in a 24MB-large package in /usr/src
6. dpkg -i linux....deb
Now it looks like the kernel is being installed, it even has exactly the same size as the stock vmlinuz-2.6.20-16-generic, but then it turns out that initrd being written is so huge I run out of free space on /boot, and the installation aborts with an error.
apt-get remove linux....-mychanges reports that installed size is around 580MB! How is this possible, when the deb package is just 24? Why is my initrd so large?
Right now I'm trying to install the kernel by hand and not use initrd by compiling in support for filesystems, so the kernel can mount root partition directly. I noticing however that if I make another make without clean, I get a lot of warnings during compile, something like "symbol xxx is now in incorrect position" (sorry can't post the exact warning right now), and I wonder what difficulties will I encounter next...
Update: didn't work - I get kernel panic with "please append correct root= option". So far I tried root=UUID=XXXXXXXX, as the normal options use, root=/dev/sda3 (why is even IDE drive now sda ?) and root=/dev/hda3, all yield same message. In my experience, grub entry as simple as
Code:
title=Some Title
root (hd0,0)
kernel /kernel-2.6.XX-version root=/dev/hda3
always worked perfectly for kernels compiled without using initrd.
Bookmarks