Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

After successfully compiling and building my mainline Kernel ( under my Ubuntu 10.04 with these headers I was wondering: how to make this kernel on startup, so I can choose which one to boot?

I have GRUB2 (grup-install -v says: 'GNU GRUB 0.97') installed.

I tried this:

sudo make install

And got:

luky@ubuntu1004:/usr/src/linux-$ sudo make install
sh /usr/src/linux- arch/x86/boot/bzImage \ "/boot"

Here's my /boot folder:

luky@ubuntu1004:/boot$ ls
config-              vmcoreinfo-2.6.32-24-generic
grub                          vmlinuz-2.6.32-24-generic
initrd.img-2.6.32-24-generic  vmlinuz-

I would NOT like to have to manually change GRUB's config files.

share|improve this question
Upstream kernels do not have a "-" in their version number, that is for package versions. It would be more clear if you said "". – Kees Cook Oct 31 '10 at 17:01
up vote 2 down vote accepted

Well, after all what solved my problem was: install the grub-pc package. This will replace the default one shipped with Ubuntu 10.04.

I'm on a PC, so I guess that's fine.

share|improve this answer
Maybe grub-pc ? – Extender Nov 1 '10 at 6:58
thanks! ;) lol! – Lucas Pottersky Nov 4 '10 at 22:53

I am assuming that you have grub2 installed because you are running 10.04, rather than grub legacy. You will need to update grub following the instructions here:

It should be a simple: sudo update-grub

This should check for new kernels and make grub entries from which you should be able to boot.

share|improve this answer
Yeah, I don't know if that was the solution, since I also edited my /etc/default/grub file... but now it's showing up. Next problem: Kernel panic: unable to mount root fs LOL! – Lucas Pottersky Oct 30 '10 at 18:22
Thats because of your /dev/sda4 (or something) is missing in initramfs /dev folder. Try sudo update-initramfs -u -k all – Extender Oct 31 '10 at 5:43

The kernels from that location are meant to be installed, not built yourself. They already have everything needed in their packaging to appear in grub, etc.

To build a mainline kernel and still get a proper .deb package, see the instructions here:

That will guide you through the build prerequisites, how to transfer the build-time configs, and generate the package. If you don't need to change configurations, see for pre-built mainline kernels.

share|improve this answer
I forgot to mention that I downloaded the sources from – Lucas Pottersky Oct 31 '10 at 0:40
Can you edit your question to reflect that? It changes the answer significantly. :) – Kees Cook Oct 31 '10 at 16:55
yeah, done. sorry for the confusion! =) – Lucas Pottersky Oct 31 '10 at 20:30

To build and install kernel in ubuntu or any debian based system for that matter its best to use makepkg istead of the usual make, make modules_install ....

makepkg --initrd linux-image linux-headers warning: this might throw a permission error some times

This creates a couple of .deb files in the parent directory which can be installed like any other .deb file.Do not worry about grub,it will configure itself;if using burg you must run "sudo update-burg".This will also ensure that the initrd file is properly generated

share|improve this answer
this command doesnt work. – Lucas Pottersky Oct 30 '10 at 21:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.