>
> Another mechanism that allows you to dynamically ignore disks (so you
> don't have to explicitly list them in each kickstart file) would be:
>
>    %pre
>    echo "bootloader --location=mbr --driveorder=cciss/c0d0" >
> /tmp/bootloader
>
>    IGNOREDISK=/tmp/ignoredisk
>
>    ### Ignore qlogic disks for PHYSICAL systems
>    cat /tmp/scsidisks
>    echo "Pulling in contents of /tmp/scsidisks"
>    for i in $(cat /tmp/scsidisks | awk '{ print $1 }'); do
>        DISKS=$DISKS" "$i
>    done
>    echo $DISKS
>    echo "Pulling in all block device sd* files in /tmp"
>    for i in $(ls -l /tmp | grep sd | grep ^brw | awk '{ print $NF }');
> do
>        DISKS=$DISKS" "$i
>    done
>    echo $DISKS
>    DISKS=$(echo $DISKS|sed 's/ s/,s/g')
>    if [ ! -z $DISKS ]; then
>        echo "ignoredisk --drives="$DISKS > $IGNOREDISK
>     else
>        echo ""> $IGNOREDISK
>    fi
>
>
> Then in the main section of the ks.cfg just:
>    %include /tmp/bootloader
>    %include /tmp/ignoredisk
>
> For HP systems (with SmartArray controllers at least), the cciss/c#d#
> devices do not show up in /tmp/scsidisks.
>
> Also, this does work with both RHEL4 and RHEL5 very successfully.  Since
> we generate individual kickstart files off of the same template for both
> SAN and non-SAN system, the above script works nicely.
>
> Maarten Broekman
> Email: [email protected]
>

**snip**

> > ps - including the RHEL5 list as well as the RHEL4 list.
>
>
> I got this from a Red Hat Global Professional Services consultant
> (cheers Dean, if you're reading this). I've just extracted it from a
> satellite kickstart profile for a RHEL5 box we have - I suppose it might
> work with RHEL4 too.
>
> Put the following %pre script block in your kickstart file to prevent
> the listed drives from being used by fdisk/lvm/mkefs:
>
> %pre
> cat <<EOF > /tmp/partitioning
> ignoredisk
> --drives=sda,sdb,sdc,sdd,sde,sdf,sdg,sdh,sdi,sdj,sdk,sdl,sdm,sdn,sdo,sdp
> ,sdq,sdr,sds,sdt,sdu,sdv,sdw,sdx
> key 49af89414d147589
> EOF
>
>
> In your partitioning section, include the file that you create in the
> pre script by adding this line
>
> %include /tmp/partitioning
>
>
> And then correct for the drive-ordering that might mean that your
> HBA-accessible drives come before your local storage. In this case, I
> wanted the local HP smartarray disk to come before all the HBA disks.
> Use the following line:
>
> bootloader --location mbr --driveorder
> cciss/c0d0,sda,sdb,sdc,sdd,sde,sdf,sdg,sdh,sdi,sdj,sdk,sdl,sdm,sdn,sdo,s
> dp,sdq,sdr,sds,sdt,sdu,sdv,sdw,sdx
>


I'm a bit confused about why so much of this is being echoed around and
included in files during the %pre script when they are completely valid
kickstart options that you just have to place inside the kickstart
normally.  I mean specifically the bootloader and ignoredisk lines.

Anyone?

-greg

_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list

Reply via email to