升级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@H_301_15@-ppa/mainline/v4.13.7/下载3个补丁:
0001@H_301_15@-base@H_301_15@-packaging.patch
0002@H_301_15@-debian@H_301_15@-changelog.patch
0003@H_301_15@-configs@H_301_15@-based@H_301_15@-on@H_301_15@-Ubuntu-4.13.0-11.12.patch

二、打补丁

$patch @H_301_15@-p1 < ../0001@H_301_15@-base@H_301_15@-packaging.patch
$patch @H_301_15@-p1 < ../0002@H_301_15@-debian@H_301_15@-changelog.patch
$patch @H_301_15@-p1 < ../0003@H_301_15@-configs@H_301_15@-based@H_301_15@-on@H_301_15@-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@H_301_15@-cloud@H_301_15@-tools-4.13.7-041307_4.13.7-041307.201710141430_amd64.deb
linux@H_301_15@-cloud@H_301_15@-tools-4.13.7-041307@H_301_15@-generic_4.13.7-041307.201710141430_amd64.deb
linux@H_301_15@-headers-4.13.7-041307_4.13.7-041307.201710141430_all.deb
linux@H_301_15@-headers-4.13.7-041307@H_301_15@-generic_4.13.7-041307.201710141430_amd64.deb
linux@H_301_15@-image-4.13.7-041307@H_301_15@-generic_4.13.7-041307.201710141430_amd64.deb
linux@H_301_15@-image@H_301_15@-extra-4.13.7-041307@H_301_15@-generic_4.13.7-041307.201710141430_amd64.deb
linux@H_301_15@-tools-4.13.7-041307_4.13.7-041307.201710141430_amd64.deb
linux@H_301_15@-tools-4.13.7-041307@H_301_15@-generic_4.13.7-041307.201710141430_amd64.deb

四、替换

按顺序:

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

五、验证

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

猜你在找的Ubuntu相关文章