jpos
Posts: 7
Joined: Wed Sep 06, 2017 6:27 pm

Apt - initramfs-tools error after normal update

Sat Apr 17, 2021 11:14 am

Running newest stable RasPi OS (fresh install 2 months back), suddenly since an apt update and upgrade two days back I am getting the following initramfs-tools post installation script error:

Code: Select all

Setting up initramfs-tools (0.133+deb10u1) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.133+deb10u1) ...
/usr/sbin/update-initramfs: 417: /usr/sbin/update-initramfs: Syntax error: Unterminated quoted string
dpkg: error processing package initramfs-tools (--configure):
 installed initramfs-tools package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
 initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
I was not installing anything new, was just performing an update. Is anyone else getting this? And anyone with an idea how to fix that? Tried various things including an apt clean and dist-upgrade.

Any help is greatly appreciated.

epoch1970
Posts: 6359
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Apt - initramfs-tools error after normal update

Sat Apr 17, 2021 9:11 pm

Have you tried “apt-get install —reinstall initramfs-tools”?

update-initramfs looks to be a shell script.
https://salsa.debian.org/kernel-team/in ... -initramfs
Did it get corrupted somehow?
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

jpos
Posts: 7
Joined: Wed Sep 06, 2017 6:27 pm

Re: Apt - initramfs-tools error after normal update

Sun Apr 18, 2021 12:07 pm

Hi,

yes, I did and interestingly it looks like there is no such package. Perhaps it is contained in something else?

Code: Select all

#apt install --reinstall initramfs-tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for initramfs-tools:armhf

fruitoftheloom
Posts: 26501
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Apt - initramfs-tools error after normal update

Sun Apr 18, 2021 12:14 pm

jpos wrote:
Sun Apr 18, 2021 12:07 pm
Hi,

yes, I did and interestingly it looks like there is no such package. Perhaps it is contained in something else?

Code: Select all

#apt install --reinstall initramfs-tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for initramfs-tools:armhf

That package does exist:

https://packages.debian.org/buster/initramfs-tools
The information is out there....you just have to let it in.

My other Linux machines: ChromeBox
https://www.aliexpress.com/item/32966393971.html
& Stone Desktop Intel CoreDuo circa 2010

jpos
Posts: 7
Joined: Wed Sep 06, 2017 6:27 pm

Re: Apt - initramfs-tools error after normal update

Tue Apr 20, 2021 3:26 pm

Yes, the package does exist, but why am I getting the internal error then? (see above)

Anyway, I solved the issue... first I successfully re-installed the initramfs-tools-core package, but then a different error withing the /usr/sbin/update-initramfs script appeared. So I manually downloaded the proper .deb, unpacked this script out of it, found that the MD5 really differ, overwrote the version in my system and ran apt upgrade again... all fixed.

A package reinstall should have indeed fixed the issue (and I did that quite at the beginning of my troubleshooting), but why it was encountering that internal error is beyond me.

Return to “Raspberry Pi OS”