how to set a custom boot logo in postmarketOS


postmarketOS is fun, and one nice thing about it is how much you can customize about the system. unfortunately, there is no obvious straightforward way to change the icon shown on the boot splash screen. but we can still change it, if we're fine with doing a little hackery.


!!! WARNING !!!

THIS INVOLVES OVERWRITING FILES IN THE BOOTLOADER!

i am not responsible if this somehow ends up bricking your device. it probably won't, since we're just replacing a single SVG file, but i haven't tested this procedure on every device ever since i don't own them all yet. follow these instructions at your own risk.


firstly, get the custom logo you want to use as an SVG file. it can be any SVG file really, just make sure the image is actually as a path and not just an embedded bitmap or something wacky like that. put this svg file somewhere easy to access; for this tutorial, we'll assume the file is at /etc/pbsplash/logo.svg. if you want to use a different name or location, just replace the path with whatever you want.

now, to get this logo to show up on your boot screen, you'll need to tell mkinitfs where to find it. put the following into /etc/mkinitfs/files/:

/etc/mkinitfs/files/30-custom-bootsplash.files
/etc/pbsplash/logo.svg:/usr/share/pbsplash/pmos-logo-text.svg

if you now re-run mkinitfs and reboot, you'll notice that your shutdown screen still has not changed. this is because we didn't change it yet. now, since the shutdown screen is actually controlled by the init system instead of the bootloader, the instructions depend on if you're using openRC or systemd.

for openRC, replace the path to the logo in the local.d stop script as shown:

/etc/local.d/99-shutdown-pbsplash.stop
# Run splash
pbsplash -s /etc/pbsplash/logo.svg -b "Linux $(uname -r) | $deviceinfo_codename" -m "Shutting down..." &

for systemd, you'll have to do similarly in the systemd service file.

/usr/lib/systemd/system/shutdown-splash.service
[Service]
RemainAfterExit=yes
ExecStart=-/usr/bin/pbsplash -s /etc/pbsplash/logo.svg -b "Shutting down..."

now that's all done, run mkinitfs, reboot, and enjoy!