Skip to main content
Community Scripts logo
Skip to Content
Tools & Add-onsPVE Tools

PVE Kernel Pin

Pin the Proxmox VE host to one installed kernel version, or remove an existing pin.

A pinned kernel is the one the host boots, even after newer kernels are installed. kernel-pin.sh is a front end for proxmox-boot-tool kernel pin and proxmox-boot-tool kernel unpin. Use it when a new kernel breaks a driver or passthrough and you want to stay on the last working one.

Website entry: kernel-pin. Source: tools/pve/kernel-pin.sh.

Run

In the Proxmox VE host shell, as root:

bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/kernel-pin.sh)"

Prompts

DialogChoicesEffect
"This will Pin/Unpin Kernel Images, Proceed?"Yes / NoThe answer is not evaluated; the script continues in both cases.
"Select Kernel to pin: Cancel to Unpin any Kernel" (radio list; the title shows the running kernel)One installed kernelGoes on to the confirmation.
Cancel, or OK without a selectionShows "No Kernel Selected", runs proxmox-boot-tool kernel unpin, prints proxmox-boot-tool kernel list and exits.
"Would you like to pin the ... Kernel?"Yes / NoThe answer is not evaluated; the kernel is pinned in both cases.

Because two of the three dialogs do not act on No, the only ways out without a change are Ctrl+C or closing the terminal. Cancelling the kernel list is not neutral: it removes an existing pin.

What it does

The list is built from installed packages whose name matches kernel-.*-pve in dpkg --list.

ActionCommand
Pinproxmox-boot-tool kernel pin <version>
Unpinproxmox-boot-tool kernel unpin

Afterwards the script prints proxmox-boot-tool kernel list and the word REBOOT. The pin takes effect at the next boot; the script does not reboot.

Undo

Run the script again and press Cancel in the kernel list, or run:

proxmox-boot-tool kernel unpin

Environment variables

VariableDefaultPurpose
COMMUNITY_SCRIPTS_CORE_URLhttps://raw.githubusercontent.com/community-scripts/core/mainBase URL the script loads api/api.func from.

Limits

  • While a kernel is pinned the host keeps booting it, so kernel security updates do not take effect until you unpin.
  • Do not remove the pinned kernel with PVE Kernel Clean.