Errors while updating system or install new packages Debian 12 (Solved sort of)

If none of the specific sub-forums seem right for your thread, ask here.
Message
Author
User avatar
kc1di
Posts: 304
Joined: 2007-03-12 12:52
Location: Somewhere In Maine
Has thanked: 5 times
Been thanked: 20 times

Errors while updating system or install new packages Debian 12 (Solved sort of)

#1 Post by kc1di »

I get the following terminal errors while trying to update a package or install new ones.
dpkg: error processing package linux-image-amd64 (--configure):
dependency problems - leaving unconfigured
Processing triggers for initramfs-tools (0.142) ...
update-initramfs: Generating /boot/initrd.img-6.1.0-9-amd64
raspi-firmware: missing /boot/firmware, did you forget to mount it?
run-parts: /etc/initramfs/post-update.d//z50-raspi-firmware exited with return code 1
dpkg: error processing package initramfs-tools (--configure):
installed initramfs-tools package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
linux-image-6.1.0-9-amd64
linux-image-amd64
initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
any resolution to this?
Last edited by kc1di on 2023-06-12 22:22, edited 1 time in total.
Dave
Morse Code -An Early digital mode !
Bookworm
John 3:16
Registered Linux User # 462608

User avatar
None1975
df -h | participant
df -h | participant
Posts: 1536
Joined: 2015-11-29 18:23
Location: Russia, Kaliningrad
Has thanked: 63 times
Been thanked: 89 times

Re: Errors while updating system or install new packages Debian 12

#2 Post by None1975 »

Hello. Please show us content of your sources list (the main apt sources configuration file is at /etc/apt/sources.list). And past output here.
OS: Debian 12.4 Bookworm / DE: XFCE
Debian Wiki | DontBreakDebian, My config files on github

User avatar
kc1di
Posts: 304
Joined: 2007-03-12 12:52
Location: Somewhere In Maine
Has thanked: 5 times
Been thanked: 20 times

Re: Errors while updating system or install new packages Debian 12

#3 Post by kc1di »

None1975 wrote: 2023-06-12 11:54 Hello. Please show us content of your sources list (the main apt sources configuration file is at /etc/apt/sources.list). And past output here.
Source list.
# deb cdrom:[Debian GNU/Linux 12 _Bookworm_ - Official Snapshot amd64 LIVE/INSTALL Binary 20230401-20:14]/ bookworm non-free-firmware main

deb http://deb.debian.org/debian/ bookworm main
deb-src http://deb.debian.org/debian/ bookworm main

deb http://security.debian.org/debian-security/ bookworm-security main
deb-src http://security.debian.org/debian-security/ bookworm-security main

# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.
Dave
Morse Code -An Early digital mode !
Bookworm
John 3:16
Registered Linux User # 462608

User avatar
sunrat
Site admin
Site admin
Posts: 7397
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 134 times
Been thanked: 654 times

Re: Errors while updating system or install new packages Debian 12

#4 Post by sunrat »

raspi-firmware is in the non-free-firmware section of the repo for Bookworm so you need to add it to your sources. It's explained in the release notes.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

User avatar
kc1di
Posts: 304
Joined: 2007-03-12 12:52
Location: Somewhere In Maine
Has thanked: 5 times
Been thanked: 20 times

Re: Errors while updating system or install new packages Debian 12

#5 Post by kc1di »

thanks for the reply.
I've changed my sources list to this and am still getting the same errors.
# deb cdrom:[Debian GNU/Linux 12 _Bookworm_ - Official Snapshot amd64 LIVE/INSTALL Binary 20230401-20:14]/ bookworm non-free-firmware main

deb http://deb.debian.org/debian bookworm main non-free-firmware
deb-src http://deb.debian.org/debian bookworm main non-free-firmware

deb http://deb.debian.org/debian-security/ bookworm-security main non-free-firmware
deb-src http://deb.debian.org/debian-security/ bookworm-security main non-free-firmware

deb http://deb.debian.org/debian bookworm-updates main non-free-firmware
deb-src http://deb.debian.org/debian bookworm-updates main non-free-firmware
Errors now:
dpkg: error processing package linux-image-amd64 (--configure):
dependency problems - leaving unconfigured
Processing triggers for initramfs-tools (0.142) ...
update-initramfs: Generating /boot/initrd.img-6.1.0-9-amd64
raspi-firmware: missing /boot/firmware, did you forget to mount it?
run-parts: /etc/initramfs/post-update.d//z50-raspi-firmware exited with return code 1
dpkg: error processing package initramfs-tools (--configure):
installed initramfs-tools package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
linux-image-6.1.0-9-amd64
linux-image-amd64
initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
Dave
Morse Code -An Early digital mode !
Bookworm
John 3:16
Registered Linux User # 462608

User avatar
sunrat
Site admin
Site admin
Posts: 7397
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 134 times
Been thanked: 654 times

Re: Errors while updating system or install new packages Debian 12

#6 Post by sunrat »

Show

Code: Select all

apt policy raspi-firmware
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

Random_Troll
Posts: 444
Joined: 2023-02-07 13:35
Been thanked: 105 times

Re: Errors while updating system or install new packages Debian 12

#7 Post by Random_Troll »

See https://bugs.debian.org/cgi-bin/bugrepo ... ug=1032071

This also cropped up in viewtopic.php?t=154565.

You have to remove /etc/kernel/postinst.d/z50-raspi-firmware & /etc/kernel/postrm.d/z50-raspi-firmware manually, purge the raspi-firmware package then remove the files left over, as per https://bugs.debian.org/cgi-bin/bugrepo ... ug=1035783.

Bit of a mess really. The bug report was filed a long time ago and I had hoped it would be fixed by now. Perhaps comment on @p.H's bug report to see if it gets any more traction.
Jeder nach seinen Fähigkeiten, jedem nach seinen Bedürfnissen.

User avatar
kc1di
Posts: 304
Joined: 2007-03-12 12:52
Location: Somewhere In Maine
Has thanked: 5 times
Been thanked: 20 times

Re: Errors while updating system or install new packages Debian 12

#8 Post by kc1di »

sunrat wrote: 2023-06-12 14:29 Show

Code: Select all

apt policy raspi-firmware
Here is the output:

Code: Select all

apt policy raspi-firmware
raspi-firmware:
  Installed: 1.20220830+ds-1
  Candidate: 1.20220830+ds-1
  Version table:
 *** 1.20220830+ds-1 500
        500 http://deb.debian.org/debian bookworm/non-free-firmware amd64 Packages
        500 http://deb.debian.org/debian bookworm/non-free-firmware i386 Packages
        100 /var/lib/dpkg/status
Dave
Morse Code -An Early digital mode !
Bookworm
John 3:16
Registered Linux User # 462608

User avatar
kc1di
Posts: 304
Joined: 2007-03-12 12:52
Location: Somewhere In Maine
Has thanked: 5 times
Been thanked: 20 times

Re: Errors while updating system or install new packages Debian 12

#9 Post by kc1di »

I decided to reinstall from the net install image and that fixed the problem. Evidently there is a problem with the install from the Live image.
Dave
Morse Code -An Early digital mode !
Bookworm
John 3:16
Registered Linux User # 462608

Random_Troll
Posts: 444
Joined: 2023-02-07 13:35
Been thanked: 105 times

Re: Errors while updating system or install new packages Debian 12

#10 Post by Random_Troll »

kc1di wrote: 2023-06-12 21:24Evidently there is a problem with the install from the Live image.
@kc1di, I linked to two relevant bug reports in my post and also explained how to fix the problem. Any particular reason why you ignored that?
Jeder nach seinen Fähigkeiten, jedem nach seinen Bedürfnissen.

User avatar
kc1di
Posts: 304
Joined: 2007-03-12 12:52
Location: Somewhere In Maine
Has thanked: 5 times
Been thanked: 20 times

Re: Errors while updating system or install new packages Debian 12

#11 Post by kc1di »

Random_Troll wrote: 2023-06-13 05:05
kc1di wrote: 2023-06-12 21:24Evidently there is a problem with the install from the Live image.
@kc1di, I linked to two relevant bug reports in my post and also explained how to fix the problem. Any particular reason why you ignored that?
I looked them over and choose to reinstall and get a clean install. And that worked for me. It was easier than trying to fix the problems with the first install.
Others may find it better to fix the install. but try all that was suggested did not fix the problem on my install from the live usb.
Thank you for your reply.
Dave
Morse Code -An Early digital mode !
Bookworm
John 3:16
Registered Linux User # 462608

User avatar
None1975
df -h | participant
df -h | participant
Posts: 1536
Joined: 2015-11-29 18:23
Location: Russia, Kaliningrad
Has thanked: 63 times
Been thanked: 89 times

Re: Errors while updating system or install new packages Debian 12

#12 Post by None1975 »

Random_Troll wrote: 2023-06-12 15:54 See https://bugs.debian.org/cgi-bin/bugrepo ... ug=1032071

This also cropped up in viewtopic.php?t=154565.

You have to remove /etc/kernel/postinst.d/z50-raspi-firmware & /etc/kernel/postrm.d/z50-raspi-firmware manually, purge the raspi-firmware package then remove the files left over, as per https://bugs.debian.org/cgi-bin/bugrepo ... ug=1035783.

Bit of a mess really. The bug report was filed a long time ago and I had hoped it would be fixed by now. Perhaps comment on @p.H's bug report to see if it gets any more traction.
Hello. No, you don't need to manually delete these files. It is enough to delete the package raspi-firmware with

Code: Select all

#apt autoremove --purge raspi-firmware
Configuration files will be deleted automatically.

I also encountered this problem when i installed Debian 12 for my friend from debian-live-12.0.0-amd64-standard.iso

Here proof:

Image
OS: Debian 12.4 Bookworm / DE: XFCE
Debian Wiki | DontBreakDebian, My config files on github

Random_Troll
Posts: 444
Joined: 2023-02-07 13:35
Been thanked: 105 times

Re: Errors while updating system or install new packages Debian 12

#13 Post by Random_Troll »

None1975 wrote: 2023-06-13 14:21Configuration files will be deleted automatically.
So you didn't read the second linked bug report then? The raspi-firmware package is very broken and leaves sh.it behind after it is purged. Very poor packaging.

EDIT: these boards now convert "sh.it" to "crap". That is pathetic.
Jeder nach seinen Fähigkeiten, jedem nach seinen Bedürfnissen.

User avatar
None1975
df -h | participant
df -h | participant
Posts: 1536
Joined: 2015-11-29 18:23
Location: Russia, Kaliningrad
Has thanked: 63 times
Been thanked: 89 times

Re: Errors while updating system or install new packages Debian 12

#14 Post by None1975 »

Random_Troll wrote: 2023-06-13 17:37 So you didn't read the second linked bug report then?
Hello. Yes, you are right. I looked at what was in the directory

Code: Select all

/boot/firmware/
There are the same files as indicated in #1035783 bug report. Sorry for the noise.
OS: Debian 12.4 Bookworm / DE: XFCE
Debian Wiki | DontBreakDebian, My config files on github

Cass
Posts: 1
Joined: 2023-06-17 22:49
Has thanked: 1 time

Re: Errors while updating system or install new packages Debian 12

#15 Post by Cass »

Random_Troll wrote: 2023-06-12 15:54 See https://bugs.debian.org/cgi-bin/bugrepo ... ug=1032071

This also cropped up in viewtopic.php?t=154565.

You have to remove /etc/kernel/postinst.d/z50-raspi-firmware & /etc/kernel/postrm.d/z50-raspi-firmware manually, purge the raspi-firmware package then remove the files left over, as per https://bugs.debian.org/cgi-bin/bugrepo ... ug=1035783.

Bit of a mess really. The bug report was filed a long time ago and I had hoped it would be fixed by now. Perhaps comment on @p.H's bug report to see if it gets any more traction.
Hi, I opened this account just so that I can say thank you. Thank you, random stranger on the internet. Have a nice day.

Danathar
Posts: 28
Joined: 2021-01-10 12:44
Been thanked: 1 time

Re: Errors while updating system or install new packages Debian 12

#16 Post by Danathar »

kc1di wrote: 2023-06-12 21:24 I decided to reinstall from the net install image and that fixed the problem. Evidently there is a problem with the install from the Live image.
Thanks for that! I was scratching my head on that one as well after doing an install from the kde live image.

User avatar
marcelmo
Posts: 12
Joined: 2019-12-14 09:37
Location: Netherlands

Re: Errors while updating system or install new packages Debian 12

#17 Post by marcelmo »

Random_Troll wrote: 2023-06-12 15:54 See https://bugs.debian.org/cgi-bin/bugrepo ... ug=1032071

This also cropped up in viewtopic.php?t=154565.

You have to remove /etc/kernel/postinst.d/z50-raspi-firmware & /etc/kernel/postrm.d/z50-raspi-firmware manually, purge the raspi-firmware package then remove the files left over, as per https://bugs.debian.org/cgi-bin/bugrepo ... ug=1035783.

Bit of a mess really. The bug report was filed a long time ago and I had hoped it would be fixed by now. Perhaps comment on @p.H's bug report to see if it gets any more traction.
Hi, had this raspi-firmware issue also, followed your advice from the quoted message and also purged with "apt autoremove --purge raspi-firmware".
Then I had left over files in /boot/firmware, but these were all owned by root, so not deleted. Don't know if I had to do this?

well, these files reside there;

Code: Select all

-rw-r--r-- 1 root root    52460 10 jun 10:51 bootcode.bin
-rw-r--r-- 1 root root      144 17 jun 07:51 cmdline.txt
-rw-r--r-- 1 root root      508 17 jun 07:51 config.txt
-rw-r--r-- 1 root root     3170 10 jun 10:51 fixup4cd.dat
-rw-r--r-- 1 root root     5399 10 jun 10:51 fixup4.dat
-rw-r--r-- 1 root root     8379 10 jun 10:51 fixup4db.dat
-rw-r--r-- 1 root root     8379 10 jun 10:51 fixup4x.dat
-rw-r--r-- 1 root root     3170 10 jun 10:51 fixup_cd.dat
-rw-r--r-- 1 root root     7262 10 jun 10:51 fixup.dat
-rw-r--r-- 1 root root    10228 10 jun 10:51 fixup_db.dat
-rw-r--r-- 1 root root    10226 10 jun 10:51 fixup_x.dat
-rw-r--r-- 1 root root 84200728 17 jun 07:51 initrd.img-6.1.0-9-amd64
-rw-r--r-- 1 root root   803964 10 jun 10:51 start4cd.elf
-rw-r--r-- 1 root root  3744808 10 jun 10:51 start4db.elf
-rw-r--r-- 1 root root  2249280 10 jun 10:51 start4.elf
-rw-r--r-- 1 root root  2996680 10 jun 10:51 start4x.elf
-rw-r--r-- 1 root root   803964 10 jun 10:51 start_cd.elf
-rw-r--r-- 1 root root  4816712 10 jun 10:51 start_db.elf
-rw-r--r-- 1 root root  2973536 10 jun 10:51 start.elf
-rw-r--r-- 1 root root  3720360 10 jun 10:51 start_x.elf
-rw-r--r-- 1 root root  7962368 17 jun 07:51 vmlinuz-6.1.0-9-amd64
After rebooting my system I tried to update it, but now I have this error;

Code: Select all

sudo apt update
Pakketlijsten worden ingelezen... Klaar
E: Kon vergrendeling /var/lib/apt/lists/lock niet verkrijgen. Proces 1944 houdt deze grendel vast (packagekitd)
N: Denk eraan dat het grendelbestand verwijderen geen oplossing is en uw systeem onklaar kan maken.
E: Kan de map /var/lib/apt/lists/ niet vergrendelen
So, it looks things got worse?

I installed from the live usb image, did use this because disk encryption setup is easier with calamares.


...

User avatar
sunrat
Site admin
Site admin
Posts: 7397
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 134 times
Been thanked: 654 times

Re: Errors while updating system or install new packages Debian 12 (Solved sort of)

#18 Post by sunrat »

@marcelmo it's recommended to open a new topic for issues rather than posting in someone else's topic. Your system may be different from theirs.
Your code translated to English as this is an English forum:

Code: Select all

Package lists are being read... Done
E: Could not get lock /var/lib/apt/lists/lock . Process 1944 holds this latch (packagekitd)
N: Please note that deleting the lock file is not a solution and may disable your system.
E: Failed to lock folder /var/lib/apt/lists/
This usually is an error generated when you have another package manager open at the same time, Synaptic, Discover, Gnome package thingy etc. Make sure they are closed.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

User avatar
marcelmo
Posts: 12
Joined: 2019-12-14 09:37
Location: Netherlands

Re: Errors while updating system or install new packages Debian 12 (Solved sort of)

#19 Post by marcelmo »

@sunrat, only my terminal was opened, commands entered just after rebooting my system. I am posting in this topic, since I had the same issue with raspi-firmware after installing from the live iso as posted by kc1di, before following the solution posted by Random_Troll in this topic. I don't know what to do now. Maybe just re-install like kc1di?

edit: I think the issue has gone away after a shutdown and reboot. Still, one question remains; do I have to remove any files from /boot/firmware or do they pose no threat?

User avatar
sunrat
Site admin
Site admin
Posts: 7397
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 134 times
Been thanked: 654 times

Re: Errors while updating system or install new packages Debian 12 (Solved sort of)

#20 Post by sunrat »

marcelmo wrote: 2023-07-03 12:19Still, one question remains; do I have to remove any files from /boot/firmware or do they pose no threat?
No threat.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

Post Reply