update-initramfs fails on plymouth hook due to missing target dir

Bug #1866377 reported by Tony Travis
174
This bug affects 33 people
Affects Status Importance Assigned to Milestone
plymouth (Ubuntu)
Fix Released
Critical
Unassigned
Focal
Fix Released
Critical
Unassigned

Bug Description

Testing pre-release Ubuntu-MATE 20.04 updated on Fri 6 Mar 2020

lsb_release -d
Description: Ubuntu Focal Fossa (development branch)
uname -a
Linux beluga 5.4.0-14-generic #17-Ubuntu SMP Thu Feb 6 22:47:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

update-initramfs: Generating /boot/initrd.img-5.4.0-14-generic
cp: cannot create regular file '/var/tmp/mkinitramfs_npYdVL/usr/share/plymouth/themes/spinner/watermark.png': No such file or direct
ory
E: /usr/share/initramfs-tools/hooks/plymouth failed with return 1.
update-initramfs: failed for /boot/initrd.img-5.4.0-14-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 libc-bin (2.30-0ubuntu3) ...
Errors were encountered while processing:
 initramfs-tools

[Same error on two different systems]

Tags: patch
Tony Travis (ajtravis)
description: updated
description: updated
Revision history for this message
ԜаӀtеr Ⅼарсһуnѕkі (wxl) wrote :

The problem appears to be in 0.9.4git20200109-0ubuntu5 where plymouth/usr/share/plymouth/themes/spinner/watermark.png was set to be installed but no such file exists in the package and no such file was added.

Needless to say, this is not just MATE. It's been confirmed on Lubuntu, Kubuntu, and we'll likely hear about it elsewhere.

affects: ubuntu-mate → plymouth (Ubuntu)
Changed in plymouth (Ubuntu):
status: New → Confirmed
importance: Undecided → Critical
Revision history for this message
ԜаӀtеr Ⅼарсһуnѕkі (wxl) wrote :

Oh and subsequently, we see this in building images, too:

P: Begin executing hacks...
update-initramfs: Generating /boot/initrd.img-5.4.0-14-generic
cryptsetup: WARNING: Couldn't determine root device
cryptsetup: ERROR: Couldn't resolve device /dev/vdb
cp: cannot create regular file '/var/tmp/mkinitramfs_2hUbHg/usr/share/plymouth/themes/spinner/watermark.png': No such file or directory
E: /usr/share/initramfs-tools/hooks/plymouth failed with return 1.
update-initramfs: failed for /boot/initrd.img-5.4.0-14-generic with 1.

summary: - update-initramfs fails on plymouth hook
+ update-initramfs fails on plymouth hook due to missing watermark.png in
+ plymouth-theme-spinner
Revision history for this message
Rik Mills (rikmills) wrote : Re: update-initramfs fails on plymouth hook due to missing watermark.png in plymouth-theme-spinner

Also occurs on Kubuntu 20.04, and in flavour ISO livefs builds.

Revision history for this message
Rik Mills (rikmills) wrote :

Looks like the error is actually saying that the target dir of the ccp command does not exist.

Revision history for this message
ԜаӀtеr Ⅼарсһуnѕkі (wxl) wrote :

Yeah, I read it wrong, sorry. It is the issue of the "spinner" directory of /usr/share/plymouth/themes not existing.

summary: - update-initramfs fails on plymouth hook due to missing watermark.png in
- plymouth-theme-spinner
+ update-initramfs fails on plymouth hook due to missing target dir
Revision history for this message
Rik Mills (rikmills) wrote :

In a flavour the plymouth-theme-spinner package is not installed, AND even if it was, initramfs does not know to include that dir as the bgrt theme is not selected as the default.plymouth alternative. Obviously the cp command is run unconditionally, hence the error in a flavour.

I think.......

Revision history for this message
Richard Baka (bakarichard91) wrote :

Here is a magic workaround command for problems like this:
sudo apt purge --reinstall plymouth

no warranty! :)

Revision history for this message
Aaron Honeycutt (aaronhoneycutt) wrote :

I've also rebuilt the package without the two lines that they added and it corrected the issue for me and a coworker.

Revision history for this message
Joseph C. Sible (jcsible) wrote :

Doing "sudo apt purge --reinstall plymouth" wasn't sufficient to fix it for me. What did fix it for me, though, was adding a mkdir statement, as I explained in #1866372 before this bug was opened.

Revision history for this message
Tony Travis (ajtravis) wrote :

Richard's magic work-around WFM:

apt purge --reinstall plymouth
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  libplymouth5
Use 'apt autoremove' to remove it.
The following packages will be REMOVED
  lightdm* plymouth* plymouth-label* plymouth-theme-spinner* plymouth-theme-ubuntu-mate-logo* plymouth-theme-ubuntu-mate-text* plymouth-theme-ubuntu-text* slick-greeter*
0 to upgrade, 0 to newly install, 8 to remove and 0 not to upgrade.
1 not fully installed or removed.
[...]
Processing triggers for systemd (244.3-1ubuntu1) ...
Processing triggers for dbus (1.12.16-2ubuntu2) ...
Processing triggers for initramfs-tools (0.136ubuntu1) ...
update-initramfs: Generating /boot/initrd.img-5.4.0-14-generic

apt autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED
  libplymouth5
0 to upgrade, 0 to newly install, 1 to remove and 0 not to upgrade.
After this operation, 425 kB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 503753 files and directories currently installed.)
Removing libplymouth5:amd64 (0.9.4git20200109-0ubuntu6) ...
Processing triggers for libc-bin (2.30-0ubuntu3) ...

Revision history for this message
Joseph C. Sible (jcsible) wrote :

Wait, the intention of that was to remove Plymouth and *leave it removed*? Well of course that "fixes" the observed bug in Plymouth...

Revision history for this message
Paul Loughman (snowhog) wrote :

Aaron's 'fix' (I assume it was a fix) mentioned in #8 isn't a solution for me. Package plymouth_0.9.4git20200109-0ubuntu6 was installed/upgraded this morning; checked the apt history.log. So I reinstalled it. The error remains.

Running Kubuntu 20.04
KDE Plasma 5.18.2
KDE Frameworks 5.67.0
Qt 5.12.5
Kernel 5.4.0-17-generic
OS 64-bit

Revision history for this message
Jose Manuel Santamaria Lema (panfaust) wrote :

Hi,

I'm attaching a debdiff of a possible fix for this, which solves the problem for me.

If this is not the correct solution I will be glad to test the correct one :)

PPA build of the proposed fix:
https://launchpad.net/~panfaust/+archive/ubuntu/plymouth

Revision history for this message
Aaron Honeycutt (aaronhoneycutt) wrote :

@Paul

You can install it like this:

sudo dpkg -i packagename

Then I would recommend locking plymouth:

sudo apt-mark hold packagename

Revision history for this message
Richard Baka (bakarichard91) wrote :

You are right :D. apt purge --reinstall command doesn't do a reinstall just a purge. BTW I like this method. Do I really need this package?

Revision history for this message
Paul Loughman (snowhog) wrote :

@Aaron

I got past the error by applying the patch that satmandu (satadru-umich) posted in https://bugs.launchpad.net/ubuntu/+source/plymouth/+bug/1866372

For the moment I'm good. Will the patch 'hold' on subsequent updates of plymouth?

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "plymouth_0.9.4git20200109-0ubuntu7~ppa1.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Revision history for this message
Antropoceno Silva (user392) wrote :

Xubuntu 20.04 here; applying the workaround mentioned in #10,
apt purge --reinstall plymouth
fixed the problem.

Revision history for this message
jean-christophe manciot (manciot-jeanchristophe) wrote :
Download full text (3.1 KiB)

Same issue on Ubuntu focal with linux 5.4.0-17-generic x86_64.

Purging plymouth then installing it back with all upstream dependencies does not change anything:
# apt purge plymouth
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  libplymouth5
Use 'apt autoremove' to remove it.
The following packages will be REMOVED:
  lightdm* plymouth* plymouth-label* plymouth-theme-spinner* plymouth-theme-ubuntu-gnome-logo* plymouth-theme-ubuntu-gnome-text* plymouth-theme-ubuntu-logo*
  plymouth-theme-ubuntu-text* slick-greeter*
0 upgraded, 0 newly installed, 9 to remove and 38 not upgraded.
1 not fully installed or removed.
After this operation, 4,028 kB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 747060 files and directories currently installed.)
...

update-alternatives: warning: alternative /usr/share/plymouth/themes/ubuntu-gnome-logo/ubuntu-gnome-logo.plymouth (part of link group default.plymouth) doesn't exist; removi
ng from list of alternatives
update-alternatives: warning: /etc/alternatives/default.plymouth is dangling; it will be updated with best choice
update-alternatives: using /usr/share/plymouth/themes/bgrt/bgrt.plymouth to provide /usr/share/plymouth/themes/default.plymouth (default.plymouth) in auto mode
update-initramfs: deferring update (trigger activated)
...

# apt autoremove
...
# apt install lightdm plymouth plymouth-label plymouth-theme-spinner plymouth-theme-ubuntu-gnome-logo plymouth-theme-ubuntu-gnome-text plymouth-theme-ubuntu-logo plymouth-theme-ubuntu-text slick-greeter
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libplymouth5
Suggested packages:
  bindfs plymouth-themes
The following NEW packages will be installed:
  libplymouth5 lightdm plymouth plymouth-label plymouth-theme-spinner plymouth-theme-ubuntu-gnome-logo plymouth-theme-ubuntu-gnome-text plymouth-theme-ubuntu-logo
  plymouth-theme-ubuntu-text slick-greeter
0 upgraded, 10 newly installed, 0 to remove and 38 not upgraded.
Need to get 98.8 kB/896 kB of archives.
After this operation, 4,453 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://fr.archive.ubuntu.com/ubuntu focal/main amd64 libplymouth5 amd64 0.9.4git20200109-0ubuntu6 [98.8 kB]
Fetched 98.8 kB in 0s (426 kB/s)
Preconfiguring packages ...
Selecting previously unselected package libplymouth5:amd64.
...
update-initramfs: Generating /boot/initrd.img-5.4.0-17-generic
cp: cannot create regular file '/var/tmp/mkinitramfs_K7OV2b/usr/share/plymouth/themes/spinner/watermark.png': No such file or directory
E: /usr/share/initramfs-tools/hooks/plymouth failed with return 1.
update-initramfs: failed for /boot/initrd.img-5.4.0-17-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:
 initramfs-tools

# apt-file search /usr/share/plymouth/themes/spinner/...

Read more...

Rik Mills (rikmills)
Changed in plymouth (Ubuntu Focal):
status: Confirmed → Fix Committed
Revision history for this message
Tony Travis (ajtravis) wrote :

Re: my comment #10 - After re-installing the purged packages the problem was, of course, not fixed. However, a fix that does work has been suggested in Bug #1866372:

  https://bugs.launchpad.net/ubuntu/+source/plymouth/+bug/1866372

Revision history for this message
Richard Baka (bakarichard91) wrote :

1. The deletion of the plymouth packages is a correct workaround however that is not a correct fix. The fix will come with a package upgrade.

2. apt purge --reinstall (what I wrote) seems to wrok well but it doesn't. It just do the purge operation and not the reinstall operation. If this package isn't installed the failure doesn't occur however you won't have a graphical boot screen (If I know this well).

3. BTW this package is not too important for the system. If I know well this is just a graphical splash screen.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package plymouth - 0.9.4git20200109-0ubuntu7

---------------
plymouth (0.9.4git20200109-0ubuntu7) focal; urgency=medium

  * debian/local/plymouth.hook:
    - try to copy the watermark image in the initramfs only if the spinner
      theme is installed (lp: #1866377)

 -- Sebastien Bacher <email address hidden> Sat, 07 Mar 2020 10:26:16 +0100

Changed in plymouth (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Richard Baka (bakarichard91) wrote :

Tested, it is OK!

Revision history for this message
jean-christophe manciot (manciot-jeanchristophe) wrote :

I confirm that it is fixed on Ubuntu 20.04.

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.