症状:
内核更新可能会由于内核与驱动不匹配,导致系统无限重启
1.
方式一(apt命令):
#查看已安装的内核
sudo dpkg --get-selections | grep linux
#查看正在使用的内核
uname -r
#使用apt命令禁止内核更新
sudo apt-mark hold linux-image-4.4.0-21-generic
sudo apt-mark hold linux-image-extra-4.4.0-21-generic
dpkg --list | grep linux-image
dpkg --list | grep linux-headers
dpkg --list | grep linux-modules
apt-mark hold linux-image-5.4.0-70-generic
apt-mark hold linux-headers-5.4.0-70-generic
apt-mark hold linux-modules-extra-5.4.0-70-generic
#重启内核更新
sudo apt-mark unhold linux-image-4.4.0-21-generic
sudo apt-mark unhold linux-image-extra-4.4.0-21-generic
方式二(修改配置文件):
sudo vim /etc/apt/apt.conf.d/10periodic
sudo vim /etc/apt/apt.conf.d/20auto-upgrades
#关闭自动更新
APT::Periodic::Update-Package-Lists "0";
APT::Periodic::Download-Upgradeable-Packages "0";
APT::Periodic::AutocleanInterval "0";
APT::Periodic::Unattended-Upgrade "0";
#开启自动更新
APT::Periodic::Update-Package-Lists "2";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "0";
APT::Periodic::Unattended-Upgrade "1";
版权说明 : 本文为转载文章, 版权归原作者所有 版权申明
原文链接 : https://blog.csdn.net/kwame211/article/details/122193755
内容来源于网络,如有侵权,请联系作者删除!