It is not possible to uninstall a locally built RPI kernel
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
flash-kernel (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
# latest Ubuntu 22.04
ubuntu@ubuntu:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_
DISTRIB_
DISTRIB_
# latest Ubuntu kernel
ubuntu@ubuntu:~$ uname -a
Linux ubuntu 5.15.0-1027-raspi #29-Ubuntu SMP PREEMPT Mon Apr 3 10:12:21 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux
ubuntu@ubuntu:~$ ls -la /boot/vmlinuz*
lrwxrwxrwx 1 root root 25 May 6 10:05 /boot/vmlinuz -> vmlinuz-
-rw------- 1 root root 10338087 Apr 3 09:39 /boot/vmlinuz-
ubuntu@ubuntu:~$ ls -la /boot/firmware/
-rwxr-xr-x 1 root root 10338087 May 8 22:09 /boot/firmware/
-rwxr-xr-x 1 root root 10338087 May 8 22:09 /boot/firmware/
# install locally built kernel
ubuntu@ubuntu:~$ ls *.deb
linux-headers-
linux-image-
linux-libc-
ubuntu@ubuntu:~$ sudo dpkg -i *.deb
# Reboot the system
ubuntu@ubuntu:~$ sudo reboot
# Check kernel version, it is the local one
ubuntu@ubuntu:~$ uname -a
Linux ubuntu 5.15.98-rt62-raspi #1 SMP PREEMPT_RT Sat May 6 20:53:20 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux
ubuntu@ubuntu:~$ ls -la /boot/vmlinuz*
lrwxrwxrwx 1 root root 25 May 6 10:05 /boot/vmlinuz -> vmlinuz-
-rw------- 1 root root 10338087 Apr 3 09:39 /boot/vmlinuz-
-rw-r--r-- 1 root root 10403897 May 6 20:53 /boot/vmlinuz-
lrwxrwxrwx 1 root root 25 May 8 22:19 /boot/vmlinuz.old -> vmlinuz-
ubuntu@ubuntu:~$ ls -la /boot/firmware/
-rwxr-xr-x 1 root root 10403897 May 8 22:14 /boot/firmware/
-rwxr-xr-x 1 root root 10338087 May 8 22:09 /boot/firmware/
# remove local kernel
ubuntu@ubuntu:~$ sudo dpkg -r linux-image-
(Reading database ... 141758 files and directories currently installed.)
Removing linux-image-
update-initramfs: Deleting /boot/initrd.
Using DTB: bcm2711-rpi-4-b.dtb
flash-kernel: Kernel 5.15.98-rt62-raspi has been removed.
flash-kernel: Flashing the remaining highest-versioned kernel (5.15.0-
Ignoring old or unknown version 5.15.98-rt62-raspi (latest is 5.15.0-1027-raspi)
# check whether local kernel is removed, it is still there under /boot/firmware/
ubuntu@ubuntu:~$ ls -la /boot/vmlinuz*
lrwxrwxrwx 1 root root 25 May 6 10:05 /boot/vmlinuz -> vmlinuz-
-rw------- 1 root root 10338087 Apr 3 09:39 /boot/vmlinuz-
lrwxrwxrwx 1 root root 25 May 8 22:19 /boot/vmlinuz.old -> vmlinuz-
ubuntu@ubuntu:~$ ls -la /boot/firmware/
-rwxr-xr-x 1 root root 10403897 May 8 22:14 /boot/firmware/
-rwxr-xr-x 1 root root 10338087 May 8 22:09 /boot/firmware/
# reboot the system
ubuntu@ubuntu:~$ sudo reboot
# it is the same local kernel again
ubuntu@ubuntu:~$ uname -a
Linux ubuntu 5.15.98-rt62-raspi #1 SMP PREEMPT_RT Sat May 6 20:53:20 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux