Hi all,
I'd like to try rolling a somewhat stripped down and customized CentOS DVD. This is particularly interesting to me now that CentOS 5.5 is 2 DVDs. I dare not call it a new distro as I suspect I will be the only one to use it. ;)
I've been googling for ways to do this, figuring it must be somewhat straight forward, but my google-fu is weak it seems. Can someone point me to a how-to or doc on rolling your own CentOS derivative ISO? Also, I'm not talking about just rolling a new ISO, I can do that already, I want to update the list of RPMs (not)available to the installer.
Thanks!
PS - I found this link, but it's from 2006. Otherwise it's in-line with the kind of thing I want to do: http://lateral.netmanagers.com.ar/stories/38.html
Subject should have been "How to *create* a ...", not "created". Sorry. :)
On 10-05-19 05:37 PM, Digimer wrote:
Hi all,
I'd like to try rolling a somewhat stripped down and customized
CentOS DVD. This is particularly interesting to me now that CentOS 5.5 is 2 DVDs. I dare not call it a new distro as I suspect I will be the only one to use it. ;)
I've been googling for ways to do this, figuring it must be somewhat
straight forward, but my google-fu is weak it seems. Can someone point me to a how-to or doc on rolling your own CentOS derivative ISO? Also, I'm not talking about just rolling a new ISO, I can do that already, I want to update the list of RPMs (not)available to the installer.
Thanks!
PS - I found this link, but it's from 2006. Otherwise it's in-line with the kind of thing I want to do: http://lateral.netmanagers.com.ar/stories/38.html
On 05/19/2010 02:37 PM, Digimer wrote:
I've been googling for ways to do this, figuring it must be somewhat
straight forward, but my google-fu is weak it seems. Can someone point me to a how-to or doc on rolling your own CentOS derivative ISO?
You can look around for documents on revisor. I use the attached configuration files to generate installable trees.
revisor.conf belongs in /etc/revisor/. revisor-c5-x86_64.conf belongs in /etc/revisor/conf.d/.
In the c5 file, you'll want to disable the "local" repository initially. I use that section to avoid downloading packages that I already have when I want to refresh my tree.
I think you'll also need to remove the "reuse" line from revisor.conf initially. I use the "revisor-reuseinstaller" to avoid rebuilding the installation images. IIRC, the squash tools differ between Fedora (where I do these builds) and CentOS 5; it isn't possible to rebuild the anaconda images on Fedora. If you run revisor on CentOS 5, the reuseinstaller package is optional.
Once you have revisor installed and the config files in place, you need a kickstart file that specifies what packages you want installed. Provide that to revisor and it will build the image using the packages specified in the kickstart file.
# revisor --yes --kickstart=/home/gordon/deploy/kickstart/centos5 --model=c5-x86_64 --install-tree --cli
On 05/20/2010 11:40 AM, Gordon Messmer wrote:
On 05/19/2010 02:37 PM, Digimer wrote:
I've been googling for ways to do this, figuring it must be somewhat
straight forward, but my google-fu is weak it seems. Can someone point me to a how-to or doc on rolling your own CentOS derivative ISO?
You can look around for documents on revisor. I use the attached configuration files to generate installable trees.
...
Once you have revisor installed and the config files in place, you need a kickstart file that specifies what packages you want installed. Provide that to revisor and it will build the image using the packages specified in the kickstart file.
# revisor --yes --kickstart=/home/gordon/deploy/kickstart/centos5 --model=c5-x86_64 --install-tree --cli
Great stuff Gordon! The graphical interface usually crashes on me but the CLI seems to be pretty solid.
Digimer, some pointers to understanding the sprawl of configuration files.
1. --model=c5-x86_64 defines the section in revisor.conf that is used
2. That section defines
main = /etc/revisor/conf.d/revisor-c5-x86_64.conf
which is the yum configuration file. Here you define the repositories that are going to be sourced for the build. These can be base repos, updates, non-centos repos, local repos, local caches, whatever you want. (Running createrepo on /var/yum/cache can be a starting point for building snapshot installers for known 'good' systems).
3. --kickstart=/home/gordon/deploy/kickstart/centos5 is the kickstart file which you use to (principally) define which packages 'must' be present on the new install disk. Dependency resolution is performed so you will usually get more than you specify, and you will get the most up-to-date packages depending on the repos you specified above. There are some options in revisor.conf to control this.
Keep in mind that you are effectively rolling your own distribution this way and, depending on the quality of the rpms, the more you deviate, the more likely you are to break things (as I have done a couple of times).
Happy Coaster Burning:-)
Kal
On 10-05-19 11:03 PM, Kahlil Hodgson wrote:
On 05/20/2010 11:40 AM, Gordon Messmer wrote:
On 05/19/2010 02:37 PM, Digimer wrote:
I've been googling for ways to do this, figuring it must be somewhat
straight forward, but my google-fu is weak it seems. Can someone point me to a how-to or doc on rolling your own CentOS derivative ISO?
You can look around for documents on revisor. I use the attached configuration files to generate installable trees.
...
Once you have revisor installed and the config files in place, you need a kickstart file that specifies what packages you want installed. Provide that to revisor and it will build the image using the packages specified in the kickstart file.
# revisor --yes --kickstart=/home/gordon/deploy/kickstart/centos5 --model=c5-x86_64 --install-tree --cli
Great stuff Gordon! The graphical interface usually crashes on me but the CLI seems to be pretty solid.
Digimer, some pointers to understanding the sprawl of configuration files.
--model=c5-x86_64 defines the section in revisor.conf that is used
That section defines
main = /etc/revisor/conf.d/revisor-c5-x86_64.conf
which is the yum configuration file. Here you define the repositories that are going to be sourced for the build. These can be base repos, updates, non-centos repos, local repos, local caches, whatever you want. (Running createrepo on /var/yum/cache can be a starting point for building snapshot installers for known 'good' systems).
- --kickstart=/home/gordon/deploy/kickstart/centos5 is the kickstart
file which you use to (principally) define which packages 'must' be present on the new install disk. Dependency resolution is performed so you will usually get more than you specify, and you will get the most up-to-date packages depending on the repos you specified above. There are some options in revisor.conf to control this.
Keep in mind that you are effectively rolling your own distribution this way and, depending on the quality of the rpms, the more you deviate, the more likely you are to break things (as I have done a couple of times).
Happy Coaster Burning:-)
Kal
Thank you both!
So let me see if I've got this straight (sorry, I'm coming from a Debian background)...
1. I need to create my own local repo which revisor will draw from. 2. Create my own kickstart file (already done, actually) 3. Run revisor as you've both discussed.
My goal is to create a much smaller DVD, more than anything. I won't be adding any custom RPMs, but I do want to add some existing ones not on the normal DVD (ie: DRBD). Is there a way, after parsing the kickstart script, to get a list of RPMs that weren't used? Or does revisor only pull from the repo the RPMs required to satisfy the kickstart script already?
Lastly, I've got a few kickstarts I've added to a re-rolled vanilla CentOS ISO that I choose at boot-time. On that stock~ish DVD, if I type "linux" at the command line, I get the normal CentOS install. Do I understand properly when I guess that now this will choose the kickstart I used with revisor?
Thanks again! This is quite new territory for me so I appreciate the help.
On 05/21/2010 12:55 AM, Digimer wrote:
So let me see if I've got this straight (sorry, I'm coming from a Debian background)...
You are forgiven :-)
- I need to create my own local repo which revisor will draw from.
Only necessary if the packages you want to include can't be found in any other repositories.
- Create my own kickstart file (already done, actually)
For your task the %packages section is the key.
- Run revisor as you've both discussed.
My goal is to create a much smaller DVD, more than anything.
I think the smallest you can get away with for a non-graphical install is something like
%packages @base @core kernel anaconda isomd5sum %end
I've not tested this though. anaconda might needs some extra stuff to run correctly (like fonts).
You need to get hold of a comps.xml file for Centos to understand the package groupings and get a handle on what is mandatory. From memory there should be a copy on the DVD somewhere. It also hangs around in yum repos, and revisor also has its own alternative version.
The Fedora 'spins-kickstart' package has the kickstart files used to build their live-cds. The %packages sections in those files will give you some insight into what a black art this can be.
I won't be adding any custom RPMs, but I do want to add some existing ones not on the normal DVD (ie: DRBD).
Just add it to the packages list.
Is there a way, after parsing the kickstart script, to get a list of RPMs that weren't used?
How good is your python scripting? ;-)
Or does revisor only pull from the repo the RPMs required to satisfy the kickstart script already?
I believe this is the case (plus dependencies). The Revisor website has some discussion about how the dependency resolution unfolds for respins. In the passed I've used the following options in my revisor.conf file
dependency_resolve_allow_conflicts=1 mode_respin=1
(man revisor.conf)
Lastly, I've got a few kickstarts I've added to a re-rolled vanilla CentOS ISO that I choose at boot-time. On that stock~ish DVD, if I type "linux" at the command line, I get the normal CentOS install. Do I understand properly when I guess that now this will choose the kickstart I used with revisor?
There are options two options for your revisor.conf file
kickstart_include=1 kickstart_default=1
which should give this behaviour (man revisor.conf)
Hope this helps.
Kal
On 05/20/2010 04:38 PM, Kahlil Hodgson wrote:
On 05/21/2010 12:55 AM, Digimer wrote:
Run revisor as you've both discussed.
My goal is to create a much smaller DVD, more than anything.
I think the smallest you can get away with for a non-graphical install is something like
%packages @base @core kernel anaconda isomd5sum %end
You can specify only "@core" if you want the smallest possible install. You can specify only "@base" if you want the "minimal" installation. You don't need to specify the other packages. kernel will always be installed. anaconda and isomd5sum (and other deps) will be included unless you're using a recent version of revisor with the reuseinstaller plugin.
The Fedora 'spins-kickstart' package has the kickstart files used to build their live-cds. The %packages sections in those files will give you some insight into what a black art this can be.
Theirs is messy, but it's not usually that bad. The system-config-kickstart tool on Fedora can be used to set this up with a GUI if you prefer.
On 05/20/2010 07:55 AM, Digimer wrote:
So let me see if I've got this straight (sorry, I'm coming from a
Debian background)...
- I need to create my own local repo which revisor will draw from.
Creating a local repo is basically the effect of running revisor. If you keep a copy of the disc or installation tree that revisor builds, you can use it later to avoid downloading packages that haven't changed. If you don't want to rebuild the installer, you can also use the reuseinstaller plugin to copy the installer from the image you compose as well.
- Create my own kickstart file (already done, actually)
- Run revisor as you've both discussed.
Yep.
My goal is to create a much smaller DVD, more than anything. I won't
be adding any custom RPMs, but I do want to add some existing ones not on the normal DVD (ie: DRBD). Is there a way, after parsing the kickstart script, to get a list of RPMs that weren't used?
Not normally. You'd have to gather the repodata from all of the repositories in the revisor configuration file, build a list of all of the packages available, and then remove those that appear in your image.
Or does revisor only pull from the repo the RPMs required to satisfy the kickstart script already?
Yes. It will use what your kickstart file states is required. It may also pull in a small number of additional packages which are required to build the anaconda installer. Older versions of revisor do this even if you are using the reuseinstaller plugin.
Pitshou Asingalembi wrote:
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Perhaps you should try the link in the footer. In the event you missed it:
http://lists.centos.org/mailman/listinfo/centos
If you look near the bottom of the page you'll see a nice little box with a nicely worded description:
"To unsubscribe from CentOS, get a password reminder, or change your subscription options enter your subscription email address:"
Did you already try this or were you attempting to be lazy?