Compatible Support Forums: Oh so stuck - Kickstart Install & %post failure

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Oh so stuck - Kickstart Install & %post failure

#1 User is offline   BenInTx 

  • stranger
  • Group: Members
  • Posts: 5
  • Joined: 29-July 04

Posted 29 July 2004 - 11:06 PM

This is a composite of posts I've left elsewhere at other Linux sites. I'm still hoping for some answers.

I've got an xw8000, dual Xeon system. I'm attempting to load RH9 from a vendor CD that has a ks.cfg file in the top directory. The vendor CD boots and ks.cfg is supposed to startup, load RH9 from "Local CDROM", then when all 3 CDs are done, prompt me to reinstall my vendor CD to finish with some RPM additions, "housekeeping", etc..

The CD-ROM isn't found after I select the Installation Location as Local CDROM (Yes, I saw the "patch" links here about prolant servers, but the links are dead). I assume the CD-ROM issue has something to do with the RH9 driver? bug. The vendor told me he swapped one drive for another and was able to make it work. I have a DT855 that came with the xw8000 (it was a "no go"), and picked up an HP 420i (no go also). Is there a CD or DVD drive I can get that WILL work? And, no, I'm stuck using RH9 in this manner for technical and legal reasons. Is there a driver I can load, when asked, that would get around the suspect driver in RH9?

Lastly, I tried running the kickstart program from a floppy using "linux ks=floppy" at "boot:" and RH9 CD1 in the CDROM. It went well until I got to the "%Post" in the ks.cfg file. It didn't do any of the "%Post --nochroot" installation stuff (e.g. I never got asked to put the vendor CD in the drive - one of the first things in %Post). I could REALLY use some help.
------------------------
BTW, the following is the %Post section (that's not working from the floppy) of my ks.cfg file.

%post --nochroot
#Set up for install
#/mnt/sysimage is the hard drive
#/tmp/cdrom is the cdrom driver (if present)
#/dev/console is terminal 1
cddrv=/tmp/cdrom
# Determine cd device
if [ ! -e ${cddrv} ]
then
cddrv=`grep cdrom /proc/ide/*/media | sed -e "s/\/proc\/ide/\/dev/" | sed -e "s/\/media.*//"`
fi
echo "Post processing started" > /mnt/sysimage/tmp/rhks.log
cd /
mkdir /cdrom
#Move to terminal 1 cause that's where read looks for input
chvt 1
correctdisk=0
#Loop until they enter the correct cd
while [ ${correctdisk} -eq 0 ]
do
if [ ! -e /cdrom/ks.cfg ]
then
umount ${cddrv} > /dev/null 2>&1
echo "Message about to be delivered" >> /mnt/sysimage/tmp/rhks.log
echo "" > /dev/console
echo "" > /dev/console
echo "" > /dev/console
echo "Load the XiO boot disk into the CD drive and hit enter to continue" > /dev/console
read ans
echo "Message acknowledged" >> /mnt/sysimage/tmp/rhks.log
mount ${cddrv} /cdrom
else
correctdisk=1
fi
done
#Go to where messages will be written which is 3
chvt 3
echo "Loading additional files"
echo "Correct CD Mounted" >> /mnt/sysimage/tmp/rhks.log
#Determine if updating smp or not
smp=`rpm -qa -r /mnt/sysimage | grep kernel-smp | wc -l`
echo "smp is equal to " >> /mnt/sysimage/tmp/rhks.log
echo "${smp}" >> /mnt/sysimage/tmp/rhks.log
#rpmdb pkg expects /var/lib/rpm. Don't dissappoint them
ln -s /mnt/sysimage/var/lib/rpm /var/lib
#Load the correct set of rpm files
if [ ${smp} -ge 1 ]
then
rpm -Uvh --root /mnt/sysimage /cdrom/errata/comps.rpm /cdrom/errata/kernel-2.4.20-8.i686.rpm /cdrom/errata/initscripts-7.14-1.i386.rpm /cdrom/errata/kernel-source-2.4.20-8.i386.rpm /cdrom/errata/kernel-smp-2.4.20-8.i686.rpm /cdrom/errata/rhn-applet-2.0.9-0.9.0.1.i386.rpm /cdrom/errata/kernel-doc-2.4.20-8.i386.rpm /cdrom/errata/rpmdb-redhat-9-0.20030313.i386.rpm | tee -a /mnt/sysimage/tmp/rhks.log
else
rpm -Uvh --root /mnt/sysimage /cdrom/errata/comps.rpm /cdrom/errata/initscripts-7.14-1.i386.rpm /cdrom/errata/kernel-source-2.4.20-8.i386.rpm /cdrom/errata/kernel-2.4.20-8.i686.rpm /cdrom/errata/rhn-applet-2.0.9-0.9.0.1.i386.rpm /cdrom/errata/kernel-doc-2.4.20-8.i386.rpm /cdrom/errata/rpmdb-redhat-9-0.20030313.i386.rpm | tee -a /mnt/sysimage/tmp/rhks.log
fi
# Determine if bcm 5700 or not
bcm=`lsmod | grep bcm5700 | wc -l`
# Install bcm5700 if needed
if [ ${bcm} -ge 1 ]
then
rpm -ivh --root /mnt/sysimage /cdrom/bcm5700-6.0.2-1.i386.rpm | tee -a /mnt/sysimage/tmp/rhks.log
fi
#Clean up
echo "RPMs installed" >> /mnt/sysimage/tmp/rhks.log
umount ${cddrv}
echo "CD unmounted" >> /mnt/sysimage/tmp/rhks.log
chvt 7
-----------------------------
I haven't been able to resolve my kickstart CDROM issue, except by putting ks.cfg on a floppy and "linux expert ks=floppy". However, when I do ks.cfg from floppy, it doesn't execute the %post commands. Can I cut and paste the %post commands to a file and run it as a batch? How? Do I still need the "/mnt/sysimage" phrase if run from a batch(e.g. smp='rpm -qa -r /mnt/sysimage | grep kernel-smp | wc -l'), delete it for batch, or replace it with something else?

Basic stuff, I'm sure, but I'm very new to it all.
0

#2 User is offline   martouf 

  • enthusiast
  • Group: Members
  • Posts: 338
  • Joined: 09-July 04

Posted 30 July 2004 - 05:00 AM

no, what you're digging into sure isn't "basic stuff".

you're sailing near the edge of the map where it says:
"dragons be here" 8)

while I'll grant you may not understand why I'm asking this question it may help
lead to a solution: are your CDROMs all SCSI attached and not ATAPI devices
connected via an IDE bus?


0

#3 User is offline   BenInTx 

  • stranger
  • Group: Members
  • Posts: 5
  • Joined: 29-July 04

Posted 30 July 2004 - 05:18 AM

An HP DT855AV connected to the primary IDE controller and set to Master via jumper. That is a 8X DVD+RW drive.
0

#4 User is offline   martouf 

  • enthusiast
  • Group: Members
  • Posts: 338
  • Joined: 09-July 04

Posted 30 July 2004 - 05:33 AM

ok. Is the CDROM drive the only device on the IDE bus?

If so, have you tried to do without the jumper?

I recall in the past HD and CDROMs which would work only without
the jumper if they are the only device on the bus.


0

#5 User is offline   BenInTx 

  • stranger
  • Group: Members
  • Posts: 5
  • Joined: 29-July 04

Posted 30 July 2004 - 05:45 AM

I haven't tried that, but it's easy enough to do. BTW, the drive works. i.e. I can install from the RH9 CDs without any problem, IF I don't run the kickstart CD first.

FWIW, the HD is a 15k rpm SCSI.

There are posts on the web about a problem with RH9 using kickstart. There was something about the "linux ks=cdrom:/ks.cfg" where only the first 7 characters were seen, e.g. "ks=cdro". Supposedly, only a factor when the ks.cfg location is the boot CD. However, I don't know enough.

I created a linux boot disk, booted from floppy and tried to ks=cdrom:/ks.cfg. I got the same "CD-ROM not found" message after selecting "Local CD-ROM" as the installation source.

I've put in 3 different CD & DVD drives to see if that made a difference. It didn't.
0

#6 User is offline   martouf 

  • enthusiast
  • Group: Members
  • Posts: 338
  • Joined: 09-July 04

Posted 31 July 2004 - 01:20 AM

1. what happens if you try to load from "/tmp/cdrom" instead of
Local CDROM?

2. I didn't encounter any articles online from Red Hat or elsewhere
about a string length limitation in the 'ks' parameter. I did encounter,
however, articles about folks having troubles after having used a Windows
editor (not vi) on the ks.cfg file. check with 'cat -t -v ks.cfg'
and ensure there aren't a bunch of "^M" (CR, ASCII 13) chars at line ends.

3. the logic of the %post section appears to me to not prompt for a CD-ROM
if the mounted CDROM at the time of %post has a ks.cfg file on it.
Are the 3 CDROMs constructed so that the 3rd one (if not also the 2nd one)
does not have a ks.cfg file on it? and the 4th (vendor) CD does have a ks.cfg on it?

It's been a long week, so my thinking is a bit fuzzy.
Wish I could put my 'finger' right on the problem.


0

#7 User is offline   BenInTx 

  • stranger
  • Group: Members
  • Posts: 5
  • Joined: 29-July 04

Posted 31 July 2004 - 03:35 AM

Regarding #1, Ah... I new to this, hence I don't know how to select a new install from "/tmp/cdrom". Local CDROM seems to be the only good answer, given the options.

Regarding #2, Yep, had some ^M characters using a Win text editor. I pulled the ks.cfg file up using pico on the linux box, checked it out and resaved it using ^O, then exit with ^X. However, the original ks.cfg file, which didn't seem to work after %post was from the vendor. That's not to say I didn't mess up somehow. Anyway, I'm running the ks.cfg (resaved with pico) file from floppy, and trying to install again.

Regarding #3, The vendor CD is setup to boot, provide the ks.cfg file, and be replaced with RH9 Disc1 when prompted for Installation Package Location (i.e. Local CD-ROM), then RH9 Disc2, then RH9 Disc3, then the ks.cfg %post section looks for /cdrom/ks.cfg on the CD and if not present (which it isn't on the RH9 disc3), it requests the vendor CD (looping until it finds the /cdrom/ks.cfg).

BTW, thanks for helping.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users