Rebuild Kernel 2.6.24 Done

For some mysterious reasons, I decided to rebuild kernel 2.6.24 for my needs. I failed several times, eventually, I’m using the brand new kernel right now.

For the first time, my box hung at Waiting for root file system. I googled and found out it is because the kernel recognized IDE hard disk as sd. Actually I saw a lot of sd?? when booting up the computer and then it hung. Google results indicates
Include IDE/ATA-2 DISK support

should be Y(not M) if the root file system is in an IDE disk. So I chose Y and rebuilt and it hung at Waiting for root file system again. I compared the config with 2.6.22’s and found that there’s one option called generic/default IDE chipset support, says If unsure, say N, but in 2.6.22 it says If unsure, say Y. Weird! And somehow I chose Y and rebuilt and the kernel recognize IDE disk as hd normally.

When I logged in, I found my eth0 disappeared. I check the kernel options again and found my VT6102 [Rhine-II] Ethernet controller was not chosen. After 7 or 8 times I finally got the kernel worked.

BTW, I’ll write down the standard procedure of making kernel package under Debian.

Step 0:

$ make xconfig/gconfig/menuconfig

to config the kernel. You may want to copy the old config file to the source dir as .config.
The config file can be found in /boot, the name is config-kernel_version.

Step 1:

$ make-kpkg clean

Whatever you’re compiling a new kernel or recompiling, this step is essential.

Step 2(the real fun):

$ sudo make-kpkg --revision=_mykernel_ --initrd kernel_image modules_image


$ fakeroot make-kpkg --revision=_mykernel_ --initrd kernel_image modules_image

kernel_image is the exactly kernel package. modules_image is used to build a modules package from /usr/src/modules. You may want kernel_headers as well.

Step 3: Install the kernel, of course.

That’s it. Good luck!