Roshi's Ramblings

Documenting things I document

A while back Adam sent a mail to the test list with instructions on rolling your own Fedora Live images. While we in QA use this method to test updated bits on the live media before starting another official build, you can use this method to spin a live image with basically any packages you want. I thought I'd document it for those of you who don't follow the QA mailing list.

What do I need?

There's only a couple packages you need and a bit of knowledge on how to use them.


  • livecd-tools
  • koji
  • and of course Yum (perhaps dnf in the future, but not now as far as I know)

Make sure you have all those installed.

sudo yum install livecd-tools koji


git clone

This repo provides all the kickstarts releng uses to build the actual Fedora releases. It's the foundation of what we'll be using to generate our custom image.


It would also be good to decide where in your /home directory you want to build these images from. As packages get downloaded to be installed on your live image, we'll be caching the packages so subsequent builds go faster. I do the same thing Adam does; I have a ~/local directory I use to build from. Once you've done that, create the needed tmp/ and cache/ directories:

mkdir tmp cache

What do I do with these?

The whole process is actually really simple once you get use to it. We need to create a repo of the packages we want to have installed on the system. So create a directory for this repo to live in:

mkdir -p ~/local/side/<target arch>

Now, go ahead and cd into the arch directory you just created. This is where we'll download the packages you want to install. You can do this manually, if you rolled your own rpms or if you just want a newer build of a package from koji, you can get koji to download it for you.

koji download-build <build id>

The koji cli tool will then download your requested build, along with all it's required dependencies. You can find koji builds here. After your packages are downloaded, you need to create the repository so your kickstart can use it:

createrepo <path to arch dir>

This creates all the metadata yum and dnf need to be able to install packages from it.

Create a Kickstart

The last prep step for firing up your build is to create a kickstart with your repo in it. I just use basically the same kickstart Adam provided:

%include spin-kickstarts/fedora-live-workstation.ks

repo --name=fedora --baseurl=$releasever/$basearch/os/
repo --name=side --baseurl=file:///home/roshi/local/side/$basearch
repo --name=bleed --baseurl=$basearch

This file is saved as live-bleed.ks in the ~/local directory.

Build your image

Now you've got all the bits you need in order to fire off the build.

sudo livecd-creator -v --releasever=22 --tmpdir=/home/roshi/local/live/tmp/ --cache=/home/roshi/local/live/cache/ -f <what you want to name your image> live_bleed.ks

I've found it useful to throw this into a script - which saves me a lot of extra typing :)


That's all there is to it! In a few minutes your build should finish and then you're free to launch it up in a VM or burn it to a disc. There's a ton of things you can do with this process, seeing as you can utilize everything kickstarts have to offer. Take some time and look through the spin-kickstarts repo you clone or look at the wiki for more kickstart options.

comments powered by Disqus