0

A couple of days ago I found that my Ubuntu 21.10 could no longer perform updates, and at the same time found that the "Ubuntu Software" app finding utility could no longer find any apps at all available. When trying to update the system, I got this error report:

The package system is broken

Check if you are using third party repositories. If so disable them, since they are a common source of problems.
Furthermore run the following command in a Terminal: apt-get install -f
Transaction failed: The package system is broken
 The following packages have unmet dependencies:

linux-generic-hwe-20.04: Depends: linux-image-generic-hwe-20.04 (= 5.13.0.44.53) but 5.13.0.52.58 is installed Depends: linux-headers-generic-hwe-20.04 (= 5.13.0.44.53) but 5.13.0.52.58 is installed

Since then, I've searched around and tried various commands that appear to clean, fix, update dependencies, etc. of apt and dpkg (including the one recommended in the error), all of them running through several results successfully but also and including some error that looks about the same as the one above I think, with a kernel version dependency mismatch. I'm not sure how my kernel version appears to have gotten ahead of its dependants; I don't typically mess with the guts of my system and I'm not sure I could have caused this.

One oddity about my system that I will note is that this partition's filesystem is btrfs. It was a mostly successful experiment, except for the fact that when I run over RAM into swap, it never moves stuff back, so my system is always hopelessly bogged down until I restart, even after closing several programs. I think that this is unrelated, though.

Results of: dpkg -l | grep "linux-image*"

rc  linux-image-5.11.0-31-generic                 5.11.0-31.33                               amd64        Signed kernel image generic
rc  linux-image-5.11.0-34-generic                 5.11.0-34.36                               amd64        Signed kernel image generic
rc  linux-image-5.11.0-36-generic                 5.11.0-36.40                               amd64        Signed kernel image generic
rc  linux-image-5.11.0-37-generic                 5.11.0-37.41                               amd64        Signed kernel image generic
rc  linux-image-5.11.0-38-generic                 5.11.0-38.42                               amd64        Signed kernel image generic
rc  linux-image-5.11.0-40-generic                 5.11.0-40.44                               amd64        Signed kernel image generic
rc  linux-image-5.11.0-41-generic                 5.11.0-41.45                               amd64        Signed kernel image generic
rc  linux-image-5.11.0-44-generic                 5.11.0-44.48                               amd64        Signed kernel image generic
rc  linux-image-5.11.0-49-generic                 5.11.0-49.55                               amd64        Signed kernel image generic
rc  linux-image-5.13.0-37-generic                 5.13.0-37.42                               amd64        Signed kernel image generic
rc  linux-image-5.13.0-39-generic                 5.13.0-39.44                               amd64        Signed kernel image generic
ii  linux-image-5.13.0-40-generic                 5.13.0-40.45                               amd64        Signed kernel image generic
ii  linux-image-5.13.0-41-generic                 5.13.0-41.46                               amd64        Signed kernel image generic
ii  linux-image-5.13.0-44-generic                 5.13.0-44.49                               amd64        Signed kernel image generic
ii  linux-image-5.13.0-48-generic                 5.13.0-48.54                               amd64        Signed kernel image generic
ii  linux-image-5.13.0-52-generic                 5.13.0-52.59                               amd64        Signed kernel image generic
rc  linux-image-5.8.0-25-generic                  5.8.0-25.26                                amd64        Signed kernel image generic
rc  linux-image-5.8.0-29-generic                  5.8.0-29.31                                amd64        Signed kernel image generic
rc  linux-image-5.8.0-31-generic                  5.8.0-31.33                                amd64        Signed kernel image generic
rc  linux-image-5.8.0-33-generic                  5.8.0-33.36                                amd64        Signed kernel image generic
rc  linux-image-5.8.0-34-generic                  5.8.0-34.37                                amd64        Signed kernel image generic
rc  linux-image-5.8.0-36-generic                  5.8.0-36.40                                amd64        Signed kernel image generic
rc  linux-image-5.8.0-38-generic                  5.8.0-38.43                                amd64        Signed kernel image generic
rc  linux-image-5.8.0-41-generic                  5.8.0-41.46                                amd64        Signed kernel image generic
rc  linux-image-5.8.0-43-generic                  5.8.0-43.49                                amd64        Signed kernel image generic
rc  linux-image-5.8.0-44-generic                  5.8.0-44.50                                amd64        Signed kernel image generic
rc  linux-image-5.8.0-45-generic                  5.8.0-45.51                                amd64        Signed kernel image generic
rc  linux-image-5.8.0-48-generic                  5.8.0-48.54                                amd64        Signed kernel image generic
rc  linux-image-5.8.0-49-generic                  5.8.0-49.55                                amd64        Signed kernel image generic
rc  linux-image-5.8.0-50-generic                  5.8.0-50.56                                amd64        Signed kernel image generic
rc  linux-image-5.8.0-53-generic                  5.8.0-53.60                                amd64        Signed kernel image generic
rc  linux-image-5.8.0-55-generic                  5.8.0-55.62                                amd64        Signed kernel image generic
rc  linux-image-5.8.0-59-generic                  5.8.0-59.66                                amd64        Signed kernel image generic
rc  linux-image-5.8.0-63-generic                  5.8.0-63.71                                amd64        Signed kernel image generic
ii  linux-image-generic                           5.13.0.41.50                               amd64        Generic Linux kernel image
ii  linux-image-generic-hwe-20.04                 5.13.0.52.58                               amd64        Generic Linux kernel image

Edit based on people's suggestions: I don't know enough to be certain, but I don't think switching to archived release servers would help, since the problem is that I'm apparently using an HWE kernel somehow, and APT didn't like that. Is there a way to roll back my kernel version that would work in this case? Can I simply remove the too-new HWE kernel version (and how do I do that), or will it just break itself again because it's somehow set to use HWE kernels? Should I somehow force it to switch to a different update server, would that work, despite that this is a different problem than the one others suggested I look at?

Certainly I could reinstall my whole system, but if the solution is simple enough (and yes I do want to update it, I just fell behind in letting it because my internet is slow enough that I prefer to pick and choose when to update) then I'd rather not have to. And why is 21.10 only supported for such a short time anyway? (I thought I was on LTS.)

  • 21.10 is listed as going EOL this month, could that be relevant? – Organic Marble Jul 09 '22 at 03:01
  • 1
    A 21.10 system should not have the linux-generic-hwe-20.04 kernel package installed. HWE kernels are for LTS releases only, and HWE kernel metapackages are not in the 21.10 repositories. So that output suggests more to the story than so far revealed. – user535733 Jul 09 '22 at 05:16
  • I didn't know what HWE was until @h1_pr018032130 gave me a link explaining it. I'm not sure how I ended up with it installed; could it have occurred if some time ago I switched from the stably supported version to the more experimental releases, or vice versa? – Nathan Tibbetts Jul 09 '22 at 19:15
  • No, I should still have support, but even so I don't think this is that kind of problem. Even unsupported releases shouldn't have this kind of kernel mismatch, right? I think what I need is a way to roll back, perhaps? I'll edit my question accordingly. – Nathan Tibbetts Jul 09 '22 at 19:46

1 Answers1

1

EDIT BELOW

Keep in mind:

  • Ubuntu 21.10 reaches EOL 31Jul2022[0]
  • A non-LTS release should not be running HWE [1]

I assume you have installed (dpkg -l | grep "linux-image*"):

linux-image-5.13.0-52-generic 5.13.0.52.58 amd64 Signed kernel image generic

fallback linux-image-generic

linux-image-generic

Same for headers.

Your image and header files don't match your linux kernel meta package; linux-generic-hwe-20.04 points to linux-image-generic-hwe-20.04 and linux-headers-generic-hwe-20.04 which you don't have(?), because you shouldn't.

Although I'm curious how you got here, your best bet is to backup your home folder and perform some fresh install of another version of Ubuntu (you can only pick LTS until the new non-LTS comes out). Presumably you were going to do this at the end of month anyways.

Further reading around this topic (but not a direct solution to this problem) [2][3][4].

[0] https://endoflife.date/ubuntu

[1] What is hardware enablement (HWE)?

[2] APT wedged by kernel version mismatch

[3] Linux kernel meta package and headers

[4] How do I resolve unmet dependencies after adding a PPA?

EDIT 07/10/2022 based on the question being edited itself:

For an actual guide (I've only skimmed it): Downgrade Kernel Linux

My answer:

why is 21.10 only supported for such a short time anyway? (I thought I was on LTS.)

From Canonical itself [5]:

Every six months between LTS versions, Canonical publishes an interim release of Ubuntu, . . . Interim releases will introduce new capabilities from Canonical and upstream open source projects, they serve as a proving ground for these new capabilities.

Since you have a few kernels already installed you can boot into any of them during boot: How to get to the GRUB menu at boot-time?

Make sure the following package (with its dependencies) is installed:

linux-generic

sudo apt install linux-generic

You can see that the dependencies are the header and image packages (which have more dependencies)

You need to remove all three HWE packages[6] linux-generic-hwe-20.04 linux-headers-generic-hwe-20.04 linux-image-generic-hwe-20.04:

Terminal:

sudo apt purge linux-generic-hwe-20.04 linux-headers-generic-hwe-20.04 linux-image-generic-hwe-20.04

[5] https://ubuntu.com/about/release-cycle

[6] As a matter of fact, you should make sure you have no hwe package at all.

  • 1
    I've been allowing Linux to update itself, but hadn't yet found a convenient time for it because of slow internet, so I probably delayed it this time for too long or something. Thanks for the links, I'll take a look and see what I might have done wrong! – Nathan Tibbetts Jul 09 '22 at 19:13
  • @NathanTibbetts I will update my answer to fit your new edit. – h1_pr018032130 Jul 10 '22 at 09:06
  • 1
    Thanks! This is really helpful! Do you still recommend a complete reinstall in preference to this fix? (I do want to try the fix, but if you think the reinstall is a much better option I may try to take the time to do that). – Nathan Tibbetts Jul 11 '22 at 15:49
  • 1
    Thank you @h1_pr018032130, so far this fix appears to have worked! Package manager is working again, and a call to sudo hwo-support-status doesn't give an output. Hopefully I'll be able to update Ubuntu itself normally again, and if not, I'll eventually do a reinstall. – Nathan Tibbetts Jul 11 '22 at 22:17
  • @NathanTibbetts Glad it worked. I very much recommend you perform a fresh install before the end of the month (probably of the latest 22.04 version unless you have severe hardware constraints) since 21.10 won't be updated starting 01Aug2022. Remember to backup the files you wish to port to your new install (usually the $home folder). – h1_pr018032130 Jul 12 '22 at 06:20
  • 1
    Thanks. What makes it better to do a fresh install than to have Ubuntu update itself to the next major version? (Or does it only do this for minor version changes?) – Nathan Tibbetts Jul 14 '22 at 00:11
  • @NathanTibbetts It's more stable to perform a fresh install than to upgrade to a new version; sometimes the system can break (make a backup before any version upgrade) or it can carry bloat into your new version. The only issue with fresh installs (given you are porting your $home folder) is to install all the software again. You do have your config files on your home folder .config so you really would need to just install the programs and move on. – h1_pr018032130 Jul 14 '22 at 04:45
  • The stability issue makes sense, I just hadn't really heard it put that way. Again, thank you for your help and advice @h1_pr018032130 ! – Nathan Tibbetts Jul 15 '22 at 22:39