Today we learn how we make Custom Centos ISO minimal 6.5.
This is very simple process of making ISO.we follow step by step procedure making Custom Centoos ISO.
1.Build Environment.

First of all we download the minimal 6.5 Centos package by the following address.

After downloading the Centos you need to install few packages using the following comand.

yum -y install rsync yum-utils createrepo genisoimage isomd5sum

Now mount the ISO
mount /dev/cdrom /mnt

Mount the ISO inside of the filesystem itself, use the next command instead
mount -o loop,ro CentOS-6.5-x86_64-minimal.iso /mnt

Now we make the directory and rsync  all the  file and folder and also hidden in build directory.
mkdir /root/build
cd /root/build
rsync -av /mnt/ .

Now we remove all useless file
find . -name TRANS.TBL -exec rm -f {} \;
Our build environment portion is completed now we forward to next portion.

2.Select Packages for custom ISO.
Now we decide which packages you want to add in custom Centos ISO.I am trying to add httpd.

First go to Packages directory

cd Packages
Now download the httpd
yumdownloader httpd

After packages selection we move to next step.

3.Test dependancies. 

Now we check the package we add in ISO above is require any dependencies.If require than we add  dependencies.

rpm –initdb –dbpath /root/build/Packages/

rpm -ivh –test –dbpath /root/build/Packages/ /root/build/Packages/*.rpm
After using above command if output is as shown below than we need to resolve fail dependencies.

warning: /root/build/Packages/acl-2.2.49-6.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
error: Failed dependencies:
/etc/mime.types is needed by httpd-2.2.15-26.el6.centos.x86_64
apr-util-ldap is needed by httpd-2.2.15-26.el6.centos.x86_64
httpd-tools = 2.2.15-26.el6.centos is needed by httpd-2.2.15-26.el6.centos.x86_64 is needed by httpd-2.2.15-26.el6.centos.x86_64 is needed by httpd-2.2.15-26.el6.centos.x86_64

Do not worry about warning messages.Our focus is only on fail dependencies as shown above.We require to download failed dependencies.Using below command to check yum provides these dependencies.

yum provides “*/etc/mime.types*”

Once you download all  dependencies  once again run below command to check all dependencies downloaded.

rpm -ivh –test –dbpath /root/build/Packages/ /root/build/Packages/*.rpm

The log show  following texts if all dependencies downloaded.

warning: /root/build/Packages/acl-2.2.49-6.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Preparing… ########################################### [100%]
installing package filesystem-2.4.30-3.el6.x86_64 needs 8KB on the /mnt filesystem.

4.Prepare comps.xml file.

Go to repodata directory
cd  repodata
Rename the 34bae2d3c9c78e04ed2429923bc095005af1b166d1a354422c4c04274bae0f59-c6-minimal-x86_64.xml file

with comps.xml as

mv 34bae2d3c9c78e04ed2429923bc095005af1b166d1a354422c4c04274bae0f59-c6-minimal-x86_64.xml comps.xml

Now open the comps.xml file and add name of  all the packages which you downloaded in previous steps main.The last package in comps.xml file is “mdadm” we can add after this the name of packages which we downloaded.

5.Create repodata.

Make sure that in the /root/build directory, there exists a file named “.discinfo”.
cd /root/build
export discinfo=$(head -1 .discinfo)

Now create the repodata
createrepo -u “media://$discinfo” -g repodata/comps.xml /root/build

6.Build the ISO image.

After this final step Custom Centos ISO image is ready for use.
Go to build directory

cd /root/build

Using mkisofs command to build ISO

mkisofs -r -R -J -T -v -no-emul-boot \
-boot-load-size 4 \
-boot-info-table \
-V “CentOS 6.5 x86_64 Custom Install” \
-A “CentOS 6.5 x86_64 Custom – 2013/04/21″ \
-b isolinux/isolinux.bin \
-c isolinux/ \
-x “lost+found” \
–joliet-long \
-o CentOS-6.4-x86_64-Custom.iso .

Finally implement the md5 checksum

implantisomd5 CentOS-6.5-x86_64-Custom.iso


Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Related News Feeds

Set your Twitter account name in your settings to use the TwitterBar Section.