前置き
自分用のメモなのでポイントだけ書いてあります。真似される場合は自己責任でお願いします。
カーネルだけbackportsのを入れたいと思ったとき
今はDebian 13 trixieを普段遣いしていますが、さまざまな理由でカーネルだけ新しいのを使いたいということもあります。
まず、backportsのURLをsources.listに追加しましょう。 /etc/apt/sources.list.d/に拡張子listで作成すれば含まれます。
私は面倒なのでbackports以外も全部入れてしまっています。何を追加するかはご自身で選んでください。
$ cat /etc/apt/sources.list.d/debian13-trixie.list
## Debian 13
deb http://httpredir.debian.org/debian trixie main contrib non-free non-free-firmware
deb http://httpredir.debian.org/debian trixie-updates main contrib non-free non-free-firmware
deb http://httpredir.debian.org/debian trixie-proposed-updates main contrib non-free non-free-firmware
deb http://httpredir.debian.org/debian trixie-backports main contrib non-free non-free-firmware
deb http://deb.debian.org/debian-security/ trixie-security main contrib non-free non-free-firmware
#deb-src http://deb.debian.org/debian-security/ trixie-security main non-free-firmware updates
apt updateしておきます。
$ sudo apt update
backportsを指定してインストールします。
$ sudo apt -t trixie-backports install linux-image-amd64
結論
6.12ではなくて、6.16のカーネルがインストールされました。
(AsIs)$ dpkg -l linux-image* | grep ^ii
ii linux-image-6.12.57+deb13-amd64 6.12.57-1 amd64 Linux 6.12 for 64-bit PCs (signed)
ii linux-image-6.16.3+deb13-amd64 6.16.3-1~bpo13+1 amd64 Linux 6.16 for 64-bit PCs (signed)
ii linux-image-amd64 6.16.3-1~bpo13+1 amd64 Linux for 64-bit PCs (meta-package)
簡単ですね。