Skip to content

Splash Screen TMP dir overwritten by tmpfs and mmdebstrap #143

@Chalta

Description

@Chalta

Issue Report: rpi-splash-screen layer fails when /tmp is a tmpfs mount

Repository: raspberrypi/rpi-image-gen
Component: layer/rpi/device/splash-screen

Description

The rpi-splash-screen layer fails to configure the splash image in build environments where mmdebstrap or the container runtime mounts a tmpfs filesystem over /tmp inside the chroot.

The build fails with:

Error: Splash image file not found

Root Cause
The splash-screen.yaml hook currently uses /tmp as a staging area to transfer the splash image from the Host to the Guest (Chroot):

# splash-screen.yaml
TEMP_IMAGE="/tmp/splash-screen-source.tga"
cp "$SPLASH_IMAGE" "$1$TEMP_IMAGE"  # Copies to the underlying backing store of /tmp

However, when configure-splash runs inside the chroot:

chroot $1 /usr/bin/configure-splash ... $TEMP_IMAGE

If /tmp is mounted as tmpfs (which is standard behavior for mmdebstrap and many containerized builds), the configure-splash process sees an empty RAM disk instead of the file that was copied to the underlying disk. The file is effectively "masked".

Suggested Fix

Avoid using /tmp for transferring files across the chroot boundary, as its persistence guarantees are weak in chroot/container environments.

Instead, stage the file in the root directory (/) or another persistent location (like /opt), and ensure it is removed after configuration.

Proposed Patch (splash-screen.yaml):

- TEMP_IMAGE="/tmp/splash-screen-source.tga"
+ TEMP_IMAGE="/splash-screen-source.tga"
  cp "$SPLASH_IMAGE" "$1$TEMP_IMAGE"
```

This ensures the file lands on the root filesystem, which is visible to the chroot process regardless of mount points.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions