Page 1 of 3 123 LastLast
Results 1 to 10 of 28

Thread: 20.04 to 22.04 kernel question

  1. #1
    Join Date
    Jul 2024
    Beans
    15

    20.04 to 22.04 kernel question

    Hi,

    Recently I've upgraded from 20.04 to 22.04, this went flawless.

    So the old kernel from 20.04 was 5.x.x. etc. The kernel for 22.04 starts with 6.x.x. The first time I ran apt update & apt upgrade after upgrading it upgraded the correct kernel.
    A couple of weeks ago it wanted to upgrade the kernel again, but it also wanted to install 5.x.x. kernel, next to the 6.x.x kernel. I upgraded nonetheless and it worked fine.
    When i run "dpkg --list | grep linux-image" this is the output:
    Code:
    rc  linux-image-5.11.0-25-generic                               5.11.0-25.27~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.11.0-27-generic                               5.11.0-27.29~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.11.0-34-generic                               5.11.0-34.36~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.11.0-36-generic                               5.11.0-36.40~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.11.0-37-generic                               5.11.0-37.41~20.04.2                              amd64        Signed kernel image generic
    rc  linux-image-5.11.0-38-generic                               5.11.0-38.42~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.11.0-40-generic                               5.11.0-40.44~20.04.2                              amd64        Signed kernel image generic
    rc  linux-image-5.11.0-41-generic                               5.11.0-41.45~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.11.0-43-generic                               5.11.0-43.47~20.04.2                              amd64        Signed kernel image generic
    rc  linux-image-5.11.0-44-generic                               5.11.0-44.48~20.04.2                              amd64        Signed kernel image generic
    rc  linux-image-5.11.0-46-generic                               5.11.0-46.51~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.13.0-25-generic                               5.13.0-25.26~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.13.0-27-generic                               5.13.0-27.29~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.13.0-28-generic                               5.13.0-28.31~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.13.0-30-generic                               5.13.0-30.33~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.13.0-35-generic                               5.13.0-35.40~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.13.0-37-generic                               5.13.0-37.42~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.13.0-39-generic                               5.13.0-39.44~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.13.0-40-generic                               5.13.0-40.45~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.13.0-41-generic                               5.13.0-41.46~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.13.0-44-generic                               5.13.0-44.49~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.13.0-48-generic                               5.13.0-48.54~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.13.0-51-generic                               5.13.0-51.58~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.13.0-52-generic                               5.13.0-52.59~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.15.0-100-generic                              5.15.0-100.110~20.04.1                            amd64        Signed kernel image generic
    rc  linux-image-5.15.0-101-generic                              5.15.0-101.111~20.04.1                            amd64        Signed kernel image generic
    rc  linux-image-5.15.0-102-generic                              5.15.0-102.112~20.04.1                            amd64        Signed kernel image generic
    rc  linux-image-5.15.0-105-generic                              5.15.0-105.115~20.04.1                            amd64        Signed kernel image generic
    rc  linux-image-5.15.0-107-generic                              5.15.0-107.117                                    amd64        Signed kernel image generic
    rc  linux-image-5.15.0-112-generic                              5.15.0-112.122                                    amd64        Signed kernel image generic
    rc  linux-image-5.15.0-113-generic                              5.15.0-113.123                                    amd64        Signed kernel image generic
    ii  linux-image-5.15.0-116-generic                              5.15.0-116.126                                    amd64        Signed kernel image generic
    rc  linux-image-5.15.0-41-generic                               5.15.0-41.44~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.15.0-43-generic                               5.15.0-43.46~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.15.0-46-generic                               5.15.0-46.49~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.15.0-48-generic                               5.15.0-48.54~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.15.0-50-generic                               5.15.0-50.56~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.15.0-52-generic                               5.15.0-52.58~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.15.0-53-generic                               5.15.0-53.59~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.15.0-56-generic                               5.15.0-56.62~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.15.0-57-generic                               5.15.0-57.63~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.15.0-58-generic                               5.15.0-58.64~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.15.0-60-generic                               5.15.0-60.66~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.15.0-67-generic                               5.15.0-67.74~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.15.0-69-generic                               5.15.0-69.76~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.15.0-70-generic                               5.15.0-70.77~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.15.0-71-generic                               5.15.0-71.78~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.15.0-72-generic                               5.15.0-72.79~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.15.0-73-generic                               5.15.0-73.80~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.15.0-75-generic                               5.15.0-75.82~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.15.0-76-generic                               5.15.0-76.83~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.15.0-78-generic                               5.15.0-78.85~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.15.0-79-generic                               5.15.0-79.86~20.04.2                              amd64        Signed kernel image generic
    rc  linux-image-5.15.0-82-generic                               5.15.0-82.91~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.15.0-83-generic                               5.15.0-83.92~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.15.0-84-generic                               5.15.0-84.93~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.15.0-86-generic                               5.15.0-86.96~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.15.0-87-generic                               5.15.0-87.97~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.15.0-88-generic                               5.15.0-88.98~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.15.0-89-generic                               5.15.0-89.99~20.04.1                              amd64        Signed kernel image generic
    rc  linux-image-5.15.0-91-generic                               5.15.0-91.101~20.04.1                             amd64        Signed kernel image generic
    rc  linux-image-5.15.0-92-generic                               5.15.0-92.102~20.04.1                             amd64        Signed kernel image generic
    rc  linux-image-5.15.0-94-generic                               5.15.0-94.104~20.04.1                             amd64        Signed kernel image generic
    rc  linux-image-5.15.0-97-generic                               5.15.0-97.107~20.04.1                             amd64        Signed kernel image generic
    rc  linux-image-5.4.0-26-generic                                5.4.0-26.30                                       amd64        Signed kernel image generic
    rc  linux-image-5.4.0-29-generic                                5.4.0-29.33                                       amd64        Signed kernel image generic
    rc  linux-image-5.4.0-31-generic                                5.4.0-31.35                                       amd64        Signed kernel image generic
    rc  linux-image-5.4.0-33-generic                                5.4.0-33.37                                       amd64        Signed kernel image generic
    rc  linux-image-5.4.0-37-generic                                5.4.0-37.41                                       amd64        Signed kernel image generic
    rc  linux-image-5.4.0-39-generic                                5.4.0-39.43                                       amd64        Signed kernel image generic
    rc  linux-image-5.4.0-40-generic                                5.4.0-40.44                                       amd64        Signed kernel image generic
    rc  linux-image-5.4.0-42-generic                                5.4.0-42.46                                       amd64        Signed kernel image generic
    rc  linux-image-5.4.0-45-generic                                5.4.0-45.49                                       amd64        Signed kernel image generic
    rc  linux-image-5.4.0-47-generic                                5.4.0-47.51                                       amd64        Signed kernel image generic
    rc  linux-image-5.4.0-48-generic                                5.4.0-48.52                                       amd64        Signed kernel image generic
    rc  linux-image-5.4.0-51-generic                                5.4.0-51.56                                       amd64        Signed kernel image generic
    rc  linux-image-5.4.0-52-generic                                5.4.0-52.57                                       amd64        Signed kernel image generic
    rc  linux-image-5.4.0-53-generic                                5.4.0-53.59                                       amd64        Signed kernel image generic
    rc  linux-image-5.4.0-54-generic                                5.4.0-54.60                                       amd64        Signed kernel image generic
    rc  linux-image-5.4.0-56-generic                                5.4.0-56.62                                       amd64        Signed kernel image generic
    rc  linux-image-5.4.0-58-generic                                5.4.0-58.64                                       amd64        Signed kernel image generic
    rc  linux-image-5.4.0-59-generic                                5.4.0-59.65                                       amd64        Signed kernel image generic
    rc  linux-image-5.8.0-34-generic                                5.8.0-34.37~20.04.2                               amd64        Signed kernel image generic
    rc  linux-image-5.8.0-36-generic                                5.8.0-36.40~20.04.1                               amd64        Signed kernel image generic
    rc  linux-image-5.8.0-38-generic                                5.8.0-38.43~20.04.1                               amd64        Signed kernel image generic
    rc  linux-image-5.8.0-40-generic                                5.8.0-40.45~20.04.1                               amd64        Signed kernel image generic
    rc  linux-image-5.8.0-41-generic                                5.8.0-41.46~20.04.1                               amd64        Signed kernel image generic
    rc  linux-image-5.8.0-43-generic                                5.8.0-43.49~20.04.1                               amd64        Signed kernel image generic
    rc  linux-image-5.8.0-44-generic                                5.8.0-44.50~20.04.1                               amd64        Signed kernel image generic
    rc  linux-image-5.8.0-45-generic                                5.8.0-45.51~20.04.1+1                             amd64        Signed kernel image generic
    rc  linux-image-5.8.0-48-generic                                5.8.0-48.54~20.04.1                               amd64        Signed kernel image generic
    rc  linux-image-5.8.0-49-generic                                5.8.0-49.55~20.04.1                               amd64        Signed kernel image generic
    rc  linux-image-5.8.0-50-generic                                5.8.0-50.56~20.04.1                               amd64        Signed kernel image generic
    rc  linux-image-5.8.0-53-generic                                5.8.0-53.60~20.04.1                               amd64        Signed kernel image generic
    rc  linux-image-5.8.0-55-generic                                5.8.0-55.62~20.04.1                               amd64        Signed kernel image generic
    rc  linux-image-5.8.0-59-generic                                5.8.0-59.66~20.04.1                               amd64        Signed kernel image generic
    rc  linux-image-5.8.0-63-generic                                5.8.0-63.71~20.04.1                               amd64        Signed kernel image generic
    rc  linux-image-6.5.0-35-generic                                6.5.0-35.35~22.04.1                               amd64        Signed kernel image generic
    ii  linux-image-6.5.0-41-generic                                6.5.0-41.41~22.04.2                               amd64        Signed kernel image generic
    ii  linux-image-6.5.0-44-generic                                6.5.0-44.44~22.04.1                               amd64        Signed kernel image generic
    ii  linux-image-generic                                         5.15.0.116.116                                    amd64        Generic Linux kernel image
    ii  linux-image-generic-hwe-22.04                               6.5.0.44.44~22.04.1                               amd64        Generic Linux kernel image
    As you can see the first kernel with "ii" is version 5.15.0-116.126. This is the version apt wanted to install earlier, but it is obsolete. Why does apt want to upgrade old kernels from an old LTS-version? And the next question is, how do I stop this from happening again?

    Thanks in advance. If you need more info, please let me know.

    Regards,

    Sluipneger

    Quick edit:
    This is the output of apt update && apt upgrade:
    Code:
    The following NEW packages will be installed:
      linux-headers-5.15.0-117 linux-headers-5.15.0-117-generic
      linux-headers-6.5.0-45-generic linux-hwe-6.5-headers-6.5.0-45
      linux-image-5.15.0-117-generic linux-image-6.5.0-45-generic
      linux-modules-5.15.0-117-generic linux-modules-6.5.0-45-generic
      linux-modules-extra-5.15.0-117-generic linux-modules-extra-6.5.0-45-generic
    The following packages have been kept back:
      ldap-utils libldap-2.5-0 libldap-2.5-0:i386 libldap-common
    The following packages will be upgraded:
      linux-generic linux-generic-hwe-20.04 linux-generic-hwe-22.04
      linux-headers-generic linux-headers-generic-hwe-22.04 linux-image-generic
      linux-image-generic-hwe-22.04 linux-libc-dev
    8 upgraded, 10 newly installed, 0 to remove and 4 not upgraded.
    5 standard LTS security updates
    Need to get 248 MB of archives.
    After this operation, 1.307 MB of additional disk space will be used.
    Do you want to continue? [Y/n] n
    Last edited by deadflowr; July 25th, 2024 at 08:18 PM. Reason: code tags

  2. #2
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    13,822
    Distro
    Ubuntu

    Re: 20.04 to 22.04 kernel question

    The answer lies here:
    Code:
    The following packages will be upgraded:
    linux-generic linux-generic-hwe-20.04 linux-generic-hwe-22.04
    linux-headers-generic linux-headers-generic-hwe-22.04 linux-image-generic
    linux-image-generic-hwe-22.04
    the linux-generic packages on 22.04 installs the 5.15 kernels.
    the linux-generic-hwe-22.04 packages installs the 6.X kernels.

    You only need one, but both are supported.

    If you want to run the 5.15 kernels then remove the hwe-22.04 packages
    like so
    Code:
    sudo apt remove linux-generic-hwe-22.04 linux-headers-generic-hwe-22.04 linux-image-generic-hwe-22.04
    If you want to run the 6.X kernel then remove the non-hwe-22.04 kernels
    like so
    Code:
    sudo apt remove linux-generic linux-headers-generic linux-image-generic
    Last edited by deadflowr; July 25th, 2024 at 09:19 PM.
    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

  3. #3
    Join Date
    Jul 2024
    Beans
    15

    Re: 20.04 to 22.04 kernel question

    Quote Originally Posted by deadflowr View Post
    The answer lies here:
    Code:
    The following packages will be upgraded:
    linux-generic linux-generic-hwe-20.04 linux-generic-hwe-22.04
    linux-headers-generic linux-headers-generic-hwe-22.04 linux-image-generic
    linux-image-generic-hwe-22.04
    the linux-generic packages on 22.04 installs the 5.15 kernels.
    the linux-generic-hwe-22.04 packages installs the 6.X kernels.

    You only need one, but both are supported.

    If you want to run the 5.15 kernels then remove the hwe-22.04 packages
    like so
    Code:
    sudo apt remove linux-generic-hwe-20.04 linux-headers-generic-hwe-22.04 linux-image-generic-hwe-22.04
    If you want to run the 6.X kernel then remove the non-hwe-22.04 kernels
    like so
    Code:
    sudo apt remove linux-generic linux-headers-generic linux-image-generic
    Thank you deadflowr for your answer.

    Does "hwe" stand for hardware enabled?

    So if I understand you correctly, if I want to use the 6.X kernel, I have to delete linux-generic-hwe-20.04 linux-headers-generic-hwe-22.04 linux-image-generic-hwe-22.04? Why do I have to delete the last two?

    Thanks.

  4. #4
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    13,822
    Distro
    Ubuntu

    Re: 20.04 to 22.04 kernel question

    So if I understand you correctly, if I want to use the 6.X kernel, I have to delete linux-generic-hwe-20.04 linux-headers-generic-hwe-22.04 linux-image-generic-hwe-22.04? Why do I have to delete the last two?
    If you want to use the 6.X kernel then you would want to remove the other packages.
    The linux-generic packages without the -hwe-22.04 at the end.

    In terms of why you need to remove all 3 is because the actual kernel packages are tied to the image and header packages.

    In order
    1) linux-generic depends on linux-image-generic and linux-headers-generic

    2) linux-image-generic and linux-headers generic always depend on the latest kernel package.
    (currently on 22.04 the linux generic packages depend on linux-image-5.15.0-177-generic and linux-headers-5.15.0-177-generic.)

    Dependencies are in one-direction.
    Meaning that while linux-generic requires the linux-image-generic and linux-headers-generic packages be installed, it's not true for the reverse of that.

    Same for the actual linux-image-5.15.0-177-generic and linux-headers-5.15.0-177-generic packages.
    While the linux-generic packages depend on those, those are not dependent on those linux-generic packages.


    Confusing?

    Edit:

    I completely missed that you also have the linux-generic-hwe-20.04 package installed, for some reason.
    You can remove that too.
    On 22.04 the linux-generic-hwe-20.04 package(s) are the same as the linux-generic package(s)
    Even more confusing.


    Also, sidenote

    If you want to clean up your dpkg output, look at this thread:
    https://ubuntuforums.org/showthread.php?t=2479069
    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

  5. #5
    Join Date
    Jul 2024
    Beans
    15

    Re: 20.04 to 22.04 kernel question

    Thanks again for the effort.

    So I can remove the following packages:
    linux-generic
    linux-generic-hwe-20.04
    linux-headers-generic
    linux-image-generic


    and keep:

    linux-generic-hwe-22.04
    linux-image-generic-hwe-22.04
    linux-headers-generic-hwe-22.04

    That should be fine?

    Sorry if I'm being a nuisance, but I am always extra careful when it concerns the kernel.

    The removal of the packages is just apt remove <packagename>?


    Cheers

    Edit: when those are deleted, the link is not available anymore, so apt will not ask to install the 5.X kernel again?
    Last edited by sluipneger; July 25th, 2024 at 10:56 PM.

  6. #6
    Join Date
    Aug 2017
    Location
    melbourne, au
    Beans
    Hidden!
    Distro
    Lubuntu Development Release

    Re: 20.04 to 22.04 kernel question

    Quote Originally Posted by sluipneger View Post

    Does "hwe" stand for hardware enabled?

    Thanks.
    HWE stands for Hardware Enablement

    Ubuntu Desktop installs default to HWE enabled; as newer machines often benefit from the newer kernel modules (drivers) found in later kernels, where as Server installs generally benefit from the extra stability of the GA kernel stack; thus Server installs default to GA.

    If using a Ubuntu flavor, the media itself uses GA at the initial & .1 ISO, but HWE for .2 & later ISOs on LTS releases.

    For more details, there are docs, eg. https://wiki.ubuntu.com/Kernel/LTSEnablementStack (though other docs exist too; introduced with 10.04).

    You can have both GA & HWE installed (OEM too), however, some closed-source kernel modules (some NVIDIA for example) can prevent multiple stacks from co-existing on the install. This is provided for FYI purposes only (hopefully helpful, otherwise ignore).

  7. #7
    Join Date
    Jul 2024
    Beans
    15

    Re: 20.04 to 22.04 kernel question

    Hi guiverc,

    Thanks for your reply.

    If I remove the packages as mentioned above the output is as follows:

    $ sudo apt remove linux-generic linux-headers-generic linux-image-generic linux-generic-hwe-20.04
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    The following packages were automatically installed and are no longer required:
    amd64-microcode intel-microcode iucode-tool linux-generic-hwe-22.04 linux-headers-generic-hwe-22.04 linux-image-5.15.0-116-generic linux-image-generic-hwe-22.04 linux-modules-5.15.0-116-generic linux-modules-extra-5.15.0-116-generic thermald
    Use 'sudo apt autoremove' to remove them.
    The following packages will be REMOVED:
    linux-generic linux-generic-hwe-20.04 linux-headers-generic linux-image-generic
    0 upgraded, 0 newly installed, 4 to remove and 15 not upgraded.
    After this operation, 86,0 kB disk space will be freed.

    Is this ok? After removing these packages, autoremove suggests to remove the current generic-hwe-22.04 packages too? I am afraid this might break my system.

    Regards,

    Sluipneger

    Edit: thermald, intel-microcode and amd-microcode seem pretty important too. Why would autoremove suggest to remove these packages?
    Last edited by sluipneger; July 26th, 2024 at 07:50 PM.

  8. #8
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    13,822
    Distro
    Ubuntu

    Re: 20.04 to 22.04 kernel question

    Sometimes if a missing dependency is not installed it can list things as marked for autoremoval.
    Try doing a quick reinstall maybe
    Code:
    sudo apt install --reinstall linux-generic-hwe-22.04
    see if that helps clear it up.
    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

  9. #9
    Join Date
    Jul 2024
    Beans
    15

    Re: 20.04 to 22.04 kernel question

    I've tried to recreate the situation in a VM today. So I installed 20.04, then upgraded to 22.04. After upgrading, it was still using kernel 5.X, 6.X was not automatically installed. This is different from my previous experience, because then it was automatically installed.

    So, after sudo apt install linux-generic-hwe-22.0 it was installed. Then I removed the previous kernel versions and ran autoremove next. It did not show amd64-microcode intel-microcode iucode-tool like it does on my live pc. It did remove some other packages related to linux-generic-20.04.

    I will perform the same steps this evening on my live pc and let you know how it went.

    Regards,

    Sluipneger

    NB: the clean up of the dpkg-output went well, so thanks for that.

  10. #10
    Join Date
    Jul 2024
    Beans
    15

    Re: 20.04 to 22.04 kernel question

    -
    Last edited by sluipneger; July 27th, 2024 at 09:12 PM.

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •