Score:2

Linux Kernel update error causing package management to grind to a halt!

dk flag

I recently went to update my system (Ubuntu Studio 22.10) and new Linux Kernels were available. On Ubuntu Studio you receive updates for both the generic and low latency kernels, with the low latency being the one you boot too.

Well something has clearly gone wrong with this, as it fails to install the updated kernels (both of them) and now I can't install or update any of my packages using apt (luckily snap and flatpak still works).

I am currently stuck on kernel low latency 1009, when 1012 is available.

I've seen some questions similar to this but none can provide me with a solution.

Neither Sudo apt-get install -f nor sudo apt --fix-broken install work.

My system seems to want me to remove linux-image-5.19.0-23-generic but any attempt to remove this package fails, and tells me that dpkg has ran into too many errors.

When attempting to remove the package through Synaptic all I got was this:

E: linux-image-5.19.0-23-generic: installed linux-image-5.19.0-23-generic package post-removal script subprocess returned error exit status 1

It might also be useful to note that this install of Ubuntu started at 21.10 and has been upgraded through 22.04 and 22.10. I would really rather not have to reinstall my entire system. So please say there is a way to fix this.

I'll be glad to provide more info if needed.

Thank you in advance!

Edit: here is the output of apt -f install

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED
  linux-image-5.19.0-23-generic
0 to upgrade, 0 to newly install, 1 to remove and 2 not to upgrade.
3 not fully installed or removed.
After this operation, 12.2 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 406974 files and directories currently installed.)
Removing linux-image-5.19.0-23-generic (5.19.0-23.24) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.19.0-23-generic
/etc/kernel/postrm.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
/etc/grub.d/bin/grubcfg_proxy: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-5.19.0-23-generic (--remove):
 installed linux-image-5.19.0-23-generic package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 linux-image-5.19.0-23-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
AdLinux avatar
dk flag
Sure, I'll add that to the main question now!
user535733 avatar
cn flag
`error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory` install or re-install that lib.
AdLinux avatar
dk flag
When I try installing `libcrypto.so.1.1` it tells me that the package doesn't exist. Instead in Synaptic there are the packages `libssl3` `libssl3:i386` and `libcrypto++8` that are installed. I have tried to reinstall them through Synaptic but it also fails giving me this error: `E: linux-image-5.19.0-1012-lowlatency: installed linux-image-5.19.0-1012-lowlatency package post-installation script subprocess returned error exit status 1 E: linux-image-5.19.0-26-generic: installed linux-image-5.19.0-26-generic package post-installation script subprocess returned error exit status 1`
Score:4
mx flag

Currently you cannot do much except install the libcrypto.so.1.1 which is an deprecated version like this.

the origin of the problem is the grub script grub_proxy, it is not from any official packages. It must come from your own modification or from some ppa.

Please try:

apt-file find grubcfg_proxy

If you have apt-file. Identify that package and uninstall it. Then try to find alternative to it. I guess you are using grub-customizer. When you use some ppa change your boot process and then use do-release-upgrade is basically shooting yourself in the foot. Because, do-release-upgrade will try to mask out all customized repos. However, boot process definitely depends on those masked out packages to function. Moreover, the old packages on the system usually depend on system libraries accurately to specific subversions. So in most cases the old packages won't work at all. Most users do not notice this, since they are not using boot-process-customizers. After reboot into new version, the broken packages can be upgraded by enable the ppa of new release version or uninstalled and replaced by alternative packages.

To me, the release upgrade never works (more than 20 year experience. I try the release upgrade method every time I saw it, never works.). I highly recommend you reinstall your system regularly. You have to be smart to keep your /home on a different partition and do not format or overwrite it during installation. After installation, you can try out fresh system to see if you like it. Then modify /etc/fstab to mount your /home partition back. Then you can see if there is some config in your ~ you have to modify (usually only small portion of them need to be changed/recreated).

You can check how many mess the release-upgrade had created via running aptitude search '?narrow(?installed, ~o)'. This gives you the orphan packages usually a source of broken dependencies.

Reinstall ubuntu only take about 10 mins, so no real reason to not do it if you do not perform deep customization: (adding too many ppas, change too much boot configuration, use more than twice update-alternatives). If you do lots of customization then you wish not touch the configurations. However, the configure files change formats, the packages come and go. Thus, if you wish to not touch the configuration, you end up cannot upgrade at all: the release update will destroy your system. This is hard lesson I learned at the very beginning and it remains true. So I highly recommand you only do user customization with configs in your ~/. Only touch very small set of configuration in /etc and use some sysop tools like ansible to maintain it, if you feel you still touched too many parts of the system and need to automate it. If you do not know what ansible is and do not want to learn it. Then I suggest you choose the best distro fit you out-of-box. Do NOT tweak the system to make it your own distro, it is missing impossible. You have to ask yourself if you hate most of the default settings why you are still using this distro at all.

AdLinux avatar
dk flag
I really appreciate your very comprehensive answer! I ran `apt-file find grubcfg_proxy` and it gave me nothing. But in my file manager I have found a file called `grubcfg_proxy` If I delete that will I need to do anything else? You say find an alternative to that, I'm afraid I don't know how. I also ran `aptitude search '?narrow(?installed, ~o)'` and it listed a few programs, none were grub. But one titled: `libfam0` had an A next to it as well as an i. Does this help at all? As for messing with my system too much. I'm going to ditch PPAs after this, and never use the customizer again.
mx flag
please do not just delete that file. Because you do not know if your boot process depends on that or not. just try the first link I give to u. install that lib, then it should work. Do the rest change after you fix the apt-get and kernel update issue.
mx flag
please do not just delete that file. Because you do not know if your boot process depends on that or not. just try the first link I give to u. install that lib, then it should work. Do the rest change after you fix the apt-get and kernel update issue. After you fixed the kernel updates and reboot is fine. You can play around. You cannot see the grubcfg_proxy just means you have not enable the ppa that provides that. It does not means you do not have package on your system depends on that.
mx flag
please try `dpkg -S /etc/grub.d/bin/grubcfg_proxy` this will search your local packages
pl flag
Did you install `grub-customizer` at some point? It looks like that provides the problematic `grubcfg_proxy`
AdLinux avatar
dk flag
@Wang I'll try installing that package from Debian to see if it works. Do you know if it's also worth reinstalling Grub? Or should I leave that alone? Also the dpkg search gave me this `dpkg-query: no path found matching pattern /etc/grub.d/bin/grubcfg_proxy` @popey Alas yes, I did once have `grub-customizer` on here. I think I installed it when my system was still on Ubuntu 21.10. (Ps, off topic, I always find you really funny and insightful on podcasts!)
AdLinux avatar
dk flag
Right, here's an update: I installed `libssl1.1` from Debian and installed it. This allowed me to finally update the kernels. So I'm now on `lowlatency-1012`. BUT; for some reason the packages `grub-efi-amd64-bin grub-efi-amd64-signed` are still being kept back. When I run `apt list --upgradable` it gives me this: `grub-efi-amd64-bin/kinetic-updates 2.06-2ubuntu13 amd64 [upgradable from: 2.06-2ubuntu12] grub-efi-amd64-signed/kinetic-updates 1.186+2.06-2ubuntu13 amd64 [upgradable from: 1.185+2.06-2ubuntu12]` Also, should I now remove `libssl1.1`? And what can I do about the `grubcfg_proxy`?
mx flag
if you do not have grub-customizer any more, you can first try: `sudo aptitude purge ?config-files`. If the file still exists. I do not thing normally there is `/etc/grub.d/bin` at all. if you have more file than grubcfg_proxy, you problem want to do similar thing as above to figure out where they come from. You probably need to figure what file in /etc/grub.d is using the bin dir. If there isn't, just `mv bin bin.bak`. then try update-grub to see if there is problem.
mx flag
libssl1.1 usually should not block grub update though. If it says upgradable, you can just try `apt upgrade` to see why it does not actually upgrade.
AdLinux avatar
dk flag
@Wang I've ran `sudo aptitude purge ?config-files` now.
AdLinux avatar
dk flag
@Wang Also, inside `etc/grub.d/bin` there was the `grubcfg_proxy` file. The command you recommended `mv bin bin.bak` didn't seem to do anything, it just said `mv: cannot stat 'bin': No such file or directory`. That said I am unfamiliar with `mv`. Also, thank you for your patience with me, I really appreciate it!
mx flag
you have to do that command inside `/etc/grub.d`
AdLinux avatar
dk flag
@Wang I just ran that command in the directory. Now when I run `update-grub` I get this: `Sourcing file `/etc/default/grub' Sourcing file `/etc/default/grub.d/init-select.cfg' Generating grub configuration file ... /etc/grub.d/09_lowlatency_proxy: 3: /etc/grub.d/bin/grubcfg_proxy: not found`
mx flag
as I said before you have to make sure your grub is not using the grubcfg_proxy before you do so. Did you read all the files in your /etc/grub.d?
AdLinux avatar
dk flag
@Wang It all seems to be working now! So I'm going to set the question to answered. Thank you for your great help :D
Score:-1
ir flag

Found a simple solution...

My grub was failing to boot in low latency, due to the last full upgrade didn't install the low latency images...

So I tried to fix this... Rebbot in recovery mode, and activate network... Go to root command line, and run apt or apt-get, update and make a full upgrade system... Currently not installing any image file... Reboot again check if you have any low-latency for the latest kernel to boot, if you don't have... reboot on the last low-latency image available. In my case it is 5.6.2-low latency, and do the same Wich I'm doing right now... It seems it is an error loading the low -latency images...

It happens when the system installed Ubuntu 5.15.0-60 update, it missed the low latency images and headers...

Solution:::::

Load up the latest generic image in recovery mode. Active network Go root command line Run apt-get or apt update Run apt install linux-image-(your image number)-lowlatency Example: apt-get install linux-image-5.15.0-60-lowlatency

Then install headers apt-get install linux-headers-5.15.0-60-lowlatency

Reboot

It will be fixed...

Thank you guys...

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.