[SOLVED] Generic package post-installation script subprocess returned error exit status 1

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
hedgehoggy
Level 3
Level 3
Posts: 157
Joined: Thu Jan 25, 2018 8:12 am

Re: Update problem: " . . . generic package post-installation script subprocess returned error exit status 1"

Post by hedgehoggy »

Code: Select all

Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 23 not upgraded.
Lenovo ThinkPad X1C10
Linux Mint 21.1 Cinnamon 5.6.8. (64-bit)
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Update problem: " . . . generic package post-installation script subprocess returned error exit status 1"

Post by rene »

OK. Issue seems fixed then? Not sure what the state is now there.
hedgehoggy
Level 3
Level 3
Posts: 157
Joined: Thu Jan 25, 2018 8:12 am

Re: Update problem: " . . . generic package post-installation script subprocess returned error exit status 1"

Post by hedgehoggy »

Well, so now I'm back on kernel 5.4.0-88-generic, and I have these updates which I installed earlier, one or more of which seemed to cause a problem
2021-10-19-13-33-12.png
I'm very picky about how my desktop looks, so I was very careful about updating "the cinnamons" doing them one at a time, and making a snapshot before each (I never got to Nemo and just plain cinnamon). I don't know if that has anything to with my issue, but just thought I'd mention it.
Last edited by hedgehoggy on Tue Oct 19, 2021 1:51 pm, edited 1 time in total.
Lenovo ThinkPad X1C10
Linux Mint 21.1 Cinnamon 5.6.8. (64-bit)
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Update problem: " . . . generic package post-installation script subprocess returned error exit status 1"

Post by rene »

The Linux kernel update triggers an update-initramfs which showed the problem, but it might be the case that you already have the same situation now. I.e., try a manual

Code: Select all

sudo update-initramfs -u -k all
hedgehoggy
Level 3
Level 3
Posts: 157
Joined: Thu Jan 25, 2018 8:12 am

Re: Update problem: " . . . generic package post-installation script subprocess returned error exit status 1"

Post by hedgehoggy »

I will try that, but maybe in a day or two after my pulse rate goes down a bit. Right now it's just nice to have a working laptop! I do appreciate you taking the time to help! :)
Lenovo ThinkPad X1C10
Linux Mint 21.1 Cinnamon 5.6.8. (64-bit)
hedgehoggy
Level 3
Level 3
Posts: 157
Joined: Thu Jan 25, 2018 8:12 am

Re: Update problem: " . . . generic package post-installation script subprocess returned error exit status 1"

Post by hedgehoggy »

Ok, getting back down to business here, I reinstalled all the cinnamon updates without error messages (not sure if this has anything to do with anything), but got another error message when trying to install new kernel from update manager, viz.:
20211020104129.png
Going over to the cli, I did this, as you suggested:

Code: Select all

sudo update-initramfs -u -k all
and got

Code: Select all

update-initramfs: Generating /boot/initrd.img-5.4.0-88-generic
E: /usr/share/initramfs-tools/hooks/plymouth failed with return 1.
update-initramfs: failed for /boot/initrd.img-5.4.0-88-generic with 1.
So, um, anything else I could try?
I'm running off of 5.4.0-88-generic at the moment, I also have 5.4.0-74, 5.4.0-86, and 5.4.0-89.

On a slightly different topic, I have a lot of difficulty getting to the GRUB menu on startup--I'm assuming there's a way to switch kernels via cli and then reboot into the new one?
Lenovo ThinkPad X1C10
Linux Mint 21.1 Cinnamon 5.6.8. (64-bit)
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Update problem: " . . . generic package post-installation script subprocess returned error exit status 1"

Post by rene »

Right, that was as expected; i.e., upgrade to -89 only shows the problem; it's the version before that, -88 then it seems, that in fact broke something. It is however very weird that I nor the forum generally seems to have experienced this. What happens if you boot into an older kernel, remove -88 through Update Manager -> View -> Linux Kernels -> Remove kernels and then update to -89?

As to Grub; yes, it can be a bit of a pain. You can for now probably best use e.g. sudo nano /etc/default/grub and have it say e.g. GRUB_TIMEOUT=10 so as to for now always get you the menu (with a 10 second timeout; also comment out or remove GRUB_TIMEOUT_STYLE=hidden if you have that now). Run sudo update-grub after editing /etc/default/grub.
sleeper12
Level 21
Level 21
Posts: 14558
Joined: Thu May 25, 2017 3:22 pm

Re: Update problem: " . . . generic package post-installation script subprocess returned error exit status 1"

Post by sleeper12 »

There is a similar problem here, but a different kernel:
viewtopic.php?p=2084220#p2084220
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Update problem: " . . . generic package post-installation script subprocess returned error exit status 1"

Post by rene »

Anyways; just asked a question --- but gone for the night. Shall read later...
hedgehoggy
Level 3
Level 3
Posts: 157
Joined: Thu Jan 25, 2018 8:12 am

Re: Update problem: " . . . generic package post-installation script subprocess returned error exit status 1"

Post by hedgehoggy »

Ok, well, I did what you said with kernel(s) but was still unable to update to (I think it was) 5.4.0-100. Trouble seems to be with 86, 88, & 89 (I think I have number dyslexia, if there is such a thing, so the kernel #s might not be right). I booted into 5.4.0-74, my oldest kernel, refreshed the update manager and was told that my system was up to date! I'm assuming that something's still not right here, though. :?:
Lenovo ThinkPad X1C10
Linux Mint 21.1 Cinnamon 5.6.8. (64-bit)
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Generic package post-installation script subprocess returned error exit status 1

Post by rene »

Something would still not be indeed. For one Update Manager shouldn't tell you you're up to date if a newer 5.4 kernel than you have installed is available.

Unfortunately, the problem is a bit too much of a one-off to very usefully comment on without hands-on to the system, I'd try if now sudo apt-get install --reinstall plymouth does anything; if it still/again fails with that same "E: /usr/share/initramfs-tools/hooks/plymouth failed with return 1." that means in fact nothing has changed yet; it that one now does work I however still don't expect it to fix anything; it seems to stumble over something else but not even using the splash screen myself, I have little idea what would be likely there (also try sudo apt-get install --reinstall plymouth-theme-spinner but I verified that CRC32 of yours so it shouldn't be the issue you run into quickly when sticking that into a google search...)

If you care deeply you can as said earlier instrument /usr/share/initramfs-tools/hooks/plymouth to see where it fails exactly but I guess I will otherwise butt out...
hedgehoggy
Level 3
Level 3
Posts: 157
Joined: Thu Jan 25, 2018 8:12 am

Re: Generic package post-installation script subprocess returned error exit status 1

Post by hedgehoggy »

Good morning.
As it stands now, I can't boot from the "89" kernel from the grub menu, which I guess isn't too surprising. I've got "86" which may or may not work, and "74" which I'm running off now. If I try to boot from 89 or another "dead" kernel, I think it says loading (can't remember what exactly, old :( ). I have to turn off and on again to get back to grub, which I'm assuming probably isn't great for the system. I'll remember for future reference to keep two extra kernels for backup.

If I try

Code: Select all

sudo apt-get install --reinstall plymouth
or

Code: Select all

sudo apt-get install --reinstall plymouth-theme-spinner
how likely is it that I might bork my system?

I'm getting an update for "libcaca" in the update manager, so it looks like I'm getting non-kernel updates, but not kernel updates. So I guess my options now are

1) To try the reinstall plymouth commands, if you think it's safe
2) To Timeshift back to a happier, simpler time (for the moment anyway)
3) Ask Clem (or maybe even Linus) for help!
4) (and maybe this should be 3, but I really don't want to do this if I can avoid it!) Reinstall 20.2 and hope this all goes away.
Lenovo ThinkPad X1C10
Linux Mint 21.1 Cinnamon 5.6.8. (64-bit)
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Generic package post-installation script subprocess returned error exit status 1

Post by rene »

It's not going to break anything. It's either already broken, in which case you'll again get that same initramfs plymouth hook error upon install but only in the sense that it shows things to still be broken, or if that now works you will know things to be currently non-broken and have a, I would say, slim chance that things would remain working also over kernel upgrades.

Note; I quite expect the former outcome. It's as said pretty one-off it seems, so likely an issue quite specific to your system, and without you instrumenting the script to find out where it bombs out it's going to be basically impossible to further diagnose.
hedgehoggy
Level 3
Level 3
Posts: 157
Joined: Thu Jan 25, 2018 8:12 am

Re: Generic package post-installation script subprocess returned error exit status 1

Post by hedgehoggy »

For the first one I get

Code: Select all

Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 1 not upgraded.
1 not fully installed or removed.
Need to get 0 B/157 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 368738 files and directories currently installed.)
Preparing to unpack .../plymouth_0.9.4+mint2+ulyssa_amd64.deb ...
Unpacking plymouth (0.9.4+mint2+ulyssa) over (0.9.4+mint2+ulyssa) ...
Setting up plymouth (0.9.4+mint2+ulyssa) ...
update-initramfs: deferring update (trigger activated)
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
Setting up linux-image-5.4.0-89-generic (5.4.0-89.100) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for systemd (245.4-4ubuntu3.13) ...
Processing triggers for initramfs-tools (0.136ubuntu6.6) ...
update-initramfs: Generating /boot/initrd.img-5.4.0-86-generic
E: /usr/share/initramfs-tools/hooks/plymouth failed with return 1.
update-initramfs: failed for /boot/initrd.img-5.4.0-86-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
 installed initramfs-tools package post-installation script subprocess returned error exit status 1
Processing triggers for linux-image-5.4.0-89-generic (5.4.0-89.100) ...
/etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.4.0-89-generic
   ...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.4.0-89-generic
E: /usr/share/initramfs-tools/hooks/plymouth failed with return 1.
update-initramfs: failed for /boot/initrd.img-5.4.0-89-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-5.4.0-89-generic (--configure):
 installed linux-image-5.4.0-89-generic package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 initramfs-tools
 linux-image-5.4.0-89-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
for the second one I get

Code: Select all

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  plymouth-theme-spinner
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
2 not fully installed or removed.
Need to get 0 B/203 kB of archives.
After this operation, 409 kB of additional disk space will be used.
Selecting previously unselected package plymouth-theme-spinner.
(Reading database ... 368738 files and directories currently installed.)
Preparing to unpack .../plymouth-theme-spinner_0.9.4+mint2+ulyssa_amd64.deb ...
Unpacking plymouth-theme-spinner (0.9.4+mint2+ulyssa) ...
Setting up initramfs-tools (0.136ubuntu6.6) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-image-5.4.0-89-generic (5.4.0-89.100) ...
Setting up plymouth-theme-spinner (0.9.4+mint2+ulyssa) ...
update-initramfs: deferring update (trigger activated)
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/50_linuxmint.cfg'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.0-89-generic
Found linux image: /boot/vmlinuz-5.4.0-86-generic
Found initrd image: /boot/initrd.img-5.4.0-86-generic
Found linux image: /boot/vmlinuz-5.4.0-74-generic
Found initrd image: /boot/initrd.img-5.4.0-74-generic
Adding boot menu entry for UEFI Firmware Settings
done
Processing triggers for initramfs-tools (0.136ubuntu6.6) ...
update-initramfs: Generating /boot/initrd.img-5.4.0-86-generic
E: /usr/share/initramfs-tools/hooks/plymouth failed with return 1.
update-initramfs: failed for /boot/initrd.img-5.4.0-86-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
 installed initramfs-tools package post-installation script subprocess returned error exit status 1
Processing triggers for linux-image-5.4.0-89-generic (5.4.0-89.100) ...
/etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.4.0-89-generic
   ...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.4.0-89-generic
E: /usr/share/initramfs-tools/hooks/plymouth failed with return 1.
update-initramfs: failed for /boot/initrd.img-5.4.0-89-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-5.4.0-89-generic (--configure):
 installed linux-image-5.4.0-89-generic package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 initramfs-tools
 linux-image-5.4.0-89-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
If I have a working laptop should I just coast with what I have running now? What would you do?

[EDIT] This probably doesn't give us any new info, but I just tried (and succeeded?) in installing libcaca. While doing so, I got

Code: Select all

(Reading database ... 368818 files and directories currently installed.)
Preparing to unpack .../libcaca0_0.99.beta19-2.1ubuntu1.20.04.2_amd64.deb ...
Unpacking libcaca0:amd64 (0.99.beta19-2.1ubuntu1.20.04.2) over (0.99.beta19-2.1ubuntu1.20.04.1) ...
Setting up initramfs-tools (0.136ubuntu6.6) ...
update-initramfs: deferring update (trigger activated)
Setting up libcaca0:amd64 (0.99.beta19-2.1ubuntu1.20.04.2) ...
Setting up linux-image-5.4.0-89-generic (5.4.0-89.100) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Processing triggers for initramfs-tools (0.136ubuntu6.6) ...
update-initramfs: Generating /boot/initrd.img-5.4.0-86-generic
E: /usr/share/initramfs-tools/hooks/plymouth failed with return 1.
update-initramfs: failed for /boot/initrd.img-5.4.0-86-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
 installed initramfs-tools package post-installation script subprocess returned error exit status 1
Processing triggers for linux-image-5.4.0-89-generic (5.4.0-89.100) ...
/etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.4.0-89-generic
   ...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.4.0-89-generic
E: /usr/share/initramfs-tools/hooks/plymouth failed with return 1.
update-initramfs: failed for /boot/initrd.img-5.4.0-89-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-5.4.0-89-generic (--configure):
 installed linux-image-5.4.0-89-generic package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 initramfs-tools
 linux-image-5.4.0-89-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Setting up initramfs-tools (0.136ubuntu6.6) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-image-5.4.0-89-generic (5.4.0-89.100) ...
Processing triggers for initramfs-tools (0.136ubuntu6.6) ...
update-initramfs: Generating /boot/initrd.img-5.4.0-86-generic
E: /usr/share/initramfs-tools/hooks/plymouth failed with return 1.
update-initramfs: failed for /boot/initrd.img-5.4.0-86-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
 installed initramfs-tools package post-installation script subprocess returned error exit status 1
Processing triggers for linux-image-5.4.0-89-generic (5.4.0-89.100) ...
/etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.4.0-89-generic
   ...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.4.0-89-generic
E: /usr/share/initramfs-tools/hooks/plymouth failed with return 1.
update-initramfs: failed for /boot/initrd.img-5.4.0-89-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-5.4.0-89-generic (--configure):
 installed linux-image-5.4.0-89-generic package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 initramfs-tools
 linux-image-5.4.0-89-generic
as well as
2021-10-21-11-37-40.png
Lenovo ThinkPad X1C10
Linux Mint 21.1 Cinnamon 5.6.8. (64-bit)
sleeper12
Level 21
Level 21
Posts: 14558
Joined: Thu May 25, 2017 3:22 pm

Re: Generic package post-installation script subprocess returned error exit status 1

Post by sleeper12 »

I don't know, but maybe something here might help:
https://askubuntu.com/questions/1136480 ... g-updating
hedgehoggy
Level 3
Level 3
Posts: 157
Joined: Thu Jan 25, 2018 8:12 am

Re: Generic package post-installation script subprocess returned error exit status 1

Post by hedgehoggy »

I'll take a look. Thanks for taking the time to troubleshoot, even if we didn't figure out the problem. :)
Lenovo ThinkPad X1C10
Linux Mint 21.1 Cinnamon 5.6.8. (64-bit)
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Generic package post-installation script subprocess returned error exit status 1

Post by rene »

hedgehoggy wrote: Thu Oct 21, 2021 11:31 am If I have a working laptop should I just coast with what I have running now? What would you do?
So yes, we have the same problem still, and no, I wouldn't leave it at that. What I would do is what I said a few times as to "instrumenting" the script to figure out what bombs but I take it then you do not count as "script-savvy". We earlier via crc32 verified that you have the same version of the script as I have locally, so I can do it for you. Attached you find "plymouth.txt" which you save as e.g. ~/Downloads/plymouth.txt. Then

Code: Select all

$ sudo mv /usr/share/initramfs-tools/hooks/plymouth{,.orig}
$ sudo chmod -x /usr/share/initramfs-tools/hooks/plymouth.orig
$ sudo cp ~/Downloads/plymouth.txt /usr/share/initramfs-tools/hooks/plymouth
$ sudo chmod +x /usr/share/initramfs-tools/hooks/plymouth
$ sudo update-initramfs -u
This is going to show a series of numbers which in your case will not make it to 25 before you get the error message. If we know the last number printed we can further figure out what the issue might be.

As long as you copy-paste the above command lines this is not dangerous and restoring the vanilla script is a simple matter of

Code: Select all

$ sudo mv /usr/share/initramfs-tools/hooks/plymouth{.orig,}
$ sudo chmod +x /usr/share/initramfs-tools/hooks/plymouth
which you can do as soon as you have that final printed number in the output of the above sudo update-initramfs -u.

I expect we may need to further instrument or at least probe a bit once we know but this should be step 1.
Attachments
plymouth.txt
(5.99 KiB) Downloaded 29 times
Last edited by rene on Thu Oct 21, 2021 12:22 pm, edited 1 time in total.
hedgehoggy
Level 3
Level 3
Posts: 157
Joined: Thu Jan 25, 2018 8:12 am

Re: Generic package post-installation script subprocess returned error exit status 1

Post by hedgehoggy »

Right, not really script savvy.
Since I usually download things from FF to my desktop, I'm assuming I should substitute that for downloads.
Should I try the askubuntu page stuff first or do the script?
Lenovo ThinkPad X1C10
Linux Mint 21.1 Cinnamon 5.6.8. (64-bit)
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Generic package post-installation script subprocess returned error exit status 1

Post by rene »

I'd do the thing I said. The askubuntu links concerns an fsck-hook error; is not really related (and yes, just copy it from wherever you save it to)
hedgehoggy
Level 3
Level 3
Posts: 157
Joined: Thu Jan 25, 2018 8:12 am

Re: Generic package post-installation script subprocess returned error exit status 1

Post by hedgehoggy »

Ok, and Downloads/Desktop? Just don't want to screw anything up.
Lenovo ThinkPad X1C10
Linux Mint 21.1 Cinnamon 5.6.8. (64-bit)
Locked

Return to “Beginner Questions”