How To Compile A Kernel - The Debian (Sarge) Way - Page 2
6 Build The KernelTo build the kernel, execute these two commands: make-kpkg clean Now be patient, the kernel compilation can take some hours, depending on your kernel configuration and your processor speed.
7 Install The New KernelAfter the successful kernel build, you can find your kernel .deb package in the /usr/src directory. cd /usr/src On my test system it was called linux-2.6.18.3-default1_2.6.18.3-default1_i386.deb. I install it like this: dpkg -i linux-2.6.18.3-default1_2.6.18.3-default1_i386.deb (You can now even transfer the .deb file to other Debian Sarge systems and install it there exactly the same way, which means you don't have to compile the kernel there again.)
8 Create A RamdiskNow we must create a ramdisk for our new kernel. Normally we do this with mkinitrd, but our new kernel uses udev instead of devfs, and you'll most likely get this error message with an mkinitrd generated ramdisk during boot-up: mount: unknown filesystem type 'devfs' which might lead to a kernel panic. The new way of creating ramdisks is with mkinitrd.yaird. Backports.org has a yaird package for Debian Sarge. Before we can install it, we must install two prerequisites: apt-get install libhtml-template-perl libparse-recdescent-perl Then we install yaird like this: cd /tmp (The original yaird package was located in http://backports.org/debian/pool/main/y/yaird/, but was removed in the meantime, so I've made the package available under http://downloads.howtoforge.com/files/yaird_0.0.12-8bpo1_i386.deb.) Before we can create the new ramdisk, we must edit the configuration file of our new kernel which you can find in the /boot directory (run ls -l /boot to find out). In this tutorial it's called /boot/config-2.6.18.3-default1, and in that file we must comment out the line CONFIG_DEFCONFIG_LIST (towards the beginning of the file) because otherwise mkinitrd.yaird will throw an error like this at us: yaird error: bad value in /boot/config-2.6.18.3-default1: CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" (fatal) So we do this: vi /boot/config-2.6.18.3-default1
Now we can finally create our ramdisk like this: mkinitrd.yaird -o /boot/initrd.img-2.6.18.3-default1 2.6.18.3-default1
9 Configure The GRUB Boot LoaderNow we must configure our GRUB boot loader so that our new kernels gets booted when we restart the system. This is very easy, just run update-grub You can check /boot/grub/menu.lst to see if your new kernel has been added: vi /boot/grub/menu.lst It should look like this now (you should find two stanzas for your new kernel at the top of the kernel stnazas list):
10 RebootNow reboot the system: shutdown -r now If everything goes well, it should come up with the new kernel. You can check if it's really using your new kernel by running uname -r This should display something like 2.6.18.3-default1 If the system doesn't start, restart it, and when you come to the GRUB boot loader menu, select your old kernel and start the system:
You can now try again to compile a working kernel. Don't forget to remove the two stanzas of the not-working kernel from /boot/grub/menu.lst.
11 Links
|
www.seamlessenterprise.com
One number. One voicemail. Seize the lead. Sprint Mobile Integration.
www.seamlessenterprise.com
One Number. One Voicemail.
Make it easier for clients to reach you. Turn your desk phone and mobile phone into one with Sprint Mobile Integration.
www.seamlessenterprise.com
One number. One voicemail. Sprint Mobile Integration.
www.seamlessenterprise.com
AT&T Synaptic Compute as a Service. Boost your power on demand.
Trial: IBM Cognos Express Reporting, Analysis & Planning




print: 

Recent comments
7 hours 5 min ago
7 hours 17 min ago
8 hours 24 min ago
12 hours 40 min ago
13 hours 9 min ago
1 day 3 hours ago
1 day 11 hours ago
1 day 18 hours ago
1 day 21 hours ago
1 day 23 hours ago