大网数据广告活动
服务器运维问答

I switched to the zabbly kernel for Ubuntu. Does it make sense to disable generic Ubuntu kernel updates?

· 52CE 我爱测

I have been using the Zabbly kernel for Ubuntu 22.04.4 LTS for several months now and it works great but Ubuntu still wants to install its own, generic kernel and I don't want it. Question one: does the system need the generic ke…

问题原文

原帖链接 · mr.zog · CC BY-SA 4.0

I have been using the Zabbly kernel for Ubuntu 22.04.4 LTS for several months now and it works great but Ubuntu still wants to install its own, generic kernel and I don't want it.

Question one: does the system need the generic kernel (modules, headers) for anything?

Question two: if the answer to question one is no, how do I blacklist the installation of new generic Ubuntu kernels?

I want to prevent the installation of any new Ubuntu kernels.

2024/04/24 update: I'm still being asked to install generic kernel packages.

apt wants to install
linux-headers-generic/jammy-updates 5.15.0.105.102 amd64 [upgradable from: 5.15.0.102.99]
apt-mark hold linux-headers-generic
linux-headers-generic was already set on hold.

已采纳解答

原帖链接 · TECHTE · CC BY-SA 4.0

Question 1: Does the system need the generic kernel?

Maybe, but probably not in your case. The generic kernel provides broad hardware compatibility and serves as the default for Ubuntu. If the Zabby kernel works flawlessly for your system, you likely don't need the generic kernel.

However, there are a few reasons you might still want the generic kernel:

  • Future hardware compatibility: If you add new hardware that requires specific drivers, the generic kernel might have them included, while Zabby might not.
  • Fallback option: In case of an issue with the Zabby kernel, having the generic kernel as a backup allows you to boot and potentially troubleshoot.

Question 2: How to blacklist generic kernel updates?

It's possible to blacklist generic kernel updates, but it's generally not recommended. Kernel updates often contain security fixes and performance improvements. Here's how to do it with caution (proceed only if you're sure):

  1. Be aware of the risks: Disabling updates can leave your system vulnerable.
  2. Identify current kernel version: Use uname -r to find the current kernel version (e.g., 5.15.0-46-generic).
  3. Blacklist packages (careful!): Use two methods (choose one):
    • Using apt: Edit /etc/apt/apt.conf.d/50unattended-upgrades (use sudo nano). In the Unattended-Upgrade::Package-Blacklist section, add the following lines (replace version with yours):
      linux-image-generic-5.15.0-46
      linux-headers-generic-5.15.0-46
      
    • Using dpkg: (For more advanced users) Use sudo dpkg --set-selections hold linux-image-generic linux-headers-generic. This holds all versions of these packages.

Recommendation:

Instead of disabling updates, consider these alternatives:

  • Boot with Zabby: If Zabby works well, configure GRUB to boot by default with the Zabby kernel. You'll still have the generic kernel available in the boot menu if needed.
  • Update strategically: Update the generic kernel occasionally (e.g., monthly) to benefit from security fixes.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2024-04-08)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。