install text reboot --eject lang en_US.UTF-8 key --skip firewall --disabled skipx network --device eth0 --bootproto dhcp # For network (PXE) boot envirnoments, comment out the following 'cdrom' line # and configure the appropriate network and/or nfs entries in this file. # cdrom # Nick - yup, done that. url --url http://192.168.10.122/ise/ # keyboard us # Nick - Changed the root password! rootpw CISCO_ise_p455w0rd authconfig --enableshadow --passalgo=sha256 timezone UTC bootloader --location=mbr --append "selinux=0 quiet" selinux --disabled %include /tmp/adeos.part # The '--ignoremissing' option to packages was only added for a missing # dependecy CARSOpenSSH has on libaudit.so.0, (which comes from # audit-libs-1.7 RPM). The reason for the dependency is the CARS # build is built on EL5, but running on EL6. EL6 uses audit-libs-2.2 %packages --ignoremissing * %pre PARTITION_FILE=/tmp/adeos.part IBM_SMALL=0 IBM_MEDIUM=0 IBM_LARGE=0 SNS3415=0 SNS3495=0 UCS_RAID_INIT=0 VM_APPLIANCE=0 USE_LVM=0 FSTYPE=ext4 # Create various links for busybox for f in grep cut tr expr gzip gunzip cpio tar do if [ ! -f /bin/$f ] ; then (cd /bin; ln -s busybox ./$f) fi done setup_raid() { # RAID configuration is done here for IBM MEDIUM or LARGE (3355 or 3395) if [ $IBM_LARGE -ne 1 -a $IBM_MEDIUM -ne 1 -a \ $SNS3415 -ne 1 -a $SNS3495 -ne 1 ] ; then return fi if [ $IBM_LARGE -eq 1 -o $IBM_MEDIUM -eq 1 ] ; then echo "***** Configuring RAID storage..." > /dev/console # CSCuc04885: commented out loading of mptctl as no longer needed # with 2.6.18 kernel # extract and load the mptctl.ko module needed by cfggen RAID config tool #( cd /tmp && cat /modules/modules.cgz | gunzip |cpio -i ; # insmod /tmp/`uname -r`/i686/mptctl.ko > /dev/console 2>&1 ; #) # Check if we can go with the exising RAID config, if present cfggen 0 display 1 > /tmp/cfggen.out VolStatus=`grep "Status of volume" /tmp/cfggen.out | cut -f2 -d:` RaidLevel=`grep "RAID level" /tmp/cfggen.out | cut -f2 -d:` HardDisks=`grep "Physical hard disks (Target ID)" /tmp/cfggen.out | cut -f2 -d:` DiskCount=`echo -n $HardDisks | busybox tr -d ' ' | wc -c` #echo RAID $VolStatus, $RaidLevel, $HardDisks, $DiskCount if [ "$VolStatus" = " Okay (OKY)" ] ; then if [ "$RaidLevel" = " 1E" -a "$DiskCount" = "4" ]; then echo "***** Retaining existing ISE-3395 RAID configuration" > /dev/console return fi if [ "$RaidLevel" = " 0" -a "$DiskCount" = "2" ]; then echo "***** Retaining existing ISE-3355 RAID configuration" > /dev/console return fi fi cfggen 0 delete noprompt sleep 5 # set RAID 1 (IM - mirroring of 2 drives *not used in ISE*) # set RAID 0 (IS - striping of 2 drives) for ISE-3355 # set RAID 1e (IME - mirroring and striping of 4 drives) for ISE-3395 # select MAX size, drive enclosure:slot, quick sync, no prompts if [ $IBM_MEDIUM -eq 1 ] ; then cfggen 0 auto IS MAX qsync noprompt # Uncomment out 'enable_ls_writecache' only if we want to enable # write cache by default on 3355/3395 # enable_lsi_writecache elif [ $IBM_LARGE -eq 1 ] ; then cfggen 0 auto IME MAX noprompt # enable_lsi_writecache fi fi } get_hwinfo() { echo "***** " > /dev/console if [ -f /sbin/cars_udi_util ]; then /sbin/cars_udi_util -q NOUDI=$? else echo "***** ERROR: NO UDI UTILITY FOUND!" > /dev/console echo "***** Exiting Installation..." > /dev/console sleep 8 # Nick - We don't need no UDI # /sbin/halt -f fi if [ $NOUDI -eq 0 ]; then # Nick - Change the Product ID to Virtual Machine.... and fake the rest. UDI_PID="Cisco-VM-SPID" UDI_VID="1.0" UDI_SN="123456789" # Nick - Commented out below. #UDI_PID=`/sbin/cars_udi_util -p` #UDI_VID=`/sbin/cars_udi_util -v` #UDI_SN=`/sbin/cars_udi_util -s` if [ "$UDI_PID" = "Cisco-VM-SPID" ] ; then echo "***** Virtual Machine host detected..." > /dev/console else echo "***** Detected Cisco UDI (Unique Device Identifier):" > /dev/console echo "***** PID: $UDI_PID , VID: $UDI_VID, SN: $UDI_SN" > /dev/console fi else echo "***** ERROR: UNSUPPORTED HARDWARE DETECTED!" > /dev/console echo "***** Cisco UDI (Unique Device Identifier) not found on this appliance." > /dev/console echo "***** Exiting Installation..." > /dev/console sleep 8 # Nick - No Fear! # /sbin/halt -f fi case $UDI_PID in NAC3315* | ISE-3315* | ISE3315* | CSACS1121* | CSACS-1121* ) IBM_SMALL=1 ;; NAC3355* | ISE-3355* | ISE3355* ) IBM_MEDIUM=1 setup_raid ;; NAC3395* | ISE-3395* | ISE3395* ) IBM_LARGE=1 setup_raid ;; # No need to setup RAID on UCS (SNS-3400). It's done by Cisco manufacturing SNS3415* | SNS-3415* ) SNS3415=1 ;; SNS3495* | SNS-3495* ) SNS3495=1 ;; Cisco-VM-SPID | ISE-VM* ) VM_APPLIANCE=1 ;; esac if [ $UCS_RAID_INIT -eq 1 ] ; then echo "***** Notice: This platform requires a RAID volume be configured. The ISE" > /dev/console echo "***** installer has just configured the RAID volume, however a" > /dev/console echo "***** reboot is required to continue the installation." > /dev/console echo "***** The appliance will reboot momentarily." > /dev/console echo "***** Please restart the installation after reboot." > /dev/console sleep 20 /sbin/reboot fi hdlist=`/sbin/fdisk -l /dev/sd[abcde] 2> /dev/null | grep "^Disk .*GB" |grep -v "^Disk.*dev.dm-[0-9]" | awk '{print $3}' | awk -F . '{print $1}'` if [ -z $hdlist ]; then hdlist="0" echo "***** ERROR: UNABLE TO DETECT SIZE OF HARD DISK(S)" > /dev/console echo "***** If installing on VM, only virtual hard disks of" > /dev/console echo "***** type SCSI are supported." > /dev/console echo "***** Exiting installation... " > /dev/console sleep 8 /sbin/halt -f fi hdsum=0 for disk in $hdlist; do let "hdsum=$hdsum+$disk" # Nick - Print out disks (for troubleshooting) echo "-NB- DISK: $disk " > /dev/console done echo "***** Hard disk(s) total size detected: $hdsum Gigabyte" > /dev/console MEM_SIZE=`cat /proc/meminfo | grep "^MemTotal:" | awk '{print $2}'` ret="$?" if [ "$ret" -ne 0 ]; then echo "***** ERROR: UNABLE TO DETECT SIZE OF PHYSICAL RAM" > /dev/console echo "***** Exiting installation... " > /dev/console sleep 8 /sbin/halt -f fi echo "***** Physical RAM size detected: $MEM_SIZE Kbytes" > /dev/console NIC_NO=`cat /proc/net/dev | grep "eth" | wc -l | awk '{print $1}'` if [ "$NIC_NO" -lt 1 ]; then echo "***** ERROR: UNABLE TO DETECT ANY NETWORK INTERFACES" > /dev/console echo "***** Exiting installation... " > /dev/console sleep 8 /sbin/halt -f fi echo "***** Number of network interfaces detected: $NIC_NO " > /dev/console CPU_NO=`cat /proc/cpuinfo |grep ^processor|wc -l` echo "***** Number of CPU cores detected: $CPU_NO " > /dev/console CPU_SP=`cat /proc/cpuinfo |grep "^cpu MHz"|head -1|awk '{print $4}'|awk -F. '{print $1}'` echo "***** Clock speed of CPU in MHz: $CPU_SP " > /dev/console } validate_hwinfo() { # Nick - fix UDI_PID (again) UDI_PID="Cisco-VM-SPID" case $UDI_PID in NAC33* | ISE-33* | ISE33* ) # Match any IBM NAC or ISE appliance echo "***** Verifying RAM requirement..." > /dev/console if [ "$MEM_SIZE" -lt 4000000 ]; then echo "***** ERROR: THE INSTALLER REQUIRES AT LEAST 4GB RAM FOR THIS APPLIANCE TYPE" > /dev/console echo "***** Exiting installation... " > /dev/console sleep 8 /sbin/halt -f fi echo "***** Verifying NIC requirement..." > /dev/console if [ "$NIC_NO" -lt 4 ]; then echo "***** ERROR: THE INSTALLER REQUIRES AT LEAST 4 NICS FOR THIS APPLIANCE TYPE" > /dev/console echo "***** Exiting installation... " > /dev/console sleep 8 /sbin/halt -f fi echo "***** Verifying Hard disk(s) requirement..." > /dev/console case $UDI_PID in NAC3315* | ISE-3315* | ISE3315* ) # Match small IBM appliance IBM_SMALL=1 if [ "$hdsum" -lt 490 ]; then echo "***** ERROR: THE INSTALLER REQUIRES AT LEAST 500GB DISK SPACE FOR THIS " > /dev/console echo "***** APPLIANCE TYPE. THIS APPLIANCE HAS $hdsum GB DISK SPACE." > /dev/console echo "***** Exiting installation... " > /dev/console sleep 8 /sbin/halt -f fi ;; NAC3355* | ISE-3355* | ISE3355* ) IBM_MEDIUM=1 if [ "$hdsum" -lt 280 ]; then echo "***** ERROR: THE INSTALLER REQUIRES AT LEAST 600GB DISK SPACE FOR THIS APPLIANCE TYPE" > /dev/console echo "***** Exiting installation... " > /dev/console sleep 8 /sbin/halt -f fi ;; NAC3395* | ISE-3395* | ISE3395* ) IBM_LARGE=1 if [ "$hdsum" -lt 590 ]; then echo "***** ERROR: THE INSTALLER REQUIRES AT LEAST 600GB DISK SPACE FOR THIS APPLIANCE TYPE" > /dev/console echo "***** Exiting installation... " > /dev/console sleep 8 /sbin/halt -f fi ;; esac ;; SNS3415* | SNS-3415* ) SNS3415=1 echo "***** Verifying RAM requirement..." > /dev/console if [ "$MEM_SIZE" -lt 16000000 ]; then echo "***** ERROR: THE INSTALLER REQUIRES AT LEAST 16GB RAM " > /dev/console echo "***** Exiting installation... " > /dev/console sleep 8 /sbin/halt -f fi echo "***** Verifying NIC requirement..." > /dev/console if [ "$NIC_NO" -lt 4 ]; then echo "***** ERROR: THE INSTALLER REQUIRES AT LEAST 4 NICS " > /dev/console echo "***** Exiting installation... " > /dev/console sleep 8 /sbin/halt -f fi echo "***** Verifying Hard disk(s) requirement..." > /dev/console if [ "$hdsum" -lt 590 ]; then echo "***** ERROR: THE INSTALLER REQUIRES AT LEAST 600GB DISK SPACE FOR THIS" > /dev/console echo "***** APPLIANCE TYPE. THIS APPLIANCE HAS $hdsum GB DISK SPACE." > /dev/console echo "***** Exiting installation... " > /dev/console sleep 8 /sbin/halt -f fi ;; SNS3495* | SNS-3495* ) SNS3495=1 echo "***** Verifying RAM requirement..." > /dev/console if [ "$MEM_SIZE" -lt 32000000 ]; then echo "***** ERROR: THE INSTALLER REQUIRES AT LEAST 32GB RAM " > /dev/console echo "***** Exiting installation... " > /dev/console sleep 8 /sbin/halt -f fi echo "***** Verifying NIC requirement..." > /dev/console if [ "$NIC_NO" -lt 4 ]; then echo "***** ERROR: THE INSTALLER REQUIRES AT LEAST 4 NICS " > /dev/console echo "***** Exiting installation... " > /dev/console sleep 8 /sbin/halt -f fi echo "***** Verifying Hard disk(s) requirement..." > /dev/console if [ "$hdsum" -lt 590 ]; then echo "***** ERROR: THE INSTALLER REQUIRES AT LEAST 600GB DISK SPACE FOR THIS" > /dev/console echo "***** APPLIANCE TYPE. THIS APPLIANCE HAS $hdsum GB DISK SPACE." > /dev/console echo "***** Exiting installation... " > /dev/console sleep 8 /sbin/halt -f fi ;; CSACS1121* | CSACS-1121* ) IBM_SMALL=1 # ACS 5.x appliance detected, verify HW attributes of ACS appliance echo "***** Verifying RAM requirement..." > /dev/console if [ "$MEM_SIZE" -lt 4000000 ]; then echo "***** ERROR: THE INSTALLER REQUIRES AT LEAST 4GB RAM " > /dev/console echo "***** Exiting installation... " > /dev/console sleep 8 /sbin/halt -f fi echo "***** Verifying NIC requirement..." > /dev/console if [ "$NIC_NO" -lt 2 ]; then echo "***** ERROR: THE INSTALLER REQUIRES AT LEAST 2 NICS " > /dev/console echo "***** Exiting installation... " > /dev/console sleep 8 /sbin/halt -f fi echo "***** Verifying Hard disk(s) requirement..." > /dev/console if [ "$hdsum" -lt 490 ]; then echo "***** ERROR: THE INSTALLER REQUIRES AT LEAST 500GB DISK SPACE FOR THIS" > /dev/console echo "***** APPLIANCE TYPE. THIS APPLIANCE HAS $hdsum GB DISK SPACE." > /dev/console echo "***** Exiting installation... " > /dev/console sleep 8 /sbin/halt -f fi ;; Cisco-VM-SPID | ISE-VM* ) VM_APPLIANCE=1 echo "***** Verifying RAM requirement..." > /dev/console if [ "$MEM_SIZE" -lt 4000000 ]; then echo "***** ERROR: THE INSTALLER REQUIRES AT LEAST 4GB RAM " > /dev/console echo "***** Exiting installation... " > /dev/console sleep 8 # Nick - Disable RAM Checking # /sbin/halt -f fi if [ "$hdsum" -lt 100 ]; then echo "***** ERROR: UNSUPPORTED VM CONFIGURATION. " > /dev/console echo "***** THE INSTALLER DETECTED LESS THAN REQUIRED 100 GIGABYTES" > /dev/console echo "***** DISK SPACE FOR THE VM INSTALLATION. " > /dev/console echo "***** Exiting Installation..." > /dev/console sleep 8 /sbin/halt -f fi echo "***** Verifying CPU requirement..." > /dev/console CPU_NO=`cat /proc/cpuinfo |grep ^processor|wc -l` if [ $CPU_NO -lt 2 ]; then echo "***** ERROR: UNSUPPORTED VM CONFIGURATION. " > /dev/console echo "***** THE INSTALLER DETECTED LESS THAN THE REQUIRED 2 CPU CORES." > /dev/console echo "***** Exiting Installation..." > /dev/console sleep 8 # Nick - Disable CPU Checking # /sbin/halt -f fi CPU_SP=`cat /proc/cpuinfo |grep "^cpu MHz"|head -1|awk '{print $4}'|awk -F. '{print $1}'` if [ $CPU_SP -lt 1800 ]; then echo "***** ERROR: UNSUPPORTED VM CONFIGURATION. " > /dev/console echo "***** THE INSTALLER DETECTED THE CPU HAS SPEED SLOWER THAN THE" > /dev/console echo "***** REQUIRED MINIMUM SPEED, WHICH IS 1800 MHZ (1.8 GHZ)" > /dev/console echo "***** Exiting Installation..." > /dev/console sleep 8 # Nick - Disable CPU Checking # /sbin/halt -f fi ;; *) # This is the case where there is a valid Cisco UDI on the platform, # however, the UDI does not match any of the supported UDIs of this # product. Hence we need to abort out with a descriptive error. echo "***** ERROR: UNSUPPORTED CISCO HARDWARE DETECTED!" > /dev/console echo "***** The Cisco UDI (Unique Device Identifier) found on this appliance" > /dev/console echo "***** does not match the expected UDI of the product being installed. " > /dev/console echo "***** Exiting Installation..." > /dev/console sleep 8 # Nick - Disable fail-safe bail # /sbin/halt -f esac if [ $IBM_SMALL -eq 1 ] ; then USE_LVM=1 fi DISK=unknown # Find first disk, don't assume it's always sda for a_disk in /dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sde ; do /sbin/sfdisk -l $a_disk > /dev/null 2>&1 if [ $? -eq 0 ] ; then DISK=$a_disk break fi done if [ "$DISK" == "unknown" ] ; then echo "***** ERROR: UNABLE TO DETERMINE INSTALLATION DISK" > /dev/console echo "***** If installing on UCS appliance, please verify a RAID volume is" > /dev/console echo "***** configured. If installing on VM, only virtual hard disks of" > /dev/console echo "***** type SCSI are supported." > /dev/console echo "***** Exiting installation... " > /dev/console sleep 8 /sbin/halt -f fi PARTDISK=`basename $DISK` } enable_lsi_writecache() { # Turn on write caching on MEDIUM and LARGE platforms # as it is turned off by default if [ $IBM_MEDIUM -eq 1 -o $IBM_LARGE -eq 1 ] ; then lsiutil -p1 -a 21,32,yes,,,,,0,0 > /tmp/lsiset.out lsiutil -p1 -a 21,1,0,0 > /tmp/lsiget.out fi } calculate_partition_sizes() { # disk and partition sizes # disk size in number of 1024 byte blocks & 512 byte sectors total_blocks=`/sbin/sfdisk -s $DISK` total_sectors=`expr $total_blocks \* 2` total_mb=`expr $total_blocks \/ 1024` # compute number of heads and sectors in a track heads=`fdisk -l $DISK | grep "sectors/track" | cut -d' ' -f1` track_size=`fdisk -l $DISK | grep "sectors/track" | cut -d' ' -f3` ncylinders=`fdisk -l $DISK | grep "sectors/track" | cut -d' ' -f5` cylinder_size=`expr $heads \* $track_size` # sectors in a cylinder #echo "heads=$heads, track_size=$track_size" #echo "cylinder_size=$cylinder_size, ncylinders=$ncylinders" #echo "total_blocks=$total_blocks, total_sectors=$total_sectors" if [ "$ncylinders" != "`expr $total_sectors / $cylinder_size`" ] ; then echo "Warning: check fdisk and partition sizes" fi if [ $VM_APPLIANCE -eq 1 ] ; then BOOT_SIZE=500 # boot is 100 MB SCFG_SIZE=100 # storedconfig SWAP_SIZE=8000 # swap should be fixed to 8Gb since we require 4Gb of physical RAM if [ $total_mb -lt 200000 ] ; then TEMP_SIZE=1000 # tmp LOCL_SIZE=6000 # localdisk else TEMP_SIZE=2000 # tmp LOCL_SIZE=15000 # localdisk fi ROOT_SIZE=`expr $total_mb - 8 - $BOOT_SIZE - $SCFG_SIZE \ - $SWAP_SIZE - $TEMP_SIZE - $LOCL_SIZE` fi if [ $IBM_SMALL -eq 1 -o $IBM_MEDIUM -eq 1 -o $IBM_LARGE -eq 1 ] ; then BOOT_SIZE=500 SCFG_SIZE=100 TEMP_SIZE=2000 SWAP_SIZE=8000 LOCL_SIZE=15000 fi if [ $SNS3415 -eq 1 -o $SNS3495 -eq 1 ] ; then BOOT_SIZE=500 SCFG_SIZE=100 TEMP_SIZE=2000 SWAP_SIZE=8000 LOCL_SIZE=15000 fi if [ $IBM_SMALL -eq 1 ] ; then disk1_mb=$total_mb disk2_mb=$total_mb total_mb=`expr $disk1_mb + $disk2_mb` # handle the case of multiple disks fi if [ $VM_APPLIANCE -ne 1 ] ; then ROOT_SIZE=`expr $total_mb - 8 - $BOOT_SIZE - $SCFG_SIZE \ - $SWAP_SIZE - $TEMP_SIZE - $LOCL_SIZE` fi } write_lvm_table() { echo "***** Writing disk partition table with logical volume manager enabled" > /dev/console # These two parititions are only used in case of LVM P456_SIZE_DISK1=`expr $disk1_mb \* 2048 / $cylinder_size \* $cylinder_size \ - $P1_SIZE - $P2_SIZE - $P3_SIZE - $P1_START` P1_SIZE_DISK2=`expr $disk2_mb \* 2048` # Determine LVM second drive is by checking if /dev/sda is first 250Gb disk fdisk -l /dev/sda|grep -q "250.*GB" if [ $? -eq 0 ] ; then LVM_DISK=/dev/sdb else LVM_DISK=/dev/sdc fi LVM_PARTITION1=${LVM_DISK}1 LVM_PARTITION2=${LVM_DISK}2 LVM_PARTITION3=${LVM_DISK}3 LVM_PARTITION4=${LVM_DISK}4 LVM_PARTDISK=`basename $LVM_DISK` (echo ; echo "unit: sectors"; echo "$PARTITION1 : start=$P1_START, size=$P1_SIZE, Id=83, bootable"; echo "$PARTITION2 : start=$P2_START, size=$P2_SIZE, Id=83"; echo "$PARTITION3 : start=$P3_START, size=$P3_SIZE, Id=83"; echo "$PARTITION4 : start=$P4_START, size=$P456_SIZE_DISK1, Id=8e"; ) | /sbin/sfdisk $DISK -q --force (echo ; echo "unit: sectors"; echo "$LVM_PARTITION1 : start=$P1_START, size=$P1_SIZE_DISK2, Id=8e"; echo "$LVM_PARTITION2 : start= 0, size= 0, Id= 0"; echo "$LVM_PARTITION3 : start= 0, size= 0, Id= 0"; echo "$LVM_PARTITION4 : start= 0, size= 0, Id= 0"; ) | /sbin/sfdisk $LVM_DISK -q --force (echo ; echo "clearpart --none"; echo "part /boot --fstype=$FSTYPE --size=$BOOT_SIZE --onpart=${PARTDISK}1"; echo "part /storedconfig --fstype=$FSTYPE --size=$SCFG_SIZE --onpart=${PARTDISK}2"; echo "part /localdisk --fstype=$FSTYPE --size=$LOCL_SIZE --onpart=${PARTDISK}3"; echo "part pv.01 --grow --size=2000 --onpart=${PARTDISK}4"; echo "part pv.02 --grow --size=2000 --onpart=${LVM_PARTDISK}1"; echo "volgroup smosvg --pesize=4096 pv.01 pv.02"; echo "logvol swap --name=swapvol --fstype=swap --vgname=smosvg --size=$SWAP_SIZE "; echo "logvol /tmp --name=tmpvol --fstype=$FSTYPE --vgname=smosvg --size=$TEMP_SIZE "; echo "logvol / --name=rootvol --fstype=$FSTYPE --vgname=smosvg --size=$ROOT_SIZE "; ) > $PARTITION_FILE } write_table() { echo "***** Writing disk partition table..." > /dev/console P5_EXT_START=`expr $P4_START + 128` P6_EXT_START=`expr $P5_START + 128` P7_EXT_START=`expr $P6_START + 128` (echo "unit: sectors"; echo "$PARTITION1 : start=$P1_START, size=$P1_SIZE, Id=83"; echo "$PARTITION2 : start=$P2_START, size=$P2_SIZE, Id=83"; echo "$PARTITION3 : start=$P3_START, size=$P3_SIZE, Id=83"; echo "$PARTITION4 : start=$P4_START, size=$P456_SIZE, Id=85"; echo "$PARTITION5 : start=$P5_EXT_START, size=$P4_SIZE, Id=83"; echo "$PARTITION6 : start=$P6_EXT_START, size=$P5_SIZE, Id=83"; echo "$PARTITION7 : start=$P7_EXT_START, size=$P6_SIZE, Id=83"; ) | /sbin/sfdisk $DISK -q --force (echo ; # The 'zerombr' directive is deprecated in EL6 # echo "zerombr"; # echo "clearpart --all --initlabel"; echo "part /boot --fstype $FSTYPE --size=$BOOT_SIZE --onpart=${PARTDISK}1"; echo "part /storedconfig --fstype $FSTYPE --size=$SCFG_SIZE --onpart=${PARTDISK}2"; echo "part /localdisk --fstype $FSTYPE --size=$LOCL_SIZE --onpart=${PARTDISK}3"; echo "part swap --fstype swap --size=$SWAP_SIZE --onpart=${PARTDISK}5"; echo "part /tmp --fstype $FSTYPE --size=$TEMP_SIZE --onpart=${PARTDISK}6"; echo "part / --fstype $FSTYPE --size=$ROOT_SIZE --onpart=${PARTDISK}7"; ) > $PARTITION_FILE } write_disk_partition_table() { if [ $VM_APPLIANCE -eq 1 ] ; then # All file system are aligned (divisible by 128) P1_START=128 # VMs needs 64KB alignment for better IO performance P1_SIZE=`expr $BOOT_SIZE \* 2048 / $cylinder_size \* $cylinder_size - $P1_START` # in 512 byte sectors P2_TENT_START=`expr $P1_START + $P1_SIZE`;P2_MODREM=`expr $P2_TENT_START \% $P1_START`; P2_ADD_SUBSET=`expr $P1_START - $P2_MODREM` P2_START=`expr $P2_TENT_START + $P2_ADD_SUBSET`; P2_SIZE=`expr $SCFG_SIZE \* 2048 / $cylinder_size \* $cylinder_size` P3_TENT_START=`expr $P2_START + $P2_SIZE`;P3_MODREM=`expr $P3_TENT_START \% $P1_START`; P3_ADD_SUBSET=`expr $P1_START - $P3_MODREM` P3_START=`expr $P3_TENT_START + $P3_ADD_SUBSET`; P3_SIZE=`expr $LOCL_SIZE \* 2048 / $cylinder_size \* $cylinder_size` P4_TENT_START=`expr $P3_START + $P3_SIZE`;P4_MODREM=`expr $P4_TENT_START \% $P1_START`; P4_ADD_SUBSET=`expr $P1_START - $P4_MODREM` P4_START=`expr $P4_TENT_START + $P4_ADD_SUBSET`; P4_SIZE=`expr $SWAP_SIZE \* 2048 / $cylinder_size \* $cylinder_size` P5_TENT_START=`expr $P4_START + $P4_SIZE`;P5_MODREM=`expr $P5_TENT_START \% $P1_START`; P5_ADD_SUBSET=`expr $P1_START - $P5_MODREM` P5_START=`expr $P5_TENT_START + $P5_ADD_SUBSET`; P5_SIZE=`expr $TEMP_SIZE \* 2048 / $cylinder_size \* $cylinder_size` P6_TENT_START=`expr $P5_START + $P5_SIZE`;P6_MODREM=`expr $P6_TENT_START \% $P1_START`; P6_ADD_SUBSET=`expr $P1_START - $P6_MODREM` P6_START=`expr $P6_TENT_START + $P6_ADD_SUBSET`; P6_SIZE=`expr $ROOT_SIZE \* 2048 / $cylinder_size \* $cylinder_size` else P1_START=$track_size # sectors in first track are reserved P1_SIZE=`expr $BOOT_SIZE \* 2048 / $cylinder_size \* $cylinder_size - $P1_START` # in 512 byte sectors P2_START=`expr $P1_START + $P1_SIZE`; P2_SIZE=`expr $SCFG_SIZE \* 2048 / $cylinder_size \* $cylinder_size` P3_START=`expr $P2_START + $P2_SIZE`; P3_SIZE=`expr $LOCL_SIZE \* 2048 / $cylinder_size \* $cylinder_size` P4_START=`expr $P3_START + $P3_SIZE`; P4_SIZE=`expr $SWAP_SIZE \* 2048 / $cylinder_size \* $cylinder_size` P5_START=`expr $P4_START + $P4_SIZE`; P5_SIZE=`expr $TEMP_SIZE \* 2048 / $cylinder_size \* $cylinder_size` P6_START=`expr $P5_START + $P5_SIZE`; P6_SIZE=`expr $ROOT_SIZE \* 2048 / $cylinder_size \* $cylinder_size` fi PARTITION1=${DISK}1 PARTITION2=${DISK}2 PARTITION3=${DISK}3 PARTITION4=${DISK}4 PARTITION5=${DISK}5 PARTITION6=${DISK}6 PARTITION7=${DISK}7 # note partition 4 is extended and unused, so 4/5/6 shift to 5/6/7 # add 128 additionaly for partition 5 start P456_SIZE=`expr $P4_SIZE + $P5_SIZE + $P6_SIZE + $P4_ADD_SUBSET + $P5_ADD_SUBSET + $P6_ADD_SUBSET + 128` if [ $USE_LVM -eq 1 ] ; then write_lvm_table else write_table fi } get_hwinfo validate_hwinfo calculate_partition_sizes write_disk_partition_table echo "***** " > /dev/console # Sleep long enough for user to read message sleep 8 %post echo "2.2.0.421" > /etc/gpce-release echo "2.2.0.421" > /etc/gpce-version echo "2.2.0.421" > /etc/ade-version rm -f /opt/system/etc/ade-mainapp.properties echo "ade.mainapp.name=ISE" >> /opt/system/etc/ade-mainapp.properties echo "ade.mainapp.description=Cisco Identity Services Engine" >> /opt/system/etc/ade-mainapp.properties echo "ade.mainapp.sysobjectid=1.3.6.1.4.1.9.1.1423" >> /opt/system/etc/ade-mainapp.properties echo "ade.mainapp.version=1.4.0.253" >> /opt/system/etc/ade-mainapp.properties echo "ade.mainapp.vm_ioperf_write=50" >> /opt/system/etc/ade-mainapp.properties echo "ade.mainapp.vm_ioperf_read=300" >> /opt/system/etc/ade-mainapp.properties rm -f /etc/issue rm -f /etc/issue.net chkconfig monit off chkconfig kudzu off chkconfig sshd off chkconfig sendmail off chkconfig rpcidmapd off chkconfig setup on chkconfig firewall on chkconfig install_apps off chkconfig smartd off chkconfig syslog off chkconfig rsyslog on chkconfig yum-updatesd off chkconfig crond off chkconfig rhsmcertd off /etc/init.d/syslog stop if [ -f /etc/rsyslog.conf ] ; then mv -f /etc/syslog.conf /etc/sysklog.conf ln -s /etc/rsyslog.conf /etc/syslog.conf fi /etc/init.d/rsyslog restart # For EL6 update boot message in init ramdisk. This is used by # plymouth for the text theme graphical boot ( cd /boot ; ls initramfs-*img | while read a_ramdisk ; do BOOT_DES=`grep ^ade.mainapp.description /opt/system/etc/ade-mainapp.properties | awk -F= '{print $2}' ` ; BOOT_VER=`grep ^ade.mainapp.version /opt/system/etc/ade-mainapp.properties | awk -F= '{print $2}' ` ; mkdir newrd ; cd newrd && zcat ../$a_ramdisk | cpio -i > /dev/null 2>&1 ; echo "$BOOT_DES release $BOOT_VER (Final)" > etc/redhat-release ; find . -xdev | cpio --quiet -o -H newc | gzip > ../$a_ramdisk ; cd /boot ; rm -rf newrd ; done ; ) # Final system prep before setup wizard /opt/system/bin/presetup.pl %end