Samstag, 10. Oktober 2009

7.) [10.6] Setup the Chameleon USB-Stick

Finally the last step before you can start installing Mac OS X. I will show you how to setup the Chameleon USB-Stick. You need a Hardware UUID and must download this stuff as mentioned already here:
  1. Chameleon 2.0 RC3 (Chameleon-2.0-RC3-r658-bin.tar.gz)
  2. Kernel extensions and Chameleon support files (Link)
Insert the Chameleon USB-Stick you have prepared in step "6.) [10.6] Prepare the Chameleon USB-Stick" and save the two downloaded files on the Chameleon USB-Stick. To get rid of the "com.apple.quarantine" extended attribute launch the Terminal and run the following commands (the shell prompt is blue, the commands you have to enter are green):
[~] > cd /Volumes/Chameleon/
[/Volumes/Chameleon] > xattr -d com.apple.quarantine Chameleon_Support_Files.zip
[/Volumes/Chameleon] > xattr -d com.apple.quarantine Chameleon-2.0-RC3-r658-bin.tar.gz

Double Click each downloaded file so that the Finder will extract the content. This should give you the following files on the USB-Stick:


Adapt the Chameleon USB-Stick according to your hardware. Modify the Extra/smbios.plist as explained already here:
  • SMboardmanufactor: the mainboard manufactor
  • SMboardproduct: the mainboard type
  • SMmemmanufacter_X: the memory manufactor
  • SMmempart_X: the memory part number
  • SMmemserial_X: the memory serial number
  • SMmemspeed: the memory speed in Mhz
  • SMmemtype: the memory type DDR2=19, DDR3=24
Replace the Extra/DSDT.aml file with the patched DSDT for your mainboard. Configure the UUID you are going to use by modifying the kernel extensions Extra/10.5/Extensions/UUID.kext and Extra/10.6/Extensions/PlatformUUID.kext with right-click with the mouse and select "Show Package Content". Then edit the file Content/Info.plist in each kernel extension. Insert/Replace the UUID for the "key/value" UUID-key (10.5: UUID.kext) and PlatformUUID (10.6: PlatformUUID.kext).

10.5 UUID.kext/Content/Info.plist
   <key>CFBundleIdentifier</key>
<string>com.free.driver.UUID</string>
<key>IOClass</key>
<string>UUID</string>
<key>IOMatchCategory</key>
<string>UUID</string>
<key>IOProviderClass</key>
<string>IOPlatformExpertDevice</string>
<key>IOResourceMatch</key>
<string>SMBIOS</string>
<key>UUID-key</key>
<string>00000000-0000-1000-8000-001FD02E7359</string>

10.6 PlatformUUID.kext/Content/Info.plist
   <key>CFBundleIdentifier</key>
<string>com.superhai.driver.PlatformUUID</string>
<key>IOClass</key>
<string>PlatformUUID</string>
<key>IOMatchCategory</key>
<string>PlatformUUID</string>
<key>IOProviderClass</key>
<string>IOResources</string>
<key>IOResourceMatch</key>
<string>IOKit</string>
<key>PlatformUUID</key>
<string>00000000-1008-1000-8000-001FD02E7359</string>
You must also configure the cpu type you are going to use for your hackintosh in the CPUInjector.kext. If you also have a Intel Quad Core CPU, then you can leave it as it is, because it's preconfigured to use a Quad Core CPU. If not read this post and edit Info.plist of the CPUInjector kernel extensions and replace the value for cpu-type with the one for your CPU. Use the Base64 encoded value.

CPUInjector.kext/Content/Info.plist
   <key>IOProviderClass</key>
<string>IOPlatformDevice</string>
<key>entriesToAdd</key>
<dict>
<key>cpu-type</key>
<data>
AQU=
</data>
</dict>

To install Chameleon on the USB-Stick you must find out which disk identifier is used for your USB-Stick. In the still open Terminal run this command:
[/Volumes/Chameleon] > diskutil list
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *465.8 Gi disk0
1: EFI 200.0 Mi disk0s1
2: Apple_HFS MacOS X 400.9 Gi disk0s2
3: Microsoft Basic Data BOOTCAMP 64.6 Gi disk0s3
/dev/disk1
#: TYPE NAME SIZE IDENTIFIER
0: Apple_partition_scheme *930.9 Gi disk1
1: Apple_partition_map 31.5 Ki disk1s1
2: Apple_HFS asere 930.9 Gi disk1s2
/dev/disk2
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *1.9 Gi disk2
1: Apple_HFS Chameleon 1.8 Gi disk2s1
The command "diskutil list" list all disks and all of their partitions. In my case the disk identifier is "disk2" (marked red). The device is /dev/disk2 an the partition is /dev/disk2s1. Please use for all upcoming terminal commands your disk identifier! It could be different than mine. I will continue using disk2.

Now let's install Chameleon. Run these commands in the Terminal and do not forget to use your disk identifier. First you must remount the USB-Stick to get rid of the "noowners", "nosuid" and "nodev" mount options as explained already here:
[/Volumes/Chameleon] > cd
[~] > sudo -s
Password:
root [~] > sync
root [~] > umount -f /Volumes/Chameleon/
root [~] > mkdir temp
root [~] > mount_hfs /dev/disk2s1 temp
root [~] > mount
/dev/disk0s2 on / (hfs, local, journaled)
devfs on /dev (devfs, local)
fdesc on /dev (fdesc, union)
/dev/disk0s3 on /Volumes/BOOTCAMP (ntfs, local, read-only, noowners)
map -hosts on /net (autofs, automounted)
map auto_home on /home (autofs, automounted)
/dev/disk1s2 on /Users/asere (hfs, local, nodev, nosuid, journaled)
/dev/disk2s1 on /Users/asere/temp (hfs, local)
The mount command shows you that the USB-Stick (/dev/disk2s1) is mounted to temp without the "noowners", "nosuid" and "nodev" options. Now set the owner and group of all files and directories in the Chameleon Extra folder to root:wheel (0:0):
root [~] > cd temp
root [~/temp] > chown -R 0:0 Extra
Finally it's time to install Chameleon. Please note the "r" before the disk identifier. Using "rdisk" isn't a typo:
root [~/temp] > cp Chameleon-2.0-RC3-r658-bin/i386/boot .
root [~/temp] > chmod 755 boot
root [~/temp] > dd if=Chameleon-2.0-RC3-r658-bin/i386/boot1h of=/dev/rdisk2s1
2+0 records in
2+0 records out
1024 bytes transferred in 0.004469 secs (229138 bytes/sec)
root [~/temp] > fdisk -f Chameleon-2.0-RC3-r658-bin/i386/boot0 -u -y /dev/rdisk2
root [~/temp] > cd
root [~] > sync
root [~] > umount -f temp
root [~] > rmdir temp
Congratulations! You are done and can remove the USB-Stick now to install Mac OS X 10.6.

5 Kommentare:

  1. a couple of comments/questions:

    A - instead of diskutil list you can use df command (to get the disk identifier) whose output looks more readable to me.

    B - in order to experiment with different kext/DSDT untill we find the perfectly tuned one, are there specific steps we have to do? I mean shall we unmount/remount the Chameleon partition with specific parameter? shall we change ownership and then change it back?

    C- in which situations we have to rebuild Extensions.mkext and with which command? In addition to chameleon one, shall we also rebuild OS X startup cache. what command shall we use?

    thanks a lot!

    AntwortenLöschen
  2. Hi!

    I've got a few questions. Maybe you or some other reader can help with an answer...

    When checking the Chameleon package I could not find a DSDT.aml file. Will it work without, too?

    Up to now I found references that explain how to fetch the needed data using some Ubuntu Live CD.

    Is it possible to change the DSDT.aml file later on as I could not find any patched file for my mainboard yet (Asus P4T, Pentium D)?

    CU,
    Mészi.

    AntwortenLöschen
  3. This info is important: Chameleon has changed the way to boot in 32 bit mode. Where one would type -x32, it's now arch=i386.
    Had a lot of headache until finding this...
    -Alex

    AntwortenLöschen
  4. To Meszi,

    Have you actually tried to obtain the DSDT from your system using the Ubuntu Live CD ?
    When you do, follow aserebln instructions to disassemble and check what you get there.
    It may happen that some things may be correct (mine were all ok.. a Lenovo T60 laptop) and it may happen you have to actually make changes.

    AntwortenLöschen
  5. @Alex: Yes, I've decompiled it but I could not find anything comparable with what AsereBLN mentioned. Unfortunately.

    So I dropped and tried another manual ... that one from Simone (osx86sv.wordpress.com).

    I managed to get the installation pendrive running and installing on an Asus P5B. But on a P5GC it does not seem to work: The moment when the verbose view should switch to MacOSX' own "verbose lines" the screen becomes black/blank and nothing more happens.

    AntwortenLöschen