RE: ks documentation and some questions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 7 Nov 2001, Bodle, Donald E wrote:

> A good place to start:
>   Burning a RedHat CD HOWTO
>   Morten Kjeldgaard, mok@xxxxxxxxxx and Peter von der Ahé,
>   pahe+rhcd@xxxxxxxxxxx
>   $Date: 2000/03/02 16:28:37 $ $Revision: 1.34 $
> 
> http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/RedHat
> -CD-HOWTO.html

  (given that i'm sometimes disappointed with the quality of some
of the HOWTOs, i've taken to writing my own.  here's one of them.)





* Building your own installation CDs

  This mini-doc explains how to build your own Red Hat-based
installation CDs, which allows you to add, delete and upgrade the
collection of RPMs on either CD, and further allows you to
change the set of RPMs associated with each software component
at installation time.

  Before you start, I'm assuming you already understand how to
do some basic (and perhaps not so basic) operations such as
mounting and examining CDs, copying entire directory structures,
and burning CDs with utilities such as xcdroast or cdrecord.

  If you have any questions, comments or corrections, please e-mail
me at rpjday@xxxxxxxxxxxxxxx
* The minimal CD structure

  To begin with, mount each CD and make your own copies of the
entire directory structure that you'll be modifying and I'll
explain, bit by bit, what you need and what you can delete in
creating your own installation CDs.

  First, consider the contents of CD 1, starting at its root
directory.  Whether or not you decide to delete something might
depend on whether space is going to be an issue.  In many cases,
it's a judgment call.

  autorun:  Depending on your desktop, this will allow you autorun
    a graphical RPM installation program.  Useful, certainly, but
    not critical.

  boot.cat:  The boot catalog, which will be recreated later when
    you build the ISO image, so you can delete it.

  COPYING:  Long-winded GPL information.  Not essential for the
    actual build, but perhaps useful for legal reasons.  Your call.

  dosutils:  Some handy DOS utilities, not essential for the build,
    but handy to have later so you might want to leave these here.

  images:  Floppy boot images, also not essential for the CD build,
    but it's worth keeping, at the very least, the boot.img file.
    If you have space, just keep the whole directory to play it safe.

  README*, RELEASE-NOTES*:  Obviously, potentially handy documentation
    but not essential.  You might consider adding your own README
    file describing your changes.

  RPM-GPG-KEY:  A public key you can use to verify RPM packages built
    and signed by Red Hat.  Not essential.

  TRANS.TBL:  All TRANS.TBL files, in this directory and all subdirs,
    can be removed since they will be recreated when you create the
    CD ISO images with "mkisofs".  So you can delete this TRANS.TBL
    file and every other one you run across.

  RedHat/base/hdlist*:  The two files hdlist and hdlist2 in this 
    subdirectory will be recreated when you run "genhdlist" shortly
    so, strictly speaking, you don't need to delete them, but you
    might want to do that anyway just to verify later that new ones
    are created by genhdlist.

In short, by the time you're finished ruthlessly cleaning out the
directory structure of CD 1, what you might have left is:
	 
  dosutils/*
  images/*
  RedHat/
	 base/
	      comps
	      hdstg1.img
	      netstg1.img
	      stage2.img
	 RPMS/*

  If you apply the same rules to CD 2, you'll end up with little more
than the RedHat/RPMS directory over there.  Now, you're ready to start
customizing.
* Customizing your RPM collection

  Go wild and add, delete or upgrade the RPMs in either CD subdirectory.
If you're trying to make a minimal install, you might even be able to
put all of the RPMs in the RPMS directory of CD 1 if that will eventually
fit on a single CD, but you'll only be able to tell this after you
finally run "mkisofs" to build the actual ISO image.
* Updating the "comps" file

  Once you've finalized your collection of RPMs on both CDs (or
possibly just one CD, if you're going for a minimal install),
you need to update the file RedHat/base/comps file from CD 1
to reflect this new collection.

  The comps file defines the software components you can select
at installation time, and the RPMs associated with each of those
components.  I'm assuming the format of that file is self-
explanatory with just a little work.  You can figure it out,
I'm sure, but here's a few hints:

  - the opening line "4" is this version of the comps file

  - a leading "1" in front of a component name means that
    that component is checked by default; "0" means not

  - the "--hide" prefix means that no entry for this component
    appears in the list; this is selectable during a kickstart
    installation, though
  

  NOTE:  It's not hard to see how to customize the *existing*
software components, but it's not as easy to add new components
that you might want to define.  That's (at least for now) beyond
the scope of this mini-doc since it requires customizing aspects
of the anaconda loader.  I'm working on that and, when I figure
it out, I'll let you know.

  If you know how to do this, by all means, fill me in.
* Running "genhdlist"

  Once all your RPMs are in place and your comps file has been updated,
you have to run "genhdlist" to recreate the files hdlist and hdlist2 in
the CD 1 directory RedHat/base.  The hdlist files contain most of the
header fields from all of the RPMs, most importantly the interdependencies
among RPM packages so that the installation program can get this info
quickly during the install process.  These files also map package names,
such as "perl", to file names such as "perl-5.6.0-3.i386.rpm".

  The "genhdlist" program is part of the anaconda-runtime RPM, so 
install that and recreate the hdlist files with:

  # /usr/lib/anaconda-runtime/genhdlist --withnumbers /path-to-cd1 /path-to-cd2

Note that you must provide the *full* pathname to the top of both CD
directories -- a relative pathname will *not* do it.  Once this command 
completes, just verify that you have the new hdlist files in the 
Redhat/base directory on CD 1.

  NOTE: You might want to verify that running genhdlist also created
the hidden files .disc1-i386 and .disc2-i386, respectively, in the root
directories of your CD images.  This is apparently just to identify
which is CD 1 and which is CD 2.  If you're building a single-CD
install, technically, you can leave off the "--withnumbers" option.
If you do, you'll get warnings during the installation but it will
still work.  I suggest using "--withnumbers" even for a single CD
install.  It doesn't hurt.  
* Creating and burning the ISO images

  Once you've finalized your directory structure on both CDs (and verified
that they will in fact fit on a CD), create the ISO image for CD 1 by
"cd"ing to the top-level directory for that CD, and typing the single
command (broken up here over several lines for aesthetics):

  # mkisofs \			contained in the "mkisofs" RPM
	-r \			set appropriate file ownership and modes
	-T \			generate TRANS.TBL files
	-J \			generate Joliet directory records
	-V "My CD 1" \		set volume ID to whatever you want
	-v \			do it all verbosely (optional, of course)
	-b images/boot.img \	make this CD bootable (CD 1 only)
	-c boot.cat \		create a boot catalog file (CD 1 only)
	-o /tmp/cd1.iso \	the output ISO file
	.			the current directory (that's a period)

Test the ISO file by mounting it and examining the contents.  Creating
an ISO image for CD 2 will be simpler since you can leave out all of
the options pertaining to making a bootable CD.  (Note that you
don't *have* to make CD 1 a bootable CD -- you can always just copy
a boot floppy image to a real floppy and boot off of that if you're 
so inclined.)

  Finally, use the CD burning utility of your choice to burn these
two ISO images to CD, and you should be in business.
* In summary

  The steps required to make your own installation CDs:

  1) Copy the two installation CDs, and remove everything you don't
     want on your revised CDs.
  2) Add, delete and upgrade the set of RPMs on both CDs.
  3) Revise the RedHat/base/comps file to reflect the new RPMs.
  4) Run "genhdlist" to rebuild the RedHat/base/hdlist* files.
  5) Use "mkisofs" to build an ISO image for each CD directory.
  6) Use a CD-writing utility, such as "cdrecord", to burn your CDs.





[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux