> 文章列表 > 内核自动更新的补救和永久固定内核措施

内核自动更新的补救和永久固定内核措施

内核自动更新的补救和永久固定内核措施

一、解决自动更新内核

服务器重新启动后,内核可能被自动更新,这就会造成开机后服务器有些服务无法正常使用
查看显卡状态:nvidia-smi 会有报错,作为深度学习算法工程师,最不能忍的就是自己辛辛苦苦安装的环境被破坏。

~$ nvidia-smi
NVIDIA-SMI has failed because it couldn\'t communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

了查看目前使用的内核版本,发现是147了,之前使用的146。

1、查看当前的内核版本

administrator@administrator-X10DRG:~$ uname -a
Linux administrator-X10DRG 5.4.0-147-generic #164~18.04.1-Ubuntu SMP Tue Apr 4 00:20:20 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

不要慌,我们可以通过配置文件,改回来。(可以不用远程让人操作)

2、查看所有安装的内核版本

grep menuentry /boot/grub/grub.cfg

从==menuentry \'Ubuntu,==作为关键字,可