您的位置:首页 > 其它

ubuntu升级系统内核

2017-12-08 16:56 519 查看

一、下载内核包升级

1、ubuntu的版本

root@ncnode02:~# cat /etc/issue
Ubuntu 16.04 LTS \n \l


2、内核版本

root@ncnode02:~# uname -sr
Linux 4.4.0-21-generic


3、升级内核

要升级 Ubuntu 16.04 的内核,打开 http://kernel.ubuntu.com/~kernel-ppa/mainline/ 并选择列表中需要的版本(选择稳定版本 4.10.1)。

centos内核地址 https://www.kernel.org/pub/linux/kernel/v3.0/

接下来,根据你的系统架构下载 .deb 文件:

对于 64 位系统:

# wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10.1/linux-headers-4.10.1-041001_4.10.1-041001.201702260735_all.deb # wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10.1/linux-headers-4.10.1-041001-generic_4.10.1-041001.201702260735_amd64.deb # wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10.1/linux-image-4.10.1-041001-generic_4.10.1-041001.201702260735_amd64.deb


这是 32 位系统:

# wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10.1/linux-headers-4.10.1-041001_4.10.1-041001.201702260735_all.deb # wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10.1/linux-headers-4.10.1-041001-generic_4.10.1-041001.201702260735_i386.deb # wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10.1/linux-image-4.10.1-041001-generic_4.10.1-041001.201702260735_i386.deb


下载完成这些所有内核文件后,如下安装:

# dpkg -ivh *.deb


安装完成后,重启并验证新的内核已经被使用了:

root@ncnode02:~# uname -sr
Linux 4.4.0-101-generic


二、直接apt升级

修改/etc/apt/sources.list使用官方源

内容:

deb http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
deb http://cn.archive.ubuntu.com/ubuntu/ xenial universe
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates universe
deb http://cn.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse

apt-get update
# apt-get install linux-headers-4.4.0-101 linux-headers-4.4.0-101-generic linux-image-4.4.0-101-generic(指定内核版本升级)


重启服务器用uname -sr查看内核版本

查看系统中有哪些内核

dpkg --get-selections |grep linux


移除内核

apt purge linux-image-4.4.0-040400-generic
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  升级 内核 ubuntu