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


Copyright © Darrell May <dmay@myezserver.com>
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
Solution:
  Follow this HowTo


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

anaconda-7.3-7es115.i386.rpm

anaconda-runtime-7.3-7es115.i386.rpm

apache-devel-1.3.27-2.i386.rpm

autoconf-2.13-17.noarch.rpm

automake-1.4p5-4.noarch.rpm

cpp-2.96-113.i386.rpm

gcc-2.96-113.i386.rpm

gcc-c++-2.96-113.i386.rpm

gettext-0.11.1-2.i386.rpm

glibc-devel-2.2.5-43.i386.rpm

glibc-kernheaders-2.4-7.16.i386.rpm

kernel-source-2.4.20-18.7.i386.rpm

libacl-2.0.11-7.i386.rpm

libacl-devel-2.0.11-7.i386.rpm

libattr-2.0.8-6.i386.rpm

libstdc++-devel-2.96-113.i386.rpm

libtool-1.4.2-7.i386.rpm

m4-1.4.1-7.i386.rpm

mkisofs-1.10-11.i386.rpm

ncurses-devel-5.2-26.i386.rpm

pam-devel-0.75-46.7.3.i386.rpm

readline-devel-4.2a-4.i386.rpm

rpm-python-4.0.4-7x.18.i386.rpm

zlib-devel-1.1.4-8.7x.i386.rpm

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/check-repository.py and comment out "import todo"  (line 38) with a '#'.

# pico /usr/lib/anaconda-runtime/check-repository.py

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 check-repository.py.  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/check-repository.py /root/smeserver/cdrom


STEP 9: Create the buildiso script below:

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

 

#!/bin/sh

# useage = ./buildiso BASENAME-VERSION-RELEASE

# Example: ./buildiso smeserver-6.0.1-01

     

# set location variables

DESTINATION=/root/smeserver

BUILDROOT=/root/smeserver/cdrom

 

# 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/boot.cat \

-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.