RHEL Kickstart pre-install script
RUSHE John (AXA-TECH-UK)
John.Rushe at axa-tech.com
Thu Feb 17 13:54:44 UTC 2005
I am trying to come up with a standard kickstart script for installing
RHEL on all our (differing) servers.
We have a mixture of kit, some with ide and some with scsi disks. In my
%pre script, I can manage to determine how many ide or scsi disks there
are in the system but I cannot find anyway to determine which device
names have been allocated. Here is my script, so far....
#!/bin/sh
#set -x
num_scsi=0
num_ide=0
exec 3<&0 # save the current
location of stdin
exec 0< /proc/scsi/scsi # reassign latest
kickstart to stdin
while read Type SCSI DROSS # read contents of
/proc/scsi/scsi
do
case $Type in
Type:)
if [ "${SCSI}" = "Direct-Access" ];
then
num_scsi=`expr $num_scsi + 1`
echo "Found SCSI Direct Access Device"
fi
;;
esac
done
echo "Found ${num_scsi} scsi disks..."
# Determine number of IDE disks (if any)
hds=""
media=""
for file in /proc/ide/h*
do
media=`cat $file/media`
if [ $media == "disk" ];
then
hds="$hds `basename $file`"
fi
done
What I am trying to do is to get the kickstart to semi-intelligently
auto-generate the partition information. For IDE this is pretty straight
forward since two IDE disks *usually* equates to /dev/hda and /dev/hdb.
Scsi is a little different in that hardware raid can confuse the issue
(we have a COMPAQ ML370 for example and the disks appear as
/dev/cissp/c0d0 etc). Is there anything during the kickstart install
which will enable me to capture (within the pre-install script) the
device names for the disk drives so that I can then generate the
kickstart partitioning on the fly based on which physical disks are
installed on the machine? I have tried trawling through /proc but so far
no success...
Cheers
John
*******************************************************************
This email originates from AXA Technology Services UK
Limited (reg. no. 1854856) which has its registered office
at 107 Cheapside, London EC2V 6DU, England.
This message and any files transmitted with it are
confidential and intended solely for the individual or
entity to whom they are addressed. If you have
received this in error, you should not disseminate or
copy this email. Please notify the sender immediately
and delete this email from your system.
Please also note that any opinions presented in this
email are solely those of the author and do not
necessarily represent those of The AXA UK Plc Group.
Email transmission cannot be guaranteed to be secure,
or error free as information could be intercepted,
corrupted, lost, destroyed, late in arriving or incomplete
as a result of the transmission process. The sender
therefore does not accept liability for any errors or
omissions in the contents of this message which arise
as a result of email transmission.
Finally, the recipient should check this email and any
attachments for viruses. The AXA UK Plc Group
accept no liability for any damage caused by any
virus transmitted by this email.
*******************************************************************
More information about the Redhat-install-list
mailing list