Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

After successfully compiling and building my mainline Kernel (2.6.32.25) 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-2.6.32.25$ sudo make install
sh /usr/src/linux-2.6.32.25/arch/x86/boot/install.sh 2.6.32.25 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-2.6.32.25
config-2.6.32.25              vmcoreinfo-2.6.32-24-generic
grub                          vmlinuz-2.6.32-24-generic
initrd.img-2.6.32-24-generic  vmlinuz-2.6.32.25
memtest86+.bin

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 "2.6.32.25". –  Kees Cook Oct 31 '10 at 17:01

4 Answers 4

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

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.

share|improve this answer
    
I forgot to mention that I downloaded the sources from kernel.org: kernel.org/pub/linux/kernel/v2.6/linux-2.6.32.25.tar.bz2 –  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

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.

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

Your Answer

 
discard

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.