Kickstarting A Fedora Live Install
by Gene Czarcinski
Prior to Fedora 21, I have been using a GA DVD and doing basically a netinstall or creating my own DVD based on everything plus updates repos which included all of the basic packages I wanted installed. With product-ized Fedora 21 and some rethinking, I realized that a better approach would be to use a live install. A live install not only installs faster than the equivalent DVD or netinstall but also freezes the release/version for each package installed to a known "good" values. This idea of having a known set of packages which create a known working system greatly enhances possibility that the fresh install will work. So, the idea is to use Live Installs rather than DVD or netinstalls. The first thing that occurs to me is how I can invoke kickstart from liveinst. I found that anaconda developers really, really do not want to support kickstart from liveinst! However, while investigating that I found that turning the question around is doable and supported: doing a kickstart install which installs a live image. For my kickstart reference, I use the Fedora wiki Kickstart page and the kickstart command of interest is:
liveimg --url=<url> [--proxy=<proxyurl>] [--checksum=<sha256>] [--noverifyssl]
--url=<path_to_squashfs.img> and can be
--url=file:/// which points to a squashfs.img file.
I assume that you will want to use the squashfs.img files from existing “known good” livecd isos. Simply mount the iso and copy
LiveOS/squashfs.img to your payload directory and, in the process, rename it something meaningful and related to the iso you extracted it from.
The Network Solution
If you have a local webserver, you can use it to deliver both the Live Image and the kickstart file.
1. Modify the kickstart file to include the liveimg command pointing to the Live Image (squashfs.img) file accessible via a web server.
2. Put the kickstart file also on the webserver.
3. Bootup a netinstall such as
4. On the boot prompt line (accessed with tab), enter something like the following:
5. Sit back and watch the install run.
Creating Your Own Live Image
One opportunity you now have is to create your own (tailored) Live Image. This can be useful to pickup the day-zero/day-one bug fixes that usually accompany general availability of a Fedora Release. This can also be used to include packages you have updated but are not in the regular yum repositories.
fedora-kickstarts. Select and update the kickstart file you ant to use. Be sure to include defining the yum repositories you want to use ... especially any local repositories.
2. Install the mock package and initialize it. See the following about using mock to run pungi to create distribution DVDs. The initialization should include installing livecd-tools. Also, copy the kickstart file you want to user into mock. Refer to the following which tells you how to setup mock for pungi and sinply run livecd-creator instead of pungi.
3. Once created, extract the squashfs.img file and add it to your payload repository.
Next, Payload on a USB Flash Drive
So far, we have done everything on the network. But, there is an alternative which use the current version of the old floppy disk: the USB Flash Drive. And, since most modern computers will optionally boot a USB Flash Drive, you will want to put you netinstall on the flash drive. While you can pick whatever size you want, I find that a 16GB USB Flash Drive is a reasonable choice.
1. Using fdisk, delete the existing partition and allocate a new partition consuming the entire USB Flash Drive. Make the partition bootable. Format the partition for ext4.
2. Use livecd-iso-to-disk to install the netinstall with something like this:
livecd-is-to-disk --reset-mbr ./Fedora-Server-netinst-x86_64-21_Beta.iso /dev/sde1
3. Besides installing the netinst system, you can also have livecd-iso-to-disk install an updates.img file and update the configuration so that it will be picked up when booted. Add the parameter
4. Mount the USB Flash Drive and add a payload directory and copy the Live Images to that directory.
5. Change the liveimg command in you kickstart file to something like this:
6. Note: “file:///run/install/repo/” must be used as shown.
7. This works with anaconda-21.48.14-1 or later.
And Kickstart Files on the USB Flash Drive too
Last, but not least, is that it would also be nice if the kickstart file was on the USB Flash Drive. In fact, maybe a “bunch” of kickstart files for different systems.
1. Create a ks directory on the USB Flash Drive and copy you kickstart files into that directory
2. You will need to specify the kickstart file when you boot up the netinstall and hit tab to get the prompt. Here you enter something of the form:
LABEL=<label> or UUID=<uuid>.
3. For example:
where LIVE is the label of the partition on the USB Flash Drive.
4. Another example is:
where the UUID is taht of the partition on the USB Flash Drive.
Gene Czarcinski <email@example.com> Thu Nov 13 2014