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 \
  System.map "/boot"

Here's my /boot folder:

luky@ubuntu1004:/boot$ ls
abi-2.6.32-24-generic         System.map-2.6.32-24-generic
config-2.6.32-24-generic      System.map-
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.

  • 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

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.

| improve this answer | |
  • Maybe grub-pc ? – Extender Nov 1 '10 at 6:58

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: https://help.ubuntu.com/community/Grub2

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.

| 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: https://wiki.ubuntu.com/KernelTeam/GitKernelBuild

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 http://kernel.ubuntu.com/~kernel-ppa/mainline/daily/ for pre-built mainline kernels.

| improve this answer | |

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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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