reference
https://www.cnblogs.com/leebri/p/16786685.html
前往此网站,找到所需的内核
https://kernel.ubuntu.com/~kernel-ppa/mainline/
查看系统架构dpkg --print-architecture
二、下载安装包
注意:下载除lowlatency以外的deb包
三、安装内核
3.1 进入安装包保存目录
将这三个 deb 下载至同一目录
cd ~/Downloads && mkdir kernel && cd ./kernel
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v4.9.100/linux-headers-4.9.100-0409100_4.9.100-0409100.201805160931_all.deb
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v4.9.100/linux-headers-4.9.100-0409100-generic_4.9.100-0409100.201805160931_amd64.deb
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v4.9.100/linux-image-4.9.100-0409100-generic_4.9.100-0409100.201805160931_amd64.deb
cd ~/Downloads/kernel
3.2 安装
sudo dpkg -i *.deb
查看已安装的内核版本dpkg --list | grep linux-image
neu@neu-ubuntu20:~$ dpkg --list | grep linux-image
ii linux-image-4.15.18-041518-generic 4.15.18-041518.201804190330 amd64 Linux kernel image for version 4.15.18 on 64 bit x86 SMP
ii linux-image-4.9.100-0409100-generic 4.9.100-0409100.201805160931 amd64 Linux kernel image for version 4.9.100 on 64 bit x86 SMP
rc linux-image-5.11.0-27-generic 5.11.0-27.29~20.04.1 amd64 Signed kernel image generic
rc linux-image-5.13.0-40-generic 5.13.0-40.45~20.04.1 amd64 Signed kernel image generic
rc linux-image-5.13.0-41-generic 5.13.0-41.46~20.04.1 amd64 Signed kernel image generic
rc linux-image-5.13.0-44-generic 5.13.0-44.49~20.04.1 amd64 Signed kernel image generic
rc linux-image-5.13.0-48-generic 5.13.0-48.54~20.04.1 amd64 Signed kernel image generic
rc linux-image-5.13.0-51-generic 5.13.0-51.58~20.04.1 amd64 Signed kernel image generic
rc linux-image-5.13.0-52-generic 5.13.0-52.59~20.04.1 amd64 Signed kernel image generic
ii linux-image-5.15.0-41-generic 5.15.0-41.44~20.04.1 amd64 Signed kernel image generic
rc linux-image-5.15.0-43-generic 5.15.0-43.46~20.04.1 amd64 Signed kernel image generic
rc linux-image-5.15.0-46-generic 5.15.0-46.49~20.04.1 amd64 Signed kernel image generic
ii linux-image-5.15.0-48-generic 5.15.0-48.54~20.04.1 amd64 Signed kernel image generic
ii linux-image-5.4.0-128-generic 5.4.0-128.144 amd64 Signed kernel image generic
ii linux-image-extra-virtual 5.4.0.128.129 amd64 Extra drivers for Virtual Linux kernel image
ii linux-image-generic 5.4.0.128.129 amd64 Generic Linux kernel image
ii linux-image-generic-hwe-20.04 5.15.0.48.54~20.04.18 amd64 Generic Linux kernel image
可以看到内核版本4.9.100-0409100-generic已成功安装。
3.3 更新
如果直接使用此内核重启,在启动时会出现以下错误:
Kernel Panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
这就需要update-initramfs和更新grub。
将4.9.100-0409100-generic替换你需要的version
sudo update-initramfs -u -k 4.9.100-0409100-generic
修改grub使4.9.100-0409100-generic为默认启动项
sudo nano /etc/default/grub
将GRUB_DEFAULT一项修改为:
“Advanced options for Ubuntu>Ubuntu, with Linux 4.9.100-0409100-generic”
同理,记得把4.9.100-0409100-generic替换你需要的version
image
更新grub
sudo update-grub
四、查看是否安装成功
重启后,查看内核版本。
sudo reboot
uname -r
如果输出为要安装的内核版本,则操作成功。文章来源:https://www.toymoban.com/news/detail-719475.html
neu@neu-ubuntu20:~$ uname -r
4.9.100-0409100-generic文章来源地址https://www.toymoban.com/news/detail-719475.html
到了这里,关于Ubuntu 内核降级到指定版本的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!