Jump to content

OSX86/PookyMacMan Mod CD 1.0


About This File

This is the Mod CD developed by PookyMacMan from the InsanelyMac.com Forum that is based off the OSx86 Mod CD. All credits and thanks go to PookyMacMan.




User Feedback

Recommended Comments

its a same as nawcom mod cd ??:confused-new:

look the script windowserver

#!/bin/sh

########################################

#

# Hey there,

# If you want to use this code for your

# own Boot CD or USB install media, I'm

# all cool with that, just please mention

# my name and/or meklort's name when explaining

# where you got the idea from, or what your

# install technique is based on. Thanks. :)

# -- nawcom

#

########################################

RAMDisk()

{

mntpt=$1

rdsize=$2

echo "Creating RAM Disk for $mntpt"

dev=`hdik -drivekey system-image=yes -nomount ram://$rdsize`

if [ $? -eq 0 ] ; then

newfs_hfs $dev

# save & restore fs permissions covered by the mount

eval `/usr/bin/stat -s $mntpt`

mount -t hfs -o union $dev $mntpt

#chown $st_uid:$st_gid $mntpt

#chmod $st_mode $mntpt

fi

}

workdir="/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Resources"

osxversion=`/usr/bin/defaults read /System/Library/CoreServices/SystemVersion ProductVersion`

prebin=( '\x01\x00\x85\xc0\x74\x63\x48\x8b' '\x01\x00\x84\xc0\x0F\x85\x81\x00' '\x00\x00\x85\xc0\x74\x62\x48\x8b' '\x01\x00\x85\xc0\x74\x5b\x8d\x83' '\x01\x00\x84\xc0\x0f\x85\x8d\x00' '\x01\x00\x85\xc0\x74\x58\x8D\x83' )

postbin=( '\x01\x00\x85\xc0\xeb\x63\x48\x8b' '\x01\x00\x84\xc0\x90\xe9\x81\x00' '\x00\x00\x85\xC0\xeb\x62\x48\x8b' '\x01\x00\x85\xc0\xeb\x5b\x8d\x83' '\x01\x00\x84\xc0\x90\xe9\x8d\x00' '\x01\x00\x85\xc0\xeb\x58\x8d\x83' )

umount /var/tmp

RAMDisk /var/tmp 48000 > /dev/console

mount -uw /var/tmp

cp -v /System/Library/PrivateFrameworks/Install.framework/Frameworks/OSInstall.framework/Versions/A/OSInstall /var/tmp/OSInstall.bak

RAMDisk /System/Library/PrivateFrameworks/Install.framework/Frameworks/OSInstall.framework/Versions/A 2048 > /dev/console

echo "Done." > /dev/console

echo "Mounting RAMDisk." > /dev/console

mount -uw /System/Library/PrivateFrameworks/Install.framework/Frameworks/OSInstall.framework/Versions/A

echo "Done." > /dev/console

echo "binpatching OSInstall framework." > /dev/console

for count in 0 1 2 3 4 5; do

perl -pi -e "s|${prebin[$count]}|${postbin[$count]}|g" /var/tmp/OSInstall.bak; done

mv /var/tmp/OSInstall.bak /System/Library/PrivateFrameworks/Install.framework/Frameworks/OSInstall.framework/Versions/A/OSInstall

echo "Done." > /dev/console

echo "Unpacking OSInstall.mpkg." > /dev/console

mkdir /var/tmp/mpkg_unpacked

cd /var/tmp/mpkg_unpacked

xar -x -f /System/Installation/Packages/OSInstall.mpkg

echo "Done."

echo "Removing GUID check and redirecting package locations." > /dev/console

echo "Applying fixes for the OS X $osxversion retail DVD." > /dev/console

mv ./Distribution ./Distribution.old

perl $workdir/distmod.pl > /dev/console

perl -ni -e 'print unless /eraseOptionAvailable/' Distribution

perl -pi -e 's/if \(system\.sysctl\(\"hw\.cpufrequency\"\) \&lt\; 866000000\)/if \(system\.sysctl\(\"hw\.cpufrequency\"\) \&lt\; 0\)/g' Distribution

perl -pi -e "s/var hwbeSupportedMachines = \[/var hwbeSupportedMachines = \[ 'OSX86Hack1\,1'\,/g" Distribution

rm ./Distribution.old

echo "Done." > /dev/console

pkgdev=`hdik -drivekey system-image=yes -nomount ram://4096`

newfs_hfs $pkgdev

mount -t hfs -o union $pkgdev /System/Installation/Packages > /dev/console

echo "Repacking OSInstall.mpkg." > /dev/console

xar -c -f /System/Installation/Packages/OSInstall.mpkg *

echo "Done." > /dev/console

cd /

rm -R "$workdir/mpkg_unpacked"

echo "Checking for LILO/GRUB on available disks..."

lilocode="4c494c4f"

grubcode="47525542"

rm /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/WindowServer

/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/WindowServer -daemon

Share this comment


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.