概述
Ubuntu系统使用固定内核版本启动方法
前言
Ubuntu系统使用固定内核版本启动的方式是在 如下Ubuntu系统版本下测试。
Linux xzx-ThinkStation-P350 5.4.0-124-generic #140~18.04.1-Ubuntu SMP Fri Aug 5 11:43:34 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
1.查看当前ubuntu系统内核版本列表
sudo dpkg --get-selections | grep linux-image
# 查询结果
linux-image-5.4.0-124-generic install
linux-image-5.4.0-125-generic install
linux-image-5.4.0-126-generic install
linux-image-5.4.0-84-generic deinstall
linux-image-generic-hwe-18.04 install
2.固定系统启动时使用的内核版本号
# 1.查看当前系统使用的内核版本号
uname -r
# 查看结果
5.4.0-124-generic
# 2.打开配置文件
sudo vim /etc/default/grub
# 3.配置文件内容如下,后面无关的配置内容省略。
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'
# 设置系统启动固定的内核版本,将当前系统使用的内核版本号设置为系统启动指定的内核版本号
GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux 5.4.0-124-generic"
GRUB_TIMEOUT_STYLE=hidden
# 设置等待时间
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
.......
后面无关的配置内容省略
.......
.......
# 3.更新配置文件生效
sudo update-grub
3.重启后查看当前系统启动版本号是否与配置一致
# 查看当前使用内核版本号
uname -r
# 查看结果
5.4.0-124-generic
最后
以上就是温暖裙子为你收集整理的Ubuntu系统设置启动系统内核版本号Ubuntu系统使用固定内核版本启动方法的全部内容,希望文章能够帮你解决Ubuntu系统设置启动系统内核版本号Ubuntu系统使用固定内核版本启动方法所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复