Installing VMWare ESXi 6 to MacPro 1,1

Items needed:
VMWare ESXi 6.0 installer
VMWare Fusion or player
ESXi 5.0 boot files macpro efi boot files.zip
———————————————————————————-
Create VM in VMWare fusion building to USB attached internal drive.
*Be sure to chose USB drive in the setup
The build shouldn’t take but a couple of minutes.

Once complete mount the /boot partition on your mac
“diskutil list” and figure out what disk is your ESXi
————————– this is my display ——————

/dev/disk6 (external, physical):
#:                       TYPE NAME                    SIZE       IDENTIFIER
0:      GUID_partition_scheme                        *160.0 GB   disk6
1:                        EFI ESXi                    4.2 MB     disk6s1
2:       Microsoft Basic Data                         262.1 MB   disk6s5
3:       Microsoft Basic Data                         262.1 MB   disk6s6
4: 9D275380-40AD-11DB-BF97-000C2911D1B8               115.3 MB   disk6s7
5:       Microsoft Basic Data                         299.9 MB   disk6s8
6: 9D275380-40AD-11DB-BF97-000C2911D1B8               2.7 GB     disk6s9
—————————————————————————————–
Type “diskutil mount /dev/disk6s1” or whatever disk is yours
once mounted open and replace the following files with the files from the link above
/Volumes/EFI/BOOT/BOOTIA32.EFI
/Volumes/EFI/BOOT/BOOTx64.EFI

/Volumes/EFI/VMware/mboot32.efi
/Volumes/EFI/VMware/mboot64.efi

back to the terminal and type “diskutil unmountDisk /dev/disk6” where it is your disk not the partition

Unplug and install in your ancient MacPro 1,1 (yes this says 2,1 but it is really a 2006 1,1) just like my early 2009 Mac Pro is a 6-core 3.33 GHz 🙂
Enjoy
screenshotvmware

BASH script unsplit for linux and mac

#!/bin/bash
#  Script.sh
#
#  Created by Marc Levine on 5/2/12.

FILES=*
for f in $FILES 
do
  
  # take action on each file. $f store current file name
	filename=$(basename $f)
	extension=${filename##*.}
	filename=${filename%.*}
	e2=${filename##*.}
	if [ "$extension" != "par2" ] && [ -f "$f" ] && [ "$e2" == "rar" ]
	then

	#echo "Processing $filename "
	cat $f >> $filename
	fi
done

Bash script to replace a string within a file

#!/bin/bash
# command line arguments are 1 search string and 2 the replacement
# handy for replacing ip addresses in host files
# example
# strreplace.sh 192.168.0.2 10.0.0.4
for f in *
do
  echo "sed -i 's/$1/$2/g' $f" #let us know what we are about to screw up
  sed -i "s/$1/$2/g $f" #making it happen
done

BASH while loop

#!/bin/bash
# create while loop that starts at x and ends at y
# good for creating folders

if [ $# -eq 2 ]; then #if no arguments then prompt for one<!--?prettify linenums=true?-->
  x=$1
  y=$2
else
  echo -n "Where to begin:"
  read x
  echo -n "Where to end:"
  read y
fi

while [ $x -le $y ]
do
#action
# do something here
 echo "mkdir IS4560_Week$x"
##
  ((x++)) #increment x
done
echo "All done"

BASH script to lookup hostname on ip address

This script will check the hostnames on a block of IP addresses and randomly change DNS servers.


#!/bin/bash
# Marc Levine

#

if [ $# -eq 1 ]; then
IPRange=$1
echo -n "Please enter your log file name: "
read logfile
elif [ $# -eq 2 ]; then
    IPRange=$1
    logfile=$2
else
        echo "Please enter the IP range in slash notation ex:10.0.0.0/24"
        echo -n "CIDR Notation: " #the echo -n will write without a newline
        read IPRange
        echo -n "Please enter your log file name: "
        read logfile
fi
echo "Please sit back and relalx while this script runs"

function randDNS {
    case $1 in
        1)
            dns="8.8.8.8"
        ;;
        2)
            dns="8.8.4.4"
        ;;
        3)
            dns="209.244.0.4"

        ;;
        4)
            dns="209.244.0.3"

        ;;
    esac

}

#check hosts to see if they are live using nmap

ipString=`nmap $IPRange -n -sP | grep report | awk '{print $5}'`

read -a ipArray <<<$ipString

for ipHost in "${ipArray[@]}"
do
echo "Checking IP Address:" $ipHost

#generate random number to change dns server
rand=`echo $RANDOM % 4 + 1 | bc`
randDNS $rand
#echo dig @$dns +short -x  $ipHost
hostName=`dig @$dns +short -x  $ipHost`
unset -v dns
#output to file
echo "$ipHost,$hostName" >> "$logfile"
done