3

I've been having an error when updating or running any apt command for a week or so. Upgrading to LTS 18.04 hasn't resolved it, nor has removing all old kernels. Space isn't an issue either.

Attempting to reinstall initramfs doesn't work. Error I get is:

Setting up initramfs-tools (0.136ubuntu6.3) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.136ubuntu6.3) ...
update-initramfs: Generating /boot/initrd.img-5.4.0-52-generic
E: /usr/share/initramfs-tools/hooks/plymouth failed with return 1.
update-initramfs: failed for /boot/initrd.img-5.4.0-52-generic with 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:

EDIT: Later addition (April 2022) to the question.

This is not for my system, but by my search this was more or less the 1. hit.

initramfs-tools:
  Installiert:           0.136ubuntu6.7
  Installationskandidat: 0.136ubuntu6.7
  Versionstabelle:
 *** 0.136ubuntu6.7 500
        500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu focal-updates/main i386 Packages
        100 /var/lib/dpkg/status
     0.136ubuntu6 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu focal/main i386 Packages

we draw the package initramfs-tools with wget fresh and try to install it with dpkg also the packages plymouth.

$ sudo dpkg -i initramfs-tools_0.136ubuntu6.7_all.deb
(Lese Datenbank ... 548002 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von initramfs-tools_0.136ubuntu6.7_all.deb ...
Entpacken von initramfs-tools (0.136ubuntu6.7) über (0.136ubuntu6.7) ...
initramfs-tools (0.136ubuntu6.7) wird eingerichtet ...
update-initramfs: deferring update (trigger activated)
Trigger für man-db (2.9.1-1) werden verarbeitet ...
Trigger für initramfs-tools (0.136ubuntu6.7) werden verarbeitet ...
update-initramfs: Generating /boot/initrd.img-5.4.0-109-generic
E: /usr/share/initramfs-tools/hooks/plymouth failed with return 1.
update-initramfs: failed for /boot/initrd.img-5.4.0-109-generic with 1.
dpkg: Fehler beim Bearbeiten des Paketes initramfs-tools (--install):
 »installiertes initramfs-tools-Skript des Paketes post-installation«-Unterprozess gab den Fehlerwert 1 zurück
Fehler traten auf beim Bearbeiten von:
 initramfs-tools

then we tried to get more info

$ dash -x /usr/share/initramfs-tools/hooks/plymouth
+ set -e
+ OPTION=FRAMEBUFFER
+ PREREQ=
+ . /usr/share/initramfs-tools/hook-functions
+ update-alternatives --query default.plymouth
+ sed -e /^Value:/!d -e s/^Value: \(.*\)/\1/
+ THEME_PATH=/usr/share/plymouth/themes/mint-logo/mint-logo.plymouth
+ basename /usr/share/plymouth/themes/mint-logo/mint-logo.plymouth .plymouth
+ THEME=mint-logo
+ THEMES=/usr/share/plymouth/themes
+ [ -n /usr/share/plymouth/themes/mint-logo/mint-logo.plymouth ]
+ grep ImageDir *= * /usr/share/plymouth/themes/mint-logo/mint-logo.plymouth
+ sed s/ImageDir *= *//
+ IMAGE_PATH=/usr/share/plymouth/themes/mint-logo
+ [ -n /usr/share/plymouth/themes/mint-logo ]
+ [ /usr/share/plymouth/themes/mint-logo/mint-logo.plymouth != /usr/share/plymouth/themes/mint-logo ]
+ basename /usr/share/plymouth/themes/mint-logo
+ IMAGE_NAME=mint-logo
+ mkdir -p //usr/share/plymouth/themes
+ [ -n mint-logo ]
+ [ mint-logo != none ]
+ THEME_NAME=mint-logo
+ THEME=/usr/share/plymouth/themes/mint-logo/mint-logo.plymouth
+ ln -s /usr/share/plymouth/themes/mint-logo/mint-logo.plymouth //usr/share/plymouth/themes/default.plymouth
ln: Die symbolische Verknüpfung '//usr/share/plymouth/themes/default.plymouth' konnte nicht angelegt werden: Die Datei existiert bereits

then I checked it is mint. But it was too late the bounty was set. :(

I checked some links

$ ls -al /usr/share/plymouth/themes/default.plymouth
lrwxrwxrwx 1 root root 55 Apr 27 14:40 /usr/share/plymouth/themes/default.plymouth -> /usr/share/plymouth/themes/mint-logo/mint-logo.plymouth

and

$ update-alternatives --query text.plymouth

Name: text.plymouth Link: /usr/share/plymouth/themes/text.plymouth Status: auto Best: /usr/share/plymouth/themes/mint-text/mint-text.plymouth Value: /usr/share/plymouth/themes/mint-text/mint-text.plymouth

Alternative: /usr/share/plymouth/themes/mint-text/mint-text.plymouth Priority: 200

Alternative: /usr/share/plymouth/themes/text/text.plymouth Priority: 40

Alternative: /usr/share/plymouth/themes/ubuntu-text/ubuntu-text.plymouth Priority: 50

and

$ update-alternatives --query default.plymouth

Name: default.plymouth Link: /usr/share/plymouth/themes/default.plymouth Status: auto Best: /usr/share/plymouth/themes/mint-logo/mint-logo.plymouth Value: /usr/share/plymouth/themes/mint-logo/mint-logo.plymouth

Alternative: /usr/share/plymouth/themes/bgrt/bgrt.plymouth Priority: 110

Alternative: /usr/share/plymouth/themes/mint-logo-legacy/mint-logo-legacy.plymouth Priority: 100

Alternative: /usr/share/plymouth/themes/mint-logo/mint-logo.plymouth Priority: 200

Alternative: /usr/share/plymouth/themes/spinner/spinner.plymouth Priority: 70

I checked links in /usr/share/plymouth/themes and correct theme:

$ ls -al /usr/share/plymouth/themes
insgesamt 104
drwxr-xr-x 22 root root  4096 Apr 27 16:33 .
drwxr-xr-x  3 root root  4096 Apr 27 13:38 ..
drwxr-xr-x  2 root root  4096 Apr 27 13:38 bgrt
lrwxrwxrwx  1 root root    40 Aug 28  2019 debian-theme -> ../../desktop-base/active-theme/plymouth #this one I let unlink too
lrwxrwxrwx  1 root root    34 Apr 27 16:33 default.plymouth -> /etc/alternatives/default.plymouth
drwxr-xr-x  2 root root  4096 Apr 27 13:38 details
drwxr-xr-x  2 root root  4096 Apr 27 13:38 fade-in
drwxr-xr-x  2 root root  4096 Mai 12  2021 futureprototype
drwxr-xr-x  2 root root 12288 Apr 27 13:38 glow
drwxr-xr-x  2 root root  4096 Mai 12  2021 joy
drwxr-xr-x  2 root root  4096 Mai 12  2021 lines
drwxr-xr-x  2 root root  4096 Jan 14 15:46 mint-logo
drwxr-xr-x  2 root root  4096 Jan 14 15:46 mint-logo-legacy
drwxr-xr-x  2 root root  4096 Jan 14 15:46 mint-text
drwxr-xr-x  2 root root  4096 Mai 12  2021 moonlight
drwxr-xr-x  2 root root  4096 Apr 27 13:38 script
drwxr-xr-x  2 root root  4096 Mai 12  2021 softwaves
drwxr-xr-x  2 root root  4096 Apr 27 13:38 solar
drwxr-xr-x  2 root root  4096 Mai 12  2021 spacefun
drwxr-xr-x  2 root root  4096 Apr 27 13:38 spinfinity
drwxr-xr-x  2 root root 12288 Apr 27 13:38 spinner
drwxr-xr-x  2 root root  4096 Apr 27 13:38 text
lrwxrwxrwx  1 root root    31 Apr 27 16:33 text.plymouth -> /etc/alternatives/text.plymouth
drwxr-xr-x  2 root root  4096 Apr 27 13:38 tribar
drwxr-xr-x  2 root root  4096 Apr 27 13:38 ubuntu-text

And another try I renamed /usr/share/initramfs-tools/hooks/plymouth and unpacked the plymouth package to replace it:

$ sudo update-initramfs -v -u -k $(uname -r) 

the output is too long, it is posted in debug-mode. I do not see errors but maybe I'm wrong.

sudo inxi -SMG
System:    Host: xxx Kernel: 5.4.0-109-generic x86_64 bits: 64 Console: tty 1 Distro: Linux Mint 20.2 Uma 
Machine:   Type: Desktop System: Gigabyte product: Z97X-UD3H v: N/A serial: N/A 
           Mobo: Gigabyte model: Z97X-UD3H-CF v: x.x serial: N/A UEFI: American Megatrends v: F7 date: 06/17/2014 
Graphics:  Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics driver: i915 v: kernel 
           Device-2: NVIDIA GP104 [GeForce GTX 1070] driver: nvidia v: 470.103.01 
           Display: server: X.org 1.20.13 driver: modesetting,nvidia unloaded: fbdev,nouveau,vesa tty: 212x58 
           Message: Advanced graphics data unavailable in console for root.

Note: nvidia module is correct build and installed in the running kernel. And in journal, I found

kernel: [drm] Initialized i915 1.6.0 20190822 for 0000:00:02.0 on minor 0
Mai 03 08:40:08 xxx kernel: [drm] Cannot find any crtc or sizes

    apt-cache policy initramfs-tools
    initramfs-tools:
      Installiert:           0.136ubuntu6.7
      Installationskandidat: 0.136ubuntu6.7
      Versionstabelle:
     *** 0.136ubuntu6.7 500
            500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
            500 http://archive.ubuntu.com/ubuntu focal-updates/main i386 Packages
            100 /var/lib/dpkg/status
         0.136ubuntu6 500
            500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
            500 http://archive.ubuntu.com/ubuntu focal/main i386 Packages
nobody
  • 5,437
  • Try reinstalling the plymouth. sudo apt install --reinstall plymouth-* – Terrance Nov 13 '20 at 02:37
  • I have already reinstalled Plymouth with no results the problem is still there. – Andre Ashmeade Nov 13 '20 at 05:38
  • 1
    Please edit your question then and add ALL DETAILS of what you have done so that we are not guessing or telling you to try things that you claim you have already done. The more details will help us help you! – Terrance Nov 13 '20 at 14:23
  • You say "Upgrading to LTS 18.04 hasn't resolved it". What OS do you have? Please post the output of: * uname -a * lsb_release -a. This OP may be out of the target of askubuntu – sancho.s ReinstateMonicaCellio Apr 28 '22 at 15:13
  • @nobody - I now realize there are two people converging at the same question: Andre and you. Given the possibly significant difference between your system and Andre's at the time of posting, I guess you should add details on your system to the OP. Please post the output of: 1) uname -a, 2) lsb_release -a. Plus the exact command you use to reinstall, and its output. – sancho.s ReinstateMonicaCellio Apr 29 '22 at 04:18
  • @nobody - Make it easy on the readers, help others help you. It would help if you were more clear in the additions. I have edited the OP (hopefully I didn't introduce any mistake).
    1. What do you mean by "This is not for my system"? You should post what you see, so we help with your case. I can't think of any reason for not doing this.
    2. Please make it clear what are commands you execute and what is output, e.g. with a $ prompt.
    3. Add the command you used to get the first posted output.
    4. Add the output of requested commands, uname -a, lsb_release -a.
    – sancho.s ReinstateMonicaCellio Apr 30 '22 at 07:09
  • @nobody - 4b) Also sudo inxi -SM, dpkg -l | grep initramfs-tools. Plus, please specify what is the original action you meant to perform, which gave problems. – sancho.s ReinstateMonicaCellio Apr 30 '22 at 07:41
  • All what I added is from the system that is concerned by this error not from mine. – nobody Apr 30 '22 at 10:21

1 Answers1

0

The original question is old.
There is a recent addition (bounty) to the inquiry, and the systems may not match. Minor subtleties may make the difference, so it is important to know them.
Plus, there is an earlier post with exactly the same wording, which is remarkable.

With limited information about the system of interest, a possible solution from post above is this set

$ sudo apt autoremove
$ sudo apt clean
$ sudo apt update
$ sudo apt upgrade

Other solutions there that you may check give alternative (sub)sets of

$ sudo apt remove initramfs-tools
$ sudo apt clean
$ sudo apt install initramfs-tools
$ sudo apt autoremove
$ sudo apt autoclean
$ sudo apt clean
$ sudo apt update 
$ sudo apt upgrade
$ sudo apt dist-upgrade
$ sudo apt -f install
$ sudo dpkg --configure -a

For further solution, please post in the OP

  1. The output of

    $ uname -a
    $ lsb_release -a
    $ sudo inxi -SM
    $ dpkg -l | grep initramfs-tools
    
  2. Is your hard drive is encrypted?

  3. Do you have enough space in /boot for update-initramfs? (ref, ref)

Related:

  1. https://stackoverflow.com/questions/35336174/ubuntu-12-04-update-to-the-3-8-kernel-fails
  • 1
    We could solve it, after changing the theme over update-alternatives and choosing to ubuntu theme. /usr/share/plymouth/themes/ubuntu-text/ubuntu-text.plymouth Now the error is gone. strange. – nobody May 03 '22 at 21:40