本文主要记录Debian 11 Bullseye 升级 Debian 12 Bookworm
root@cn-bj-r1.ysicing.local:~$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
apt update
apt upgrade -y
apt dist-upgrade -y
apt autoclean
apt autoremove -y
/etc/apt/sources.list
non-free
),如部分驱动,都被转移到新组件目录: 非自由固件(non-free-firmware
)# 替换 bullseye 为 bookworm
sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list
sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list.d/*.list
# 新增 non-free-firmware 可选, 但建议
sed -i 's/non-free/non-free non-free-firmware/g' /etc/apt/sources.list
cat > /etc/apt/sources.list <<EOF
deb http://mirrors.tencent.com/debian/ bookworm main contrib non-free non-free-firmware
deb http://mirrors.tencent.com/debian/ bookworm-updates main contrib non-free non-free-firmware
deb http://mirrors.tencent.com/debian/ bookworm-backports main contrib non-free non-free-firmware
deb http://mirrors.tencent.com/debian/ bookworm-proposed-updates main contrib non-free non-free-firmware
deb http://mirrors.tencent.com/debian-security bookworm-security main contrib non-free non-free-firmware
EOF
腾讯云内网
cat > /etc/apt/sources.list <<EOF
deb http://mirrors.tencentyun.com/debian/ bookworm main contrib non-free non-free-firmware
deb http://mirrors.tencentyun.com/debian/ bookworm-updates main contrib non-free non-free-firmware
deb http://mirrors.tencentyun.com/debian/ bookworm-backports main contrib non-free non-free-firmware
deb http://mirrors.tencentyun.com/debian/ bookworm-proposed-updates main contrib non-free non-free-firmware
deb http://mirrors.tencentyun.com/debian-security bookworm-security main contrib non-free non-free-firmware
EOF
完成上述操作后,再次执行更新系统命令
用Debian都知道的
keep the local version
即可apt update
apt upgrade -y
apt dist-upgrade -y
# 在升级完成没报错后执行,也可以在reboot后执行
apt autoclean
apt autoremove -y
reboot
确定查看系统版本
root@cn-bj-r1.ysicing.local ~ # cat /etc/debian_version
12.0
确定查看系统版本
root@cn-bj-r1.ysicing.local:~$ uname -a
Linux cn-bj-r1.ysicing.local 6.1.0-9-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.27-1 (2023-05-08) x86_64 GNU/Linux