How to build your own custom SME Server 6.0.x iso

Copyright © Darrell May <>
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License.

Release supported:
SME Server 6.0.x
Last updated: 2/5/2004 9:07 AM
Problem:  You want to build your own SME Server, custom iso, bootable CD
  Follow this HowTo

STEP 1: On your SME 6.x test server, find and download the following rpms:

























Install the rpms:

# rpm -Uvh –-nodeps –-replacepkgs *.i386.rpm

STEP 2: To deal with some errors in the python paths, and an error in one of the scripts, you need to make some quick changes.  These are one-time changes to your build system.  Edit /usr/lib/anaconda-runtime/ and comment out "import todo"  (line 38) with a '#'.

# pico /usr/lib/anaconda-runtime/

Go to line 38 and comment out "import todo"  by preceding it with a '#',  # import todo

STEP 3: Download the current smeserver-x-x.iso and copy to /root/smeserver.  Logged in as root, make a temporary directory to loopback mount the iso image.  Make a directory for your work area (for this example, /root/smeserver/cdrom), cd to it.  Copy the iso contents into your work area on the hard drive.

# mkdir –p /root/smeserver/cdrom
# mkdir –p /root/smeserver/iso_mnt_point
# mount -o loop /root/smeserver/smeserver-x-x.iso /root/smeserver/iso_mnt_point/
# cd /root/smeserver/cdrom
# cp -Rav /root/smeserver/iso_mnt_point/* .

STEP 4: Create the RedHat link required for proper compatibility with standard RedHat iso tools.

# cd /root/smeserver/cdrom
# ln -s e-smith RedHat

STEP 5: Add your new rpms (example: sme56dev/updates) into /root/cdrom/e-smith/RPMS.  Remember to delete any older rpm versions you are replacing.

# cp *.rpm /root/smeserver/cdrom/e-smith/RPMS

TIP ;->

You may find it beneficial to create an iso that includes all the contribs and important programs you regularly use. To do so simply create a subdirectory under /root/smeserver/cdrom and copy all your files into it.  These will not get automatically installed but will be available inside your iso for manual installation.  You may include both Linux and Windows programs in your iso.

STEP 6: If you added any new rpms above into /root/cdrom/e-smith/RPMS you must edit /root/cdrom/e-smith/base/comps and add the new rpm names into the list.

# pico  /root/smeserver/cdrom/e-smith/base/comps

STEP 7: Optional.  Edit the install.cfg mirror.cfg upgrade.cfg. These are commented text files that hold install/mirror/upgrade defaults. You may leave these untouched or elect to alter to meet your specific needs.

# cd /root/smeserver/cdrom/images

# pico install.cfg
# pico mirror.cfg
# pico upgrade.cfg

STEP 8: Optional, but a good idea.  Run the script  This is will do some simple checks to verify that all the RPMs listed in your comps file are in the RPMS directory.  If it returns nothing, all is well.  If it returns an error, correct the problem.  Errors are usually due to typos in the comps file, or you forgot to add the RPM to the RPMs directory in the image.  This script will stop on the first error, so you need to run it until all errors are fixed!

# /usr/lib/anaconda-runtime/ /root/smeserver/cdrom

STEP 9: Create the buildiso script below:

# pico /root/smeserver/cdrom/devtools/buildiso



# useage = ./buildiso BASENAME-VERSION-RELEASE

# Example: ./buildiso smeserver-6.0.1-01


# set location variables




# remove any previous TRANS.TBL files

/usr/bin/find $BUILDROOT -name TRANS.TBL -exec /bin/rm -f {} \;


# create a rpm list for this build and save to destination

/bin/ls -1 $BUILDROOT/e-smith/RPMS > $DESTINATION/$1.list


# generate the hdlist file

/usr/lib/anaconda-runtime/genhdlist $BUILDROOT


# build the iso, save to destination

/usr/bin/mkisofs -V '$1' \

-b dosutils/autoboot/cdboot.img \

-c e-smith/base/ \

-J -r -T -pad -o $DESTINATION/$1.iso $BUILDROOT

STEP 10: Create your new iso by simply entering this command:

# chmod 550 /root/smeserver/cdrom/devtools/buildiso

# /root/smeserver/cdrom/devtools/buildiso BASENAME-VERSION-RELEASE

The above command creates two files in the /root/smeserver/cdrom dir:

  1. BASENAME-VERSION-RELEASE.iso = the new iso image
  2. BASENAME-VERSION-RELEASE.list =  a list of all rpms in this build

STEP 11: Burn the BASENAME-VERSION-RELEASE.iso image to a CDR.

STEP 12: Test the CDR by booting and performing a fresh server install.