Revisor: Creating Custom Fedora Installation Media
Written by Northbear

Revisor is a GUI based appliction for "re-spinning" Fedora installation media. It allows you to create a DVD or set of CDs with updated packages, add custom packages, etc. Revisor also can setup the media to run from a "kickstart" configuration file. This feature allows you to do a complete custom Fedora install without having to answer all those questions for a manual installation. Revisor also is available for other "RedHat" related distros, such as Red Hat Enterprise Linux (RHEL) and Centos.




Revisor: Not so user friendly plus a couple of warts

Revisor's biggest "downfall" is a lack of setting up a proper configuration from Revisor's GUI. Configuration is best accomplished using a text editor. This makes Revisor a tool that's only useful for a very knowledgable user. This tutorial will cover how to configure Revisor for a Fedora 8 "re-spin" using a local package repositiory and a few external repositories.

Revisor has a couple of problems that are due to updated packages killing off some functionality during installation:
  • Graphical Installation. This was lost due to updates to anaconda or supporting packages. Fixing it requires access to some specially packaged anaconda files available only on one website or having those files downloaded to a local repository. Ouch!
  • Firstboot. This was lost due to updates to smolt. Fortunately, these updates can be avoided for Revisor's media build. They can be updated later after the installation is complete.

         
Configuration: Configure the GUI with /etc/revisor/revisor.conf

                        

After a couple of trips through Revisor, you are going to want to pre-configure the GUI so you can minimize the number of checkboxs you need to click. By editing the file /etc/revisor/revisor.conf, you can pre-configure the GUI for various things such as the media type, the media "model" (i.e. Fedora 8 i386), the kickstart file to use, etc.
   #Types of Installation Media to build
      media_installation_dvd=1

   # These are more advanced options
       dependency_resolve_allow_conflicts=0
       mode_respin=0
       model=f8-i386

   [f8-i386]
       main = /etc/revisor/conf.d/revisor-f8-i386.conf
       product_name = Fedora
       product_path = Packages
       iso_basename = F
       comps = /usr/share/revisor/comps/comps-f8.xml
       architecture = i386
       version = 8
       version_from = F8
       getsource = 0
       kickstart_file=/etc/revisor/conf.d/ks.cfg
I selected DVD media and set the default model to "f8-i386". I also wanted this model to use my custom kickstart file located at /etc/revisor/conf.d/ks.cfg. After you've spent several hours with Revisor, these minor changes will be really appreciated!

Configuration: Setup the media model with /etc/revisor/conf.d/revisor-f8-i386.conf

                                   

Revisor uses YUM to download and manage all the packages for the custom install media. I had problems using Revisor's GUI to add repositories, too many syntax errors for YUM to parse, etc. I just manually edited the model file to include sections for all of my repositories. I left the "main" section intact. Notice that almost all of the repositories are located locally on my LAN.
[fedora]
name = Fedora 8 - Werewolf - i386
baseurl = http://192.168.0.46/yum/base/

[fedora-updates-newkey]
name = Fedora Updates NewKey
baseurl = http://192.168.0.46/yum/updates/i386.newkey/
exclude=smolt smolt-firstboot

# For the Flash plugin and Acrobat Reader packages.
[adobe-linux-i386]
name     = Adobe Repo
baseurl  = http://linuxdownload.adobe.com/linux/i386/

# For libdvdcss package. Everthing else has moved over to RPMfusion.
[livna]
name = Livna Repo
baseurl = http://livna-dl.reloumirrors.net/fedora/8/i386/

# Add this section only if you don't have local copies of anaconda-11.3.0.50-10
# and anaconda-runtime-11.3.0.50-10
[kanarip]
name = Kanarip
baseurl = http://kanarip.com/anaconda/f8/i386/

# Custom packages (like codecs, Firefox 3, RealPlayer 11, etc.).
[local-extras]
name = Local Extras
baseurl = http://192.168.0.46/yum/extras/

# The RPMfusion Free and Non-free repositories (replaces old Livna).
[rpmfusion-free-updates]
name = Free RPMfusion Repo
baseurl = http://192.168.0.46/yum/rpmfusion-free/i386/

[rpmfusion-nonfree-updates]
name = NonFree RPMfusion Repo
baseurl = http://192.168.0.46/yum/rpmfusion-nonfree/i386/

[main]
metadata_expire = 15
plugins = 0
reposdir =
tolerant = 1
keepcache = 1
cachedir = -yumcache
exactarch = 1
pkgpolicy = newest
distroverpkg = redhat-release
debuglevel = 1
gpgcheck = 1
logfile = revisor-yum.log
installroot = /var/tmp/revisor
obsoletes = 1

Notice the "exclude" line for the updates repository. This line prevents Revisor from using the broken version of smolt. Firstboot now functions. Unfortunately, the same trick doesn't work for anaconda. I've had to download anaconda-11.3.0.50-10 and anaconda-runtime-11.3.0.50-10 and into a local repository and load them into Revisor in order to get Graphical Install working again.

If you don't want to have local copies of anaconda and anaconda-runtime, you can add the "kanarip" repo and download them from kanarip.com.

For repos that are local to your machine, you can use "createrepo". Download the packages you want with either "wget" or a web browser (say to /home/me/Custom) and then run "createrepo /home/me/Custom". Then setup a YUM section in your model file to access the new custom repo.

[fedora]
name = Fedora 8 - Werewolf - i386
baseurl = http://192.168.0.46/yum/base/

[fedora-updates-newkey]
name = Fedora Updates NewKey
baseurl = http://192.168.0.46/yum/updates/i386.newkey/

# My Custom repository on this machine
[my-custom]
name = Local Custom Packages
baseurl = file:///home/me/Custom



Configuration: Setup a KickStart file (optional)

A kickstart file is a very handy item when used with Revisor. Kickstart allows you to automate (or semi-automate) the installation process. It provides a lot of convience and control. You can use the kickstart GUI tool which is located at
/usr/bin/system-config-kickstart to create an initial kickstart file (ks.cfg) and then manually edit it to include the appropriate packges and package groups.

A few recomendations for the kickstart file:

  • Don't enable reboot. If Revisor has been set to use kickstart as the boot default, then you could auto-reboot back into the installation process after just completing the install. Not much fun if kickstart wipes the MBR and partition tables!
                                    
  • For safety's sake, manually edit any kickstart file and make certain all of the bootloader and partition information is commented out. The install process will ask you what you want to do with the bootloader/partitions, it's just much safer than letting kickstart blast away at some disk drive that might not be the correct drive!
                                     
  • You can set the default desktop to KDE in the Display section of the kickstart GUI. This panel also lets you control the Setup Agent (firstboot). I usually enable the Setup Agent to make it easy to setup a non-root user, set the system time, etc. However, comment out the "xconfig" line if you aren't installing X windows!
                                 
                                        

Here is what the first portion of the resulting ks.cfg file looks like. This one has a single ethernet device (eth0) enabled at boot up time. Installations are graphical (as opposed to text mode), the firewall is enabled allowing ssh, the Setup Agent (aka firstboot) is enabled, default language and keyboard layout are specified, etc.


#platform=x86, AMD64, or Intel EM64T
#version=F8
# Network information
network  --bootproto=dhcp --device=eth0 --onboot=on
# System authorization information
auth  --useshadow  --passalgo=md5
# Use graphical install
graphical
# Firewall configuration
firewall --enabled --ssh 
# Run the Setup Agent on first boot
firstboot --enable
# System keyboard
keyboard us
# System language
lang en_US
# SELinux configuration
selinux --disabled
# Install OS instead of upgrade
install
# Use CDROM installation media
cdrom

# System timezone
timezone  America/New_York
# X Window System configuration information
xconfig  --defaultdesktop=KDE --depth=24 --resolution=1280x1024 --startxonboot

# System bootloader configuration
#bootloader --location=mbr
# Partition clearing information
#clearpart --none 


Finally, ks.cfg has a large section for the packages. I select all of the package groups from the base execpt the Virtualization group (I prefer using VirtualBox, which I have stored in my local-extras repo). I also select all of the optional packages in each group. Finally, I've added in the packages contained in updates, local extras and repmfusion.

The "groups.xml" files in base and updates have a few packages listed that aren't in the repos. This might have been fixed for later version of Fedora. It's a non-fatal annoyance that is fixed by excluding the offending packages in the ks.cfg file.

%packages

# Loaded package groups
@admin-tools
@authoring-and-publishing
@base
@base-x
@core
@development-libs
@development-tools
@dial-up
@dns-server
@eclipse
@editors
@engineering-and-scientific
@fonts
@ftp-server
@games
@gnome-desktop
@gnome-software-development
@graphical-internet
@graphics
@hardware-support
@java
@java-development
@kde-desktop
@kde-software-development
@legacy-fonts
@mail-server
@mysql
@network-server
@news-server
@office
@printing
@ruby
@sound-and-video
@sql-server
@system-tools
@text-internet
@web-development
@x-software-development

# These pesky packages are listed in comps.xml in base (fedora) and updates.
# They don't have any packages associated with them, so don't go looking for
# them even though they appear to be in some package group(s).
-elilo
-iprutils
-kdeutils-devel
-mcelog
-ppc64-utils
-prctl
-s390utils
-yaboot

# Additional standard packages from fedora
compat-libstdc++-296
compat-libstdc++-33
ctapi-cyberjack
ctapi-cyberjack-pcsc
dejavu-fonts
dejavu-fonts-experimental
dnsmasq
dvdauthor
easytag
esmtp
exim
festival
festvox-bdl-arctic-hts
festvox-clb-arctic-hts
festvox-rms-arctic-hts
ghostscript-fonts
gnome-netstatus
gnuchess
gqview
imake
im-chooser
iscsi-initiator-utils
jfsutils
kftpgrabber
libifp
lsdvd
memtest86+
mod_auth_mysql
mtools
netcdf
openct
pax
qtparted
radeontool
reiserfs-utils
rpmdevtools
spambayes
squashfs-tools
vbetool
vdr
vdr-wapd
velocity
w3m
xfsprogs
xmms
xmms-skins

# Additional standard packages from updates.newkey
akode
amarok
audit
bittorrent-gui
bridge-utils
busybox-anaconda
createrepo
dcraw
digikam
emacs
fuse
gnokii
gparted
grip
gutenprint-plugin
gxine
ImageMagick
isomaster
istanbul
jack-audio-connection-kit
k3b
kaffeine
kdeedu
kdegames
kdegraphics
kdegraphics-extras
kdemultimedia
kdepim
kernel-devel
kernel-headers
kipi-plugins
konversation
ksensors
libsane-hpaio
liferea
lua
lynx
mesa-libGLU-devel
mikmod
netpbm-progs
php-mysql
postfix
qdbm
rpmlint
scribus
seamonkey
thunderbird
urw-fonts
vdradmin-am
vim-X11
vnc-server
wine
wireshark-gnome
xfig

# Loaded custom packages from local-extra
anaconda
anaconda-runtime
Firefox
Mplayer_codecs
RealPlayer

# Loaded "restricted" packages from adobe-linux-i386
AdobeReader_enu
flash-plugin

# Loaded "restricted" packages from livna
libdvdcss

# Loaded "restricted" packages from rpmfusion-free-updates
audacity-freeworld
avidemux
avidemux-cli
avidemux-gtk
avidemux-qt
dvd95
gstreamer-plugins-bad
gstreamer-plugins-ugly
k3b-extras-freeworld
mencoder
mplayer
mplayer-gui
vlc
vobcopy
xine
xine-lib-extras-freeworld
xmms-faad2
xmms-mp3
%end



Package Selection: Revisor and non-standard repositories

ORevisor has a checkbox for manual package configuration, so you can add/remove packages even after Revisor has loaded up everything from a kickstart file. However, non-standard repos won't appear unless then have the proper setup performed on them. To do this, each non-standard repo needs it's own "comps.xml" file. Once you've edited this file, which resides in the main directory of the repo, executing "createrepo -g ." in that directory will copy comps.xml into the repodata subdirectory. Then, when Revisor gets that repo's repodata files, it will have a way of displaying the repo's contents for manual package configuration. Here is the comps.xml file from my local-extras repo:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE comps PUBLIC "-//Red Hat, Inc.//DTD Comps info//EN" "comps.dtd">
<comps>
  <group>
    <id>local_extras-internet</id>
    <name>Graphical Internet</name>
    <description>Firefox 3.0.4</description>
    <default>true</default>
    <uservisible>true</uservisible>
    <packagelist>
      <packagereq type="optional">Firefox</packagereq>
    </packagelist>
  </group>
  <group>
    <id>local_extras-multimedia</id>
    <name>Sound and Video</name>
    <description>Codecs for Mplayer/Xine. RealPlayer11.</description>
    <default>true</default>
    <uservisible>true</uservisible>
    <packagelist>
      <packagereq type="default">RealPlayer</packagereq>
      <packagereq type="default">Mplayer_codecs</packagereq>
    </packagelist>
  </group>
  <group>
    <id>local_extras-virtualization</id>
    <name>Virtualization</name>
    <description>VirtualBox.</description>
    <default>true</default>
    <uservisible>true</uservisible>
    <packagelist>
      <packagereq type="optional">VirtualBox</packagereq>
    </packagelist>
  </group>
  <category>
    <id>local_extras</id>
    <name>Local - Extras</name>
    <description>Extra packages</description>
    <grouplist>
      <groupid>local_extras-internet</groupid>
      <groupid>local_extras-multimedia</groupid>
      <groupid>local_extras-virtualization</groupid>
    </grouplist>
  </category>
</comps>

I created three package groups and populated them with the packages I had downloaded to the repo. I made the multimedia packaged manditory and the rest optional.

Conclusion

There's a large amount of "hand crafting" in order to get Revisor and it's friends all configured. The work of setting up local repositories and having them rsync'd to the Internet repos is no minor task. However, if you have more than a few machines that you like to keep updated, the local repos are the way to go for saving bandwidth through your ISP.

Having a custom DVD for building machines from "bare metal" is very gratifying. You get all those packages that don't come on a standard install media and everything is up to date, no sitting around watching YUM update 600 packages for hours on end.