我正在运行 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
5.10.0-28
如果我在启动时从 grub 菜单中明确选择内核,一切都会正常。我想我必须有效地删除启动项grub.cfg
、6.1x
内核相关的文件和头文件。
我担心如果我手动执行此操作,我会弄乱 Debian 包管理系统的依赖项列表。而且,我不再需要了bullseye-backports
。
我删除了条目/etc/apt/sources.list
,apt update -y
然后是apt upgrade
. 这没有帮助。不知道应该做什么。
你的
uname
显示5.10.209-2
表明你正在运行这个版本。您可以使用 删除特定的内核包apt purge linux-image-???specific-version??-amd64
,它应该会自动更新grub.cfg
。您可以使用以下命令找到已安装内核包的名称dpkg --list |grep linux-image