|
Page 5 of 6 Creating custom configuration packages I hope the examples above show you that creating a Live CD is actually a trivial job. Using Zeuthen's packages, you can go on creating Live CDs, adding applications from any repository. But suppose you need to create a Live CD that you can use to write documents and code as well. You'll want to include OpenOffice.org, Evolution e-mail client, Beagle desktop search, GAIM instant messenger, Xchat IRC client, GIMP image manipulator, GCC compiler, GDB debugger, and Doxygen for code documentation. Either you can specify them with the --package switch every time you want to assemble the CD, or you can write a configuration file of your own. The added advantage of using a configuration file is that you can specify your custom configuration as well. Anatomy of a configuration file Before you create your own configuration file, look at the configuration file that you've been using to create your Live CDs, fedora-gnome. You can extract the configuration file from the RPM by right-clicking on fedora-livecd-gnome-6-1.i386.rpm and selecting the Extract Here option. This should get you a file called 20-fedora-livecd-gnome.conf available under the etc/livecd/ directory. The prefix numbers help identify the particular package in the tree of packages. So 20-* package follows and probably depends upon a 10-* package, and a 30-* package follows and probably depends upon the 20-* and earlier packages. The first part of the file contains a list of applications to install, and the second part contains the configuration that needs to be done for that particular environment.
Listing 10. Contents of the 20-fedora-livecd-gnome.conf file case $1 in # inquire what packages to install; must print packages to install pkgadd) echo " chkconfig gdm gnome-panel nautilus metacity gnome-themes redhat-artwork gnome-power-manager gnome-volume-manager desktop-printing gnome-terminal gedit . . . .
# run configuration scripts when all packages are installed post) # mount livecd mkdir -p /mnt/livecd mount -o ro -t iso9660 /dev/livecd /mnt/livecd # add fedora user with no passwd useradd -c "Fedora live CD" fedora passwd -d fedora > /dev/null . . . . |
As you can see, most of the work such as setting up a user and setting up networking is done by the fedora-gnome package. Creating a configuration file The best way to create a configuration file is to use the 20-fedora-livecd-gnome.conf and remove the GNOME-specific bits. Let's call our file 40-fedora-livecd-office-code.conf. This should do the trick: # cp 20-fedora-livecd-gnome.conf 40-fedora-livecd-office-code.conf
|