|
按下列方法升级后:
Debian testing升级内核笔记
这里仅记录使用make-kpkg的方法升级内核至linux-2.6.29,并且此文仅为笔记,关于升级内核的详细介绍请参照其他相关资料。
以下命令均在root下执行。
1:编辑"sources.list":
#nano /etc/apt/sources.list
添加下列地址或其他镜像地址:
deb ftp://ftp.debian.org/debian lenny main non-free contrib
deb-src ftp://ftp.debian.org/debian lenny main non-free contrib
2:编辑"interfaces":
#nano /etc/network/interfaces
修改如下:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
保存后执行以下命令使系统连上网络:
#/etc/init.d/networking restart
*已经连上网络的可省略此步骤。
3:依次执行如下命令:
#apt-get update
#apt-get install kernel-package libncurses5-dev zlib1g-dev build-essential
*一定要安装zlib1g-dev,否则无法生成.deb文件。
#cd /usr/src
#wget http://www.kernel.org/pub/linux/kern...2.6.29.tar.bz2
#tar xjf linux-2.6.29.tar.bz2
#cd linux-2.6.29
#make clean && make mrproper
#cp /boot/config-`uname -r` ./.config
#make menuconfig
*加载刚刚拷贝过来的".config"文件,保存后退出,或自行定义配置文件。
#make-kpkg clean
#make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers
#cd /usr/src
*或#cd ..
#dpkg -i linux-headers-2.6.29-custom_2.6.29-custom-10.00.Custom_i386.deb
*注意最后一个单词"Custom"的首字母为大写。
#dpkg -i linux-image-2.6.29-custom_2.6.29-custom-10.00.Custom_i386.deb
#shutdown -r now
重启后进不了系统
在/boot/grub/menu.lst文件里
[color="Red"]title Debian GNU/Linux, kernel 2.6.29-custom
root (hd0,8)
kernel /vmlinuz-2.6.29-custom root=UUID=11d91f15-d983-4450-b61f-d088d6395286 ro
title Debian GNU/Linux, kernel 2.6.29-custom (single-user mode)
root (hd0,8)
kernel /vmlinuz-2.6.29-custom root=UUID=11d91f15-d983-4450-b61f-d088d6395286 ro single
title Debian GNU/Linux, kernel 2.6.26-2-686
root (hd0,8)
kernel /vmlinuz-2.6.26-2-686 root=UUID=11d91f15-d983-4450-b61f-d088d6395286 ro
initrd /initrd.img-2.6.26-2-686
title Debian GNU/Linux, kernel 2.6.26-2-686 (single-user mode)
root (hd0,8)
kernel /vmlinuz-2.6.26-2-686 root=UUID=11d91f15-d983-4450-b61f-d088d6395286 ro single
initrd /initrd.img-2.6.26-2-686
少了initrd.img,请问如何弄initrd.img文件??? |
|