Talk:Custom SME Server ISO
RequestedDeletion 04:55, 18 February 2013 (MST) Copied from Darell May under GNU license
Required packages
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
Adjust environment
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
Source ISO
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/* .
Create links
Create the RedHat link required for proper compatibility with standard RedHat iso tools.
- cd /root/smeserver/cdrom
- ln -s e-smith RedHat
add custom changes
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/cdromand 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 RPMsdirectory 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: BASENAME-VERSION-RELEASE.iso = the new iso imageBASENAME-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.