The boot-duration file may not be available at boot if / and /var are different filesystems
Submitted by David Shaw
Assigned to Ray Strode @halfline
Description
This originally manifested itself as a progress bar that gets around 1/3 of the way across and then just crawls to a halt. After lots of debugging, the problem seems to be that when / and /var are on different filesystems (as they are on my box), Plymouth attempts to read /var/lib/plymouth/boot-duration before /var is mounted and so always gets ENOENT. After the boot completes, the newly updated boot-duration file is written to /var/lib/plymouth, which by that point in the boot does exist. Repeat on every boot. The end result is that the progress bar never has a boot-duration file to work from.
When testing on a box where / and /var are on the same filesystem, there is no problem.
I have a workaround, which is to run this script:
#!/bin/sh workdir=$(mktemp -d) mount -obind / $workdir mkdir -p $workdir/var/lib/plymouth cp /var/lib/plymouth/boot-duration $workdir/var/lib/plymouth umount $workdir rmdir $workdir
That is, copy the boot-duration file so that it exists on the root filesystem and is thus present when Plymouth starts up.
I've observed this with plymouth versions 0.8.4 and 0.8.9. For reasons that are not clear to me, I've only observed this with the script plugin. It does not seem to happen using throbgress.