Unable to install linux-firmware (20230323.gitbcdcfbcf-0ubuntu1.6) "SOLVED"

Bug #2036339 reported by vimo
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux-firmware (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

O.S.: Ubuntu 23.04
Package: linux-firmware 20230323.gitbcdcfbcf-0ubuntu1.6

Trying to install the package above, I receive these errors:

Configuring linux-firmware (20230323.gitbcdcfbcf-0ubuntu1.6)...
update-initramfs: Generating /boot/initrd.img-6.2.0-32-generic
update-initramfs: Generating /boot/initrd.img-6.2.0-31-generic
update-initramfs: Generating /boot/initrd.img-6.2.0-24-generic
grep: /boot/config-6.2.0-24-generic: No such file or directory
W: zstd compression (CONFIG_RD_ZSTD) not supported by the kernel, using gzip
grep: /boot/config-6.2.0-24-generic: No such file or directory
E: gzip compression (CONFIG_RD_GZIP) not supported by the kernel
update-initramfs: failed for /boot/initrd.img-6.2.0-24-generic with exit code 1
dpkg: error processing package linux-firmware (--configure):
subprocess installed linux-firmware package post-installation script returned error status 1
Errors were encountered while processing:
linux-firmware
E: Sub-process /usr/bin/dpkg returned an error code (1)

I tried to uninstall the package with
sudo apt remove --purge linux-firmware
and then reinstall it, but without success.

Same result when trying installing older packages 20230323.gitbcdcfbcf-0ubuntu1.2 and 20230323.gitbcdcfbcf-0ubuntu1

vimo (vimot2)
description: updated
summary: - Unable to configure linux-firmware (20230323.gitbcdcfbcf-0ubuntu1.6)
+ Unable to install linux-firmware (20230323.gitbcdcfbcf-0ubuntu1.6)
description: updated
Revision history for this message
Juerg Haefliger (juergh) wrote : Re: Unable to install linux-firmware (20230323.gitbcdcfbcf-0ubuntu1.6)

You have a somewhat broken system:
 grep: /boot/config-6.2.0-24-generic: No such file or directory

What does 'dpkg -l | grep linux-' show?

Changed in linux-firmware (Ubuntu):
status: New → Incomplete
Revision history for this message
vimo (vimot2) wrote :
Download full text (26.0 KiB)

dpkg -l | grep linux-
ii binutils-x86-64-linux-gnu 2.40-2ubuntu4.1 amd64 GNU binary utilities, for x86-64-linux-gnu target
ii ladspa-sdk 1.17-1 amd64 sample tools for linux-audio-dev plugin architecture
ii linux-base 4.5ubuntu9 all Linux image base package
iF linux-firmware 20230323.gitbcdcfbcf-0ubuntu1.6 all Firmware for Linux kernel drivers
ii linux-firmware-nonfree 1.16 all Non-free firmware for Linux kernel drivers
ii linux-headers-6.2.0-31 6.2.0-31.31 all Header files related to Linux kernel version 6.2.0
ii linux-headers-6.2.0-31-generic 6.2.0-31.31 amd64 Linux kernel headers for version 6.2.0 on 64 bit x86 SMP
ii linux-headers-6.2.0-32 6.2.0-32.32 all Header files related to Linux kernel version 6.2.0
ii linux-headers-6.2.0-32-generic 6.2.0-32.32 amd64 Linux kernel headers for version 6.2.0 on 64 bit x86 SMP
ii linux-headers-generic 6.2.0.32.32 amd64 Generic Linux kernel headers
ic linux-image-6.2.0-25-generic 6.2.0-25.25 amd64 Signed kernel image generic
ic linux-image-6.2.0-26-generic 6.2.0-26.26 amd64 Signed kernel image generic
rc linux-image-6.2.0-27-generic 6.2.0-27.28 amd64 Signed kernel image generic
ii linux-image-6.2.0-31-generic 6.2.0-31.31 amd64 Signed kernel image generic
ii linux-image-6.2.0-32-generic 6.2.0-32.32 amd64 Signed kernel image generic
ii linux-libc-dev:amd64 6.2.0-32.32 amd64 Linux Kernel Headers for development
ii linux-libc-dev:i386 6.2.0-32.32 i386 Linux Kernel Headers for development
rc linux-modules-5.11.0-17-generic 5.11.0-17.18 amd64 Linux kernel extra modules for version 5.11.0 on 64 bit x86 SMP
rc linux-modules-5.11.0-18-generic 5.11.0-18.19 ...

Revision history for this message
vimo (vimot2) wrote :

Thank you https://launchpad.net/~juergh

Since you pointed out the error relating to linux-firmware-6.2.0-24-generic, I tried reinstalling it (receiving new errors) and then doing a purge.

The linux-firmware package now installs successfully

I wonder if I can also purge all the packages reported in the output of the dpkg -l | command grep linux- which I posted above, with the acronym "rc" (they should be packages in broken state). Since they are referring to older firmware modules, there shouldn't be any problems, I think. Can anyone confirm this?

After that I mark the bug as SOLVED.

Revision history for this message
Juerg Haefliger (juergh) wrote :

You can purge all these:

ic linux-image-6.2.0-25-generic
ic linux-image-6.2.0-26-generic
rc linux-image-6.2.0-27-generic
rc linux-modules-5.11.0-17-generic
rc linux-modules-5.11.0-18-generic

I still don't understand why update-initramfs tries kernel 6.2.0-24 when you don't have that installed.

Revision history for this message
vimo (vimot2) wrote :

"I still don't understand why update-initramfs tries kernel 6.2.0-24 when you don't have that installed."

So do I.
However I run the command:
dpkg --list |grep "^rc" | cut -d " " -f 3 | xargs sudo dpkg --purge

purging the residual configurations of all removed packages.

I will mark the bug as SOLVED
Thank you very much for the support.

summary: Unable to install linux-firmware (20230323.gitbcdcfbcf-0ubuntu1.6)
+ "SOLVED"
Revision history for this message
Juerg Haefliger (juergh) wrote :

One more thing, what's the output of 'linux-version list'?

Changed in linux-firmware (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
vimo (vimot2) wrote :

linux-version list
6.2.0-31-generic
6.2.0-32-generic

Revision history for this message
laurenz baba (laurenzbaba) wrote :
Download full text (4.7 KiB)

I am having a similar problem here.
I am trying to uninstall the AMD ROCM kernel module, which fails with the following message:

sudo apt autoremove amdgpu-dkms
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
  amdgpu-dkms
0 upgraded, 0 newly installed, 1 to remove and 2 not upgraded.
1 not fully installed or removed.
After this operation, 441 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 214096 files and directories currently installed.)
Removing amdgpu-dkms (1:6.1.5.50601-1649308.22.04) ...
update-initramfs: Generating /boot/initrd.img-6.2.0-31-generic
grep: /boot/config-6.2.0-31-generic: No such file or directory
W: zstd compression (CONFIG_RD_ZSTD) not supported by kernel, using gzip
grep: /boot/config-6.2.0-31-generic: No such file or directory
E: gzip compression (CONFIG_RD_GZIP) not supported by kernel
update-initramfs: failed for /boot/initrd.img-6.2.0-31-generic with 1.
dpkg: error processing package amdgpu-dkms (--remove):
 installed amdgpu-dkms package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 amdgpu-dkms
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

Again update-initramfs seems to try to do something with an non-existent kernel:
laurenz@katuunko:~$ dpkg -l | grep linux-
ii binutils-x86-64-linux-gnu 2.40-2ubuntu4.1 amd64 GNU binary utilities, for x86-64-linux-gnu target
ii linux-base 4.5ubuntu9 all Linux image base package
ii linux-firmware 20230323.gitbcdcfbcf-0ubuntu1.6 all Firmware for Linux kernel drivers
ii linux-generic 6.2.0.33.33 amd64 Complete Generic Linux kernel and headers
ii linux-generic-hwe-22.04 6.2.0.33.33 amd64 Complete Generic Linux kernel and headers
ii linux-headers-6.2.0-32 6.2.0-32.32 all Header files related to Linux kernel version 6.2.0
ii linux-headers-6.2.0-32-generic 6.2.0-32.32 amd64 Linux kernel headers for version 6.2.0 on 64 bit x86 SMP
ii linux-headers-6.2.0-33 6.2.0-33.33 all Header files related to Linux kernel version 6.2.0
ii linux-headers-6.2.0-33-generic 6.2.0-33.33 amd64 Linux kernel headers for version 6.2.0 on 64 bit x86 SMP
ii linux-headers-generic 6.2.0.33.33 amd64 Generic Linux kernel headers
ii linux-headers-generic-hwe-22.04 6.2.0.33.33 amd64 Generic Linux kernel headers
ii linux-image-6.2.0-32-generic 6.2.0-32.32 amd64 Signed kernel image generic
ii linux-imag...

Read more...

Revision history for this message
vimo (vimot2) wrote (last edit ):

Sorry https://launchpad.net/~laurenzbaba, unfortunately I'm not a Linux expert.
I hope someone more knowledgeable can help you.

I assume you have already run the commands:
sudo apt install -f
sudo apt clean
sudo apt autoclean

I see that dpkg is considering linux-image-6.2.0-31-generic
You could try to purge:
linux-image-6.2.0-31-generic
linux-modules-6.2.0-31-generic

Maybe https://launchpad.net/~juergh can help you as he made with me.

Revision history for this message
Juerg Haefliger (juergh) wrote :

Oh I wonder if it's the DKMS that makes the system believe there's kernel 6.2.0-31-generic. What do you get for:

$ dkms status

Revision history for this message
laurenz baba (laurenzbaba) wrote :

Hi @joergh,
Unfortunately dkms status returns nothing:
laurenz@katuunko:~$ dkms status

@vimo
I tried to purge the Linux image but it was not possible, because it isn't installed anymore:
sudo apt purge linux-image-6.2.0-31-generic
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package 'linux-image-6.2.0-31-generic' is not installed, so not removed
The following packages will be REMOVED:
  amdgpu-dkms
0 upgraded, 0 newly installed, 1 to remove and 8 not upgraded.
1 not fully installed or removed.
After this operation, 441 MB disk space will be freed.
Do you want to continue? [Y/n] n
Abort.

I also tried to execute the other commands but it returned the same error:
sudo apt install -f
sudo apt clean
sudo apt autoclean
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
  amdgpu-dkms
0 upgraded, 0 newly installed, 1 to remove and 8 not upgraded.
1 not fully installed or removed.
After this operation, 441 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 214096 files and directories currently installed.)
Removing amdgpu-dkms (1:6.1.5.50601-1649308.22.04) ...
update-initramfs: Generating /boot/initrd.img-6.2.0-31-generic
grep: /boot/config-6.2.0-31-generic: No such file or directory
W: zstd compression (CONFIG_RD_ZSTD) not supported by kernel, using gzip
grep: /boot/config-6.2.0-31-generic: No such file or directory
E: gzip compression (CONFIG_RD_GZIP) not supported by kernel
update-initramfs: failed for /boot/initrd.img-6.2.0-31-generic with 1.
dpkg: error processing package amdgpu-dkms (--remove):
 installed amdgpu-dkms package post-removal script subprocess returned error exi
t status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 amdgpu-dkms
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done

Revision history for this message
Juerg Haefliger (juergh) wrote :

Hm. Maybe that unsupported DKMS package is broken. I need to check what it does.

Revision history for this message
Juerg Haefliger (juergh) wrote :

Yeah this seems horribly broken packaging. What do you get for:

$ cat /var/tmp/amdgpu-dkms-kernels

Remove all lines that reference uninstalled kernels and then try to remove the package again.

Revision history for this message
vimo (vimot2) wrote :

@lorenz baba,
I'm sorry, but I don't think I can give you any further advice. 😢
I hope you can resolve it soon.

Revision history for this message
laurenz baba (laurenzbaba) wrote :

@vimo
No problem at all, I appreciate your support :)

@juergh
Thank you so much for your help.
Indeed, this file shows references to the non-existent 6.2.0.31 kernel:
cat /var/tmp/amdgpu-dkms-kernels
6.2.0-31-generic
6.2.0-32-generic

After I removed the -31 line, it was possible to uninstall the amdgpu-dkms package.
Great job!

Revision history for this message
Juerg Haefliger (juergh) wrote :

Cool. Glad this is resolved.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.