Re: Compiling a kernel



* John O'Hagan (johnohagan@xxxxxxxxxxxxxx) wrote:
Hi Patrick,

Hello John,

I always compile my own kernels the Debian (testing) way like this:

-Install the latest Debian linux-source package (currently
linux-source-2.6.17); or you can use vanilla source as you describe
-Make a symlink /usr/src/linux to the resulting
folder /usr/src/linux-source-2.6.17 (is this step still necessary?)

I have wondered this too. I always do it, but it seems like I read
something somwhere suggesting that it is not needed.

-Configure the kernel
-In /usr/src/linux, run "make-kpkg buildpackage kernel-image" (there are other
options, in the man page)
-Install the resulting .deb packages in /usr/src with dpkg -i

Will I still have to configure grub? And will update-grub work or
will I have to manually edit menu.lst? I am still getting the hang of
grub. It was never a part of Slackware and so I had become very
comfortable with lilo.

- Reboot into your new kernel

This will build a kernel without an initrd, so you must compile in all drivers
for the the boot disk(s). Or use the --initrd option.

I prefer to go without initrd myself. Just seems a tad faster, though
probably my imagination.

If you are recompiling a kernel with the same version name, you must
move /lib/modules/[$KERNEL_VERSION] out of the way (you are warned if you
forget!), or you can use the --revision or --append-to-version options to
avoid this.

This is new to me. Will these flags stop clobbering of my modules?
If so, that is a very cool feature. I forget to move my modules at
least half of the time and it really stinks. I think it is because in
Slack since I was going from a 2.4 to a 2.6 it never seemed to
matter. I am going to do some reading on this.

Many thanks for the help.

Patrick


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: FC3: grub hangs in ide+scsi box
    ... >> That doesn't explain why grub would hang. ... My problem is before initrd ... I can't even get to grub. ... To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list ...
    (Fedora)
  • Re: grub: not found or no block device
    ... *outside* the chroot ... you could also use the grub shell ... initrd.img file to that the kernel can find the root device. ... are using an initrd that was built on a scsi system, ...
    (Debian-User)
  • Re: GRUB loader hangs in to message "savedefault" in Debian etch and load error in Ubuntu.
    ... and it gets hung up. ... of the default configuration for GRUB on Debian. ... leading up to it and the text of the error message), ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: grub: not found or no block device
    ... *outside* the chroot ... you could also use the grub shell ... initrd.img file to that the kernel can find the root device. ... are using an initrd that was built on a scsi system, ...
    (Debian-User)
  • Re: Grub installation on a USB external disk
    ... Grub, and tanks to the help of John Austin I was able to create a boot ... title FC7 2.6.22.5-76.fc7 14/9/2007 ... initrd /initrd-2.6.22.5-76.fc7.img ...
    (Fedora)