[Bug 2018946] [NEW] It is not possible to uninstall a locally built RPI kernel
Andrei Kholodnyi
2018946 at bugs.launchpad.net
Mon May 8 22:29:26 UTC 2023
Public bug reported:
# latest Ubuntu 22.04
ubuntu at ubuntu:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.2 LTS"
# latest Ubuntu kernel
ubuntu at 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 at ubuntu:~$ ls -la /boot/vmlinuz*
lrwxrwxrwx 1 root root 25 May 6 10:05 /boot/vmlinuz -> vmlinuz-5.15.0-1027-raspi
-rw------- 1 root root 10338087 Apr 3 09:39 /boot/vmlinuz-5.15.0-1027-raspi
ubuntu at ubuntu:~$ ls -la /boot/firmware/vmlinuz*
-rwxr-xr-x 1 root root 10338087 May 8 22:09 /boot/firmware/vmlinuz
-rwxr-xr-x 1 root root 10338087 May 8 22:09 /boot/firmware/vmlinuz.bak
# install locally built kernel
ubuntu at ubuntu:~$ ls *.deb
linux-headers-5.15.98-rt62-raspi_5.15.98-rt62-raspi-1_arm64.deb
linux-image-5.15.98-rt62-raspi_5.15.98-rt62-raspi-1_arm64.deb
linux-libc-dev_5.15.98-rt62-raspi-1_arm64.deb
ubuntu at ubuntu:~$ sudo dpkg -i *.deb
# Reboot the system
ubuntu at ubuntu:~$ sudo reboot
# Check kernel version, it is the local one
ubuntu at 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 at ubuntu:~$ ls -la /boot/vmlinuz*
lrwxrwxrwx 1 root root 25 May 6 10:05 /boot/vmlinuz -> vmlinuz-5.15.0-1027-raspi
-rw------- 1 root root 10338087 Apr 3 09:39 /boot/vmlinuz-5.15.0-1027-raspi
-rw-r--r-- 1 root root 10403897 May 6 20:53 /boot/vmlinuz-5.15.98-rt62-raspi
lrwxrwxrwx 1 root root 25 May 8 22:19 /boot/vmlinuz.old -> vmlinuz-5.15.0-1027-raspi
ubuntu at ubuntu:~$ ls -la /boot/firmware/vmlinuz*
-rwxr-xr-x 1 root root 10403897 May 8 22:14 /boot/firmware/vmlinuz
-rwxr-xr-x 1 root root 10338087 May 8 22:09 /boot/firmware/vmlinuz.bak
# remove local kernel
ubuntu at ubuntu:~$ sudo dpkg -r linux-image-5.15.98-rt62-raspi
(Reading database ... 141758 files and directories currently installed.)
Removing linux-image-5.15.98-rt62-raspi (5.15.98-rt62-raspi-1) ...
update-initramfs: Deleting /boot/initrd.img-5.15.98-rt62-raspi
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-1027-raspi).
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/vmlinuz
ubuntu at ubuntu:~$ ls -la /boot/vmlinuz*
lrwxrwxrwx 1 root root 25 May 6 10:05 /boot/vmlinuz -> vmlinuz-5.15.0-1027-raspi
-rw------- 1 root root 10338087 Apr 3 09:39 /boot/vmlinuz-5.15.0-1027-raspi
lrwxrwxrwx 1 root root 25 May 8 22:19 /boot/vmlinuz.old -> vmlinuz-5.15.0-1027-raspi
ubuntu at ubuntu:~$ ls -la /boot/firmware/vmlinuz*
-rwxr-xr-x 1 root root 10403897 May 8 22:14 /boot/firmware/vmlinuz
-rwxr-xr-x 1 root root 10338087 May 8 22:09 /boot/firmware/vmlinuz.bak
# reboot the system
ubuntu at ubuntu:~$ sudo reboot
# it is the same local kernel again
ubuntu at 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
** Affects: flash-kernel (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to flash-kernel in Ubuntu.
https://bugs.launchpad.net/bugs/2018946
Title:
It is not possible to uninstall a locally built RPI kernel
Status in flash-kernel package in Ubuntu:
New
Bug description:
# latest Ubuntu 22.04
ubuntu at ubuntu:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.2 LTS"
# latest Ubuntu kernel
ubuntu at 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 at ubuntu:~$ ls -la /boot/vmlinuz*
lrwxrwxrwx 1 root root 25 May 6 10:05 /boot/vmlinuz -> vmlinuz-5.15.0-1027-raspi
-rw------- 1 root root 10338087 Apr 3 09:39 /boot/vmlinuz-5.15.0-1027-raspi
ubuntu at ubuntu:~$ ls -la /boot/firmware/vmlinuz*
-rwxr-xr-x 1 root root 10338087 May 8 22:09 /boot/firmware/vmlinuz
-rwxr-xr-x 1 root root 10338087 May 8 22:09 /boot/firmware/vmlinuz.bak
# install locally built kernel
ubuntu at ubuntu:~$ ls *.deb
linux-headers-5.15.98-rt62-raspi_5.15.98-rt62-raspi-1_arm64.deb
linux-image-5.15.98-rt62-raspi_5.15.98-rt62-raspi-1_arm64.deb
linux-libc-dev_5.15.98-rt62-raspi-1_arm64.deb
ubuntu at ubuntu:~$ sudo dpkg -i *.deb
# Reboot the system
ubuntu at ubuntu:~$ sudo reboot
# Check kernel version, it is the local one
ubuntu at 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 at ubuntu:~$ ls -la /boot/vmlinuz*
lrwxrwxrwx 1 root root 25 May 6 10:05 /boot/vmlinuz -> vmlinuz-5.15.0-1027-raspi
-rw------- 1 root root 10338087 Apr 3 09:39 /boot/vmlinuz-5.15.0-1027-raspi
-rw-r--r-- 1 root root 10403897 May 6 20:53 /boot/vmlinuz-5.15.98-rt62-raspi
lrwxrwxrwx 1 root root 25 May 8 22:19 /boot/vmlinuz.old -> vmlinuz-5.15.0-1027-raspi
ubuntu at ubuntu:~$ ls -la /boot/firmware/vmlinuz*
-rwxr-xr-x 1 root root 10403897 May 8 22:14 /boot/firmware/vmlinuz
-rwxr-xr-x 1 root root 10338087 May 8 22:09 /boot/firmware/vmlinuz.bak
# remove local kernel
ubuntu at ubuntu:~$ sudo dpkg -r linux-image-5.15.98-rt62-raspi
(Reading database ... 141758 files and directories currently installed.)
Removing linux-image-5.15.98-rt62-raspi (5.15.98-rt62-raspi-1) ...
update-initramfs: Deleting /boot/initrd.img-5.15.98-rt62-raspi
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-1027-raspi).
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/vmlinuz
ubuntu at ubuntu:~$ ls -la /boot/vmlinuz*
lrwxrwxrwx 1 root root 25 May 6 10:05 /boot/vmlinuz -> vmlinuz-5.15.0-1027-raspi
-rw------- 1 root root 10338087 Apr 3 09:39 /boot/vmlinuz-5.15.0-1027-raspi
lrwxrwxrwx 1 root root 25 May 8 22:19 /boot/vmlinuz.old -> vmlinuz-5.15.0-1027-raspi
ubuntu at ubuntu:~$ ls -la /boot/firmware/vmlinuz*
-rwxr-xr-x 1 root root 10403897 May 8 22:14 /boot/firmware/vmlinuz
-rwxr-xr-x 1 root root 10338087 May 8 22:09 /boot/firmware/vmlinuz.bak
# reboot the system
ubuntu at ubuntu:~$ sudo reboot
# it is the same local kernel again
ubuntu at 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
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/flash-kernel/+bug/2018946/+subscriptions
More information about the foundations-bugs
mailing list