Compile Kernel 2.6 under Debian Sarge

Sarge uses grub as the boot loader (instead of lilo) and  module-init-tools,   initrd-tools, procps are already installed, We can compile kernel 2.6 under debian sarge as follows:

1.Installing some necessary tool packages

   #apt-get install kernel-package libncurses5-dev fakeroot bzip2  

   

2. Installing the kernel sources

   Get the latest Linux kernel source (or the kernel source you need) from      

http://www.kernel.org/pub/linux/kernel/v2.6/     

There I download the kenerl source linux-2.6.16.27.tar.bz2 , move it into the   directory /usr/src      

  #cd /usr/src

  #tar xjf linux-2.6.16.27.tar.bz2

  #cd linux-2.6.16.27

3. configure the kernel

   #make menuconfig

    #make-kpkg clean

    #fakeroot make-kpkg --initrd --revision=custom.1.0  kernel_image

    //custom.1.0 is the revision we define for ourself indentification

4. If the compilation stops with an error , then:

    #make clean

    #make menuconfig

5. Install new kernel image

If no error appears , we will find a new kernel as a debian package called kernel-image-2.6.16.27_custom.1.0_i386.deb under the directory /usr/src

#cd /usr/src

#ls

#linux-2.6.16.27  kernel-image-2.6.16.27_custom.1.0_i386.deb

#apt-get install mkinitramfs-kpkg mkinitrd yaird

#dpkg –i kernel-image-2.6.16.27_custom.1.0_i386.deb

 

6. reboot & use the new kernel

This will install new kernel (including a ramdisk) and also update grub. We can now reboot our system, and we should then have a new kernel. Check that by running:

    #uname -a

    #2.6.16.27

 

All is OK! ^_^

 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值