Most recent edit on 2008-06-09 10:39:15 by JimmyConner

Additions:
copy /media/cdrom/.discinfo /CD



Edited on 2006-05-28 22:14:22 by JimmyConner [Minor update]

Additions:
Now unmount the CDRom if you had mounted it
testrpms.sh is used for when you add RPM packages to the CD. It will test all the packages to ensure that there are no dependecy problems. This is exceedingly useful, as you don't have to wait until after you created the CD and tried to install it, to find out you are missing a package. Upon running the script, it is safe to ignore any warning, such as
makeiso.sh is the script that does the actual CD creating. We create the list of packages, and the proper order they should be installed in, and then we creat the ISO image. The script as written will place the ISO in /root directory.


Deletions:
Now unmount the CDRom if you had mounted
testrpms.sh is used for when you add RPM packages to the CD. It will test all the packages to ensure that there are no dependecy problems. This is exceedingly useful, as you don't have to wait until after you created the CD and tried to install it, to find out you are missing a package. Upon running the script, it is safe to ignore any warning, such as
makeiso.sh is the script that does the actual CD creating. We create the list of packages, and the proper order they should be installed in, and then we creat the ISO image. The script as written will place the ISO in /root directory.




Edited on 2006-05-22 21:35:18 by JimmyConner [Minor grammar update]

Additions:
The most important file that you will deal with is ks.cfg which will be directly in the /CD/ directory. This file is the "automation" script which tells the installer what to do. Here you specify what packages to install, the root password, and all the commands to run after the installation if complete.

Deletions:
The most important file that you will deal with is ks.cfg would will be directly in the /CD/ directory. This file is the "automation" script which tells the installer what to do. Here you specify what packages to install, the root password, and all the commands to run after the installation if complete.



Edited on 2006-05-20 11:19:02 by JimmyConner [Spelling fix]

Additions:
The two important areas in this script are marked by

Deletions:
The two imporant areas in this script are marked by



Edited on 2006-05-19 07:31:21 by JimmyConner [Notes about ks.cfg]

Additions:
The most important file that you will deal with is ks.cfg would will be directly in the /CD/ directory. This file is the "automation" script which tells the installer what to do. Here you specify what packages to install, the root password, and all the commands to run after the installation if complete.
The two imporant areas in this script are marked by
%post --nochroot
and
%post
Everything after the %post --nochroot is not using the "normal" base root that you are accustomed to. Instead the physical hard drives are mounted. You can access the normal root here
/mnt/sysimage
Generally here we mount the CD-Rom and do any work we have to do with it (like copying all the files off), before changing to the "normal" root.
Now when we switch to %post all the paths are exactly as they will be on your new install. Here we can do most anything we want, such as starting services (MySQL must be started inorder to import databases!), removing services we don't want, changing directory permissions, setting up the cron jobs, etc... It is important to note, that most of these items can also be done in the --nochroot enviroment, but I find it easier this way, as I believe so will you.
An important directory on the CD is
/CD/CentOS/RPMS
This is the directory where you will place any RPMs that you want installed. You can also remove old RPMs that aren't needed anymore (for instance if you add upgraded RPMs) or if you decide to remove features (be sure to remove the listing for the RPMs in ks.cfg or else your install will fail!).


Deletions:
Here I will detail a little information on the ks.cfg file, and the important parts of the ISO.



Edited on 2006-05-19 07:07:36 by JimmyConner [Fix the mkisofs package name]

Additions:
mkisofs
yum install anaconda-runtime mkisofs anaconda

Deletions:
makeisofs
yum install anaconda-runtime makeisofs anaconda




Edited on 2006-05-19 07:01:18 by JimmyConner

No differences.


Edited on 2006-05-19 07:00:54 by JimmyConner [Add command to remove TRANS.TBL files]

Additions:
The copy command for some odd reason creates files called TRANS.TBL in every directory that it copied to, so we will get rid of those now.



Edited on 2006-05-19 06:57:05 by JimmyConner [Minor change to the copy command]

Additions:
cp -R /media/cdrom/* /CD

Deletions:
cp -R /media/cdrom /CD



Edited on 2006-05-18 22:23:23 by JimmyConner

Additions:
In the process of creating and testing the CD's that I created, I can say that it is definitely so much faster and easier to use a virtual server application, such as VMWare, to test the CD installation, than actually using a real machine.

Deletions:
This documentation is far from complete, so I wouldn't bother even looking at it yet
Also, some of the commands might not be showing up correctly until I fix a few wiki parse errors.




Edited on 2006-05-18 22:20:18 by JimmyConner

Additions:
Preparing... # # # # # # # # # # [100%]
then it means there are no dependecies problems, so you are now able to create the CD.


Deletions:
Preparing... # [100%]
then it means there are no dependecies, so you are now able to create the CD.




Edited on 2006-05-18 22:18:48 by JimmyConner

Additions:
mkdir /media/cdrom
mkdir /CD

Deletions:
mkdir -p /media/cdrom
mkdir




Edited on 2006-05-18 22:18:06 by JimmyConner

Additions:
mkdir -p /media/cdrom

Deletions:
mkdir /media/cdrom



Edited on 2006-05-18 22:10:18 by JimmyConner

Additions:
This documentation is far from complete, so I wouldn't bother even looking at it yet
Also, some of the commands might not be showing up correctly until I fix a few wiki parse errors.


Deletions:
(This documentation is far from complete, so I wouldn't bother even looking at it yet)



Oldest known version of this page was edited on 2006-05-18 21:56:47 by JimmyConner [Beginning of the tutorial]
Page view:
(This documentation is far from complete, so I wouldn't bother even looking at it yet)

This documenation will show you how to "remaster" the CactiEZ CD, in order to add your own packages (or otherwise customize it for you organization), and then reburn the CD.

First, I would like to point out, that this documentation is based off a ton of google searches in order to find the right information. I could not find any concise place that contains more than one or two bits of information, and most of it not directed at the CentOS distribution. There is actually a lot more than this that is required if you happen to want to start from scratch off the base CentOS CDs, I just have happened to do most of the work for you already.

I definitely don't mind you using this information, or the CactiEZ CD as your base, but I would like to ask that if you want to help improve the CD (within reason ofcourse) then let me know so that I can incorporate the changes into the official CD, instead of having to have multiple forks running around. This makes it easier on you, and on me when having to support these installs.



This documentation is based off of a host machine already running CactiEZ, so if you are not using it, you may require additional RPMs.



We will start off by installing these packages, and all dependecies.
anaconda-runtime
makeisofs
anaconda

Use this command to make it easy on yourself.
yum install anaconda-runtime makeisofs anaconda




Next, you want to either mount the ISO using these commands
mkdir /media/cdrom
mount /dev/cdrom /media/cdrom
(Skip this step if you plan on using another way to get the CD files on the server)


For this tutorial, we will place the files in a directory in root called
/CD

Copy the files either remotely via SCP (using WinSCP), or from the mounted CD with this command.
mkdir
cp -R /media/cdrom /CD

Now unmount the CDRom if you had mounted
umount /media/cdrom



Now we create these scripts, I put them in /root/

makeiso.sh
#!/bin/bash
export PYTHONPATH=/usr/lib/anaconda
/usr/lib/anaconda-runtime/genhdlist /CD/
/usr/lib/anaconda-runtime/pkgorder /CD i686 > /CD/CentOS/base/pkgorder
/usr/lib/anaconda-runtime/genhdlist --withnumbers --fileorder /CD/CentOS/base/pkgorder --hdlist /CD/CentOS/base/hdlist /CD
find /CD -name TRANS.TBL -exec rm {} \;
mkisofs -r -T -J -V "CactiEZ" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -v -o /root/Cacti.iso /CD

testrpms.sh
#!/bin/bash
cd /CD/CentOS/RPMS
mkdir /tmp/testdb
rpm --initdb --dbpath /tmp/testdb
rpm --test --dbpath /tmp/testdb -Uvh *.rpm
rm -fr /tmp/testdb

testrpms.sh is used for when you add RPM packages to the CD. It will test all the packages to ensure that there are no dependecy problems. This is exceedingly useful, as you don't have to wait until after you created the CD and tried to install it, to find out you are missing a package. Upon running the script, it is safe to ignore any warning, such as
warning: apr-0.9.4-24.5.c4.1.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
as these just mean that you do not have a GPG key for the package, but it will install successfully without it. If you see this
Preparing... # [100%]
then it means there are no dependecies, so you are now able to create the CD.

makeiso.sh is the script that does the actual CD creating. We create the list of packages, and the proper order they should be installed in, and then we creat the ISO image. The script as written will place the ISO in /root directory.

You will want to make both of these scripts executable by running these commands
chmod +x /root/makeiso.sh
chmod +x /root/testrpms.sh

Now you can make modifications to the /CD directory, and easily test the CD and recreate the ISO.


Here I will detail a little information on the ks.cfg file, and the important parts of the ISO.
Page was generated in 0.0504 seconds