I was running Bullseye (Debian 11?), tried to install kernel 6.x from the bullseye-backports. I am really not sure how to undo it. The new kernel does not work with the graphics driver and a few more. I want to go back to 5.10 kernel.
Here are what I have done:
- Added the following to the
/etc/apt/sources.list
deb http://deb.debian.org/debian/ bullseye-backports main contrib non-free
- Ran these commands:
sudo apt install -t bullseye-backports linux-image-amd64 firmware-misc-nonfree
sudo remove firmware-misc-nonfree
sudo apt -s remove linux-image-amd64
The apt policy linux-image-amd64
shows:
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
However, I am not sure if I am currently using any of those kernels:
$ uname -a
Linux debian 5.10.0-28-amd64 #1 SMP Debian 5.10.209-2 (2024-01-31) x86_64 GNU/Linux
The following is the Debian-related part of /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
}
}
Here are the vmlinuz*
files I actually have under /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
Everything works if I explicitly choose the 5.10.0-28
kernel from the grub menu on boot. I think I have to effectively remove the boot entry from grub.cfg
, the 6.1x
kernel-related files and headers.
I am worried if I do so manually, I will mess up the dependency list for Debian's package management system. And, I do not need the bullseye-backports
any more.
I removed the entry from /etc/apt/sources.list
and apt update -y
followed by apt upgrade
. It did not help. Not sure what should be done.
Your
uname
shows5.10.209-2
so you are running this version. You can remove a specific kernel package withapt purge linux-image-???specific-version??-amd64
, it should updategrub.cfg
automatically. You can find the name of installed kernel packages withdpkg --list |grep linux-image