Ask Your Question

Creating a Fedora remix with livecd-creator, no custom plymouth theme on live boot.

asked 2013-12-03 13:12:00 -0500

VincePrince gravatar image

updated 2014-04-11 16:48:47 -0500

remjg gravatar image

I got this problem that has been driving me bananas or some time now and I haven't found any manuals, guides or forum posts that have given me the answer. I have a kickstart script that I use on occasion that'll set up a live image of a 'less-free' Fedora desktop, it works well and produces a live bootable DVD that installs nicely and includes many of my fave apps & tools.

Recently I decided to fill out my ks script a bit and make a proper remix out of it, apply my own branding and give to some friends who are interested to try it out. All is good apart from one issue, the Plymouth boot theme.

I'm using livecd-creator and creating a remix of Fedora 20, until 20 is released I'm using a couple of 19 & rawhide third-party repos but this will change. For the record I'm running livecd-creator like this;

livecd-creator --config=/mypath/chapeau_full.ks --fslabel=Chapeau --releasever=20 --cache=/mypath/livecache

I've knocked together a custom plymouth theme called 'chapeau' (what I've called my remix) and it works great in Fedora 19 & 20. In the kickstart script it is copied into /usr/share/plymouth/themes/ during a %post --nochroot.

Later in the ks script a %post runs;

/usr/sbin/plymouth-set-default-theme -R chapeau

... which sets the default theme and updates the initrd

During a live session my plymouth theme only shows up when shutting down the live session but on startup all I can get is the hot-dog theme included in the generic-logos package.

I'm thinking it must be something to do with applying this change in %post and not during the %packages stage. The initrd seems to be getting regenerated by plymouth-set-default-theme though.

Even tried to learn how to package my theme up in an rpm and install it in the %packages section but after working through the rpm packaging guides for a few hours I wanted to shoot myself.

Anyone have any advice regarding applying Plymouth themes in this manner to a live remix? I have trawled the man pages, web searches and the Fedora & Red Hat documentation there's not a lot out there. I would prefer not to have to create rpms and a repo just to change a boot theme.


edit retag flag offensive close merge delete


Thanks Wilf. I know how to use plymouth and set themes but my issue is relating to livecd-creator and applying a theme in a kickstart %post script. Also if you run plymouth-set-default-theme with the -R option you don't need to update initrd a second time with the plymouth-update-initrd script. However I do think you've hit on something with updating grub.cfg, normally one would not have to update grub when changing a plymouth theme and grub.cfg is not present on a live boot image but you have made me wonder if my live image is loading the correct initrd images.

VincePrince gravatar imageVincePrince ( 2013-12-04 04:03:58 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2014-11-20 23:50:12 -0500

updated 2014-11-21 17:21:01 -0500

I have also run into this issue. (Whether the theme comes from an RPM or from elsewhere does not matter, by the way.) You already found the source of the problem in your FedoraForum thread: you have to pass the kernel version to dracut, the image gets generated for the wrong one otherwise. The Sugar on a Stick spin kickstart contains the solution:

EDIT: It turns out that the snippet from the Sugar on a Stick kickstart is not sufficient on its own, at least not for CD/DVD images. (SoaS targets USB, so it might be different there.) It also turns out that it is not actually needed for the Sugar theme because that one sets itself as the default in the package's %post scriptlet, but that is not an option if you don't have an RPM, nor if you want to use an existing RPM that does not make itself the default that way (such as plymouth-theme-fade-in). (I also don't think it's a very nice solution.) So why does it not work? That's because livecd-creator copies the initramfs from the INSTALL_ROOT to the LIVE_ROOT before running the %post scriptlets. (The initramfs is then deleted by some kickstarts' %post scriptlets, because it is not actually needed on the live image, it will be rebuilt in hostonly mode during installation anyway.) The solution is to add a %post --nochroot snippet that moves the regenerated initramfs to the correct place:

%post --nochroot
mv -f $INSTALL_ROOT/boot/initramfs-3*.img $LIVE_ROOT/isolinux/initrd0.img

With both the snippet from the Sugar on a Stick kickstart and the above extra trick, setting a different Plymouth theme works for me.

edit flag offensive delete link more

answered 2013-12-03 15:05:00 -0500

wilf gravatar image

updated 2013-12-03 15:09:50 -0500

When I change plymouth themes, I do this:

plymouth-set-default-theme --list

This is just to find the theme I want - is the chapeau one listed?

Then just:

plymouth-set-default-theme charge -R
grub2-mkconfig -o /boot/grub2/grub.cfg

The last one sometimes is necessary as it is Grub that does the boot-up initrd stuff.

All these commands have to be done as root, which boot up stuff probably is done as anyway. It may just be simpler to add this as a script which is automatically booted afterwards if it does not work in the 'post' stage - perhaps with rc.local or something, and that automatically removes or disables itself after running sucessfully to stop it running at every boot up?

I also wish they would get rid of the stupid hot-dog - introducing vegetarians to Fedora does not always work...

edit flag offensive delete link more

Question Tools


Asked: 2013-12-03 13:12:00 -0500

Seen: 1,592 times

Last updated: Nov 21 '14