Hacking Red Hat Kickstart

April 1st, 2003 by Brett Schwarz in

How to create a single CD for fast and easy customized installation.
Your rating: None Average: 3.4 (7 votes)

Installing Linux is a relatively easy task. However, I was faced with the task of installing it on multiple machines repeatedly, which is time consuming and prone to errors. This problem affected our whole group and other groups that relied on us. So I started using Red Hat Kickstart to automate the installs. This helped, but there still was room for improvement. What I ultimately wanted was an automated installation that would fit on one CD, dynamically partition the hard drives and contain all of the updated packages. I wanted to be able to start an installation then walk away from the machine, returning only when it was done. To accomplish this, I supplemented Kickstart with a customized version of the Red Hat installation program, Anaconda.

Although not officially supported, Red Hat has made available several tools and documentation to assist in customizing an installation. I describe a few of the possible ways to do this here, which should give the reader enough information to get started.

The following topics are covered in this article: replacing packages with updates, reducing the installation size to fit on one CD, utilizing Kickstart in the custom installation and creating a custom message screen.

The reader should have a good understanding of Linux installations in general. I also assume that no esoteric hardware is being used, as other customizations may be needed to accommodate such hardware.

Setting Up the Build Machine

The first step is to prepare the build computer. Because the installer tools are specific to a particular release, the build computer needs to have the same Red Hat release as the one used on the target(s). For our example, Red Hat 8.0 is being used. There are some differences between Red Hat 8.0 and previous versions, and you need to investigate them if you use a previous version.

Once the build computer has the correct release installed, the Anaconda packages need to be installed. These usually are not installed by default, so they need to be manually installed. They are located on the second CD of the standard Red Hat distribution and are named anaconda, anaconda-runtime and anaconda-help (optional).

The next step is to create a directory structure where the installation files will be located. The partition should have adequate space available, approximately 3GB. The actual location is based on your preference; for this article, the base directory is located at /RH80. Under this directory, we create directories for each of the CDs:

mkdir -p /RH80/CD{1,2,3}

We are not concerned with the source packages, so CD4 and CD5 are not included.

We make an additional directory where we can create the custom installation:

mkdir /RH80/ONE_CD

Now we can copy the contents of the CDs to the respective directories. Mount the first CD, then issue this command:

cp -a /mnt/cdrom/* /RH80/CD1/
Repeat this step for CD2 and CD3.

Copy the contents of the CD directories to the ONE_CD directory, but hard link them instead of actually copying the files. This saves space and is quicker:

cd /RH80
cp -al CD1/* ONE_CD/
cp -al CD{2,3}/RedHat/RPMS/* ONE_CD/RedHat/RPMS/

You'll get an overwrite TRANS.TBL message; you can answer no.

Selecting the Packages

Next we trim down the contents of the ONE_CD directory so it fits on one CD. I assume the CD size to be 700MB. I will not go into detail on how to do this, as the list of files to remove from the distribution is different from one installation to another. However, here are some tips for trimming down the distribution:

  • Don't include the source RPMs.

  • Remove the dosutils directory, as these will be automated installs.

  • Remove any unnecessary packages. This can be complicated, because you need to make sure that the dependencies are still intact.

You should keep a record of the files that were removed. You can use this list in case you need to back out, and you will need it later if you edit the comps.xml file.

For the package selection, I logged to a file all of the base and core group packages with their dependencies (according to the comps.xml file). In order to find this information, I used the script getGroupPkgs.py (see Resources):

cd /RH80/ONE_CD/RedHat/base
getGroupPkgs.py comps.xml > /RH80/pkglist

Any additional package names can be appended to the end of this file. After my list was complete, I removed the packages not on the list by using the syncRpms.py script (see Resources). The arguments are the package directory and the list of packages is generated from getGroupPkgs.py. This script removes the packages not listed in the package list and prints out the package names. We redirect that to a file so we have a log:

cd /RH80
syncRpms.py ONE_CD/RedHat/RPMS/ pkglist > pkgs_rem
We can monitor the installation size by using the du command. The -h option displays the result in human readable format, and the -s option gives a summary of the whole directory tree:
du -hs /RH80/ONE_CD
The hdlist files actually decrease in size after they are regenerated (see below), because we removed many of the packages. This in turn reduces the size of the CD image.

The tricky part about removing packages is they may break dependencies. Even though getGroupPkgs.py resolved the dependencies base on the comps.xml file, they are not guaranteed to be accurate. Adding additional packages may break dependencies as well. One way to verify their accuracy is to create a temporary RPM database, and then do a test install on that database with the packages you have selected:

cd /RH80/ONE_CD/RedHat/RPMS
mkdir /tmp/testdb
rpm --initdb --dbpath /tmp/testdb
rpm --test --dbpath /tmp/testdb -Uvh *.rpm

Look for any error messages regarding failed dependencies. If any appear, resolve the dependencies by either adding or removing files that caused the discrepancy, and repeat the above test.

Once the package dependencies have been resolved, you can download the package updates pertinent for your installation. Put these files under a separate directory:

mkdir -p /RH80/updates/RPMS/

Remove the old files from the build directory and then link the updated files to the build directory. Do this for each updated package (where old_rpmfile is the previous version of the package):

cd /RH80/ONE_CD/RedHat/RPMS/
rm
# ... remove each old rpm
cd /RH80/updates/RPMS/
cp -l
# ... do this for each rpm
You should keep a record of the updated packages, in case you need to back them out. It's also a good idea to check the dependencies and size one more time, in case they changed after the packages were updated.

Next, we check the internal checksum of each package with the -K option to rpm. First we need to import the key:

cd /RH80/ONE_CD/RedHat/RPMS
rpm --import /usr/share/rhn/RPM-GPG-KEY
rpm -K *.rpm | grep "NOT *OK"

This isn't strictly necessary, but because we downloaded package updates, this verifies they are valid.

Preparing the Installation Files

Once all of the packages have been updated, we need to regenerate the hdlist files. They contain only the headers of the packages, which allows Anaconda to retrieve the header information more quickly. Because we updated packages, we need to regenerate these files with the genhdlist tool, which is part of the anaconda-runtime package:

/usr/lib/anaconda-runtime/genhdlist /RH80/ONE_CD/

Next we need to handle the comps.xml file. This file defines package groups and package dependencies (although they are not guaranteed). The file structure was changed in Red Hat 8.0 to be XML-based; in previous releases it was only a simple text file with some obscure tags. We need to ensure that packages defined within groups are included in our installation. We need to be concerned only with groups we are installing. If packages are missing (or if packages were added), we need to edit the comps.xml file (see Resources). Because we chose all of the packages in the Core and Base groups, however, we don't need to edit this file. We simply need to specify those groups under the %packages directive in the Kickstart file. See Listing 1 for an excerpt from the Kickstart file.

Listing 1. Excerpt from the Kickstart File

Technically, we can leave out the @Core and @Base groups, as they are installed by default. They are included here for illustrative purposes.

Creating a Custom Message Screen

We also want to create a custom message screen to give the user special instructions. The message screens are kept in the boot.img file (for CD-ROM installs) under the images directory. This is a DOS filesystem, so we can mount it to get to the contents:

cd /RH80/ONE_CD/images
mount -o loop -t msdos boot.img /mnt/boot

Looking in /mnt/boot, you see six message files: boot.msg, options.msg, general.msg, param.msg, rescue.msg and snake.msg. We create our own message file and call it custom.msg, an arbitrary name. Because snake.msg isn't really used, we replace that entry within syslinux.cfg with custom.msg. Edit syslinux.cfg in /mnt/boot and replace F7 snake.msg with F7 custom.msg.

A few other modifications were made to the syslinux.cfg file; refer to Listing 2. The default entry was changed from linux to ks. If the timeout occurs or if the user presses Enter at the boot prompt, then the ks label is used. Additionally, the timeout value was decreased from 600 to 60, so the installation can start sooner if there is no input from the user. The display entry was changed as well. Instead of boot.msg being the initial message screen, we wanted our custom message to be displayed. For the append line under the ks label, we added two things. The first is the keyword text, to enable text-based installs. Then we changed the keyword ks to ks=cdrom:/ks.cfg. This hard codes the Kickstart location so the user doesn't have to specify it at the boot prompt.

Listing 2. Modified syslinux.cfd File

Next we create our custom.msg file. Listing 3 shows our custom.msg. The contents of the file can be marked up, such as adding color around words. For example, ^O09Custom^O02 changes the color of Custom to blue, and ^O02 changes it back. See the syslinux reference in the Resources section for more information.

Listing 3. Custom Message

Once we have composed the custom message, we need to umount the boot image:

umount /mnt/boot
Building the CD

Before actually creating the CD, you may want to test it by doing a network install. See the Red Hat Kickstart documentation on how to do this.

We want this custom installation to be automated, so we put the Kickstart file on the CD itself. You can create the Kickstart file with any text editor, or you can use the GUI tool called Kickstart Configurator.

In the %pre section, add a shell script to probe the hard drives and dynamically create the partition information based on the number of drives. We take advantage of the fact that Kickstart executes the %pre section and then re-reads the Kickstart file. When it reads it for the second time, it includes the /tmp/partinfo file where the %include directive is located (see Listing 1). The /tmp/partinfo file is the output from the script. We use the list-harddrives command, which lists the available hard drives and their sizes. Having the partition created dynamically frees us from having to create multiple Kickstart files that hard code the partition information.

Once the Kickstart file is created, name it ks.cfg and place it in the root directory of our installation tree (/RH80/ONE_CD/). It is possible to create more than one Kickstart file and place all of them on the CD. Different Kickstart files might address different hardware configurations.

We can now create the ISO image. From our previous steps, the distribution should be small enough to fit on one CD and contain all of the updated packages. The mkisofs program creates the image, and then we can copy the image to the CD. The command to create the ISO image is:

cd /RH80/ONE_CD
mkisofs -r -T -J \
-V "My Custom Installation CD" \
-b images/boot.img \
-c images/boot.cat \
-o /RH80/mydist.iso \
/RH80/ONE_CD

Refer to Table 1 for a description of the options.

Table 1. Options Used for mkisofs

The last parameter to mkisofs is the source directory of the contents that need to be included in the image file (e.g., our custom installation directory). Several other parameters are available that you may want to use. For example, the -A, -P and -p options add additional labeling information to the image. The -m and -x options also allow you to exclude certain directories and file patterns from the image. See the mkisofs man page for additional information.

Next, add a checksum to the ISO image. This is not strictly necessary, but it provides a way for end users to check the integrity of the CD. The tool to add a checksum to the ISO image is called implantisomd5. To add a checksum to the ISO image, use the following command:

implantisomd5 /RH80/mydist.iso

A companion tool, checkisomd5, can be used to verify the checksum for you:

checkisomd5 /RH80/mydist.iso
The CD also can be verified during the installation. After booting from the CD, the user can issue this command:
linux mediacheck
Now we can burn the image to the CD. I assume the CD writer is already set up on your system. We use cdrecord below, but you can use other programs as well. The command is invoked as:
cdrecord -v speed=4 dev=0,0,0 /RH80/mydist.iso
The speed and dev options depend on your system. The device for the dev argument can be determined by using the -scanbus option to cdrecord:
cdrecord -scanbus

Using the CD

Once the image is burned onto the CD, insert the CD into the target machine and boot the machine. You should get the custom message that you created earlier. At this point, you can either press Enter at the boot prompt or let it timeout. When it times out it uses the default label, which we specified as ks (Kickstart).

If we did everything right, the installation should proceed without user interaction. In my experience, the installation takes approximately ten minutes. This may differ depending on your exact configuration.

Conclusion

With a combination of Kickstart and a customized Anaconda, a powerful and flexible installation can be created. This installation greatly improved cycle time and reduced errors for my project. I was able to install multiple machines, multiple times almost effortlessly. In this article, I touched on only a few ways to take advantage of Kickstart and Anaconda, but there are many other possibilities. I encourage those interested to read the documentation in the Resources section and to join the Kickstart and Anaconda mailing lists for further information.

Resources

email: bschwarz@pamd.cig.mot.com

Brett Schwarz lives near Seattle, Washington, with his wife, son and dog. Although he is familiar with multiple platforms, his platform of choice is Linux. He is a computer and wireless systems consultant. He can be contacted via his home page at www.bschwarz.com.

__________________________


Special Magazine Offer -- Free Gift with Subscription
Receive a free digital copy of Linux Journal's System Administration Special Edition as well as instant online access to current and past issues. CLICK HERE for offer

Linux Journal: delivering readers the advice and inspiration they need to get the most out of their Linux systems since 1994.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Michael's picture

Michael

On September 30th, 2007 Michael (not verified) says:

Hi, nice site!

Harshal's picture

hey this is a really

On May 4th, 2007 Harshal (not verified) says:

hey this is a really helpfull article.

ABHI's picture

builinstall error

On August 4th, 2006 ABHI (not verified) says:

Hello ,

I am trying to customise Fedora core2 installation . I have stuck
in rebuilding anaconda step . MY tree is /RH/ONE_CD/... this contains
my contents of 1st cd . my pakgfile is in /RH/OE_CD/Fedora/base/pkgfile

I give command :
/usr/lib/anaconda-runtime/buildinstall --pkgorder /RH/ONE_CD/Fedora/pkgfile.`date +%Y-%m-%d` --version 2 --product 'Fedora Core' --release 'Fedora Core 2' /RH/ONE_CD/

I get following errors :

Running buildinstall...
/RH/ONE_CD/buildinstall.tree.3514 /
rpm2cpio: /RH/ONE_CD/Fedora/RPMS/anaconda-runtime-[0-9]*: No such file or directory
cpio: premature end of archive
/
cp: cannot stat `/RH/ONE_CD/buildinstall.tree.3514/usr/lib/anaconda-runtime/./upd-instroot*': No such file or directory
cp: cannot stat `/RH/ONE_CD/buildinstall.tree.3514/usr/lib/anaconda-runtime/./mk-images*': No such file or directory
cp: cannot stat `/RH/ONE_CD/buildinstall.tree.3514/usr/lib/anaconda-runtime/./makestamp.py*': No such file or directory
cp: cannot stat `/RH/ONE_CD/buildinstall.tree.3514/usr/lib/anaconda-runtime/./buildinstall*': No such file or directory
Going to run buildinstall again
/usr/lib/anaconda-runtime/buildinstall: line 133: /RH/ONE_CD/buildinstall.tree.3514/buildinstall: No such file or directory
PLZ HELP ME IF .

Prosun Prodhan's picture

Kickstart

On July 3rd, 2005 Prosun Prodhan (not verified) says:

One Question.
I never want to modify the boot.iso, but want such that if in client machine I use "ks" (without quotes) it will read kickstart from the server and also install linux from the server using nfs. How to do that. It happens.

Thanks in advance

Prosun Prodhan's picture

kickstart

On July 3rd, 2005 Prosun Prodhan (not verified) says:

Found solution of my problem. Sorry to disturb you, In fact I just post that problem without testing, but it takes just 6-8 minutes for me. Solution is:

open your dhcpd.conf file and add following lines

filename "/path-to-kickstart-file";
next-server yourserver;

and thats it.

You only have to share your kickstart over nfs.

Sorry to disturb you
Prosun Prodhan.

Daniel A. Avelino's picture

Some points about this article.

On March 8th, 2005 Daniel A. Avelino (not verified) says:

Hi, guy !

I'm working too in a Fedora customization process, read you article and there are a little bit I would like to add in order to port this article to Fedora Core 2. The file one must to change in order to create a custom message screen in FC2 is isolinux.cfg and, this was put in boot.iso file. To mount it and get its contents,

cd /RH80/ONE_CD/images
mount -o loop -t iso9660 boot.iso /mnt/boot

Thanks a lot.

abhi's picture

Fedora core 2 installation

On August 1st, 2006 abhi (not verified) says:

hello ,
i am also trying my to customize fedora installation process
into one cd . i am using only base and core packages . My cd boots well
but on the graphical screen when system asks to choose media .
i choose local-cdrom . but it gives me errror "the Fedora core CD was not found in any of your CDrOM drives .plz insert the Fedora core CD and press OK to retry."
ctl+alt+f3 :--- starting to STEP_URL ,trying to mount CD device hdc .

PLZ , help out i have stuck on this for week

Anonymous's picture

Re: Hacking Red Hat Kickstart - Update RH3.0 - U3...

On October 6th, 2004 Anonymous says:

tested on RHES3.0 U3... here is my little update... - thanks to everyone who have post some info here ! :)

=====

export PYTHONPATH=/usr/lib/anaconda

/usr/lib/anaconda-runtime/pkgorder /RH/ONE_CD i386 > /RH/ONE_CD/RedHat/base/pkgorder

/usr/lib/anaconda-runtime/genhdlist --withnumbers --fileorder /RH/ONE_CD/RedHat/base/pkgorder --hdlist /RH/ONE_CD/RedHat/base/hdlist /RH/ONE_CD/

mkisofs -r -T -J -V "RHAS3.0U3.L4" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -v -o /RH/ISO/RHES3U3.lab4.iso /RH/ONE_CD/

implantisomd5 /RH/ISO/RHES3U3.lab4.iso

then... burn baby... burn !!! :)
==================

Marcus

Anonymous's picture

mkisofs drops a segmentation

On August 18th, 2006 Anonymous (not verified) says:

mkisofs drops a segmentation fault error with no reasons..
can't go through this, no way helps...

Pavel

Anonymous's picture

Quick note -> same procedure

On May 24th, 2005 Anonymous (not verified) says:

Quick note -> same procedure with RH 3.0 U4, U5 and RH4.0 ;) - any release... ( WS, ES or AS )

Marcus

Vivian's picture

pkgorder and Enterprise 4

On August 22nd, 2005 Vivian (not verified) says:

Marc,
I have tried to run the pkgorder on a Enterprise 4 64bit machine and keep getting an error. Do you have any ideas on what I am doing wrong?
I run the commands as follows:
# /usr/lib/anaconda-runtime/genhdlist --withnumbers /sysadm/RH/ONE_CD
(it creates the proper files hdlist and hdlist{2})

# /usr/lib/anaconda-runtime/pkgorder /sysadm/RH/ONE_CD i686 > \ /sysadm/RH/ONE_CD/RedHat/base/pkgorder

ERROR:
Traceback (most recent call last):
File "/usr/lib/anaconda-runtime/pkgorder", line 209, in ?
pkgOrder.append(hdlist[package].nevra())
File "/usr/lib/anaconda/hdrlist.py", line 422, in __getitem__
raise KeyError, "No such package %s" %(item,)
KeyError: 'No such package kernel'

pkgorder file contents:
kernel

I have tried to change the arch to x86_64 , but it still gives me an error. I can proceed with the mkisofs until this is resolved.
Thanks, --Vivian

Scott's picture

Workaround

On February 10th, 2006 Scott (not verified) says:

I ran into this issue and determined after a bit of research that the architecture actually is being driven by the first field of /etc/rpm/platform -- my solution, which appears to work so far :-) is to edit this file and put the desired target architecture into /etc/rpm/platform before the dash, run the pkgorder command, and then restore the original /etc/rpm/platform file. So in your case:

echo "i686-redhat-linux" > /etc/rpm/platform
pkgorder /sysadm/RH/ONE_CD i686
echo "x86_64-redhat-linux" > /etc/rpm/platform

Good luck, --Scott

Durgaprasad Ala's picture

do this to get x86_64 to work

On October 3rd, 2005 Durgaprasad Ala (not verified) says:

echo x86_64-redhat-linux > /etc/rpm/platform
once you are done get back the config with
echo i686-redhat-linux > /etc/rpm/platform

:-> hv a nice cd

John's picture

problem with U4 AS3

On May 2nd, 2005 John (not verified) says:

I successfully installed AS3 from the procedures you have provided.
But it is throwing error from GRUB.

root (hd0,0)
Filesystem type is ext2fs, partition type 0x83
kernel /vmlinuz-2.4.21-27.EL ro root=/dev/hda2

Error 15: File not found

Press any key to continue.

I tried several times but in vain getting the same error.

Please help me !!!!!

Anonymous's picture

problem with U4 AS3

On May 24th, 2005 Anonymous (not verified) says:

Looks like you have a problem with your partition... are you also trying to automate the creation of your partition too ?... if so, it's probably where you have a problem!...

quick test: boot in rescue mode and try to mount or acces your /dev/hda2 partition... ;)

Marcus

Anonymous's picture

Re: Hacking Red Hat Kickstart

On September 25th, 2004 Anonymous says:

Hi All,

I'm trying to get a single cd install of RedHat 3 AS, I followed both your method and Dave Hull PDF. Now I get an error in the install phase.
Anaconda eject's the cd and tell me to make sure I'm not using /mnt/source on tty2.

I check on tty2 and found no /tmp/hdc device. What am I doing wrong

Anonymous's picture

Re: Hacking Red Hat Kickstart

On October 3rd, 2004 Anonymous says:

found on : https://listman.redhat.com/archives/anaconda-devel-list/2004-May/msg00039.html

============================

Had to a genhdlist --withnumbers...

What gave that away was the part of the error message that said:

Switching from ISO[1] to [] for

Exception was : an integer is required

So basically it was switching from 1 to null because the hdlist did not a
have reference to which CD the package was on, even though there is only
one CD. I never had to use this option before, but I think it's probably
a safe thing to do all the time from now on. This was on RHEL3QU2.

Forrest,

==========================
my command:
/usr/lib/anaconda-runtime/genhdlist --withnumbers /RH/ONE_CD/

it should fix perfectly your problem ! :)
Marcus

goran785's picture

Re: Hacking Red Hat Kickstart

On June 30th, 2004 goran785 (not verified) says:

Hi to all!

I am trying to setup up an RedHat ES 3.0 Update 2 custom cd!
This document is very helpfull, but there are some differences between RH80 and ES30 (isolinux).

I made some changes in the isolinux/isolinux.cfg file:

### start
default linux
prompt 1
timeout 60
display custom.msg
F1 boot.msg
F2 options.msg
F3 general.msg
F4 param.msg
F5 rescue.msg
F7 custom.msg
label linux
kernel vmlinuz
append initrd=initrd.img
label text
kernel vmlinuz
append ks=cdrom:/ks/ks.cfg initrd=initrd.img text
label expert
kernel vmlinuz
append expert initrd=initrd.img
label ks
kernel vmlinuz
append ks initrd=initrd.img
label lowres
kernel vmlinuz
append initrd=initrd.img lowres
### end

I create the image with:
cd /custom/ONECD
mkisofs -r -T -J -V "MY_DIST" -b isolinux/isolinux.bin -c isolinux/boot.cat -o /custom/ver_03.iso -no-emul-boot -boot-load-size 4 -boot-info-table -R .

boot from cd is ok
after loading some modules a massage is displayed
"CD NOT FOUND"
on the diagnistic screen you can see:
(ALT F3)
starting to STEP_URL
* trying to mount device hdc

(ALT F4)
VFS: Can't find a valid FAT ffilesystem on dev 16:00
VFS: Can't find ext2 filesystem on dev ide1(22,0)

I found some information about this error
http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=22285

but it dont work!

Has someone any information for me?

thank you

Anonymous's picture

Re: Hacking Red Hat Kickstart

On June 30th, 2004 Anonymous says:

Check the thread above yours. I've posted a pdf on how I managed to get this done using RHELASv3.1. You can grab the pdf here:

http://insipid.com/RHOneCD.pdf

Off the top of my head, I'm thinking you're missing the .discinfo file from the root directory of your CD. You have to have that file. I copied it from the first disk of Red Hat's ISOs.

Good luck.

--
Dave Hull
http://insipid.com

goran785's picture

Re: Hacking Red Hat Kickstart

On July 1st, 2004 goran785 (not verified) says:

Thank You

I was helpfull!

I didn't copy the .disckinfo ;-(

by goran

Anonymous's picture

Re: Hacking Red Hat Kickstart

On June 4th, 2004 Anonymous says:

I just thought you should know that people are still getting mileage out of this document. I had been looking for a way to do an unattended single disc install of Red Hat EL AS 3 for a handful of machines.

This document served as a good foundation for that work. I had to change some things to make this work for AS 3, but for the most part the process is the same.

Thanks Brett and Linux Journal for keeping this article available. It seems like this process should be well documented somewhere at Red Hat's site, but I couldn't find it.

For what it's worth, I can now perform an unattended "minimal" install in less than six minutes. That rocks!

--
Dave Hull
http://insipid.com

Anonymous's picture

Re: Hacking Red Hat Kickstart

On June 23rd, 2004 Anonymous says:

Greate Article.

Dave, I am also installing several Redhat AS 3.0 servers and are trying to build a corporate standard for it so that al our servers can be installed using this.

Could you post what you had to change for AS3.0. Saves me en the rest of them AS3.0 guys some work.

Kind regards, hope to hear from you

Rob Schreurs
robschreurs@hotmail.com

Anonymous's picture

Re: Hacking Red Hat Kickstart

On June 28th, 2004 Anonymous says:

Rob and anyone else trying to do this with RH AS v 3:

I have put together a PDF on how I modified Brett's process to make it work with Advanced Server.

You can find the document here:

http://insipid.com/RHOneCD.pdf

I hope someone finds this useful.

--
Dave Hull
http://insipid.com

Anthony Haley's picture

Dave, Hey thanks for putting

On March 22nd, 2005 Anthony Haley (not verified) says:

Dave,
Hey thanks for putting that PDF together. I'm almost done creating my all-in-one CD for RH. If I hadn't found this information posted it have taken me much longer to figure this out for myself. Since I don't have an expert LINUX background.

Anonymous's picture

Re: Hacking Red Hat Kickstart

On September 24th, 2004 Anonymous says:

Hi Dave,

I've used your process with White Box Enterprise Linux which is based on redhat AS and it worked great.

Thanks a million

Hugues Belanger

Anonymous's picture

Re: Hacking Red Hat Kickstart

On June 2nd, 2003 Anonymous says:

This is really a great article.
And the rpmdb dependency test is really very cool.

Now I can start my work, and I think that it can help me a lot.

Thank a lot!

X.H. Beijing

Anonymous's picture

implantisomd5

On May 1st, 2003 Anonymous says:

Where is the implantisomd5 and checkisomd5? I dont have it, let alone find it on my box.

bschwarz's picture

Re: implantisomd5

On May 2nd, 2003 bschwarz (not verified) says:

I believe they are in the anaconda or anaconda-runtime (I think this one) packages.

Anonymous's picture

Re: Hacking Red Hat Kickstart

On April 29th, 2003 Anonymous says:

Really Great Article! It helped me a lot!

I have one tiny problem. I tried it for RH9 and got a CD. If i try to install from that CD I get a message "RHL CD was not found". The error comes on the phase of selecting installation method", when CDROM is selected.

However, if I put that CD under my FTP site and use "FTP" as my Installation method, it works great.

Any idea?

Anonymous's picture

Re: Hacking Red Hat Kickstart

On August 16th, 2003 Anonymous says:

Missing .discinfo file on your cd

Anonymous's picture

Missing .discinfo file on your cd

On December 22nd, 2008 Anonymous (not verified) says:

I got the "anaconda CD was not found" error and checked my CD, and it does indeed have .discinfo - unchanged (except for top number and second line version name) from .discinfo on my previous CD which gave no such error. The only change is in isolinux I changed vmlinuz and initrd.img to accommodate a new module.

shock106's picture

Re: Hacking Red Hat Kickstart

On April 18th, 2003 shock106 (not verified) says:

Can someone post links to the .py files. The link www.bschwarz.com doesn't seem to be working. Thanks

goran785's picture

Re: Hacking Red Hat Kickstart

On June 30th, 2004 goran785 (not verified) says:

hi

you can find them in the google cache

by goran

Anonymous's picture

Bschwarz & Kickstart article

On April 3rd, 2003 Anonymous says:

Great article that could not have come at a better time. I have been trying to create a Kickstart floppy for the past 7 days with no luck, and I have 12 servers to load!! hopefully after trying the steps in your article I can get to work....I have been using several books and alot of online docs to guide me..... MrMMills@onebox.com,

**oh yeah your email address on the LinuxJournal page doesnt work 'bschwarz@pamd.cig.mot.com'

Anonymous's picture

Re: Hacking Red Hat Kickstart

On March 27th, 2003 Anonymous says:

has anyone had to update nic drivers to Intel EtherExpress/1000 gigabit ?

can't seem to get it quite right... one listing mentioned boot drivers were needed and are different .... also pcitable and module-info listings ?

Anonymous's picture

Re: Hacking Red Hat Kickstart

On March 25th, 2003 Anonymous says:

Kickstart seems like a good start however for a more feature rich alternative for anybody who is responsible for the administration of a large number of Linux machines might want to consider the Open Source project called "The System Installation Suite".

It is best suited to machines with similar hardware but offers software upgrades, rollback functionality and many other goodies.

It can be found here at http://sisuite.org/

Hope it helps

Kai

Anonymous's picture

Re: Hacking Red Hat Kickstart

On March 18th, 2003 Anonymous says:

Great article and some nice ideas I can add in my own procedures.

Just a question, I googled the newsgroups for implantisomd5 and checkisomd5 without luck. And dont recall any redhat rpms with that name and so I was wondering where it can be obtained or what package its contained in.

Next im off to to searching sourceforge and freshmeat for them.

Anonymous's picture

Re: Hacking Red Hat Kickstart

On April 29th, 2003 Anonymous says:

use http://rpmseek.com it works great.

(BTW, I believe it is in the rpm for anaconda-runtime).

Anonymous's picture

Re: Hacking Red Hat Kickstart

On March 22nd, 2003 Anonymous says:

I am not at my computer right now, but I believe that they are part of the anaconda-runtime package.

--brett

bschwarz's picture

Re: Hacking Red Hat Kickstart

On March 13th, 2003 bschwarz (not verified) says:

Hummm, I tried to post this before, but didn't show up.

I apologize about my web server. It is suppose to be resolved by monday. If you would like the scripts, please feel free to email me:

brett_schwarz AT yahoo.com

--brett

Anonymous's picture

Re: (NOT) Hacking Red Hat Kickstart

On March 13th, 2003 Anonymous says:

Not to rip on Brett, because he's done some cool stuff here, and any cool python work is worthy of praise, but he may have gone about things the wrong way.

Red Hat gives you everything you need to do (almost) everything Brett has (re-)done, and a lot more. Look in "/usr/lib/anaconda-runtime".

Actually, several people have been using anaconda-runtime successfully for a while now. A good example that I'm the most familiar with is http://linux.engineering.uiowa.edu. You can read more about it at their site, but basically within about 3 hours of getting patches from Red Hat, they have new up-to-date ISO image sets of RH 7.3/8.0, available to download. They've only used one or two non- Red Hat scripts (mostly for automating of the process), and make "real" ISO images, right down the the implanted MD5 sums.

You'd still have to go in and implant your kickstart file onto the CD, but this can be done with a floppy and a quick "linux ks=floppy" on the installer's command line, or better yet, via dhcp/ftp/http/nfs for a full network install. (This is where kickstart really shines).

Anyway, good idea Brett. It stinks to finish up a cool little project like this and to realize someone else has already done it. At least you're thinking for yourself, which puts you one-up on a lot of other users. :-)

Just my $0.02 worth...

Anonymous's picture

Re: (NOT) Hacking Red Hat Kickstart

On March 13th, 2003 Anonymous says:

I read your comment about 5 times, but I am still not sure exactly what your complaint is. More precisely how you formulated that compliant. Nevertheless, I will try to speak to your comments:

Not to rip on Brett, because he's done some cool stuff here, and any cool python work is worthy of praise, but he may have gone about things the wrong way.

There are certainly several ways to go about this, whatever "this" is to you. There are also alot of different combinations that one could conceive of about modifying/automating RH Linux installs. However, that would probably take a book. I only had an article. The best approach that I thought of was to take a real life example of something I did, and let the readers infer from that ways for them to accomplish their specific need. In no way was this article a one size fits all model. However, at the same time, I don't think this is a wrong way to go about it...it is one of many ways. In this context, this was the easiest way for me.

Red Hat gives you everything you need to do (almost) everything Brett has (re-)done, and a lot more. Look in "/usr/lib/anaconda-runtime".

These were the objectives of the article:

* replacing packages with updates

* reducing the installation size to fit on one CD

* utilizing Kickstart in the custom installation

* creating a custom message screen.

Which of these is address (specifically) in anaconda-runtime?

I do concede that I could have explained more about the anaconda-runtime utilities, but I also had to keep the article under a certain size.

Actually, several people have been using anaconda-runtime successfully for a while now. A good example that I'm the most familiar with is http://linux.engineering.uiowa.edu. You can read more about it at their site, but basically within about 3 hours of getting patches from Red Hat, they have new up-to-date ISO image sets of RH 7.3/8.0, available to download. They've only used one or two non- Red Hat scripts (mostly for automating of the process),

Yes, there are alot of people utilizing anaconda-runtime. In fact, in the article I did make use of some of the programs in there. However, in the context of the article, not everything in anaconda-runtime did what I wanted it to do.

http://linux.engineering.uiowa.edu certainly fills a need, and I imagine alot of people utilize it. However, my preference is to keep a respository locally. That way, I can do with it as I like, instead of getting something that might not fit my installation needs.

and make "real" ISO images, right down the the implanted MD5 sums.

I am not sure what you mean by "real" ISO images? Are you implying that the ones generated in the article are not "real"?

You'd still have to go in and implant your kickstart file onto the CD, but this can be done with a floppy and a quick "linux ks=floppy" on the installer's command line, or better yet, via dhcp/ftp/http/nfs for a full network install. (This is where kickstart really shines).

But one of the points of the article was to have the kickstart on the CD. The idea was to have one CD, with a kickstart on it, and something you could load and walk away from (i.e. no manual intervention). I think the article explains one way to do this. There are certainly other ways.

Anyway, good idea Brett. It stinks to finish up a cool little project like this and to realize someone else has already done it. At least you're thinking for yourself, which puts you one-up on a lot of other users. :-)

I still don't understand how you deduced that someone has already done this.

If I have misunderstood your comments, then I apologize and please explain further to clarify.

You may want to read the article again, because you may have missed some points I was trying to make.

Anyways, thanks for the feedback, and the reference to CSS Enhanced Red Hat Linux.

--brett

Anonymous's picture

Re: (NOT) Hacking Red Hat Kickstart

On July 14th, 2004 Anonymous says:

* replacing packages with updates
* reducing the installation size to fit on one CD
* utilizing Kickstart in the custom installation
* creating a custom message screen.

The above solution was what I was looking for. I urgently need to learn how to make the whole installation at one time without changing disc and answering the questions as I am required to make several installations on many many computers. If this can be done so, it would save me a lots of time.

Harry

Anonymous's picture

Re: (NOT) Hacking Red Hat Kickstart

On September 24th, 2003 Anonymous says:

While the tone of the original commenter was a bit snarky, and the comments about "real" ISO images didn't make any sense, it is true that the functionality of the two python scripts you wrote is largely subsumed by "/usr/share/comps-extras/getnotincomps.py | xargs rm", if you have removed all groups and other references except for Core and Base.

While getnotincomps.py does make all sorts of assumptions about the installation build tree that are mildly annoying, this approach has the advantage that the comps.xml file on the CD doesn't reference any missing RPMs, so that the user can manually select a non-kickstart boot and still use the standard installer to manually select packages from the install menus.

Also, the getnotincomps.py performs full recursion on dependencies in the s section of comps.xml, where your scripts only go four levels deep.

I still found your article quite helpful, and the scripts were informative to look at.

Apparently (Mar 11 3:30pm PST) bschwarz.com is not responding. I'd like to get the python utilities that are essential to reproducing this article's work.

Perhaps LinuxJournal.com could have a policy of keeping all the resources for an article like this available on their server? (Within reasonable size-constraints of course).

This looks great, but as it is the article is useless unless I can get those files.

Oisin Feeley

bschwarz's picture

Re: Hacking Red Hat Kickstart/ Can't get the python from bschwa

On March 11th, 2003 bschwarz (not verified) says:

Unfortunately, my web server isn't under my complete control, and will go down once in awhile. You just happen to pick a bad time ;(

Anyways, try again. It should be up now. I apologize for the inconvenience, but it's the best I can do on my income ;)

Anonymous's picture

Re: Hacking Red Hat Kickstart

On March 11th, 2003 Anonymous says:

Looks like http://www.bschwarz.com 's web server is dead...

Any other place to get those scripts?

Anonymous's picture

Re: Hacking Red Hat Kickstart

On March 11th, 2003 Anonymous says:

excellent article. This gives me some insight into doing this. I've just been too busy to lookup all the information needed. Now I've got a foot in the door. This is what makes my LJ subscription worthwhile.

Anonymous's picture

Re: Hacking Red Hat Kickstart

On March 11th, 2003 Anonymous says:

Good article man. We're still using 6.2 and that's all the kickstart I've done but hopefully we can move to 8 someday :) The temp rpmdb thing is very cool. Never made my own cd, we use pxe, but I think I can see some definite advantages to having it on cd.

bschwarz's picture

Re: Hacking Red Hat Kickstart

On March 11th, 2003 bschwarz (not verified) says:

Certainly using network installs is the way to go *if* you can. There were circumstances in my case where it did not make sense (i.e. needed to do the installs off site sometimes). I actually had both setup, but I though making the CD might be a little more interesting to talk about ;)

Post new comment

Please note that comments may not appear immediately, so there is no need to repost your comment.
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <pre> <ul> <ol> <li> <dl> <dt> <dd> <i> <b>
  • Lines and paragraphs break automatically.

More information about formatting options

Newsletter

Each week Linux Journal editors will tell you what's hot in the world of Linux. You will receive late breaking news, technical tips and tricks, and links to in-depth stories featured on www.linuxjournal.com.
Sign up for our Email Newsletter

Tech Tip Videos

From the Magazine

July 2009, #183

News Flash: Linux Kernel 3.0 to include an on-the-go Expresso machine interface! Ok, maybe not, but Linux is definitely going mobile, from phones to e-readers. Find out more inside about Android, the Kindle 2, the Western Digital MyBook II, The Bug, and Indamixx (a portable recording studio). And if you've gone mobile and you been wanting more Emacs in your life then check out Conkeror.


To compliment the mobile we've got the stationary: parsing command line options with getopt, checking your Ruby code with metric_fu, and building a secure Squid proxy. How is this stationary you ask? What can we say? It's not. We just wanted to see if anybody actually read this part of the page :) .


All this and more, and all you have to do is get your hot sweaty hands on the latest copy of Linux Journal.





Read this issue