cygwin添加环境变量
时间:2011-11-24
来源:互联网
我的系统是ubuntu11.04,本想在Ubuntu11.10发布的时候更新到11.10,奈何装上这个宝贝,搞了两天耐性还是被它折磨殆尽。只好重新装机,换回11.04。但是呢?我又需要用3.0的内核,这可怎么办呢?可以自己编译、甚至可以直接到Ubuntu ppa下载 已经编译好的内核。不过我觉得这些方法都比较麻烦,更重要的是我担心自己编译的跟老版本的系统兼容性不佳,所以就想着能不能直接用使用11.10的内核,这样子应该兼容性好一些吧。呵呵,到网上找了找,还真找到了。
现在写一篇总结。
其实原理也简单,就是在源里添加11.10的源,但是再设置一下,限制更新的时候只使用11.10的内核,其它的则还使用11.04的。不得不佩服Linux的定制性呀。
下面开始说详细步骤:
1.在 /etc/apt/sources.list里添加更新版本的源:
说明:我要更新的是11.10的内核,所以就添加这个版本的源,哦,我用的源是教育网的源:
http://202.38.95.110/ubuntu/ ,所以我的添加方式是:
下面是我的/etc/apt/sources.list文件的内容:
cat /etc/apt/sources.list
2. 创建 /etc/apt/preferences.d/30-oneiric 文件
把下面的内容复制到 /etc/apt/preferences.d/30-oneiric 文件里
3.然后更新即可,以后可能同步ubuntu11.10的内核了
我在11.04的系统上实测通过,原理上只要是旧的版本都可以通过这种方式可以使用最新的内核啦。但是要记得依据你的系统做相应的修改啊。

其实原理也简单,就是在源里添加11.10的源,但是再设置一下,限制更新的时候只使用11.10的内核,其它的则还使用11.04的。不得不佩服Linux的定制性呀。
下面开始说详细步骤:
1.在 /etc/apt/sources.list里添加更新版本的源:
说明:我要更新的是11.10的内核,所以就添加这个版本的源,哦,我用的源是教育网的源:
http://202.38.95.110/ubuntu/ ,所以我的添加方式是:
代码:
sudo echo "deb http://202.38.95.110/ubuntu/ oneiric main" >> /etc/apt/sources.list
下面是我的/etc/apt/sources.list文件的内容:
cat /etc/apt/sources.list
代码:
#北京交通大学的校内源,速度可达1.5M/s http://mirror.njtu.edu.cn,
deb http://202.38.95.110/ubuntu/ natty main multiverse restricted universe
deb http://202.38.95.110/ubuntu/ natty-backports main multiverse restricted universe
deb http://202.38.95.110/ubuntu/ natty-proposed main multiverse restricted universe
deb http://202.38.95.110/ubuntu/ natty-security main multiverse restricted universe
deb http://202.38.95.110/ubuntu/ natty-updates main multiverse restricted universe
deb-src http://202.38.95.110/ubuntu/ natty main multiverse restricted universe
deb-src http://202.38.95.110/ubuntu/ natty-backports main multiverse restricted universe
deb-src http://202.38.95.110/ubuntu/ natty-proposed main multiverse restricted universe
deb-src http://202.38.95.110/ubuntu/ natty-security main multiverse restricted universe
deb-src http://202.38.95.110/ubuntu/ natty-updates main multiverse restricted universe
deb http://202.38.95.110/ubuntu/ oneiric main
deb http://202.38.95.110/ubuntu/ natty main multiverse restricted universe
deb http://202.38.95.110/ubuntu/ natty-backports main multiverse restricted universe
deb http://202.38.95.110/ubuntu/ natty-proposed main multiverse restricted universe
deb http://202.38.95.110/ubuntu/ natty-security main multiverse restricted universe
deb http://202.38.95.110/ubuntu/ natty-updates main multiverse restricted universe
deb-src http://202.38.95.110/ubuntu/ natty main multiverse restricted universe
deb-src http://202.38.95.110/ubuntu/ natty-backports main multiverse restricted universe
deb-src http://202.38.95.110/ubuntu/ natty-proposed main multiverse restricted universe
deb-src http://202.38.95.110/ubuntu/ natty-security main multiverse restricted universe
deb-src http://202.38.95.110/ubuntu/ natty-updates main multiverse restricted universe
deb http://202.38.95.110/ubuntu/ oneiric main
2. 创建 /etc/apt/preferences.d/30-oneiric 文件
代码:
gedit /etc/apt/preferences.d/30-oneiric
把下面的内容复制到 /etc/apt/preferences.d/30-oneiric 文件里
代码:
Package: *
Pin: release n=natty
Pin-Priority: 900
Package: *
Pin: release n=oneiric
Pin-Priority: 800
Package: linux-image-generic
Pin: release n=oneiric
Pin-Priority: 900
Package: linux-headers-generic
Pin: release n=oneiric
Pin-Priority: 900
Package: linux-libc-dev
Pin: release n=oneiric
Pin-Priority: 900
Package: module-init-tools
Pin: release n=oneiric
Pin-Priority: 900
Package: procps
Pin: release n=oneiric
Pin-Priority: 900
Package: nvidia-common
Pin: release n=oneiric
Pin-Priority: 900
Pin: release n=natty
Pin-Priority: 900
Package: *
Pin: release n=oneiric
Pin-Priority: 800
Package: linux-image-generic
Pin: release n=oneiric
Pin-Priority: 900
Package: linux-headers-generic
Pin: release n=oneiric
Pin-Priority: 900
Package: linux-libc-dev
Pin: release n=oneiric
Pin-Priority: 900
Package: module-init-tools
Pin: release n=oneiric
Pin-Priority: 900
Package: procps
Pin: release n=oneiric
Pin-Priority: 900
Package: nvidia-common
Pin: release n=oneiric
Pin-Priority: 900
3.然后更新即可,以后可能同步ubuntu11.10的内核了
代码:
apt-get update; apt-get dist-upgrade -y
我在11.04的系统上实测通过,原理上只要是旧的版本都可以通过这种方式可以使用最新的内核啦。但是要记得依据你的系统做相应的修改啊。

作者: Crazier 发布时间: 2011-11-24
懒人一枚
下deb装的。
下deb装的。
作者: remeber 发布时间: 2011-11-24
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28