Compiling and installing a vanilla custom kernel.org kernel on ubuntu like a normal human being
March 21, 2011
S(kip to the good part)
So I’ve got ubuntu 9.04 (karmic koala) on my laptop, and I decided I’d try installing a custom kernel from kernel.org. I do this all the time at work, so it’s not a big deal, or so I think.
I downloaded 2.6.38 from kernel.org, and unpack it. I think, well, if it’s not too much trouble to find, I’ll start off with the ubuntu config file from my running kernel. Look in /proc for config.gz. It’s not there (SuSE has the config file compiled into the kernel, so you can’t lose it, and can’t get the wrong one. Nice. Don’t know why more distros don’t do that.) Then I decide my laptop is slow enough that I’d better customize the hell out of the config file anyway just to throw out the 90% of drivers for which my laptop has no corresponding hardware. So, I run “make menuconfig” and start tossing stuff out. This takes about half an hour, I guess. Then compile the kernel. That takes two hours. Wow my laptop is old and slow, I guess (kernel.org kernel with a full RHEL6 .config file takes maybe 15 minutes or so to compile on the 8 CPU HP DL380g7 I have at work. Might be getting time to get a new laptop.) Then “make modules_install” and “make install”.
I happen to notice it didn’t make any initrd image. Hmmm.
Start digging around on the net to try to figure out how to install a kernel.org kernel on ubuntu and run into all kinds of bullshit about fakeroot this, and debian package that… Barf. I just want to install my kernel.org kernel like a normal human being. Which is to say, I want to do:
make sudo su make modules_install make install
On Redhat or SuSE, that’d be all there was to it.
make sudo su make modules_install make install update-initramfs -c 2.6.38 update-grub
Update-initramfs makes a new initrd image, despite the name of the command.
No telling how long this information will remain accurate. I think Ubuntu doesn’t really like you installing a kernel that you compiled yourself. Check out this thread on ubuntuforums.org which ends:
You are talking about using an unsupported kernel on Ubuntu, and this is clearly a violation of the terms of service and is punishable under court of law. If you engage in this activity I will have to report this activity to a moderator.