Create A Custom CentOS/RedHat/Fedora .ISO

After documenting my Nagios(FAN) install, I started..well obsessing really over all the different possibilities available to Nagios. What I found was that there are a ton of new plugins and front-ends that required an incredible amount of Linux know-how in order to make them compatible with the Nagios(FAN) Distro of Linux. After trying for a few days to get the Adagios Front end to work with my FAN install – I finally decided to just do a clean install and set Adagios up as recommended by the developers on CentOS 6 and everything worked flawlessly. I decided at this point that If I can configure Nagios, Adagios, Nagvis, etc and somehow create a custom CentOS spin – It would be a great project for my Blog and to share with the Nagios community. So I spent some time learning what goes into Creating your own CentOS Spin..

 

 

Why LiveCD?

 

The LiveCD tool is probably one of the easiest tools to start using and configuring – Familiarizing yourself with this tool is a great way to begin working with Kickstart files and testing your image in your chosen virtual environment. While Learning how to create a custom CentOS spin, I ran across 3 main tools – LiveCD, Pungi & Revisor. After a number of different test installs and trial by fire testing, LiveCD  emerged the victor primarily for its ease of use.

With The most recent versions of LiveCD Images you are no longer restricted to just creating a LiveCD Image, you also have the option to install that image upon booting. A significant part of creating your custom CentOS .ISO is done setting up a custom Kickstart File for LiveCD to use. But since that process varies wildly based on individual needs, I won’t be covering that process in this post. I have however, taken the liberty of including a number of helpful resources below to help get you orientated. 😉

 

 

 Using LiveCD to Create a Custom CentOS .ISO

Install LiveCd-Tools & Subversion

CD to /usr/share/

SELinux should be in permissive mode for livecd-creator to work. Run the following as root user first before attempting to create a live CD or DVD.

You can use one of the pre-configured Kickstart files  in the  /usr/share/livecd-config/ directory as a template, Or create your own.

If you would prefer to create your kickstart file using a GUI interface, Download and run System-Config-Kickstart

CD to /usr/share/livecd-config/
Once you have modified your kickstart file, You can create your Livecd Iso…

For Additional Usage Information:

 

LiveCD Resources
http://www.livecd.ethz.ch/build.html
http://fedoraproject.org/wiki/How_to_create_and_use_a_Live_CD
http://linuxmoz.com/centos-kickstart-guide/

 

 

Test the ISO image

You can burn your ISO image to a CD or Flash Drive. However it is typically easier to test your image in a virtual environment via VirtualBox or Qemu.

Burn to Flash – https://fedorahosted.org/liveusb-creator/

VirtualBox (GUI)- https://www.virtualbox.org/

Get qemu (Command Line) – http://wiki.qemu.org/Download

 

 

Additional Resources:

 

General

KickStart Examples

Pungi


While Pungi is still a viable method for creating a custom Linux .Iso, it is much more labor intensive than using the LiveCD tool for a number of reasons. Pungi uses the Anaconda-runtime\buildinstall tool to compile the .ISO and RPMS via a custom kickstart file. While I personally haven’t had very much success using Pungi, I know others have been able to get it working and it is, if nothing else a viable option. I’ve detailed the install process below if you wish to sate your curiosity.

 

Install Pre-requisites

Download & Install Pungi

Compose RPM Tree ( this may take awhile…)

View pungi Usage

 

 

Additional Pungi Resources
https://fedorahosted.org/pungi/
http://koji.fedoraproject.org/koji/packageinfo?packageID=3528
https://fedorahosted.org/pungi/wiki/PungiDocs/RunningPungi

 

Revisor


Revisor is another option for those brave enough to tackle the process. Below are instructions on how to install a working version of Revisor on CentOS 6.4. You will need to be fairly adept with all of the components of a Kickstart file to be able to use Revisor effectively.

 

Install Pre-requisites

Install Revisor

If you would prefer to create your kickstart file using a GUI interface, Download and run System-Config-Kickstart

Then run

 

Additional Revisor Resources
http://ftp.scientificlinux.org/linux/scientific/6.4/x86_64/addons/revisor/
http://www.blueonyx.it/index.php?mact=News,cntnt01,detail,0&cntnt01articleid=127&cntnt01origid=62&cntnt01pagelimit=100000&cntnt01returnid=62

 

 

Update:

I will no longer be creating a custom CentOS Nagios Spin, at least not at this point in time. It has recently came to my attention that the developers of Adagios are already aiming to package their Adagios front-end within OMD. I personally think it would be a great addition to OMD and look forward to seeing Adagios appear in the OMD lineup.

~Rionoskae

 

  • Anant

    /usr/lib/python2.6/site-packages/imgcreate/errors.py:45: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
    return unicode(self.message)

    Error creating Live CD : Failed to find package ‘syslinux’ : No package(s) available to install

    • What version of CentOS are you running?

      • Karl Erickson

        I am also seeing this same message on CentOS 6.5 (64-bit), when trying to create a LiveCD. My message is almost the same 9except for the last line):

        /usr/lib/python2.6/site-packages/imgcreate/errors.py:45: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
        return unicode(self.message)
        Error creating Live CD : Unable to install: Could not run transaction.

  • This method was detailed for Centos 6.4.

    To be honest…I’m not sure what changes were made to break this in 6.5, I’ll see if I can’t figure it out in a future post.

    ~Cheers

  • Roman

    hi! I followed the instructions in https://projects.centos.org/trac/livecd/wiki/CreateImage , but every time I try to boot created live image, I receive:
    “…
    Could not find filesystem ‘/dev/root’

    Kernel panic – not syncing: Attempted to kill init!”
    does anyone know where is the problem??

  • Kun Lu

    Hi Roman, have you solved this problem?

Pin It on Pinterest