ubuntu 8.04 内核升级

dpkg -l 查看安装的文件

首先更新apt-get源

vim /etc/apt/sources.list

deb http://old-releases.ubuntu.com/ubuntu/ hardy main restricted universe multiverse

deb-src http://old-releases.ubuntu.com/ubuntu/ hardy main restricted universe multiverse

deb http://old-releases.ubuntu.com/ubuntu/ hardy-security main restricted universe multiverse

deb-src http://old-releases.ubuntu.com/ubuntu/ hardy-security main restricted universe multiverse

deb http://old-releases.ubuntu.com/ubuntu/ hardy-updates main restricted universe multiverse

deb-src http://old-releases.ubuntu.com/ubuntu/ hardy-updates main restricted universe multiverse

deb http://old-releases.ubuntu.com/ubuntu/ hardy-proposed main restricted universe multiverse

deb-src http://old-releases.ubuntu.com/ubuntu/ hardy-proposed main restricted universe multiverse

deb http://old-releases.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse

deb-src http://old-releases.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse

系统版本过旧,国内源已经没有支持,找到ubuntu官网,对老版本支持

apt-get clean

apt-get update

apt-cache  search linux|grep linux-image

apt-get install linux-image-XXX-generic-pae linux-headers-XXX-generic-pae

 

不成功可以手动编译升级内核

下载新内核

apt-cache  search linux-source

apt-get install linux-source

cd  /usr/src 

tar xvf  linux-source-2.6.24.tar.bz2 

sudo apt-get install build-essential kernel-package libncurses5-dev libqt3-headers 

make menuconfig

make -j4

make modules

make modules_install

make install

生成initrd.img

mkinitramfs -o /boot/initrd.img-2.6.24.6 2.6.24.6

update-grub或者手写更新menu.lst

编译的时候碰到错误:

Include IDE/ATA-2 DISK support 如果你的/boot是放在IDE硬盘上,那么这里一定要选*,选M都不行。否则启动时会出现“waiting for root file system”的提示而停滞不前。

 

 

ubunt 12升级

阿里云还支持12的版本

vim /etc/apt/sources.list

deb http://mirrors.aliyun.com/ubuntu/ precise main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ precise-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ precise-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ precise-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ precise main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ precise-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ precise-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ precise-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ precise-backports main restricted universe multiverse

apt-cache  search linux|grep linux-image

apt-get install linux-image-3.2.0-126-generic-pae linux-headers-3.2.0-126-generic-pae