实际上Debian12尚未正式发布,但是似乎已经可用了。

升级步骤

参考文章:How to Upgrade from Debian 11 Bullseye to Debian 12 Bookworm

替换软件源

在此之前,你最好确保自己的其他软件处于bullseye的最新版本且工作正常。

sudo sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list

更新并升级所有软件包

sudo apt update && sudo apt full-upgrade

重启

sudo reboot
升级完成后重启你的PC

升级后出现的问题

GRUB里Windows10启动项没了,但是这不算太严重的问题,因为我确实打算全面切换到Linux,尤其是唯一困扰已久的休眠问题已久解决的情况下,FUCK YOU Microsoft!

不过,由于我的硬盘空间不足,我还是不得不至少在笔记本上启动一次Windows以便把必必需的数据无损迁移到Ext4分区。这还需要我去买一块硬盘;)大概得等到下个月发工资的时候了。

恢复grub里的windows10启动项

xfox@ThinkPadE14Gen3:~$ sudo update-grub
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-5.18.0-0.deb11.4-amd64
Found initrd image: /boot/initrd.img-5.18.0-0.deb11.4-amd64
Found linux image: /boot/vmlinuz-5.10.0-20-amd64
Found initrd image: /boot/initrd.img-5.10.0-20-amd64
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
done

注意第八行提示,由于更新后的Grub软件包默认禁用os-prober,我们得手动编辑grub配置文件启用os-prober帮助grub扫描添加Windows启动项。
sudo nano /etc/default/grub
取消对GRUB_DISABLE_OS_PROBER=false的注释并保存

xfox@ThinkPadE14Gen3:~$ sudo update-grub
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-5.18.0-0.deb11.4-amd64
Found initrd image: /boot/initrd.img-5.18.0-0.deb11.4-amd64
Found linux image: /boot/vmlinuz-5.10.0-20-amd64
Found initrd image: /boot/initrd.img-5.10.0-20-amd64
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Windows Boot Manager on /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
done

问题解决

我的升级获益

  1. 困扰我已久的系统休眠可以正常工作了(我一直有预感debian12会解决这个问题,很高兴我的预感的确很准确。)
  2. 笔记本低负载下(比如现在我在写博客)发热明显降低,续航似乎也比Debian11有所增强。
  3. 更漂亮的GRUB启动图片

看来一些人喜欢arch linux的滚动更新也并非没有道理,许多linux发行版的稳定版特别是LTS对新的桌面PC的支持都并不友好,但是这些新设备的支持往往已久被加入更新的软件版本了,对于因此对于自己手头常用的新PC产品并不应该过于执着稳定版,尚未发布的版本往往对新设备用户准备了惊喜/吓。
尽管休眠已经可用,我发现睡眠似乎还是出现睡眠后无法登录的问题,只能强制关机。
但是cat /sys/power/state发现返回值变成了freeze mem disk (在debian11的时候仅仅支持freeze和mem)
参见查看当前内核支持的休眠模式
经手动测试,freeze,mem,模式是正常可用的。
disk模式在测试时被发现电源指示灯闪烁后屏幕恢复休眠瞬间的界面并卡死。(但是我点击KDE休眠选项真的可以正常休眠和唤醒)

未完待续

标签: none

已有 2 条评论

  1. 天灭FireFox 天灭FireFox

    貌似还要改一下源,12 的非自由固件合并进 新分区了
    https://www.debian.org/releases/testing/amd64/release-notes/ch-whats-new.zh-cn.html

    1. 貌似是得改下,但是我是从11直接换源覆盖过来的不改基本也能用。

添加新评论