我正在运行 Bullseye(Debian 11?),尝试从 bullseye-backports 安装内核 6.x。我真的不知道如何撤消它。新内核与图形驱动程序和其他一些驱动程序不兼容。我想回到 5.10 内核。
以下是我所做的:
- 将以下内容添加到
/etc/apt/sources.list
deb http://deb.debian.org/debian/ bullseye-backports main contrib non-free
- 运行以下命令:
sudo apt install -t bullseye-backports linux-image-amd64 firmware-misc-nonfree
sudo remove firmware-misc-nonfree
sudo apt -s remove linux-image-amd64
演出apt policy linux-image-amd64
:
linux-image-amd64:
Installed: 5.10.209-2
Candidate: 5.10.209-2
Version table:
6.1.55-1~bpo11+1 100
100 http://deb.debian.org/debian bullseye-backports/main amd64 Packages
*** 5.10.209-2 500
500 http://deb.debian.org/debian bullseye/main amd64 Packages
100 /var/lib/dpkg/status
5.10.205-2 500
500 http://security.debian.org/debian-security bullseye-security/main amd64 Packages
但是,我不确定我当前是否正在使用以下任何一个内核:
$ uname -a
Linux debian 5.10.0-28-amd64 #1 SMP Debian 5.10.209-2 (2024-01-31) x86_64 GNU/Linux
以下是与 Debian 相关的部分/boot/grub/grub.cfg
:
menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-da96684c-0696-43ed-ba36-54d11861e7d4' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root da96684c-0696-43ed-ba36-54d11861e7d4
echo 'Loading Linux 6.1.0-0.deb11.13-amd64 ...'
linux /boot/vmlinuz-6.1.0-0.deb11.13-amd64 root=UUID=da96684c-0696-43ed-ba36-54d11861e7d4 ro noresume quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-6.1.0-0.deb11.13-amd64
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 'gnulinux-advanced-da96684c-0696-43ed-ba36-54d11861e7d4' {
menuentry 'Debian GNU/Linux, with Linux 6.1.0-0.deb11.13-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.0-0.deb11.13-amd64-advanced-da96684c-0696-43ed-ba36-54d11861e7d4' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root da96684c-0696-43ed-ba36-54d11861e7d4
echo 'Loading Linux 6.1.0-0.deb11.13-amd64 ...'
linux /boot/vmlinuz-6.1.0-0.deb11.13-amd64 root=UUID=da96684c-0696-43ed-ba36-54d11861e7d4 ro noresume quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-6.1.0-0.deb11.13-amd64
}
menuentry 'Debian GNU/Linux, with Linux 6.1.0-0.deb11.13-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.0-0.deb11.13-amd64-recovery-da96684c-0696-43ed-ba36-54d11861e7d4' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root da96684c-0696-43ed-ba36-54d11861e7d4
echo 'Loading Linux 6.1.0-0.deb11.13-amd64 ...'
linux /boot/vmlinuz-6.1.0-0.deb11.13-amd64 root=UUID=da96684c-0696-43ed-ba36-54d11861e7d4 ro single noresume
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-6.1.0-0.deb11.13-amd64
}
menuentry 'Debian GNU/Linux, with Linux 5.10.0-28-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.10.0-28-amd64-advanced-da96684c-0696-43ed-ba36-54d11861e7d4' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root da96684c-0696-43ed-ba36-54d11861e7d4
echo 'Loading Linux 5.10.0-28-amd64 ...'
linux /boot/vmlinuz-5.10.0-28-amd64 root=UUID=da96684c-0696-43ed-ba36-54d11861e7d4 ro noresume quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-5.10.0-28-amd64
}
menuentry 'Debian GNU/Linux, with Linux 5.10.0-28-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.10.0-28-amd64-recovery-da96684c-0696-43ed-ba36-54d11861e7d4' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root da96684c-0696-43ed-ba36-54d11861e7d4
echo 'Loading Linux 5.10.0-28-amd64 ...'
linux /boot/vmlinuz-5.10.0-28-amd64 root=UUID=da96684c-0696-43ed-ba36-54d11861e7d4 ro single noresume
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-5.10.0-28-amd64
}
menuentry 'Debian GNU/Linux, with Linux 5.10.0-26-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.10.0-26-amd64-advanced-da96684c-0696-43ed-ba36-54d11861e7d4' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root da96684c-0696-43ed-ba36-54d11861e7d4
echo 'Loading Linux 5.10.0-26-amd64 ...'
linux /boot/vmlinuz-5.10.0-26-amd64 root=UUID=da96684c-0696-43ed-ba36-54d11861e7d4 ro noresume quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-5.10.0-26-amd64
}
menuentry 'Debian GNU/Linux, with Linux 5.10.0-26-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.10.0-26-amd64-recovery-da96684c-0696-43ed-ba36-54d11861e7d4' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root da96684c-0696-43ed-ba36-54d11861e7d4
echo 'Loading Linux 5.10.0-26-amd64 ...'
linux /boot/vmlinuz-5.10.0-26-amd64 root=UUID=da96684c-0696-43ed-ba36-54d11861e7d4 ro single noresume
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-5.10.0-26-amd64
}
menuentry 'Debian GNU/Linux, with Linux 5.10.0-22-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.10.0-22-amd64-advanced-da96684c-0696-43ed-ba36-54d11861e7d4' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root da96684c-0696-43ed-ba36-54d11861e7d4
echo 'Loading Linux 5.10.0-22-amd64 ...'
linux /boot/vmlinuz-5.10.0-22-amd64 root=UUID=da96684c-0696-43ed-ba36-54d11861e7d4 ro noresume quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-5.10.0-22-amd64
}
menuentry 'Debian GNU/Linux, with Linux 5.10.0-22-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.10.0-22-amd64-recovery-da96684c-0696-43ed-ba36-54d11861e7d4' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root da96684c-0696-43ed-ba36-54d11861e7d4
echo 'Loading Linux 5.10.0-22-amd64 ...'
linux /boot/vmlinuz-5.10.0-22-amd64 root=UUID=da96684c-0696-43ed-ba36-54d11861e7d4 ro single noresume
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-5.10.0-22-amd64
}
}
以下是vmlinuz*
我实际拥有的文件/boot/
:
$ ls -1 /boot/vmlinuz*
/boot/vmlinuz-5.10.0-22-amd64
/boot/vmlinuz-5.10.0-26-amd64
/boot/vmlinuz-5.10.0-28-amd64
/boot/vmlinuz-6.1.0-0.deb11.13-amd64
如果我在启动时从 grub 菜单中明确选择内核,则一切正常5.10.0-28
。我认为我必须有效地从中删除启动项grub.cfg
、6.1x
内核相关文件和标头。
我担心如果我手动执行此操作,我会弄乱 Debian 包管理系统的依赖项列表。而且,我不再需要它了bullseye-backports
。
我删除了 中的条目/etc/apt/sources.list
,然后apt update -y
删除了apt upgrade
。这没有帮助。不知道该怎么做。
答案1
您的uname
显示5.10.209-2
表明您正在运行此版本。您可以使用 删除特定的内核包apt purge linux-image-???specific-version??-amd64
,它应该会grub.cfg
自动更新。您可以使用 查找已安装的内核包的名称dpkg --list |grep linux-image