We're currently using Ubuntu 22.04.3 LTS (GNU/Linux 5.4.0-153-generic x86_64) and trying to upgrade the kernel to 5.15 or newer. Still even after searching through several posts, wikis, etc, the kernel will stay on 5.4.0. We're out of ideas and hope that someone can point us to the right direction.
What we tried:
sudo apt update && sudo apt full-upgrade && sudo apt clean && sudo apt autoremove
based on this postsudo apt-get install linux
returnedE: Unable to locate package linux
sudo apt-get install linux-generic
returnedlinux-generic is already the newest version (5.15.0.89.86)
sudo apt-get install linux-image-generic
returnedlinux-image-generic is already the newest version (5.15.0.89.86)
- Using ubuntu-mainline-kernel.sh based of the answer of this post. After testing we uninstalled the kernel via same script.
sudo apt install linux-generic-hwe-22.04
based on this post
Still after reboot uname -r
will return 5.4.0-153-generic
From what I read in other posts you probably need these information (let me know if something is missing):
$ uname -a
Linux vm-server-1 5.4.0-153-generic #170-Ubuntu SMP Fri Jun 16 13:43:31 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
$ sudo apt policy linux-image
linux-image:
Installed: (none)
Candidate: (none)
Version table:
$ sudo apt-cache policy linux-generic
linux-generic:
Installed: 5.15.0.89.86
Candidate: 5.15.0.89.86
Version table:
*** 5.15.0.89.86 500
500 http://de.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
500 http://de.archive.ubuntu.com/ubuntu jammy-security/main amd64 Packages
100 /var/lib/dpkg/status
5.15.0.25.27 500
500 http://de.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
$ sudo apt-mark showmanual | grep linux-image
linux-image-generic
$ sudo apt-mark showmanual | grep linux-headers
# nothing
$ sudo apt-mark showauto | grep linux-image
linux-image-5.15.0-89-generic
linux-image-6.2.0-37-generic
linux-image-generic-hwe-22.04
$ sudo apt-mark showauto | grep linux-headers
linux-headers-5.15.0-89
linux-headers-5.15.0-89-generic
linux-headers-6.2.0-37-generic
linux-headers-generic
linux-headers-generic-hwe-22.04
$ sudo update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.2.0-37-generic
Found initrd image: /boot/initrd.img-6.2.0-37-generic
Found linux image: /boot/vmlinuz-5.15.0-89-generic
Found initrd image: /boot/initrd.img-5.15.0-89-generic
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
done
$ sudo grub-editenv list
# nothing
$ sudo dpkg --get-selections | grep linux-image
linux-image-5.15.0-76-generic deinstall
linux-image-5.15.0-78-generic deinstall
linux-image-5.15.0-79-generic deinstall
linux-image-5.15.0-82-generic deinstall
linux-image-5.15.0-83-generic deinstall
linux-image-5.15.0-84-generic deinstall
linux-image-5.15.0-86-generic deinstall
linux-image-5.15.0-87-generic deinstall
linux-image-5.15.0-88-generic deinstall
linux-image-5.15.0-89-generic install
linux-image-6.2.0-37-generic install
linux-image-generic install
linux-image-generic-hwe-22.04 install
$ sudo dpkg -l | egrep linux-'[g|h|i|m]'
ii binutils-x86-64-linux-gnu 2.38-4ubuntu2.3 amd64 GNU binary utilities, for x86-64-linux-gnu target
ii linux-generic 5.15.0.89.86 amd64 Complete Generic Linux kernel and headers
ii linux-generic-hwe-22.04 6.2.0.37.38~22.04.15 amd64 Complete Generic Linux kernel and headers
ii linux-headers-5.15.0-89 5.15.0-89.99 all Header files related to Linux kernel version 5.15.0
ii linux-headers-5.15.0-89-generic 5.15.0-89.99 amd64 Linux kernel headers for version 5.15.0 on 64 bit x86 SMP
ii linux-headers-6.2.0-37-generic 6.2.0-37.38~22.04.1 amd64 Linux kernel headers for version 6.2.0 on 64 bit x86 SMP
ii linux-headers-generic 5.15.0.89.86 amd64 Generic Linux kernel headers
ii linux-headers-generic-hwe-22.04 6.2.0.37.38~22.04.15 amd64 Generic Linux kernel headers
ii linux-hwe-6.2-headers-6.2.0-37 6.2.0-37.38~22.04.1 all Header files related to Linux kernel version 6.2.0
rc linux-image-5.15.0-76-generic 5.15.0-76.83 amd64 Signed kernel image generic
rc linux-image-5.15.0-78-generic 5.15.0-78.85 amd64 Signed kernel image generic
rc linux-image-5.15.0-79-generic 5.15.0-79.86 amd64 Signed kernel image generic
rc linux-image-5.15.0-82-generic 5.15.0-82.91 amd64 Signed kernel image generic
rc linux-image-5.15.0-83-generic 5.15.0-83.92 amd64 Signed kernel image generic
rc linux-image-5.15.0-84-generic 5.15.0-84.93 amd64 Signed kernel image generic
rc linux-image-5.15.0-86-generic 5.15.0-86.96 amd64 Signed kernel image generic
rc linux-image-5.15.0-87-generic 5.15.0-87.97 amd64 Signed kernel image generic
rc linux-image-5.15.0-88-generic 5.15.0-88.98 amd64 Signed kernel image generic
ii linux-image-5.15.0-89-generic 5.15.0-89.99 amd64 Signed kernel image generic
ii linux-image-6.2.0-37-generic 6.2.0-37.38~22.04.1 amd64 Signed kernel image generic
ii linux-image-generic 5.15.0.89.86 amd64 Generic Linux kernel image
ii linux-image-generic-hwe-22.04 6.2.0.37.38~22.04.15 amd64 Generic Linux kernel image
rc linux-modules-5.15.0-76-generic 5.15.0-76.83 amd64 Linux kernel extra modules for version 5.15.0 on 64 bit x86 SMP
rc linux-modules-5.15.0-78-generic 5.15.0-78.85 amd64 Linux kernel extra modules for version 5.15.0 on 64 bit x86 SMP
rc linux-modules-5.15.0-79-generic 5.15.0-79.86 amd64 Linux kernel extra modules for version 5.15.0 on 64 bit x86 SMP
rc linux-modules-5.15.0-82-generic 5.15.0-82.91 amd64 Linux kernel extra modules for version 5.15.0 on 64 bit x86 SMP
rc linux-modules-5.15.0-83-generic 5.15.0-83.92 amd64 Linux kernel extra modules for version 5.15.0 on 64 bit x86 SMP
rc linux-modules-5.15.0-84-generic 5.15.0-84.93 amd64 Linux kernel extra modules for version 5.15.0 on 64 bit x86 SMP
rc linux-modules-5.15.0-86-generic 5.15.0-86.96 amd64 Linux kernel extra modules for version 5.15.0 on 64 bit x86 SMP
rc linux-modules-5.15.0-87-generic 5.15.0-87.97 amd64 Linux kernel extra modules for version 5.15.0 on 64 bit x86 SMP
rc linux-modules-5.15.0-88-generic 5.15.0-88.98 amd64 Linux kernel extra modules for version 5.15.0 on 64 bit x86 SMP
ii linux-modules-5.15.0-89-generic 5.15.0-89.99 amd64 Linux kernel extra modules for version 5.15.0 on 64 bit x86 SMP
ii linux-modules-6.2.0-37-generic 6.2.0-37.38~22.04.1 amd64 Linux kernel extra modules for version 6.2.0 on 64 bit x86 SMP
rc linux-modules-extra-5.15.0-76-generic 5.15.0-76.83 amd64 Linux kernel extra modules for version 5.15.0 on 64 bit x86 SMP
rc linux-modules-extra-5.15.0-78-generic 5.15.0-78.85 amd64 Linux kernel extra modules for version 5.15.0 on 64 bit x86 SMP
rc linux-modules-extra-5.15.0-79-generic 5.15.0-79.86 amd64 Linux kernel extra modules for version 5.15.0 on 64 bit x86 SMP
rc linux-modules-extra-5.15.0-82-generic 5.15.0-82.91 amd64 Linux kernel extra modules for version 5.15.0 on 64 bit x86 SMP
rc linux-modules-extra-5.15.0-83-generic 5.15.0-83.92 amd64 Linux kernel extra modules for version 5.15.0 on 64 bit x86 SMP
rc linux-modules-extra-5.15.0-84-generic 5.15.0-84.93 amd64 Linux kernel extra modules for version 5.15.0 on 64 bit x86 SMP
rc linux-modules-extra-5.15.0-86-generic 5.15.0-86.96 amd64 Linux kernel extra modules for version 5.15.0 on 64 bit x86 SMP
rc linux-modules-extra-5.15.0-87-generic 5.15.0-87.97 amd64 Linux kernel extra modules for version 5.15.0 on 64 bit x86 SMP
rc linux-modules-extra-5.15.0-88-generic 5.15.0-88.98 amd64 Linux kernel extra modules for version 5.15.0 on 64 bit x86 SMP
ii linux-modules-extra-5.15.0-89-generic 5.15.0-89.99 amd64 Linux kernel extra modules for version 5.15.0 on 64 bit x86 SMP
ii linux-modules-extra-6.2.0-37-generic 6.2.0-37.38~22.04.1 amd64 Linux kernel extra modules for version 6.2.0 on 64 bit x86 SMP
$ ls /boot
System.map-5.15.0-89-generic config-5.15.0-89-generic grub initrd.img-5.15.0-89-generic initrd.img.old vmlinuz vmlinuz-6.2.0-37-generic
System.map-6.2.0-37-generic config-6.2.0-37-generic initrd.img initrd.img-6.2.0-37-generic lost+found vmlinuz-5.15.0-89-generic vmlinuz.old
$ cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.3 LTS"
PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
Partition information:
$ sudo parted -l
Model: ATA Samsung SSD 870 (scsi)
Disk /dev/sda: 2000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 2097kB 1049kB bios_grub
2 2097kB 2150MB 2147MB ext4
3 2150MB 2000GB 1998GB
Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/ubuntu--vg-ubuntu--lv: 1998GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:
Number Start End Size File system Flags
1 0,00B 1998GB 1998GB ext4
Model: Samsung SSD 960 EVO 500GB (nvme)
Disk /dev/nvme0n1: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 538MB 537MB fat32 boot, esp
2 538MB 1612MB 1074MB ext4
3 1612MB 500GB 498GB
$ sudo lsblk -f
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
loop0 squashfs 4.0 0 100% /snap/core20/1974
loop1 squashfs 4.0 0 100% /snap/core20/2015
loop2 squashfs 4.0 0 100% /snap/lxd/24322
loop3 squashfs 4.0 0 100% /snap/snapd/20092
loop4 squashfs 4.0 0 100% /snap/snapd/20290
sda
├─sda1
├─sda2 ext4 1.0 a2c63d1f-fec5-4509-a3d6-5ad29a80659a 1,5G 14% /boot
└─sda3 LVM2_member LVM2 001 ZfgXCe-fGAO-4892-UF2D-V4gq-d7hQ-5SggRI
└─ubuntu--vg-ubuntu--lv ext4 1.0 6b157c55-6273-4694-bc9d-237cea92d8d8 1,7T 2% /
nvme0n1
├─nvme0n1p1 vfat FAT32 4CEE-91B6
├─nvme0n1p2 ext4 1.0 f007e56e-a254-48ea-8468-c65ecc7b478e
└─nvme0n1p3
$ cat /etc/fstab
/etc/fstab: static file system information.
Use 'blkid' to print the universally unique identifier for a
device; this may be used with UUID= as a more robust way to name devices
that works even if disks are added and removed. See fstab(5).
<file system> <mount point> <type> <options> <dump> <pass>
/ was on /dev/ubuntu-vg/ubuntu-lv during curtin installation
/dev/disk/by-id/dm-uuid-LVM-1OpWKw4SuxDrjnHjXbSxnsYuaTPZbHWZfd2iKx7srOOcU4DgSRcde81utmMRfYC1 / ext4 defaults 0 1
/boot was on /dev/sda2 during curtin installation
/dev/disk/by-uuid/a2c63d1f-fec5-4509-a3d6-5ad29a80659a /boot ext4 defaults 0 1
/swap.img none swap sw 0 0
Hardware:
- ASUS PRIME B350-PLUS Motherboard
- AMD Ryzen 7 1700 Eight-Core Processor
And still after reboot, uname -r
will return 5.4.0-153-generic
. Final notes: When installing a new package via apt install
there is a message that a new kernel has been found and will be used after reboot. But Kernel stays on 5.4.
cat /etc/*release
? The 5.4 Kernel was never in Ubuntu 22.04. It started with 5.15. – Terrance Nov 23 '23 at 18:41sudo update-grub
and add the output to your question. – noisefloor Nov 24 '23 at 08:39dpkg --list | grep linux-image
to show all installed kernel versions – if installed correctly, note that the ones with ii in front are actually installed! The ones with rc are just leftover config files and can be purged. – darth_epoxy Nov 24 '23 at 08:45sudo parted -l
andsudo lsblk -f
alsocat /etc/fstab
please. – nobody Nov 24 '23 at 09:491 1049kB 2097kB 1049kB bios_grub
this is a left over from focal. – nobody Nov 24 '23 at 11:32