InfiniteMac OSx86  


 
 
Thread tools Display modes
Prev Previous Post   Next Post Next
  #1  
Old 05-07-2009, 05:15 PM
thorazine74 thorazine74 is offline
 
Join Date: May 2009
Location: Spain
Posts: 411
How to create & customize a Retail Installer on a USB Drive with Chameleon 2 RC1

This pretends to be a simple guide with pictures to install Leopard Retail from a USB drive to a hard disk using Chameleon 2 RC1.
[Updated 15/05/2009]: It involves using Chameleon2 RC1 to boot a copy of a Retail DVD on a USB Drive, install from there to a hard disk partition, boot the newly installed partition from the same USB Drive, and perform the necesary kext/kernel/chameleon installation over the HD partition to make it able to boot from it independently (it could also be posible to keep the USB Drive as the boot device and dont touch the partition with the retail installation at all but I havent tested this scenery).
It is assumed you know what kexts your specific hardware needs to boot and work as you would need to provide them for the USB drive to boot, this is meant to be a general guide, not specific for any hardware. Its supposed to be a replacement for boot132 methods where you dont have a ready made dvd and need to create one, with this method you can easily customize the kexts used during installation just by copying them to the USB drive instead of creating custom isolinux images. Also it can be useful when you have troubles with distros that doesnt support a specific SATA/IDE Controller and, instead of modding the distro DVD to inject the missing kexts, it would be easier to mod the retail with the storage controller's kexts you need to boot.
It has been tested on a GA-73PVM-S2H board (nForce 630i/Geforce 7100 chipset, C2D E8200, Geforce 8600 GTS), installing from a generic SanDisk USB Stick to a SATA AHCI hard disk partition in MBR format, using the vanilla kernel.
This is my first time installing retail so please correct any mistakes or stupidities I may have done but this worked for me at first try so I'm sharing it to help other people install retail.

REQUIREMENTS:

Hardware:
A 8 Gb USB Drive (smaller will do if you remove some installation packages)
Being able to boot from USB (most motherboards will, need to configure BIOS to select device boot order)
Software:
Chameleon 2.0 RC1 Installer
Leopard Retail DVD/DMG (tested with Leopard 10.5.6 - 9566 Build)
An existing installation of Leopard (doesnt need to be the same computer)
STEP 1: COPYING THE INSTALLATION DVD/DMG

You need to repartition the USB drive and dump the retail installation media to the DVD drive using Disk Utility.

A) Erase the USB Drive:

Plug in the USB Drive.
Open Disk Utility and select the USB Drive in the left:


Click on the Partition tab and select Volume Scheme: 1 partition:


Click on the Options button and make sure the Master Boot Record option is selected:




It should be the default but its mandatory for the USB drive to boot so better to be sure.
The Volume Format should be Mac OS Extended Journaled but its selected by default.
You can name it something like "Mac OS X Install USB" to avoid mistaking it.
Click on the Apply button and wait while the whole USB drive is repartitioned into a single MBR partition with HFS+ format.

B) Copy install media to the new USB partion:

Insert Mac OS X Retail DVD disk or mount the corresponding DMG image or just drag it to Disk Utility.
Select the USB Drive on the left and click on the Restore tab.
You have to select the Mac OS X Install DVD as the source and the Mac OS X Install USB as the Destination, dragging them from the list of units on the left to the corresponding field on the right (or by selecting each of them as Source or Destination in their respective context menu).


Select the Erase destination option and click Restore.
This will take a while as it will copy the whole DVD to the USB.

STEP 2: EDIT THE OSINSTALL.MPKG TO ALLOW INSTALLATIONS ON A MBR PARTITION

[Updated 15/05/2009]: By default the Retail DVD doesnt let you install over a partition in an MBR partitioned disk, when you select the partition to install it just gives you the choice to Erase the disk into a GPT partitioned format.
If you already have a GPT partitioned disk or you dont mind repartitioning that way with Disk Utility you dont need to do anything and can use the Retail Install as it is.
But if you need to install into an already existing MBR partition and you dont want to erase the whole disk or you just simply dont want to use GPT, you need to edit a file in the retail dvd to allow that.
Basically you have to extract the contents of the OSInstall.mpkg file with a XAR compressor command, edit the (text file) named Distribution contained inside changing directive that says eraseOptionAvailable='true' into eraseOptionAvailable='false'.
And compress all the files you extracted back into a new OSInstall.mpkg using XAR again.
You can follow the specific steps detailed in this thread (part b)
Instead of compiling XAR compressor by yourself you also can get a binary from this page. Keep in mind that there is already a xar command in Mac OS X but its not v1.5.2, make sure you are using the right version you have installed (find them all with "which -a xar" and find the version of each with "/full/path/xar --version" and use the full path to the right version when performing the decompression and compression).
Here its an already edited OSInstall.mpkg taken from Mac OS X Retail 10.5.6 (9G66), it may work with other versions too but its not tested.

You just have to replace the OSInstall.mpkg in the USB Drive located in with the new one edited. Keep a backup copy of the original just in case.
(remember you need to be able see hidden files in the finder to do that).




STEP 3: MAKE THE USB DRIVE BOOTABLE

Right now you have Leopard Installer on the USB but you are not able to boot from it yet.
What you need is simply to install Chameleon Boot Loader onto it to make it bootable.
For this just launch Chameleon official installer and follow the prompts until you reach the page where you can Choose Install Location. Click that button and make sure you select the same USB drive you want to boot from on the list:



STEP 4: CUSTOMIZE CHAMELEON CONFIG ON THE USB

The USB Drive is already bootable but you need to configure certain things to be able to boot the Install DVD succesfully.

A) Kexts:
You need to add all the kexts you need to the Extra\Extensions\ folder on the USB Drive.
1. Mininum (always required) ones:
- AppleDecrypt.kext or dsmos.kext
- IntelCPUPMDisabler.kext or a generic Disabler.kext to avoid AppleIntelCPUPowerManagement.kext crashes.
- You should need no SMBIOS enabler because I think Chameleon 2 already does that.
2. PS/2 Keyboard and Mouse/Trackpad support:
Either VoodooPS2Controller.kext or APCIPS2Nub.kext+ApplePS2Controller.kext (just one of them), of course not needed if you use USB Mouse & Keyboard).
3. Storage Controller support:
This will vary depending on what board you are going to install, if its not natively supported by Vanilla Leopard you need to add its kexts. Keep in mind that you only need to see the destination disk in the installer, so if for instance you are installing to SATA, you dont need IDE support even if you have an IDE DVD because it will not be used during installation.
4. Other kexts you may need during installation:
I'm not sure if any graphics kexts are needed to boot the graphical installer, for my NVIDIA card its not needed, I dont know about ATI.
[Updated 21/05/2009]: Remember to modify kexts' info.plist OSBundleRequired property to Root if needed (VoodooPS2Controller.kext needs this, for instance). The "Root" value seems to be required for any kext to load successfully from /Extra/Extensions.
If you are not using legacy (plist-only) kexts but modded ones that overlap Apple's originals present in /System/Library/Extensions (for instance, a full modded AppleIntelPIIXATA.kext or IOATAFamily.kext with a binary instead of just LegacyApplePIIXATA.kext) I think you also need to increase the version properties in each info.plist so the ones in /Extra/Extensions get favored over the ones in /System/Library/Extensions on the loading queue.

B) Custom Kernel:
If your system can boot the vanilla kernel (AMD, i7), you also need to install the Voodoo kernel to the USB Drive.
I'm not using it at the moment but I think the mach_kernel.voodoo file has to be in the root of the USB drive.
You may also need to include the System.kext that comes with Voodoo Kernel (in Extra\Extensions\ folder), but I think its only needed for proper USB hotplug support (not needed for just USB detection).

C) com.apple.boot.plist customizations:
Follow Chameleon's help to configure it accordingly to your system (for instance you need to specify the voodoo kernel here if you want to use it).

D) smbios.plist customizations:
I think this is not needed for installation, at least for my system, but if you need to set specific SMBIOS values edit this file.

E) Custom DSDT:
You can also include a modded DSDT.aml file, I think it goes in Extra too but I havent tested (if you use one you should not even need to include a disabler kext for AppleIntelCPUPowerManagement). This is not tested by me either.



I think thats all, Chameleon its too new so if I've missed something please correct me.

STEP 5: BOOT AND INSTALL FROM THE USB DRIVE

With this you can restart the computer, configure your BIOS accordingly and boot from the USB drive.
You should see Chameleon menu and it should select the boot device by default.
Just press Enter or better press Arrow Down to make the Options menu appear and select the option to boot in verbose mode to see whats going on if something goes wrong.
You can also type kernel or booting parameters there if needed, just read the help.
The Mac OS X Installation should start, just follow the typical installation procedures from the other guides.
Remember that you wont be able to install into a MBR partition by default, you would need to mod the OSInstall.mpkg on the DVD for that. There are also guides for that in the forum.
If all goes well the installation will complete in about 10 minutes (depending on what options you choose) but it will complain at the end that it failed because it couldnt make the destination volume bootable.

STEP 6: FIX INSTALLATION VOLUME

You should have Mac OS X installed on the destination drive/partition but you are not able to boot from it on its own.
You can however boot from the same USB Drive you have used from installation and when prompted by the Chameleon Menu, select the destination partition where you installed Leopard instead of the Default "Mac OS X Install USB".
The new Leopard installation should boot to the desktop and when you are there you need to install Chameleon again but now on the Hard Disk partition and copy the extra extensions (and kernel) you have used on the USB drive the hard drive, same as you would do with boot132 installation methods.
[Updated 15/05/2009]: Keep in mind that if you are using voodoo or other kernel you may need to specify it in the chameleon's com.apple.Boot.plist configuration so the mach_kernel.voodoo file from the USB drives is used instead of the vanilla mach_kernel in the HD partition. You can also copy it to the destination partition before booting from replacing vanilla mach_kernel. I'm not using voodoo kernel so I cant give detailed instructions, pleaser refer to the Chameleon 2's threads for more help on how to specify a custom kernel when booting an HD partition from an USB Drive.

Last edited by thorazine74; 05-22-2009 at 10:24 AM.
Reply With Quote