Liunx(Ubuntu16.04-更新内核到-4.9.9)

1.查看目前系统 kernel 情况

uname -a
Linux xenial64-157 4.4.0-53-generic #74-Ubuntu SMP Fri Dec 2 15:59:10 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

 2.下载 Ubuntu 编译好的内核

ubuntu 编译好的最新版本内核地址

http://kernel.ubuntu.com/~kernel-ppa/mainline

获取最新 4.9.9 的内核

很多命令最好直接使用 root 操作

sudo su
cd
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.9.9/linux-headers-4.9.9-040909_4.9.9-040909.201702090333_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.9.9/linux-headers-4.9.9-040909-generic_4.9.9-040909.201702090333_amd64.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.9.9/linux-image-4.9.9-040909-generic_4.9.9-040909.201702090333_amd64.deb

3.安装内核

dpkg -i *.deb

4.卸载旧内核

查询目前安装的内核
dpkg -l | grep linux-image
ii linux-image-4.4.0-53-generic 4.4.0-53.74 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii linux-image-4.9.9-040909-generic 4.9.9-040909.201702090333 amd64 Linux kernel image for version 4.9.9 on 64 bit x86 SMP
ii linux-image-virtual 4.4.0.53.56 amd64 This package will always depend on the latest minimal generic kernel image.

卸载旧内核
apt remove linux-image-4.4.0-53-generic

5.更新启动引导

update-grub
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.9.9-040909-generic
Found initrd image: /boot/initrd.img-4.9.9-040909-generic
done

6.确认最新内核安装情况

ls /boot/vmlinuz*
/boot/4.9.0-040900-generic

7.重启

     reboot

8.重启后验证

uname -a
Linux xenial64-157 4.9.9-040909-generic #201702090333 SMP Thu Feb 9 08:35:27 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

9.开启最新的拥塞控制算法

重启后,修改内核参数
vim /etc/sysctl.conf
net.core.default_qdisc=fq
net.ipv4.tcp_congestion_control=bbr
生效
sysctl -p
net.ipv4.tcp_congestion_control = bbr
sysctl net.ipv4.tcp_available_congestion_control
net.ipv4.tcp_available_congestion_control = bbr cubic reno

 

 

文章来自:https://favoorr.github.io/2017/02/11/update-kernel-for-ubuntu/