The (unofficial) RedHat 7 Customised Installer mini-HOWTO
| This document describes the basic methodology for creating
customised network and cdrom installation images for redhat 7.2 and 7.3.
|
- Home for this web page is http://www.linuxworks.com.au/redhat-installer-howto.html
- Tony Nugent <tony@linuxworks.com.au>
- 27/28th January, 20th February 2002 - Initial release
- 23rd, 24th March 2002 - Many updates, additions, etc.
- 11/12th May 2002 - Version 0.4 (beta) - rewrite and updated for redhat 7.2
and 7.3
- 28th May 2002 - Version 0.5 (not made public) - corrections,
clarifications and additions. - major rewriting of many sections. - more
streamlined presentation.
- 31st May - 2nd June 2002 - Version 0.6 - many cleanups, added more
materials, etc. - this version will hopefully become public real soon :)
- 6th June 2002 - Version 0.7 - more cleanups, corrections, updates,
re-arrangements, additions.
October 2002 - This document does NOT mention redhat 8.0. Updates are
pending...
Meanwhile, Luigi Bitonti has created an updated document, Burning a RedHat CD
HOWTO.
- This document is under occasional (and irregular) development. Sometimes
links to local resources are broken or missing... yes, I know about them and
there are (usually) reasons why they aren't working (yet).
- All comments, additions, errata and other such feedback will be gratefully
accepted.
- Contributions are especially welcome (please!)
- Many thanks to others (both mentioned and not mentioned below here) for
their valuable feedback and (sometimes unsolicited) contributions (taken from
mailing lists etc).
Especially (and in no particular order): Chuck
Moss <mossc@mossc.com>, Michael McGillick <mmcgillick@attbi.com>,
Seth Vidal <skvidal@phy.duke.edu>, Jeremy Katz <katzj@redhat.com>,
Peter Bowen <pzb@datastacks.com>, Forrest Taylor <forrestx.taylor@
intel.com>, Brian Ipsen <Brian.Ipsen@andebakken.dk>, Martin Stricker
<shugal@gmx.de>, Alf Wachsmann <alfw@slac.stanford.edu>, John
Sheahan <jrsheahan@optushome.com.au>, James Olin Oden
<joden@lee.k12.nc.us>, Scott Sharkey
<ssharkey@linux-no-limits.com>, Dongwon Kim <prdd@finf.net>.
- (FIXME: complete this lists of people who need to be acknowlegement)
- Special thanks to Scott Sharkey for originally pointing me in the right
direction with how to do all this.
- I wrote this. It might all be lies, you take the risk.
- It works for me, if you are lucky it might work for you too.
- If anything you find here is broken or it breaks other things, you get to
keep all the pieces.
- If you fix or improve anything, please let me know and I'll definitely
consider adding it to the clutter.
- Permission is given to redistribute this document, I just ask you to
please let me know about it.
- If you do reproduce or use any part of this document, kindly give me (and
others) due credit.
Ten Easy (??) steps:
- Prepare the
build system
- Prepare the
build source tree
- Generate a
new hdlist
- Rebuild the
anaconda installer runtime images
- Generate a
package order file (if necessary)
- Split the
installation image into several CDROM images
- Re-generate
new hdlist files (again)
- Create the
iso9660 filesystem images
- Burn
(and test) the cdroms
- Enjoy!
(putting it all together)
Here is a tarball of
everything you will find here.
Introduction
It is possible to create highly customised redhat-based
linux installation disks, and people are doing this (especially in educational
campus or enterprise/corporate environments) where there is a need to deploy
linux distributions and have them installed in customised ways.
If you are attempting to create your own customised redhat installation
disks, then this unofficial mini-howto will (hopefully) prove to be a useful
resource.
Fortunately RedHat has provided the
anaconda tools that are needed to completely (or partially) recreate new
installation disks.
Unfortunately, there is a distinct lack of documentation
that describes how to use anaconda to create the actual installation
images.
This document is an attempt to fill this information gap, to reveal to all
just how the magic is supposed to work.
Hopefully the need for this howto
will be short-lived, depreciated when it is eventually replaced by the anaconda
documentation itself.
- Even with the arrival of rh7.3, the documentation that comes with anaconda
refers only to the installation options that can be passed to the installer at
installation time, and how to use kickstart.
While this is valuable - and
essential - reading, there is still no description there for how to
create modified installation images using the anaconda tools.
"Use the source" - which is fair-enough advice in this
case. Comments in the source code are few and far between, which is
unfortunate for the casual observer. But if you know a little about shell and
perl script programming, then python is a relatively easy language to read and
understand what is going on. (Hint: python relies heavily on formatting, such
as indenting, to deliniate program structures such as functions, loops and
conditionals).
(FIXME: links to resources for python documentation. Python Home Page. There is a python-docs
rpm, but it is in .tex format and you need to produce readable docs from
that).
Most of the anaconda tools are either python or shell scripts, so
get out your favourite editor start hacking at what you'll find in the /usr/lib/anaconda/ and /usr/lib/anaconda-runtime/
directories. (If you go ahead and do what is to follow, you'll need to do this
anyway! :-)
My basic approach and aim here is to create customised rh7.x
installation cdroms that have already had all the update packages added to them.
This avoids having to go through the tedious and often perilous hassle of
applying all the updates after doing an installation using the original release
cdrom images - it is not necessary since the updates are already there!
- As of May 2002, the total size of the all the i386 update packages for
rh72 had bloated to almost 1100Mb (including the .src.rpms).
And less than
two weeks out from its official release, there are already 191Mb of updates to
redhat 7.3 (kernel, evolution updates).
Repeatedly applying all that lot
to every new installation is a real headache... kernels (generally) need to be
installed and not upgraded or freshened (although this has recently changed),
some packages are new and need installing before some of the updates, you need
to choose between freshening with the glibc-i386 or glibc-i686 package and so
on. Yuk! Much better to have as many of the updates in there right at the
initial installation.
The resulting modified installer disks can also be used to "freshen" (rpm
-Fva *.rpm) an existing running installation. (Although this too can be a
perilous task, and if you need to do this on a number of similar computers it
can become tedious if it isn't scripted in a sane way).
- Other people have created utilities for doing these updates in a fairly
seemless way. Here are some references that may prove useful for going about
doing updates on running installations in "sane" ways (eg, taking care of
dependencies, new packages, special requirements and so on).
- up2date
- Redhat offers its own solution, aka up2date and the
rhn* (Red Hat Network) utilities. This suits some people's needs
and requirements very nicely. But not mine. I very much want (among other
things) to have much more control over the updates, when they are applied,
where they are downloaded from, what happens to the downloaded files (eg, I
care about their timestamps), and when and how much bandwidth the utility
uses.
My own approach to managing updated is to download them all (once)
into a local location (preserving their timestamp), and have all the other
boxes update from there. I also want to "reuse" the downloaded rpms (to
rebuild updated installers! :) Last time I looked at it, up2date
didn't allow you to do it anything like that. (Perhaps things have
changed...)
If rhn and up2date work for you, then that's great - use it.
- apt4rpm
- apt4rpm is described at http://freshmeat.net/projects/apt4rpm/?topic_id=147%2C257
as...
- the superb Debian package installer APT has since some time become
available for RPM-based distributions. However, to install RPM packages
with apt, an apt repository is needed. apt4rpm creates the apt repository
from an RPM repository. The rpm repository can be located locally or
remotely. Once the apt repository has been created with apt4rpm, the apt
tools can be used to install RPMs.
- It has a homepage at http://sourceforge.net/projects/apt4rpm/,
and rpms can be obtained from freshrpms.net, where they have an excellent web page describing apt and
how to use it.
- autoupdate
- autoupdate (by Gerald Teschl
<autoupdate@mat.univie.ac.at>) "is a Perl script which performs a
task similar to RedHat's up2date or autorpm. It can be used to automatically
download and upgrade rpms from different (s)ftp or http(s) sites. Moreover,
it can also be used to keep a server with a customized (RedHat) distribution
plus all clients up to date. I have tried to write it in such a way that it
is not RedHat specific and hence it should work with any other rpm based
distribution as well."
It can be downloaded from its home page at
http://www.mat.univie.ac.at/~gerald/ftp/autoupdate/index.html.
- other contributions
- rh-update.pl
is a perl script taken from the kickstart HOWTO
at linuxdoc.org described as useful for "munging updated RPMs into
the RedHat distribution area". It has been described as a "very
good basic idea... but unfortunately it seems to lack a few features (like
understanding different archs and comparison between version is done by
strings)".
I have never used it, you might find it useful for your
own needs.
- rpmupdates.sh
is a small #!/bin/bash shell script used for updating an RPM
repository. I have never used it, it doesn't look very "smart but might be a
good starting place. Apologies to its now anonymous author.
- FIXME: This is where more links to other tools and contributions will
appear.
- mailing lists
- If you are seriously interested in building customised redhat-based
installation cdroms, then I strongly urge you to subscribe to two (moderately
low-volume) redhat mailing lists... anaconda-devel-list and
kickstart-list.
To subscribe, send email to
{kickstart,anaconda-devel}-list-request@redhat.com with
"subscribe" in the Subject: line of the message.
The web pages
and archives for the mailing lists can be found here, but unfortunately, the
mailing list archives are not searchable there.
Kickstart-list mailing
list <Kickstart-list@redhat.com>
https://listman.redhat.com/mailman/listinfo/kickstart-list
Anaconda-devel-list mailing list <anaconda-devel-list@redhat.com>
https://listman.redhat.com/mailman/listinfo/anaconda-devel-list
Go to the above URLs (where you can subscribe), go to the archives for
either kickstart-list
or anaconda-devel-list,
download the mbox format mail files, then grep through or import them into
your mail and search with your mailer.
-
Kickstart and Anaconda
- Many (most? all?) people who build customised installations also want to
be able to automate the process so that there is no need for any manual
intervention at all for it to do its job. This is exactly what
kickstart allows you to do.
Kickstart allows you totally automate an installation while giving a very
high degree of control over what the installer does (how partitions are
created, what filesystem types to use, what packages are selected, how the box
is configured, etc) by providing installer directives and hooks to run
customised scripts and so on... basically, boot into the installer, have a
coffee while you let it go and do its stuff, and next time you look it will be
booted up all installed, configured and running ready to go exactly how you
would like it. Repeat as many times as you like. Very cool.
Kickstart is an integral part of the anaconda installer, they go
hand-in-hand. If you use kickstart, you are using anaconda. If you are
building deployment distributions with the anaconda tools, you are neglecting
some of its most powerful features if you don't consider using kickstart to
script its behaviour.
The official Red Hat
kickstart documentation can be found in the redhat 7.3 anaconda
documentation directory.
This is the definitive guide for the current
7.3 release.
John Sheahan <jrsheahan@optushome.com.au> has an interesting document
"How to make a new kickstart Redhat bootdisk" at
http://www.reptechnic.com.au/kickstart.html.
(Local copy here). This document
is especially interesting as it shows how to manually "pull apart" the
installer images, modify them for your own purposes, then re-package and put
them all back again.
His page refers to another "RedHat
Linux KickStart HOWTO". that can be found at the RedHat Linux KickStart
Information Page.
Beware however, that this HOWTO is dated 11th Jan
1999, so the document is getting rather aged (redhat 6.x vintage).
Interesting that this page refers to a howto-kickstart mailing list,
details at http://mail.gnu.org/mailman/listinfo/howto-kickstart
(I have never been subscribed, the list archives can be found here: http://mail.gnu.org/pipermail/howto-kickstart/).
- FIXME: add more resource links for kickstart
-
Previous versions of RedHat - 7.0 and 7.1
- The basic principles described here are likely to apply to earlier redhat
7.x distributions.
It would be interesting to know if the anaconda
packages from redhat 7.3 or 7.2 can be adapted to work to rebuild installers
for earlier releases. If you are able to adapt things, then that's great
(please let me know your wonder!)
Wouldn't it be brilliant if current
and future versions of anaconda could successfully ("out of the box")
recognise and build any previous redhat distributions?
Wishful
thinking I'm sure. But it would be a nice goal to aim for :)
- These two redhat distributions have a reputation of being rather buggy and
problematic in places. Personally, I would recommend that if you are building
7.x installers, then use either 7.2 or 7.3.
- I have had no direct experience using anaconda to create rh70 and rh71
installers. I had no idea that anaconda could do any of this so
comprehensively until rh72 arrived, so I am not "supporting" these platforms.
When I did try to build customised installers for them (without using anaconda
- except for genhdlist), the resulting disks either completely failed
to work or required much annoying disk-swapping during the installation.
- Anaconda has been developing over 7.x distros, so there are differences
and per-release customisations. Essentially, it means that you need to use the
anaconda package that came with the distribution you are building, and best
(perhaps not a requirement) that it is done on a box that has that particular
distro installed.
- There are known bugs, problems and deficencies with these earlier versions
of anaconda. My recommendation would be to check the mail archives and
bugzilla for details. (FIXME: provide some links).
- One example of such a difference is that prior to 7.2, the
"splitdistro" utility did not exist in anaconda. (Does anyone know
how this was done in releases prior to rh7.2?)
-
Previous versions of RedHat - 5.x and 6.x
- It really needs to be recognised that these distributions of redhat are
getting aged (especially 5.x). If you are building new or modified installers,
then you should be using the latest and greatest and not wasting time working
with old distributions.
RedHat no longer supports 5.x, so you are on your own with that. They still
support the 6.2 distribution (probably for not all that much longer), but now
only for things like essential critial security updates. Since its release,
there have been many updates issued for 6.2 (approx 700Mb in the current
collection).
Any redhat 6.x box built from the original release installation disks is a
total security hazard on a network unless it has been updated and properly
configured.
Also, due to some fundamental changes to tools that have been updated --
like rpm itself -- it is now very difficult to get the 6.2 installer
working with these without some patching to the installer.
I have had considerable experience using redhat 6.2, and I must praise it
(patched!) for being one of the most stable and reliable server "grunt box"
platforms that I have ever seen.
If you are looking for a proven stable
hassle-free server box and don't need support for all the latest fancy
hardware or software features, then redhat 6.2 will certainly qualify for the
job.
With notable exceptions, it is possible to rebuild many rpm packages
released for redhat 7.x on redhat 6.2 and they will work just fine.
- Details for how to create customised install disks for previous versions
of redhat (6.2 and before - "2000/03/02 16:28:37 Revision 1.3") can be found
here:
http://ha.redhat.com/docs/CD-HOWTO/RedHat-CD-HOWTO.html
While many of the things described in these pages are still valid (and I
strongly urge you to refer to it), it does not work for rehat 7.x because the
new multi-disk distribution format has changed many things. Anaconda itself
has also improved dramatically, and become central to the disk image creation
process.
- Peter Bowen (<pzb@datastacks.com>) wrote a small but useful howto for creating redhat 6.2
installers. It references a perl script that "overlays a set of RPMS
on another directory of RPMs deleting old versions as necessary."
(For prosperity, the howto is duplicated here, the perl script is
here).
- FIXME: A couple of years ago I also wrote a fairly comprehensive howto on
this same subject based on my experiences with redhat 5.x and 6.x... if I find
a copy of this in my archives then I will include it here as a historical
reference.
Start off by doing
this on a "standard" redhat 7.2 or 7.3 installation. Apply all the current
updates to it, including the latest kernel rpm. Do it, you have been
warned.
It is highly recommended that you build the new
installer disks on a system built from the same one you are trying to build.
(eg, build a rh72 distribution on a rh72 box using anaconda-7.2).
Install the anaconda and anaconda-runtime packages. Most of the good stuff
gets put into /usr/lib/anaconda/ and /usr/lib/anaconda-runtime/. If
you are using rh73, then you would do well to read the new additions to the anaconda documentation on your hard
drive.
- This next step is not strictly necessary...
- If an updated installer disk exists (eg, for redhat 7.2), then it could be
useful to use the installer updates disk to update your installed version of
anaconda.
Loop-mount the disk image and replace the files in your
/usr/lib/anaconda/* tree with the corresponding new versions
contained in the update. (Some of them go into the anaconda subdirectories,
easy to find them).
Note that this will update the running version of
anaconda on your hard drive, but it has no effect on the installer
itself... what gets put into the installer is taken directly from the
anaconda packages in the RedHat/RPMS/ directory (along with other
things like the kernel-BOOT package). (It would be (technically) possible
to repackage the anaconda rpms patched with the updates, and put that in the
RedHat/RPMS/ directory so it will be used).
Keep that update disk
image, it is needed for the next step.
If you plan to make a lot of changes to anaconda, and you don't want to
"destroy" or "meddle with" the original installed version, then one idea would
be to copy all the original files to a new location and use this copy for
running your hacked and otherwise modified version of anaconda:
-
# cd /redhat
# cp -ar /usr/lib/anaconda .
# cp -ar /usr/lib/anaconda-runtime .
# perl -pi.bak -e 's,/usr/lib/anaconda-runtime,/redhat/anaconda-runtime,g'
# perl -pi.bak -e 's,/usr/lib/anaconda,/redhat/anaconda,g'
# cd anaconda
# echo make changes to any anaconda files
# cd ../anaconda-runtime
# echo make changes to any anaconda-runtime files
|
Warning: in theory this is likely to work,
but it has not been tested by me!
The perl commands will change all
references to /usr/lib/anaconda* in the anaconda scripts to refer to
those in your new location. If any binary files or programs get destroyed in
the process, don't blame me:)
FIXME: I really need to test to see if this
works, or how to make it work if it doesn't (short of recompiling it with
patches).
- BTW, if you don't know how to loop-mount a floppy or iso disk image:
-
# mkdir img/
# mount -o loop file.img img/
|
- If mount complains about an unknown filesystem type, then you might need
to add a "-t vfat", "-t iso9660" or -t ext2" switch
to specify what you are using. (Recent versions of mount are cleaver enough to
probe for and auto-detect the filesystem type).
- You can now directly access the contents of the disk image
file.img in the directory img/.
This is the
trickiest part of the whole process. This is where you do your own
customisations.
- Despite being a primary motive for creating redhat installation
images, the nitty-gritty involved with designing customised redhat-based
installation images is beyond the immediate scope of this discussion. It is
assumed that the reader has some fundamental awareness of what is involved,
such as the roles of the various files in the RedHat/base/ directory
like comps. Full details can be found elsewhere, such as the URL at
ha.redhat.com referred to above.
What is described here are the steps
required to produce working installation disks from your customised install
image.
FIXME: provide a URL that points to the most recent
description of the comps file (et.al.)
To get started with a new fresh installation image, copy the entire contents
of all of the original redhat 7.x installation cdroms into a directory called
"i386/" on a partition that has plenty of space available for what you
will need to do (several gigabytes).
For example purposes, I'll use
/redhat/i386/ (where /redhat/ could be a symbolic link to its
real location).
- For more information about doing this, see the README file in the base directory of the
distribution cdroms.
All the binary RedHat/RPMS/*.rpm files
from all the installation disks should now be together in the same directory,
like it should be for setting up an NFS export image for network installs,
exactly as described in the README.
What you should have at this point is the installation root image directory
trees organised in this manner:
|-- redhat
|-- SRPMS
| `-- SRPMS
|-- i386
| |-- RedHat
| | |-- RPMS
| | `-- base
| |-- dosutils
| | |-- autoboot
| | |-- fips15c
| | | |-- restorrb
| | | `-- source
| | |-- fips20
| | | |-- restorrb
| | | `-- source
| | |-- fipsdocs
| | `-- rawritewin
| |-- images
| | |-- de
| | |-- es
| | |-- fr
| | |-- it
| | |-- ja
| | `-- pxeboot
|
- I would like to see the SRPMS directory become optional so that if the
SRPMS/ directory does not exist, then they are simply not processed.
This is very useful for creating binary-only installer images. (The version of
splitdistro below here works like this).
The RedHat/, RedHat/base/, RedHat/RPMS/,
images/ and dosutils/ directories (as found on the CDROM) are
standard (and expected) in the i386/ build source tree.
If you add or remove any additional directories to your main
/redhat/i386/ directory, they they will be added to the first
installation disk image exactly as is. (When the install image trees are
created, account will be taken for the size fo the files in these directories).
Note that if you want to add files to the base directory, then
it is likely that you will have to patch splitdistro to include them
too. These files usually get put onto each image, not only the first one). Or
put them there yourself once the images are created.
This is a very useful feature! With rh7.2 I had been including a
"software/" directory that included additional packages such as
openoffice. For redhat 7.3, there exists a 56Mb documentation cdrom. I have
created a i386/doc/ directory and copied the contents of this iso into
it... it will automatically end up on the first of the installation cdrom images
(in i386-disc1/).
| |
| `-- docs
| |-- RH-DOCS
| | |-- maximum-rpm-1.0
| | |-- pdf-en
| | |-- rhl-cg-en-7.3
| | |-- rhl-gsg-en-7.3
| | |-- rhl-ig-x86-en-7.3
| | `-- rhl-rg-en-7.3
| |-- RedHat
| | `-- RPMS
| |-- SRPMS
| `-- figs
|
- Note: small point, but if you do this then you may want to delete the
(empty) i386/docs/.disc5-i386 file that exists in this iso image.
- They are ok for me, but you may want to verify that all the html links
work in the documentation.
- Beware that adding additional content to the first disk image will "push"
more of the rpm packages off the first disk, putting more of them onto the
third (last) disk image (where there is currently enough space to accomodate
it). This may have consequences if you are attempting to build a installers
that avoid using the third disk during the installation (see below).
I then have a directory structure on the same physical filesystem and level
as the i386/ tree, organised so that it resembles the structure of the
redhat updates on the ftp mirror sites:
|
|-- updates
| |-- i386
| |-- i486
| |-- i586
| |-- i686
| |-- SRPMS
| |-- noarch
| |-- images
| `-- athlon
|
This allows me to hard-link the updates from
there into the i386/RedHat/RPMS directory of the installation tree,
which saves a lot of hard drive real estate by not having physically duplicated
files on that (or any other) disk.
For example: ln
/redhat/updates/i386/package.i386.rpm /redhat/i386/RedHat/RPMS/
cp
-al does the same thing, it is how splitdistro does it. (Hint:
midnight commander, /usr/bin/mc is a very useful utility for managing
large numbers of files in these sorts of ways).
Also in the /redhat/ "working" directory, I have some other dirs (or
symlinks of these names to the real directories)...
|
|-- memtest86
|-- tomsrtbt
| `-- addons
|-- mindi
| `-- (whatever)
|
I use these as source directories for adding
bootdisk images to the normally non-bootable installers. It is an advantage here
to have these files on the same filesystem as the others, files can be
hard-linked (rather than copied) which, again, can save resources.
More on
this below.
To show you were this is all going, the end result of the process described
here will be the creation of a series of directories beside the main
i386/ directory, populated with the RedHat/RPMS/* files
distributed across them so that they can be used for creating installation CDROM
images:
|
|-- i386-disc1
| |-- RedHat
| | |-- RPMS
| | `-- base
| |-- dosutils
| | |-- ... etc ...
|-- i386-disc2
| |-- RedHat
| | `-- RPMS
|-- i386-disc3
| |-- RedHat
| | `-- RPMS
| `-- SRPMS
|-- i386-disc4
| `-- SRPMS
`-- i386-disc5
`-- SRPMS
|
(Note that for redhat 7.2, there are only four
i386-disc?/ directory trees created, and there are some minor
differences in the directory structure).
Now get rid of any messy "leftovers" that came with the cdrom...
The ugly
TRANS.TBL files can go, so can boot.cat (on bootable cdroms)
and any rr_moved/ directories that may have been copied over:
# find /redhat/i386 -name TRANS.TBL -o -name rr_moved -o -name boot.cat -exec rm -rf {} \;
|
Now go ahead and do your customisations... carefully and attentively
replace, add or remove packages as you like to the i386/RedHat/RPMS/*
directory.
For example, people have built customised "slim" installation disks designed
to fit everything that is needed onto only one cdrom image, often adding
kickstart functionality for using with it.
These installations have
obviously been trimmed to the "essentials" and usually contain a highly specific
package selection and with customised software packages.
Such installations
can be made to run to automatically use a kickstart ks.cfg file, even
off the cdrom itself.
-
- The RULE Project
- The aims of The RULE
Project - Run Up2date Linux
Everywhere - are to:
- Modify the current Red Hat Linux installer so that it runs in less
than 32 MB of RAM, or create a new one if needed.
- Select, test, and (if needed) package the system and desktop
applications which give the greatest real functionality with the smallest
consumption of CPU and RAM resources
- Create another installation option of the Red Hat Linux distribution
(not another distribution, see the FAQ), containing all and only the
packages above, optimized to run either a server, or a basic desktop on
obsolete hardware with very little RAM and HD space.
- Promote and support (especially in developing countries) the use of
this install option with schools, public and private organizations.
This project has the potential to offer many useful ideas and
resources for those building highly customised installers, especially if the
one aim is to make it work on low-end, low-resourced, low-memory computers,
and with an installation that is trimmed down to the bare essentials.
For example, it is possible to use a third CD to boot the installer,
then let anaconda prompt for the original RedHat CDROMs (or anything else).
(This approach is also used by SGI to make their XFS installer http://oss.sgi.com/projects/xfs/).
(Thanks to Martin Stricker <shugal@gmx.de> for the pointer to this
project).
Whenever there are any changes in (for example)
missing, changed or added dependency requirements, appropriate modifications
need to be made to the RedHat/base/comps file to make it all work as
expected.
Package dependencies must be satisfied in two ways:
- within the set of all the rpm packages in the RedHat/RPMS/
directory, and
- within the RedHat/base/comps file (with respect to the specific
dependencies of the selected packages).
If you don't ensure that all
your changes are consistent, then the installer will either fail to build as an
installation, or (less likely but much more heart-breaking) it will crash and
burn during runtime installation.
If package dependencies are not specified
correctly in the comps file, you may find that at the point when the
installer is checking the package selection for dependency requirements, the
install may actually work - but with a hitch. Since its default package
selection is taken from comps, any unmentioned packages that satisfy
dependency requirements will will tend to force the installer to prompt you if
it is ok to install the package in question.
One thing I have found useful is that if you do change the comps
file, first copy the original distribution version to (say) comps.orig
(or whatever) and let that end up preserved in the images you create.
Checking the integrity of the rpm packages
- Do this to check the internal md5 checksum of each rpm package to make
sure that they are all intact:
cd /redhat/i386/RedHat/RPMS
rpm -K --nogpg *.rpm | grep "NOT OK"
|
Immediately replace any rpm packages
that do not pass this integrity test.
Dealing with the SRPMS
- Put all the *.src.rpm packages into a SRPMS/ directory
alongside the i386/ directory (eg, into /redhat/SRPMS/).
- If you have little interest in repackaging the SRPMS (ie, you are only
interested in producing the installation disks with the binary packages), then
either change the functionality of splitdistro yourself, or use the
modified version of splitdistro presented here (see below).
Dealing with the anaconda installer updates
Bugfix updates to the anaconda installer are periodically released. They come
as floppy disk images, used from the installer if you tell the bootloader to use
it by giving it the appropriate parameters. The installer then asks for the
floppy disk, you put it into the floppy drive and away it goes.
A useful
functionality, but very inconvenient for all the manual intervention that is
required.
Fortunately, there are several ways to deal with this so that the updates are
aready there and used automatically...
- If it exists, grab a copy of the latest redhat installer update-disk image
(one exists for redhat 7.2).
Now save a copy of that installer update-disk
image as i386/RedHat/base/updates.img
There, done. Was that so difficult to do? :-) Once you
have done this, the installer will automatically find, loop-mount and use
it.
This is the easiest and recommended way to include any anaconda
updates into the installation.
This is important... it means that
you will not need to worry about specifying and then manually feeding the
update disk to the installer at installation time. Plug it in and forget
about it :)
Note that you could create your own updates.img disk to modify the
installer as you like... simply put your alternative versions of the
installer's anaconda files into it.
The updates.img file needs to
be an ext2 filesystem suitable for loop-mounting. These files are usually
created on ram disks, the ramdisks copied and preserved as files.
See the
anaconda documentation on your hard drive
for more details.
- This is mentioned in the (rh7.3) anaconda documentation...
Loop-mount
the latest updates disk image somewhere, and copy its contents into a
directory called i386/RHupdates/ in the buildimage source tree.
That's it, done. When the installer runs, it will look for that directory and
use it automatically if it exists.
This works very well with network and hard drive installs.
However, be
very cautious if you are considering this with cdrom images... play it safe
and update it with the RedHat/base/updates.img method instead.
This was a bugzilla'd problem for rh72. The installer ends up using
that directory on the first CDROM as a runtime libary "include" directory,
which prevented the disk from being umounted and changed... the installation
fails with a "device busy" error when it attempts to eject the disk, so it is
not able to continue after this point.
FIXME: (update for rh73, does
it now work? Does it really matter?)
- Another alternative is to put the updates for anaconda directly into the
runtime installer itself.
- Note: I have not tested this myself, the details might not be quite
right, but in principle it should work.
(Thanks to Alf Wachsmann
<alfw@slac.stanford.edu>, who posted this to a mailing list).
- loop-mount the redhat update bootdisk image onto a directory point.
- loop-mount the following anaconda installer images:
- RedHat/base/netstg1.img
- RedHat/base/stage2.img
- copy all the *.py files from the update image to
/usr/lib/anaconda and its subdirectories to replace their
corresponding files (backup the originals).
- cd /usr/lib/anaconda and do "python
/usr/lib/python1.5/compileall.py ."
- copy all the new *.py and *.pyc files back into the
usr/lib/anaconda directory in the netstg1 and stage2 loop-mounted
images. Do NOT copy the "anaconda" executable itself.
- recreate the installer images as compressed filesystems...
- mkcramfs --verbose /tmp/netstag1/ /tmp/netstg1.img
- mkcramfs --verbose /tmp/stage2/ /tmp/stage2.img
- umount the original netstge1.img and
stage2.img images.
- copy /tmp/netstg1.img and /tmp/stage2.img into the
installation image tree, i386/RedHat/base/
- Known issues for redhat 7.2
- Mention of the Omni and Omni-foomatic packages needs to
be added to the comps file. These are new packages for the
distribution, required after the update for ghostscript which has a
dependency on Omni.
- A similar situation exists for the March 2002 perl updates... some of the
perl modules included with the original perl package have been split out into
separate (new) packages These may also need mentioning in the comps
file (due to package dependencies).
- The big Jan 2002 KDE update packages do not fully replace rpm-by-rpm the
original distribution packages. Worse - the packages that are installed after
the update have different names. Look for mention of these in the
comps file and make alterations accordingly. (eg, the
kde-i18n-Chinese package no longer exists).
- Here is a copy of the updated redhat 7.2 comps
file that I have been using successfully for a while now (as of May 2002).
It contains most of the changes mentioned above. There is a diff file
available if you want to see the changes.
- Known issues for redhat 7.3
- You may have noticed that the mkkickstart utility has quietly
vanished.
The good news is that it will probably be replaced by a new
anaconda tool.
FIXME: follow up the status of this.
- The only updates to redhat 7.3 so far involve replacement packages, no new
ones. The comps file does not need to be modified from its default
(unless, of course, you want to modify it for your own needs and preferences).
- That being said, there appears to be a bug in the comps file related to
using pkgorder (Bugzilla
#64995).
Things have been designed for rh7.3 so that doing a custom
install and choosing all components (except Everything) should only require
the use of the first two installation discs, not all of them.
The
problem has proved difficult to find, and appears to be related to a
dependency loop in the comps file.
The packages that are affected
are: w3c-libwww-devel, wine-devel, and
libesmtp-devel (all in the "Software Development" group).
The
quick hack is to remove the X Window System/GNOME sub dependency.
The
third installer will also be needed if you have an older video card that
requires the legacy drivers from XFree v3.3.x.
To avoid having to use the third disk, force the "earlier" inclusion of the
packages you require by adding an entry to the bottom of the comps
file similar to this:
0 --hide Old X Windows System {
XFree86-3DLabs
XFree86-8514
XFree86-AGX
XFree86-FBDev
XFree86-Mach32
XFree86-Mach64
XFree86-Mach8
XFree86-Mono
XFree86-P9000
XFree86-S3
XFree86-S3V
XFree86-SVGA
XFree86-VGA16
XFree86-W32
XFree86-compat-modules
}
|
0 means that it is not installed by
default,
--hide means that you cannot choose it during the Custom
installation, but will allow it to be included in the first two discs by
pkgorder/splitdistro.
Further tuning can be done, for example to add an entry for any extra rpms
that you specifically want to install:
0 --hide Extras {
numlock
xcdroast
taper
etc...
}
|
The example here mentions numlock (a
package that keeps the numlock key on in X and VT). You may want it included
in the installation, perhaps because you find that it is useful for laptop
installs, (laptop users often seem to get confused with numlock... they try to
type a username and it comes out numbers).
For kickstart installs, just
include it in the %package section of the non-laptop ks.cfg
files.
(Thanks to Forrest Taylor <forrestx.taylor@ intel.com> for the good
description of this trick).
- Anaconda and related contributions
- Anaconda offers some tools that help to ensure that things are ok.
The python script /usr/lib/anaconda-runtime/check-repository.py
can be used to check the RedHat/base/comps file to ensure that
it is consistent with the contents of the RedHat/RPMS/ directory.
However, comment out the "import todo" entry (around line 38)
before you use it. (Thanks to Forrest Taylor <forrestx.taylor@
intel.com> for this hint).
- depchecktree.py
is a python script written by Seth Vidal (<skvidal@phy.duke.edu>),
posted to the anaconda-devel-list on Sat 25th May 2002.
FIXME: provide a
link to the original message in the mailing list archives.
It takes a
parameter of the path to the directory where you have a collection of rpms
(ie: i386/RedHat/RPMS), and checks that all their dependencies are
satisfied by others in the collection. (Thanks Seth).
Seth added that "this does not do anything with the comps file, at all.
Jeremy mentioned doing something like that. If I thought I had any shot of
intelligently understanding the comps parsing I would work on it, but I'm not
that smart yet.
So it would (technically) be possible to extend this
script to include an examination of the comps file (which it
currently ignores), checking it for errors or inconsistencies, or even create
a new one based on the packages it finds and their inter-dependencies.
- Seth has some more gems available at http://www.dulug.duke.edu/treetools/...
FIXME: provide a link to this message in the archives (3rd Jun 2002).
- In kickstart-list Seth said about these scripts...
- comps-check.pl
is "not terribly pretty but it seems to work... for MOST situations. You
pass it an architecture a comps file and a dir of rpms - it hands you back
whats in the comps file thats missing from the dir of rpms for that arch.
I'm planning on rewriting it in python (or rather liberally stealing
code from anaconda :)
the other two scripts are programs that I and jack
neely put together to help maintain distribution trees - the add-rpm.py
adds updated rpms to an install tree.
depchecktree.py
just takes the dirs you give it, look for all the rpms and tells you if
they fully satisfy their dependencies.
- (Here are links to local copies of add-rpm.py and comps-check.pl).
- dumphdrlist.py
is another python script, this one written by Jeremy Katz
(<katzj@redhat.com>) and posted to kickstart-list on 15th May 2002.
(FIXME: link to original message in mail archives).
This script looks
at the RedHat/base/hdlist file and lists which installation disk a
particular rpm is on. From Jeremy: "Usage is simple enough --
'dumphdrlist.py /path/to/hdlist' and it will then print the
NEVRA of all of the packages as well as the disc it's on in the format
E:N-V-R.A disc
- FIXME: here (?) add details of more scripts and utilites that:
- can
be used to easily and sanely update (replace, add or remove packages) an
installation image from a local (or remote) updates repository.
- will
make package dependency checks on the RedHat/RPMS/ directory and then create a
new comps file based on the original one, and on what has been added or
removed from the RPMS/ installation directory.
Such scripts would be very
useful for designing and testing highly customised installations.
Note that I have
a shell
script that I use to automate much of what is to follow. More on this below.
At this point, do the following to make it much more convenient for using the
anaconda tools from the command line:
# export PYTHONPATH=/usr/lib/anaconda
# export PATH="$PATH:/usr/lib/anaconda-runtime"
|
If you are using a customised version of
anaconda copied to another place (as suggested above), change these paths to
reflect their new location... for example:
# export PYTHONPATH=/redhat/anaconda
# export PATH="$PATH:/redhat/anaconda-runtime"
|
- If you get errors running any of the anaconda tools
(genhdlist, pkgorder, buildinstall,
splitdistro), then the first things to investigate are inconsistency
problems in the comps file and missing or corrupt packages and/or
dependencies in the RPMS/ directory.
Do this to refresh
the i386/RedHat/base/{hdlist,hdlist2} files so that they reflect the
changed contents of the i386/RedHat/RPMS/ directory:
Note: give no options to genhdlist
(they are not needed at this time). (It will be run again later with a full set
of options).
- At this point, it should now be (theoretically) possible to use
/redhat/i386/ as an nfs export for network installs using
images/netboot.img as the boot image on clients (either via
PXE/bootp, or a boot floppy).
This is a good way to test highly customised installations, as you don't
need to waste time and money potentially burning a stack of useless cdrom
coffee coasters in the process of trying to get things working right.
:-)
The hdlist and hdlist2 files created by genhdlist in
RedHat/base don't need to contain accurate information about package
ordering if all the rpm packages are available in one place for the installer.
If the contents of i386/RedHat/RPMS/ changes, then genhdlist needs
to be run for sure.
But unless you want or need to rebuild the installer itself, this is all
that is needed to prepare it for use as a network installation image.
Note that you do not need to do this if you do not need or want to
rebuild the actual anaconda runtime installer in any of the anaconda
installation boot and runtime images.
Also note that if you do skip it,
then it is essential that a package order file is created (as described below).
The following command is a small but powerful tool that calls on several
other scripts to do a lot of work:
# buildinstall --pkgorder /redhat/pkgorder.txt --comp dist-7.2 --version 7.2 /redhat/i386
|
or for redhat 7.3...
# buildinstall --pkgorder /redhat/pkgorder.txt --comp dist-7.3 --version 7.3 /redhat/i386
|
Notes:
- I'll say it again just in case you missed it... the installer itself
rarely needs to be completely rebuilt - this is exactly what
buildinstall does.
Heck, you would only want to do this if any
packages used in the installer itself has been updated, and even then it would
rarely be an issue for the functionality of the installer.
So it is not
essential that buildinstall be run at all.
- If you don't use the "--version 7.x" switch, the resulting
installer will announce itself as redhat 7.1, oops :)
(Well that's what
happened for redhat 7.2).
- I am not sure what the --comp parameter is actually used for,
even though it is referenced at the end of the buildinstall script.
Peter Bowen has suggested that " --comp is not used if you
are not internal to Red Hat, it is specific to their own build system. The
only places it is used are in calls to /usr/bin/runroot, which isn't
shipped as part of anaconda ".
If this is the case, then the
--comp parameter is not strictly necessary.
- The "--pkgorder /redhat/pkgorder.txt" switch is important as it
will negate the use of the next step.
A package order file is needed for
subsequent steps, and specifing one to buildinstall automatically ensures that
one is available in a known location.
/usr/lib/anaconda-runtime/buildinstall does
a lot of things... in essence, its job is to completely rebuild the anaconda
installer boot and runtime images using the packages it finds in the
RedHat/RPMS directory.
- The run-time anaconda installer, once it is all packaged, exists in
several forms as boot disk and installer images.
- So what buildinstall does is rebuild from scratch all of the boot
images found in the i386/images/ and i386/dosutils/autoboot/
directories, as well as the anaconda installer runtime images
(hdstg1.img, netstg1.img and stage2.img) in the
i386/RedHat/base/ directory.
- It does this by directly extracting with rpm2cpio a selection of
the RedHat/RPMS/*.rpm packages into a temporary build root tree in
the i386/ directory.
(So beware that you'll need a few Mb free to
accomodate this temporary workspace).
For example, the contents of the
kernel-BOOT package in the installation directory is extracted (among many
others) into this temporary build tree and (selected parts are) used as the
installer's boot kernel and initrd-included modules.
- Much of this work is done by /usr/lib/anaconda-runtime/mk-images (which
happens to be an easily readable/hackable #!/bin/bash shell script).
- It is possible just before this point to reconfigure the buildinstall to
include things like your own customised install boot drivers if you need to
do that.
This would be useful for, eg, a kickstart install designed for
a big bunch of cloned machines that all happen to have some weird hardware
that needs some non-standard special drivers for accessing the installation
media.
(This was doable on redhat 5.x and 6.x installs, I have not done
this myself on redhat 7.x. If someone would like to email me to confirm the
same for redhat 7.3, I will update this document).
- Hint: read /usr/lib/anaconda-runtime/buildinstall
- it is a #!/bin/bash shell script.
The output generated by running buildinstall is quite verbose, and
it is usual to see some error messages go by as it does its work.
These
include a series of non-fatal errors, such as complaints about missing files,
bad links and missing kernel modules...
Running mkfontdir...
/usr/X11R6/bin/mkfontdir: failed to create directory in
/redhat/i386/RedHat/instimage/usr/share/fonts/ISO8859-2/*
rm: cannot remove `/redhat/i386/RedHat/instimage/usr/X11R6/bin/mkfontdir': No such file or directory
Scrubbing trees... /redhat/i386/image-templateusr/sbin/ldconfig: /usr/lib/libbz2.so.1 is not a symbolic link
Scrubbing trees... /redhat/i386/RedHat/instimageusr/sbin/ldconfig: /usr/lib/libbz2.so.1 is not a symbolic link
|
When generating all the boot images, there can
be many (repeated) instances of:
module xxxx not found in kernel rpm
|
These are non-fatal warnings, not
errors. If it runs to completion (it may take some time) without the script
itself falling in a heap, then all is (usually) well.
If a temporary
buildinstall.xxxxx directory exists in your i386/ directory,
then zap it with "rm -rf" and try to track down the reason why it
failed.
If you have just rebuilt the installer and intend to use it only for network
installations and not for creating cdrom images, then your install image is
now ready for use at this point.
The /usr/lib/anaconda-runtime/pkgorder
utility is used like this:
# pkgorder /redhat/i386 i386 > /redhat/pkgorder.txt
|
The output redirection (">") creates
the file "silently".
I suggest creating it with the tee utility so
that you can check for error messages in the output...
# pkgorder /redhat/i386 i386 | tee /redhat/pkgorder.txt
|
(tee is a simple standard unix utility
that redirects any input to both a file and to the current tty).
Notes:
- This step is not necessary if a package order file exists
because you have previously called buildinstall with the
--pkgorder parameter since the last time you made any changes to the
source build tree.
(If you don't give the --pkgorder argument to
buildinstall, then it still creates a pkgorder file, but it is
eventually deleted along with its other temporary files).
- It is not always necessary (or desirable) to call buildinstall to
rebuild all the installation image files each time you want to create
new/updated cdrom installation images. (Have I mentioned this already? :)
After all, the installer does not need to be rebuilt if there are no
functionally critical updates or changes to any of the packages that may be
used by the installer.
Nor would a rebuild be needed just because a new
RedHat/base/updates.img file was added, or if you prefer to stick
with using any new boot installer images released by redhat as updates.
(Beware that buildinstall rebuilds these boot image files, destroying
the previous ones).
On the other hand, if an update exists for, eg, a new
kernel, then it is usually good advice to rebuild the anaconda installer so
that it uses the updated kernel-BOOT package.
- A package order file is necessary for subsquent use by
splitdistro and genhdlist.
It is used to ensure that the
ordering and sorting of the rpm files in the i386/RedHat/RPMS/
directories over each of the installation images is consistent and "sane"...
if it isn't done properly, then you will find that the installer will
repeatedly ask you to swap between the installation disks throughout the
installation process.
- The actual package order that is generated by this utility is greatly
influenced by the contents and structure of the
i386/RedHat/base/comps file.
This can have subtle implications
when designing highly customised installers, or if you populate your source
tree with additional directories (eg, i386/doc/).
By manipulating the package order it is possible to design things to avoid
the use of one (or possibly more) of the installation disks. There is mention
elsewhere in this document that gives some clues about how to manipulate the
package order on the cdroms (eg, for kickstart installs) so that, depending on
actual package selection, the installation only requires the use of two rather
than all three installation cdrom disks.
Perhaps if you are really very cleaver, it would certainly be possible to
create an installer designed for small "slim" installations that only use
one disk (while all the other packages on the other two disks are still
available if you want/need them later).
This would require a very
finely-tuned and highly customised comps file, and/or prudent package
selection in a kickstart ks.cfg file.
One of anaconda's tools does this otherwise quite tricky task for
you... the python script /usr/lib/anaconda-runtime/splitdistro uses
the installation source tree in i386/ to automagically create a
populated series of directories alongside the i386/ and SRPMS/
directories, named
i386-disc1/
i386-disc2/
i386-disc3/
i386-disc4/
i386-disc5/
|
The contents of these directories have the distribution packages split
sic up, sized and sorted in a manner exactly suitable for using as
cdrom images. At the same time, it does it quicly and in a way that consumes
only a small amount of actual hard drive space.
This is exactly what we
want. Magic.
There is a lot to say about this very useful python script.
# splitdistro --fileorder /redhat/pkgorder.txt /redhat i386
|
Note that the syntax has been slightly extended
for redhat 7.3...
# RELEASE="RedHat 7.3 (Valhalla) with updates to $(date '+%Y-%M-%d %H:%m')"
#
# splitdistro --fileorder /redhat/pkgorder.txt --release "$RELEASE" /redhat i386
|
- In both redhat 7.2 and 7.3, there are known problems with the
as-released splitdistro script in the anaconda-runtime package. See
below for working, enhanced versions.
Note the following:
- The --release string (new in rh7.3) gets stamped into files
called i386-disc?/.disc?-i386 that are created in the base
directories of each of the cdrom image trees. They contain a timestamp "serial
number" (in whatever raw format string python returns from the call to
time.time()), along with the "release" tag you specify on the command
line.
- The i386-disc5/ directory is (normally) only created with the
redhat 7.3 anaconda.
- Two installation images are created for redhat 7.2, with two more for
all its *.src.rpm files.
- For redhat 7.3, three cdrom install images are created, two more for the
SRPMS, with the remaining .src.rpm files put into third installer image (as
it assumes there is enough space to do that).
- These changes are hard-coded into each release version of the script
(oops?).
- These directories contain a "split" of the original (full) image in
i386/ spread over 4 directories in 640/650/680Mb "hunks", suitable
for creating iso images with mkisofs for burning to cdrom.
When
splitdistro finishes *(rh7.3), you should find that it has given you a listing
of the directories it just created, along with the size of each of their
contents.
- All the files in these directories are hard-linked to the original files
of the same name in the i386/ directory tree.
This is very cool,
the hard links are not copies of the original files, they
are the original files... hard-links are directory entries that
point to the same disk inodes.
The files themselves are not
copied, which means that very little time and disk space is actually used to
obtain the "split copy".
- While splitdistro does this anyway each time it is run, you can
safely do "rm -rf /redhat/i386-disc?" at any time (note the
shell wildcard ? character).
This will simply delete the
directory trees with all their hard-linked contents.
Simply run
splitdistro (and genhdlist, see the next step) to (quickly)
recreate it all again.
- If you don't intend to use the SRPM iso images, then you can avoid having
to manage or package any of the SRPMs by hacking near the end of /usr/lib/anaconda-runtime/splitdistro to
disable the python code that does that.
The alternative version of
splitdistro found here has this functionality.
Alternative versions of the splitdistro (with patches)
The as-released version of splitdistro in both redhat 7.2 and 7.3
have known problems, and both need patching before they will work correctly.
- Aside:
- It is a pity that the tendency for splitdistro so far is to hack
it to work specifically for each distribution.
For example, the 7.3
version of splitdistro will fail to work for correctly creating
redhat 7.2 images because the directory structures, number and contents of the
installers are hard-coded into the scripts. Command-line parameters have also
changed.
Perhaps this is the nature of the beast, but IMHO it would be
good to make changes to anaconda so that it is able to automatically cope both
with older distributions (eg, 7.0, 7.1 and 7.2), and for any future
distributions that may require the management of any number of binary and
source/doc installation disks.
Here are versions of splitdistro that I am currently using for my own
purposes...
The diffs are included as they can be useful for quickly
analysing the modifications that have been made (see the man pages for
diff(1) and patch(1).
Keep an eye on these links, they may
change from time to time as further changes are made. There should be a
description of the patch at the top of the file.
BOTH of these enhanded versions now have exactly the same syntax...
# RELEASE="RedHat 7.3 (Valhalla) with updates to $(date '+%Y-%M-%d %H:%m')"
#
# splitdistro --fileorder /redhat/pkgorder.txt --isosize 680 --fudge 0.8 --release "$RELEASE" /redhat i386
|
The changes to these rh7.2 and rh7.3 versions of splitdistro do the
following:
- splitdistro-7.2 now has exactly the same command-line (and underlying)
functionality as the (enhanced) splitdistro-7.3 version.
In general, it
has been changed to closely conform to various code changes made to the 7.3
version that are not related to distribution-specific issues. (See the patch).
If you are still producing redhat 7.2 installers, then you should find the
enhancements useful. It works for me.
- Bugfix changes, based on those in a patch posted to the redhat
anaconda-devel list by Forrest Taylor (and commented on by others fix some
bugs...
- Remove reference to the "preview" directory (no longer present
in redhat 7.3)
- Remove the bad reference to "beta.eula", replaced with the real name of
the file ("EULA")
- Add forced removal of the i386-disc3 directory.
This is
necessary as the order of the packages changes each time splitdistro is run.
If the directory is not deleted, some packages may be duplicated in the
undeleted i386-disc3/RedHat/RPMS/ directory.
Perhaps
all the i386-disc?/ directories should be forceably
removed? (I think so. If I knew python better to so a shell-like glob for a
list of directories, I'd make this [small] change myself).
- Bugs with the creation of some of the subdirectories in the new
directories. This problem is discussed below.
- Several enhancements:
- Omission of the SRPMS/ directory
If the SRPMS
directory exists (because you put it there), then it will process them as
usual.
If the directory did NOT exist, splitdistro would
originally fail and exit.
This behaviour has been changed so that if the SRPMS/ directory
isn't there, a variable is set accordinaly and used as a flag to disable any
code that does any processing of the SRPM packages. It goes ahead and
creates the installation images, with the resulting directory trees not
containing any SRPMs.
I'll leave it to your imagination for what you might do to use any space
that may be available on the last installation image :-)
Hint: if the
last cdrom is left mounted at the end of the installation process, then its
contents (whatever you put there, rpms, configuration scripts or whatever)
are available if you are using a %post section for customisation
with a kickstart install.
- Code cleanups
After these modifications, several changes were needed
(especially for 7.3) that have "exposed" some (minor) problems in the code
where it was confusing how the script was recreating the directory trees,
especially those for the SRPMS.
By separating out the creation of the
RedHat/RPMS and SRPMS/ directory trees, the code becomes
much more readable and maintainable.
- Personally, I would like to see splitdistro become "smart",
creating the directory image trees "dynamically" as required. For example,
whenever a split of a new image tree is needed (when the current working
one is "over-full"), then create them as needed.
I suspect that this
sort of logic would not be too difficult to implement. (If I knew python
better... :)
Re-working splitdistro like this would generalise the
directory creation mechanism (perhaps as a subroutine), removing much of
the necessity for any hard-coding of the specific directory structure
requirements for each distribution that may be produced, allowing it to
work with any distribution of any size, with any number of packages in the
RedHat/RPMS/ directory, and with any number of installation (and
src) disks.
In fact, the majority of changes to splitdistro from redhat
7.2 to 7.3 involve these sorts of per-distro customisations.
To prove
the point, here is a diff
between the 7.2 and 7.3 as-released versions of splitdistro, and even
more revealing is a diff
between the modified 7.2 and 7.3 versions of splitdistro which
strongly identifies the "real" differences between the two distribution
versions.
- There may be a (very) few scattered "harmless" changes to the code
indenting and other "cosmetics", possibly some (commented) debug code, and
other misc stuff that may appear in these patches. (Apologies to any
"purists" that don't like them).
- Setting the resulting ISO image size
Hard-coding changes into
splitdistro just to reset the max size of the resulting disk images
is (at least for me) an annoying inconvenience.
I have always thought
that it would be much more convenient to be able to pass optional
command-line arguments to splitdistro to reset the target image
size (via the "fudgeFactor" and targetSize" parameters).
This version of splitdistro will now take two additional
command-line parameters:
- --isosize 700 (Mb) for example, to set the maximum size of
the resulting images (defaulting to 640Mb if no argument is given).
- --fudge 1.2 (Mb) for specifying the "fugdeFactor" when
calculating the image sizes.
This makes it easy to vary the size of the resulting disk images from 640
to, say 680Mb. (I have found that for me, around 682Mb works for producing
iso images that safely burn onto blank 700Mb-capacity disks almost to
capacity). By re-running splitdistro with different values, you can quickly
compare and fine-tune the results.
- If you are aware of any other useful patches to splitdistro, please don't
hesitate to forward them for inclusion.
As mentioned above, you can set the size limit of the final cdrom images in
splitdistro.
This is handy... after the updates and other additions
I tend to add, for redhat 7.2 the final result is close to two full 700Mb
install images.
For redhat 7.3, I am putting the contents of the 55Mb redhat
7.3 documentation iso image onto the first installation image.
This is no
problem with blank 700Mb disks but too much for 640Mb (the default). 640Mb just
doesn't do it any longer :-)
(The day when distributions are released on
DVD as standard is coming quickly... the European release of redhat 7.2 was
commercially available on DVD).
We are almost
there, but there is still some final tweaking needed in the new installer image
trees.
The hdlist* files in i386-disc1/RedHat/base/ are
hard-linked copies of the original ones in the i386/RedHat/base/
directory, and are very likely (certain!) not to work properly for cdrom
installs.
So they need to be re-created.
genhdlist is used again to create new hdlist files, but
this time referencing the "package order catalogue" and the newly-created
i386-disc? directory trees...
# rm -f /redhat/i386-disc1/RedHat/base/hdlist*
# genhdlist --withnumbers --fileorder /redhat/pkgorder.txt /redhat/i386-disc[123]
|
- If you run genhdlist with no parameters, it gives you a usage
guide:
# genhdlist
genhdlist: genhdlist [--withnumbers] [--fileorder ] [--hdlist ] +
|
Note the "--hdlist " option, I
am uncertain why it is available. Experimentation has shown me that the end
result is the essentially the same whether the option is used or not. If it is
used, then this is what is needed:
- --hdlist /redhat/i386-disc1/RedHat/base/hdlist
FIXME: a
little mystery to solve here (eg, check the genhdlist.c source file)
- Some people have suggested that the hard-linked copies of the two
i386-disc1/RedHat/base/hdlist* files should be deleted before running
genhdlist.
The usefulness of deleting these files is debateable,
and for most circumstances it is not strictly necessary.
When genhdlist
runs, its job is to re-create the two hdlist{,2} files in the
new i386-disc1/RedHat/base/ directory. This is needed
so that the installer works properly as a split-image multiple-disk cdrom
installer.
Note that if the hdlist{,2} files in
i386-disc1/RedHat/base/ aready exist then they are over-written. They
do exist - created by genhdlist in a prior step and hard-linked to the copy in
the original i386/RedHat/base/ source directory. So running genhdlist
will have the result of changing both hard-linked copies of the file.
By
first deleting the copies in the i386-disc1/ directory before they
are re-created, the original "master" versions from the previous run of
genhdlist are preserved intact in i386/RedHat/base/.
For
most situations it does not matter what is done, the practical difference is
not an issue and unlikely to be of any practical consequence.
For example,
for network installations the packaging order of the rpms is irrelevant. So if
the /redhat/i386/ directory is used as a network installation source,
it will happily work with the hdlist* files produced by either the
first or this second run of genhdlist. The important thing is that
they should accutately describe the contents of RedHat/RPMS, whether
or not they were created with the extra parameters that specify ordering.
Please yourself what you do here, your choice.
I prefer to delete them
and keep the orignal i386/RedHat/base/hdlist* files intact from the
first run.
- For redhat 7.2 the last parameter to genhdlist should be
/redhat/i386-disc[12] (in order to specifically glob two directories,
not three. Generalising this with a wildcard such as
/redhat/i386-disc* would not work since that would tend to include
the SRPM images too).
(There are some simply ways to use shell tricks to
correctly glob out the relevant directories).
- Note all the options to genhdlist, unlike the first time it was
used, here all these options are very important.
In particular, if you
don't specify a --fileorder file, then it is likely that you'll end
up with an installation that repeatedly and randomly asks you to swap between
disc1 and disc2 (and disc3), VERY inconvenient!
The package order file
prevents this so that only one disc change is ever needed for each install
disk.
(It was this behaviour that irrirated me so much when redhat 7.0
came along, it motivated me to finally discover the "right" way to do all
this).
Once you have come this far... congradulations, this completes
the preparation of the cdrom source image directory trees.
What needs
to be done now is to create the cdrom iso9660 images using the
i386-disc?/ directory trees, and burn them to blank cdrom disks.
For the more experienced, things should be "plain sailing" from
this point, but to complete the discussion here and to give some help and tips
for those not so experienced, this process is explored in some detail.
Also presented here are some suggestions for making the other cdroms (besides
the first one) bootable in useful ways. Bonus :)
Use whatever tools you like to create the iso images, using your own options.
mkisofs seems to be what is generally available, it comes standard
with redhat, RedHat themselves use it, and it works very well.
I create the
iso image in a manner similar to this (example for redhat 7.3):
# cd /redhat/
# myname='Tony Nugent <tony@linuxworks.com.au>'
# bootimg="images/boot.img"
# bootimg="dosutils/autoboot/cdboot.img"
# bootcat="RedHat/base/boot.cat"
# distname="valhalla"
# distvers="7.3"
# mkisopts="-r -N -L -d -D -J"
# today="$(date '+%d %b %Y')"
# mkisofs $mkisopts \
-V "RedHat $distver ($distname) UPDATED Disk 1" \
-A "RedHat $distver ($distname) update created on $today" \
-P "$myname" \
-p "$myname" \
-b "$bootimg" \
-c "$bootcat" \
-x lost+found \
-o "$distname"-1.iso \
i386-disc1
# for i in 2 3 ; do
# mkisofs $mkisopts \
-V "RedHat $distver ($distname) UPDATED Disk $i" \
-A "RedHat $distver ($distname) update created on $today" \
-P "$myname" \
-p "$myname" \
-x lost+found \
-o "$distname"-${i}.iso \
i386-disc${i}
done
|
Notes:
- What I have here works for me - although it is not how I actually do it
:-)
See the accompanying
script for details on what I really do. My eventual plan is to create a
./.mkisofsrc file for specifying the volume, author and publisher
strings (see the mkisofs(1) man page), and (hard-link) copy this into
the source image file (for prosperity). This would greatly simplify the format
of the command-line options that are used for running mkisofs.
- If you use a hex-editor to check near the beginning of an iso9660
filesystem image or cdrom created with mkisofs, then you'll find the
command-line arguments that were used to create it.
For the official
valhalla-i386-disc1.iso release, at around offset hex 0xa000
there is this string which reveals exactly how RedHat originally created it in
their production environment...
MKI Fri Apr 19 14:54:03 2002
mkisofs 1.14 -A Red Hat Linux/i386 7.3 -V Red Hat Linux/i386 7.3
-J -R -v -T
-x ./lost+found
-o /mnt/scratch/Valhalla-re0419.5/Valhalla-re0419.5-i386-disc1.iso
-b dosutils/autoboot/cdboot.img -c boot.cat .
|
- Some people would question the following (especially when compared to how
RedHat does it):
- omission of the -T flag which otherwise creates ugly
TRANS.TBL files in each directory.
After 4 years experience
burning redhat cdroms, I have never had a need to have them there. They look
ugly, they are ugly. (Go ahead, please convince me otherwise).
- -d, -D and -N (see the mkisofs man
page).
- use of -r over -R (much of the following is taken from
the man page)...
The big-R switch specifies that Rockridge
extensions are needed in the image to further describe all the unix
attributes of the files in the iso9660 filesystem.
The small-r
switch specifies the same thing, but file ownership and modes are set to
more "useful" values.
The uid and gid are set to zero (root), because
they are usually only useful on the author's system, and not useful to the
client.
All the file read bits are set so that files and directories are
globally readable on any client.
If any execute bit is set for a file,
set all of the execute bits, so that executables are globally executable on
the client.
If any search (executable) bit is set for a directory, set
all of the search bits, so that directories are globally searchable on the
client.
All write bits are cleared, because the CD-Rom will be mounted
read-only in any case.
If any of the special mode bits are set, clear
them because file locks are not useful on a read-only file system, and
set-id bits are not desirable for uid 0 or gid 0.
(Much of this has been
taken from the mkisofs man page. It also refers to the -uid -gid, -dir-mode,
-file-mode and dir-mode options).
- Be warned that if you do use -R and not -r to create
the iso images, then you are highly advised to do something like this before
running splitdistro...
# cd /redhat/i386
# chown -R root.root .
# find . -type d -exec chmod 755 {} \;
# find . -type f -exec chmod 644 {} \;
# if [ -f autorun ] ; then chmod 755 autorun ; fi
|
There may be situations for using
-R. While a cdrom is a read-only media (usually with all write
permission bits turned off), it can be useful for them to appear to have
owner-write permissions, eg, after copying them off the disk (cp
-a) onto a hard drive.
- If you are doing all this with a user account and not as root, then you
it is likely that you will have little choice but to use the -R
switch to force file ownerships in the iso image as root-owned and all files
and directories with read-only permissions.
- The first iso image should be made as an El Torito
bootable cdrom using any of a number of boot image files:
- dosutils/autoboot/cdboot.img is a 2.88Mb cdrom boot image
(recommended).
- images/boot.img is a 1.44Mb floppy boot image. It works as a
cdrom boot image if you are dealing with cdroms and/or motherboards that
don't like 2.88Mb boot images.
- images/pcmcia.img is (possibly) useful if you intend to use the
cdroms for installing onto laptops.
- I like putting the boot.cat file out of the way into
RedHat/base/boot.cat so that it is not cluttering the root
directory of the cdrom. (The file itself it servers no practical purpose
other than being technically necessary for, and an indication of, a bootable
El Torito cdrom).
- The second and subsequent images are not usually made bootable.
However, why waste a useful feature of a cdrom? If there is space (and not
much is needed), there is no reason why you couldn't manually add your own
cdrom boot images to them.
Some suggestions:
- tomsrtbt, "Tom's Root Boot
Disk", a self-contained floppy-based linux mini-bootdisk that is useful
for running a basic linux system on just about any computer (for rescue,
recovery, hardware examination or all sorts of other purposes). There is an
El Torito image available for it that works well as a 2.88Mb El
Torito boot image on a cdrom.
However, be warned that tomsrtbt has
some limitations working with modern distributions such as redhat 7.x... it
is based on an old (modified) 2.0.39 kernel, it has bugs that no longer
allow it to "chroot" into a kernel-2.4.x-based distribution, and it
does not know about ext3, lvm and other more recent
filesystem types.
Despite these limitations, it is a very worthwhile
tool to have around. I have been using tomsrtbt to make my cdrom
data disks El Torito bootable for some time now, and it has proved
to be a very useful tool to have so readily available.
More recently, a
new version stream of tomsrtbt has begun development, using a 2.2.x kernel.
See Tom's web site for the latest stable version and for download mirror
sites.
- memtest86, Memtest86, is a small
stand-alone memory diagnostic utility which you actually boot the computer
into in order to run it.
"Since Memtest86 is a standalone program it
does not require any operating system support for execution. It can be used
with any PC regardless of what operating system, if any, is installed. The
test image may be loaded from a floppy disk or may be loaded via LILO on
Linux systems. Any Unix, Windows or DOS system may be used to create a boot
floppy. Precompiled binaries are available. Full instructions for how
to use it are in the source tarball, but it is as simple as changing to the
source directory and running "make" to produce the actual
memtest.bin binary bootsector file.
Creating a bootdisk image
for memtest is as easy as this sequence of commands...
# bootimg=i386-disc2/memtest86.img
# dd if=/dev/zero of=/dev/ram count=2880
# dd if=memtest.bin of=/dev/ram bs=8192
# dd if=/dev/ram of=$bootimg count=2880
|
Simply create your iso image with
mkisofs specifing -b memtest86.img as the cdrom's boot
image when you create the second disk from the i386-disc2/
directory tree.
- mondo and mindi, Mondo Rescue Home Page.
mindi is a boot image creation utility, mostly developed and
customised for, and heavily used by, mondo, which is a backup and
disaster-recovery system... it "backs up your filesystem to tape, CD-R,
CD-RW or an NFS partition. In the event of catastrophic data loss, you will
be able to use it to completely restore some or all of your data, from bare
metal if necessary."
- If you do a lot of work with creating and burning cdrom images, then I
would recommend that you have a look a something called cdfs
- cdrom filesystem.
Its homepage can be found here:
http://www.elis.rug.ac.be/~ronsse/cdfs/
This is a drop-in kernel module that allows you to look at the contents
of cdroms in an "abstract" way. Audio tracks appear as .wav files,
the boot and data images appear as files (useful for, eg, loop-mounting).
Do a search at freshmeat.net for "cdfs" and you should get an exact
match. There it describes cdfs as...
- "a file system for Linux systems that `exports' all tracks and
boot images on a CD as normal files. These files can then be mounted (e.g.
for ISO and boot images), copied, played (audio tracks), etc. The primary
goal for developing this file system was to `unlock' information in old
ISO sessions. The file system also allows you to access data on faulty
multi session disks, e.g. disks with multiple single sessions instead of a
multi session."
I notice that a new (bugfix) version 0.5c is now available, I have not
tested it.
When I last looked at it, there were two versions available,
0.5a and 0.5b. The `a' version is dated early 2001, while the `b' version
that I first tried is dated late December 2001.
The newer 0.5b version
is quite different to its predecessor, and while it compiles silently, using
it on a redhat 7.2 box (compiled against a standard redhat kernel) was one
sure way to get a kernel to go OOPs.
The older 0.5a version compiles and
loads silently if I did the following:
- change all references to malloc.h to slab.h, and
- add `MODULE_LICENSE("GPL");' to a couple of places after
module_exit() calls.
I can confirm that this (patched)
0.5a version also compiles and works on a RedHat 7.3 box (updated kernel).
FIXME: test 0.5c on redhat 7.3 to see if it works without locking up the
system.
By using it, you can insert an audio cd, mount it (yes,
mount an audio cdrom!) by specifying the filesystem type
as cdfs with `-t cdfs', and what you see on the mount
point are a bunch of track*.wav files that you can do things with
like play directly with any suitable software (like sox). Rip them into
mp3s? No problem. With data cdroms, it shows you things like boot images and
the contents of every multi-session burn image...
-
$ ls -l /mnt/cdfs
total 0
-r--r--r-- 1 root root 2867200 Jan 1 1970 boot.image_0
-r--r--r-- 1 root root 670242816 Jan 7 2001 sessions_1-1.iso
|
These image files can then be
loop-mounted to get at their contents (or copied raw as is, or whatever).
It gets even better... with mixed audio/data disks you can not only spot
this right away, but you also get immediate access to all the available data
on the disk in one hit.
This is what you get when you cdfs-mount a cdrom
with the original redhat 7.3 valhalla-1.iso image on it...
-
$ cat /proc/cdfs
[cdfs 0.5]
CD contains 2 tracks:
Track 1: data track (sessions_1-1.iso), [0-326416/326417], length=637 MB
type: 1 info: CD001 version: 1 date: 19/04/2002 time: 14:54:03 system: LINUX
volume: Red Hat Linux/i386 7.3
publisher:
preparer:
application: Red Hat Linux/i386 7.3
length: 637 MB / 637 MB / 637 MB / 637 MB
Bootimage (boot.image_0), [323578-324977], length=2800 kB
ID string:
Type: x86 boot sector, LDLINUX SYS boot loader with FAT12
|
With audio cdroms, this is what
/proc/cdfs can tell you about them...
-
$ cat /proc/cdfs
[cdfs 0.5]
CD contains 14 tracks:
Track 1: audio track (track-01.wav), [0-21645], length= 4:48
Track 2: audio track (track-02.wav), [21646-41051], length= 4:18
Track 3: audio track (track-03.wav), [41052-63438], length= 4:58
[ ... ]
Track 12: audio track (track-12.wav), [217962-235006], length= 3:47
Track 13: audio track (track-13.wav), [235007-257161], length= 4:55
Track 14: audio track (track-14.wav), [257162-279367], length= 4:56
|
This is cool, very useful. It
would be good to see this useful little gem part of the standard linux
kernel.
One warning... this does NOT work for loopback-mounted iso
images! (Beware - don't even try to do it! - at least not with
version 0.5a).
- Do a search at http://freshmeat.net/
and http://sourceforge.net/ for other
similar tools.
There is a new "mediacheck" functionality in 7.3 with the addition of two
new anaconda tools.
It is possible to embed checksums of the iso images
into the iso images themselves using implantisomd5,
and then with checkisomd5 to read and verify them.
Thanks to James Olin Oden <joden@lee.k12.nc.us> for this
explaination...
- implantisomd5 is actually the coolest little thing I have
seen in awhile, IMHO.
It creates a md5 sum of an ISO image, less the area of the image to which
it will write the checksum, and then writes the md5 checksum to an area of
the ISO that is open to an app to write to it.
I don't know the ISO 9660 standard, but as I can grok it appears that
there are areas left aside in ISO image that one can write to, without
disturbing the integrity of the ISO image, simular to the areas of the IP
headers that were left aside for future use.
The tool is actually smart enough to not write to that area if something
already has.
Anyway once you have created this checksum on the ISO, you check it by
typing:
/usr/lib/ancaconda-runtime/checkisomd5
/path/to/iso/image/file
It then generates an md5 checksum (less
the area written to with the checksum), reads the original checksum and
compares the two.
The real cool deal about this hack is that it appears that it works with
all iso images, and does not have to be constrained to RH installation. For
that matter I don't think it is constrained to Intel architecture either...
think, think, think.
As for RH's use, if you start RH 7.3 with:
linux
mediacheck
anaconda (or the loader, I am not sure) will allow
you to check various RH media, which it untimately does of course by calling
checkisomd5.
James had posted a message to the redhat-devel-list on 3rd June
2002 about a minor problem with the implantisomd5 utility. When it finishes,
it exits with a return code of "6" instead of "0" as would normally be
expected. This is because a printf call (printing 6 characters) exists just
before the program terminates.
If this problem hits you, then try the
following patch (posted by James) to the source for implanisomd5...
*** implantisomd5.c.orig Mon Jun 3 14:09:22 2002
--- implantisomd5.c Mon Jun 3 14:09:37 2002
***************
*** 179,182 ****
--- 179,184 ----
close(isofd);
printf("Done!\n");
+
+ exit(0);
}
FIXME: proper patch (although it is a trivial change, who needs a patch? :)
If you don't know the
scsi device number of your cdrom, then use "cdrecord -scanbus" to
find out.
Oh, you have an IDE (atapi) cdrom burner? RedHat have made it
easy to set up your atapi cdrom as an emulated scsi device...
-
# rmmod ide-cd
# modprobe ide-scsi
# cdrecord -scanbus
|
Assuming that you have a scsi or
ide-scsi (atapi) cdrom writer installed as scsi device 1, this will burn the
iso image to disk...
# cdrecord -v dev=0,1,0 speed=12 fs=20M -eject -data valhalla-1.iso
|
Peter Bowen <pzb@datastacks.com> suggests doing it like this, to
"make it work properly in all the CD-ROMs that I have run into".
# cdrecord -v dev=0,1,0 speed=12 fs=20M -eject -dao -pad padsize=150s -data valhalla-1.iso
|
Until Peter mentioned this, I had ever burned
cdrom data image files in disk-at-once mode. YMMV.
The only difference I
noticed was this additional output from cdrecord...
-
Last chance to quit, starting real write in 0 seconds. Operation starts.
Waiting for reader process to fill input buffer ... input buffer ready.
Performing OPC...
|
Sending CUE sheet...
cdrecord: WARNING: Drive returns wrong startsec (0) using -150
Writing pregap for track 1 at -150
|
Starting new track at sector: 0
Track 01: 596 of 596 MB written (fifo 100%).
Track 01: writing 300 KB of pad data.
Track 01: Total bytes read/written: 625541120/625848320 (305590 sectors).
Writing time: 534.671s
Fixating...
Fixating time: 13.874s
cdrecord: fifo had 9853 puts and 9853 gets.
cdrecord: fifo was 0 times empty and 9512 times full, min fill was 98%.
|
The resulting disks seem to be
working just fine.
Testing with cd-re-writables at this point is advised, you'll need to do a
test installation with your result to confirm that it all went well and works
as advertised.
But if you got this far, the chances are that it will work
just fine.
It works for me :-)
Ok, let's put this all together...
Here I present a
shell script for building installation images created mainly for my own
use. If it is useful for you, that's great... hopefully it has been
generalised enough to work without the need for too much hacking :)
- Use this script entirely at your own risk. YMMV. I take no
responsibility for what it may do. Read it, change it as you need to. If you
do try it, then you are advised to read what it does and tailor it for your
own purposes. By default, the script will not do anything (except to
possibly run pkgorder) unless you allow it to.
What it does...
- Basically, it does just about everything that has been described above.
- It was originally developed with redhat 7.2, but this much improved
version has been made to work for 7.3.
With relatively minor changes it
is possible for it to be used for either redhat 7.2 or 7.3.
- It expects to live in, and be run from, the base directory of the source
build tree where the i386/ directory exists (/redhat/ in
the examples above). If this is a limitation for you, sorry, you'll have to
change this yourself.
- It is verbose -- quite deliberately... I want to see exactly what it is
doing and I have gone to some effort to make it run like this. If you don't
like what it does, then you can always change it :-)
- It has functionality for making the second and third (or more) disks
bootable. For example, if the tarball for memtest86 is unpacked beside
i386, do a "make" in the subdir (to create memtest.bin)
then change back and run the script, it will find and use it and do what is
necessary to create these disks as bootable cdroms.
- It isn't perfect, it isn't finished, and not fully debugged. I can see
several places where it can be greatly improved and made a lot more "smart".
I want to make to work with 7.2 (I plan to test the current version on my
7.2 box for backwards compatability), and add functionality for using
tomsrtbt as an alternative boot image.
- By default (without parameters) it asks for confirmation before doing
each step. Give it a "help" parameter (help, -h,
--help, whatever) to learn more of how to tell it what to do.
- It has a silly command-line syntax that allows you to contol what it
does. (Getting this working is the reason why the script has been so long to
appear). The parameter parsing mechanism is crude and not totally foolproof
-- but it works if you use it sensibly. The -o ("do only") switch
is perhaps the most useful, and if you use the "test" parameter then it will
tell you what it would do. The help screen should give enough clues to get
you going.
This script is HIGHLY LIKELY to contain some bugs. If you find (and fix?)
any, or have suggestions for improvements, please don't hesitate to contact
me.
FIXME: find/collect what others have done.
(Relevant stuff that doesn't quite fit anywhere else).
- Thanks to Dongwon Kim, <prdd@finf.net>, who forwarded to a
mailing list a response from a support email from Sandra Moore from RedHat.
His original question was asking how it would be possible to capture error
messages produced from the anaconda installer.
If you have two computers that are networked, you can use one as an
installation box and the other to take screenshots.
These instructions are
oriented towards NFS installs, so it may be a little different for cdrom.
- Note: cdrom and hard drive installs do not require networking, so it
is not enabled and configured during the installation. It is unlikely that
this is possible to do for installs that are not network-based.
- Box 1
- The pre-installed linux system that is your workstation that will take
the screenshots. Make sure that "xhost +" is used so that the
second system can send its DISPLAY information to it.
- Box 2
- The "test box" that will run the installation program.
Boot
the installation program, and at the boot: prompt type
"text
display=www.xxx.yyy.zzz:0"
where the www.xxx.yyy.zzz is the IP
address of Box 1.
Next, use the installer as usual, but after entering the server name and
directory containing the installation image, press the F2 help key.
At the prompt type "anaconda -m nfs://mnt/source".
After a short time, the installer program should start sending its the
display to box 1, allowing you to take screenshots.