Skip to content
Advertisement

createrepo using –split option for a multi CD distribution

I am trying to create a customized CentOS multi CD installation. Our current distribution just grew past the size of a CD. Sure, you can just burn it on a DVD. Well, we have customers with old machines that do not support DVDs so I have to create a distribution on 2 CDs. So far, I’ve found createrepo using the –split option but cannot find any good examples on how to make this work correctly. From the man page for createrepo:

   --split
          Run  in  split  media mode. Rather than pass a single directory,
          take a set of directories corresponding to different volumes  in
          a media set.

Here is the createrepo command:

  echo "Creating the repository..."
  discinfo=`head -1 $OS_BASE/.discinfo`
  createrepo -v --split -u "media://$discinfo" -g repodata/comps.xml $ISO $ISO_2

NOTE: ISO (Disc 1) and ISO_2 (Disc 2) represent build directories that have RPMs copied to them before createrepo is executed.

RPM dir for CentOS 5: $ISO/CentOS

RPM dir for CentOS 6: $ISO/Packages

The problem I’m having is that I’m not sure what to expect from using –split option with createrepo. I think I’m heading in the right direction using –split with createrepo but I am not quite sure.

Any ideas on how to properly build a multi-CD dist?? I can’t seem to find any good examples.

* After the problem was solved *

createrepo –split will look at all the RPMs in your build directories and will create the appropriate XML files in repodata dir on disc1 of the installation. These XML files will tell anaconda during an install what installation disc they are on and knows based on this to ask you to insert a certain CD. Make sure your .discinfo file on line 4 (Disc # Line) is set correctly for disc 1 and 2.

I ended up only using the pkorder script to decide what RPMs I should put on disc2. I also notice and CentOS 6 does not have a pkgorder script so I won’t be able to use it going forward. Will probably have to rework my installation at that point to use the other scripts described in the answer.

Advertisement

Answer

I’m not certain but I believe you need to use the pkgorder and then splittree.py scripts to generate the split RPMs directories then you can run createrepo in --split mode across them and then run buildinstall/etc. on each RPM directory/etc. in sequence.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement