升级内核

好久不见啊亲们,小橘回来啦,最近加班实在太累,不知道有没有宝子在玩互联网的,我特别想学习视频剪辑类的知识,来记录我这苟延残喘的小日子。

言归正传,今天咱们聊聊如何升级内核吧!

环境准备:

apt update 
apt search linux image | grep 5.15
apt install linux-image-unsigned-5.15.0-94-generic
update-grub
reboot 
uname -r

1. 固定内核版本

1.1. 修改grub配置文件固定内核版本

uname -r

#复制内核版本信息

5.4.0-88-generic(按查找版本)

#编辑内核配置文件

vim /etc/default/grub

#修改本行,格式照抄,最后版本修改为自己的即可,修改完保存退出。

GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux 5.4.0-88-generic"

#更新grub

update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.0-89-generic
Found initrd image: /boot/initrd.img-5.4.0-89-generic
Found linux image: /boot/vmlinuz-5.4.0-88-generic
Found initrd image: /boot/initrd.img-5.4.0-88-generic
Adding boot menu entry for UEFI Firmware Settings
done

1.2. apt-mark固定内核

apt-mark hold 版本号

1.3. 禁止apt自动更新

vim /etc/apt/apt.conf.d/10periodic
APT::Periodic::Update-Package-Lists "0";   #这里的1改成0
APT::Periodic::Download-Upgradeable-Packages "0";
APT::Periodic::AutocleanInterval "0";

1.4. ib网卡驱动安装(安装了新版本内核的内核头文件)

apt install linux-headers-$(uname -r)

 

posted @ 2025-01-22 14:15  lala的小橘  阅读(38)  评论(0)    收藏  举报