1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

proxmox-boot-tool で利用するカーネルを指定する

1
Posted at

proxmox-boot-tool は起動カーネルを指定するだけです。
カーネル原因のトラブル・切り分けには便利ですが、他のパッケージ含めたバージョン固定はできません。
そのような場合はPOM(proxmox offlien mirror)Toolを利用します。

以下の記事・脆弱性を契機にPVEのバージョンアップをした人も多いかもしれません。

記事執筆次点でno-subscriptionリポジトリではproxmox-kernel-7.0が降ってきます。
Proxmox デフォルトではインストールされている最新のカーネルで起動するように設定されています。
proxmox-boot-toolを使うと、起動カーネルを指定できます。

事前確認

現時点でno-subscriptionリポジトリは以下のようになっていました。
7.0.0-3で起動しているので、6.17.13-6で起動するようにしてみます。

root@handson01:~# pveversion -v
proxmox-ve: 9.1.0 (running kernel: 7.0.0-3-pve)
pve-manager: 9.1.9 (running version: 9.1.9/ee7bad0a3d1546c9)
proxmox-kernel-helper: 9.0.4
proxmox-kernel-7.0: 7.0.0-3
proxmox-kernel-7.0.0-3-pve-signed: 7.0.0-3
proxmox-kernel-6.17: 6.17.13-6
proxmox-kernel-6.17.13-6-pve-signed: 6.17.13-6
proxmox-kernel-6.17.13-4-pve-signed: 6.17.13-4
proxmox-kernel-6.17.13-1-pve-signed: 6.17.13-1
proxmox-kernel-6.17.4-2-pve-signed: 6.17.4-2
proxmox-kernel-6.17.2-2-pve-signed: 6.17.2-2
root@handson01:~#
root@handson01:~# uname -r
7.0.0-3-pve
root@handson01:~#
root@handson01:~# proxmox-boot-tool kernel list
Manually selected kernels:
None.

Automatically selected kernels:
6.17.13-6-pve
7.0.0-3-pve
root@handson01:~#

ちなみに、proxmox-boot-tool kernel list6.17.13-6-pveが表示されてますが、これはboot候補として選んでいるカーネルです。

起動カーネルを固定する場合

コマンド

refreshはESP同期していない場合には省略可能です。
設定しただけなので、設定後には再起動必要です。

proxmox-boot-tool kernel pin 6.17.13-6-pve
proxmox-boot-tool refresh

実行例

このPVEノードではESP同期してないので、refreshが空振りしています。

root@handson01:~#
root@handson01:~# proxmox-boot-tool kernel pin 6.17.13-6-pve
proxmox-boot-tool refresh
Setting '6.17.13-6-pve' as grub default entry and running update-grub.
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-7.0.0-3-pve
Found initrd image: /boot/initrd.img-7.0.0-3-pve
Found linux image: /boot/vmlinuz-6.17.13-6-pve
Found initrd image: /boot/initrd.img-6.17.13-6-pve
Found linux image: /boot/vmlinuz-6.17.13-4-pve
Found initrd image: /boot/initrd.img-6.17.13-4-pve
Found linux image: /boot/vmlinuz-6.17.13-1-pve
Found initrd image: /boot/initrd.img-6.17.13-1-pve
Found linux image: /boot/vmlinuz-6.17.4-2-pve
Found initrd image: /boot/initrd.img-6.17.4-2-pve
Found linux image: /boot/vmlinuz-6.17.2-2-pve
Found initrd image: /boot/initrd.img-6.17.2-2-pve
Found linux image: /boot/vmlinuz-6.14.11-7-pve
Found initrd image: /boot/initrd.img-6.14.11-7-pve
Found linux image: /boot/vmlinuz-6.14.11-6-pve
Found initrd image: /boot/initrd.img-6.14.11-6-pve
Found linux image: /boot/vmlinuz-6.14.11-5-pve
Found initrd image: /boot/initrd.img-6.14.11-5-pve
Found linux image: /boot/vmlinuz-6.14.11-4-pve
Found initrd image: /boot/initrd.img-6.14.11-4-pve
Found linux image: /boot/vmlinuz-6.14.11-3-pve
Found initrd image: /boot/initrd.img-6.14.11-3-pve
Found linux image: /boot/vmlinuz-6.14.8-2-pve
Found initrd image: /boot/initrd.img-6.14.8-2-pve
Found linux image: /boot/vmlinuz-6.8.12-13-pve
Found initrd image: /boot/initrd.img-6.8.12-13-pve
Found linux image: /boot/vmlinuz-6.8.12-9-pve
Found initrd image: /boot/initrd.img-6.8.12-9-pve
Found memtest86+ 64bit EFI image: /boot/memtest86+x64.efi
Found memtest86+ 32bit EFI image: /boot/memtest86+ia32.efi
Found memtest86+ 64bit image: /boot/memtest86+x64.bin
Found memtest86+ 32bit image: /boot/memtest86+ia32.bin
Adding boot menu entry for UEFI Firmware Settings ...
done
Running hook script 'proxmox-auto-removal'..
Running hook script 'zz-proxmox-boot'..
Re-executing '/etc/kernel/postinst.d/zz-proxmox-boot' in new private mount namespace..
No /etc/kernel/proxmox-boot-uuids found, skipping ESP sync.
root@handson01:~#
root@handson01:~# proxmox-boot-tool kernel list
Manually selected kernels:
None.

Automatically selected kernels:
6.17.13-6-pve
7.0.0-3-pve

Pinned kernel:
6.17.13-6-pve
root@handson01:~#

再起動後は以下

root@handson01:~# uname -r
6.17.13-6-pve
root@handson01:~#
root@handson01:~#
root@handson01:~# pveversion -v
proxmox-ve: 9.1.0 (running kernel: 6.17.13-6-pve)

1回だけ指定したい場合

切り分けなどのために次回起動のみ指定したい場合。

--next-bootを追加します。

proxmox-boot-tool kernel pin 6.17.13-6-pve --next-boot
proxmox-boot-tool refresh

固定をやめて自動選択にしたい場合

固定にしたまま、いつまでも同じ(古い)カーネルを継続利用するのはトラブルの原因です。
問題解消後は自動選択へ戻す運用を推奨します。

proxmox-boot-tool kernel unpin
proxmox-boot-tool refresh

proxmox-boot-tool statusのエラー

proxmox-boot-tool statusを実行すると以下のようにエラーが出ます。
ESP同期なしでは出力されるエラーなので無視しでOKです。

root@handson01:~# proxmox-boot-tool status
Re-executing '/usr/sbin/proxmox-boot-tool' in new private mount namespace..
E: /etc/kernel/proxmox-boot-uuids does not exist.

CVE-2026-31431 Copy Fail のタイミングではどうすれば?

古いバージョンを使っていて、CVE-2026-31431 Copy Fail 対応済みカーネルにしたいが、7.0はまだちょっと…な場合、以下の流れだと思います。

  • 通常通りパッケージをアップデート
  • proxmox-boot-toolで6.0系の対応済み6.17.13-6を指定
  • 再起動
  • 7.0系が安定してきたらunpinして通常運用

最後に

固定してしまったことを忘れ、「aptとしては新しいカーネルダウンロードできてる!ヨシッ!」となり、古いカーネルのまま脆弱性・不具合を踏むとかありそうなので、気を付けてください。

参考

https://pve.proxmox.com/wiki/Host_Bootloader
https://pve.proxmox.com/wiki/Recover_From_Grub_Failure

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?