Hacking Red Hat Kickstart

How to create a single CD for fast and easy customized installation.
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

______________________

Comments

Comment viewing options

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

Kickstart ISO

mheanghreen's picture

I am creating a customized Kickstart file but I am having some trouble installing my root directory unto the harddrive .Case in point:
I have created an iso image that is able to run once installed. Example 1: On my ks.cfg file; cp, rpm, and third party installs are embebed directly inside the ks.cfg file.This iso image is fine; however, I would like to run those cp, rpm, and third party software from a seperate script file called "mypostscript", located in the root level in a directory called MYDIR,of my iso image. I have already created the script file containing my cp, rpms, and third party software ("mypostscript") and have placed it in the top level of my iso. Next, I wrote a small script to instruct my ks file to run those scripts. The problen I am having now is: After creating this new iso, I tried to install it on my harddrive. When the ks.cfg file executes, it runs the normal install plus packages. Once it gets to my %post section, it does not recognize any part of my %post except for my echo" " cammands. My script was as follows:

#The following was included minus the comments#

***EXAMPLE 1 WORKED BUT NOT EXAMPLE 2 DOES NOT***

***EXAMPLE 1:***

#install
#text
#lang en
#keyboard us
#mouse generic3ps/2
#cdrom
#timezone --utc US America/New_York
#rootpw MYPASS
#bootloader --location=mbr --driveorder=sda --append="rhgb quiet"
#--md5pass=MYPASS2
#zerombr yes
#clearpart --all
#part / --fstype ext3 --size=3000
#part /usr --fstype ext3 --size=4000
#part swap --size 4000
#part /usr/local --fstype ext3 --size=1 --grow
#authconfig --enableshadow --enablemd5
#network --bootproto=static --device=eth0 --ip #192.168.1.100 --netmask 255.255.255.0
#--gateway --hostname WSQ1
#network --bootproto=static --device=eth1 --ip #192.168.1.101 --netmask 255.255.255.0
#--gateway --hostname MYHOSTNAME
#firewall --disabled --ssh --port=22:tcp
#selinux --disabled
#xconfig --depth=24 --resolution=1280x1024 --#defaultdesktop=KDE --startxonboot
#firstboot --enable
#
#
#
#%packages
#@ Administrative Tools
#authconfig-gtk
#system-config-lvm
#system-config-soundcard
#system-config-network
#pirut
#
#
#%post --nochroot

#echo "In Non-Chrooted part of KS"
#cp -a /mnt/source/MYDIR /mnt/sysimage/root

#echo "In Chroot part of KS"

#cp -a my path
#rpm -iv my rpm
#cd any dir and run third party sofrware
#chconfig add or del any sevices I want

***EXAMPLE 2:***

#install
#text
#lang en
#keyboard us
#mouse generic3ps/2
#cdrom
#timezone --utc US America/New_York
#rootpw MYPASS
#bootloader --location=mbr --driveorder=sda --append="rhgb quiet"
#--md5pass=MYPASS2
#zerombr yes
#clearpart --all
#part / --fstype ext3 --size=3000
#part /usr --fstype ext3 --size=4000
#part swap --size 4000
#part /usr/local --fstype ext3 --size=1 --grow
#authconfig --enableshadow --enablemd5
#network --bootproto=static --device=eth0 --ip #192.168.1.100 --netmask 255.255.255.0
#--gateway --hostname WSQ1
#network --bootproto=static --device=eth1 --ip #192.168.1.101 --netmask 255.255.255.0
#--gateway --hostname MYHOSTNAME
#firewall --disabled --ssh --port=22:tcp
#selinux --disabled
#xconfig --depth=24 --resolution=1280x1024 --#defaultdesktop=KDE --startxonboot
#firstboot --enable
#
#
#
#%packages
#@ Administrative Tools
#authconfig-gtk
#system-config-lvm
#system-config-soundcard
#system-config-network
#pirut
#
#
#%post --nochroot

#echo "In Non-Chrooted part of KS"
#cp -a /mnt/source/MYDIR /mnt/sysimage/root

#echo "In Chroot part of KS"
#cd /root/MYDIR
#/root/bin/bash mypostscript

#After compiling the kickstart script, I tried installing it on the hard-drive. The post script section, Non-chrooted part of the kickstart file failed. It said:#

# Running kickstart %%post scripts
#:command not foundyi:line1
#In Non-Chrooted part of KS
# command not foundlg:line 4
#Error: Error code 127 encountered running ks %post
# command not found_v:line 1

#The post script section, Chroot part of the kickstart file failed. It said:#
#In Chroot part of KS
#:no such file or directory 3: /root/MYDIR
# /tmp/ks-script-hTNO_v: line 4: /root/bin/bash:no such file or directory.

CAN SOMEBODY HELP ME!!!!PLEASE

builinstall error

ABHI's picture

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 .

Kickstart

Prosun Prodhan's picture

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

kickstart

Prosun Prodhan's picture

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.

Some points about this article.

Daniel A. Avelino's picture

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.

Fedora core 2 installation

abhi's picture

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

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

Anonymous's picture

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

mkisofs drops a segmentation

Anonymous's picture

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

Pavel

Quick note -> same procedure

Anonymous's picture

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

Marcus

pkgorder and Enterprise 4

Vivian's picture

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

Workaround

Scott's picture

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

do this to get x86_64 to work

Durgaprasad Ala's picture

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

problem with U4 AS3

John's picture

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 !!!!!

problem with U4 AS3

Anonymous's picture

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

Re: Hacking Red Hat Kickstart

Anonymous's picture

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

Re: Hacking Red Hat Kickstart

Anonymous's picture

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

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

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

Re: Hacking Red Hat Kickstart

goran785's picture

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

Re: Hacking Red Hat Kickstart

Anonymous's picture

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

Re: Hacking Red Hat Kickstart

goran785's picture

Thank You

I was helpfull!

I didn't copy the .disckinfo ;-(

by goran

Re: Hacking Red Hat Kickstart

Anonymous's picture

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

Re: Hacking Red Hat Kickstart

Anonymous's picture

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

Re: Hacking Red Hat Kickstart

Anonymous's picture

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

Dave, Hey thanks for putting

Anthony Haley's picture

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.

Re: Hacking Red Hat Kickstart

Anonymous's picture

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

Re: Hacking Red Hat Kickstart

Anonymous's picture

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

implantisomd5

Anonymous's picture

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

Re: implantisomd5

bschwarz's picture

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

Re: Hacking Red Hat Kickstart

Anonymous's picture

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?

Re: Hacking Red Hat Kickstart

Anonymous's picture

Missing .discinfo file on your cd

Missing .discinfo file on your cd

Anonymous's picture

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.

Re: Hacking Red Hat Kickstart

shock106's picture

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

Re: Hacking Red Hat Kickstart

goran785's picture

hi

you can find them in the google cache

by goran

Bschwarz & Kickstart article

Anonymous's picture

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'

Re: Hacking Red Hat Kickstart

Anonymous's picture

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 ?

Re: Hacking Red Hat Kickstart

Anonymous's picture

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

Re: Hacking Red Hat Kickstart

Anonymous's picture

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.

Re: Hacking Red Hat Kickstart

Anonymous's picture

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

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

Re: Hacking Red Hat Kickstart

Anonymous's picture

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

--brett

Re: Hacking Red Hat Kickstart

bschwarz's picture

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

Re: (NOT) Hacking Red Hat Kickstart

Anonymous's picture

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...

Re: (NOT) Hacking Red Hat Kickstart

Anonymous's picture

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

Re: (NOT) Hacking Red Hat Kickstart

Anonymous's picture

* 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

Re: (NOT) Hacking Red Hat Kickstart

Anonymous's picture

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.

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

Anonymous's picture

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

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

bschwarz's picture

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 ;)

Re: Hacking Red Hat Kickstart

Anonymous's picture

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

Any other place to get those scripts?

Re: Hacking Red Hat Kickstart

Anonymous's picture

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.

Re: Hacking Red Hat Kickstart

Anonymous's picture

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.

Re: Hacking Red Hat Kickstart

bschwarz's picture

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 ;)

Re: Hacking Red Hat Kickstart

Anonymous's picture

what about using mandrake with saving the needed packages at install time to a floppy and use it later

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState