升级ubuntu 16.10内核到v4.13.7

前端之家收集整理的这篇文章主要介绍了升级ubuntu 16.10内核到v4.13.7前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

首先从http://cn.ubuntu.com/download/下载ubuntu 16.10 amd64版并安装好。

一、下载Ubuntu内核源码

$git clone git://git.launchpad.net/~ubuntu-kernel-test/ubuntu/+source/linux/+git/mainline-crack -b v4.13.7
接着在kernel.ubuntu.com/~kernel-ppa/mainline/v4.13.7/下载3个补丁:
0001-base-packaging.patch
0002-debian-changelog.patch
0003-configs-based-on-Ubuntu-4.13.0-11.12.patch

二、打补丁

$patch -p1 < ../0001-base-packaging.patch
$patch -p1 < ../0002-debian-changelog.patch
$patch -p1 < ../0003-configs-based-on-Ubuntu-4.13.0-11.12.patch

三、将内核做成*.deb包

$sudo apt-get install kernel-package fakeroot build-essential libssl-dev git kernel-wedge debhelper pciutils-dev libpci-dev
$chmod a+x debian/rules
$chmod a+x debian/scripts/*
$chmod a+x debian/scripts/misc/*
$fakeroot debian/rules clean
$fakeroot debian/rules binary-headers binary-generic binary-perarch   //quicker build
或者
$fakeroot debian/rules binary //if you need linux-tools or lowlatency kernel,run instead:

如果成功,将生成8个*.deb包:

$cd ..
$ls *.deb
linux-cloud-tools-4.13.7-041307_4.13.7-041307.201710141430_amd64.deb
linux-cloud-tools-4.13.7-041307-generic_4.13.7-041307.201710141430_amd64.deb
linux-headers-4.13.7-041307_4.13.7-041307.201710141430_all.deb
linux-headers-4.13.7-041307-generic_4.13.7-041307.201710141430_amd64.deb
linux-image-4.13.7-041307-generic_4.13.7-041307.201710141430_amd64.deb
linux-image-extra-4.13.7-041307-generic_4.13.7-041307.201710141430_amd64.deb
linux-tools-4.13.7-041307_4.13.7-041307.201710141430_amd64.deb
linux-tools-4.13.7-041307-generic_4.13.7-041307.201710141430_amd64.deb

四、替换

按顺序:

$sudo dpkg -i linux-headers-4.13.7-041307_4.13.7-041307.201710141430_all.deb
$sudo dpkg -i linux-headers-4.13.7-041307-generic_4.13.7-041307.201710141430_amd64.deb
$sudo dpkg -i linux-image-4.13.7-041307-generic_4.13.7-041307.201710141430_amd64.deb
$sudo dpkg -i linux-image-extra-4.13.7-041307-generic_4.13.7-041307.201710141430_amd64.deb
$sudo apt install -f
$sudo dpkg -i linux-tools-4.13.7-041307_4.13.7-041307.201710141430_amd64.deb
$sudo dpkg -i linux-tools-4.13.7-041307-generic_4.13.7-041307.201710141430_amd64.deb
$sudo apt install -f
$sudo dpkg -i linux-cloud-tools-4.13.7-041307_4.13.7-041307.201710141430_amd64.deb
$sudo dpkg -i linux-cloud-tools-4.13.7-041307-generic_4.13.7-041307.201710141430_amd64.deb
$sudo reboot

五、验证

重启后执行uanme -a 命令,查看内核版本。

原文链接:https://www.f2er.com/ubuntu/350838.html

猜你在找的Ubuntu相关文章