User:Outragedtony/Creating Chameleon Boot Media
This guide explains how to create CD's and USB drives booting Chameleon 2 with different operating systems. Basic understanding about how Chameleon works is expected. Before creating the boot media, collect the configuration files, kext's and other customizations you will need and organize these files as Chameleon expects them. In short, you should have one Chameleon root folder containing the stage2 bootloader file and the Extra/... folder with all the other stuff inside. Download Chameleon 2 from here.
The Chameleon Boot CD allows you to install Mac OS X from a retail DVD. After Chameleon is booted, switch the CD with the retail OS X DVD and press F5 to rescan the optical drive. Make sure to have Chameleon's "cdboot" stage2 in Chameleon's root folder (instead of "boot" which is used for HD-installation), and set "Rescan" and "Instant Menu" to yes in com.apple.Boot.plist. The CD can also boot operating systems on the hard drive, essential to get access if you somehow screwed up your installation.
Mac OS X
1. Open Terminal.app and create the preboot image (in this example, Chameleon's root folder is ~/Desktop/newiso/):
# hdiutil create -size 15m -fs HFS+ -volname Preboot -layout MBRSPUD -attach ~/Desktop/newiso/Extra/Preboot.dmg
2. Create a bootable iso:
# hdiutil makehybrid -o ~/Desktop/Chameleon.iso ~/Desktop/newiso/ -iso -hfs -eltorito-boot ~/Desktop/newiso/cdboot -no-emul-boot -hfs-volume-name "BootCD"
3. Burn Chameleon.iso
1. Get the open-source burning tool InfraRecorder
2. Select Data CD and add the Chameleon files (cdboot & Extra folder)
3. Go to File -> Project Properties -> Boot
4. Add Chameleon's "cdboot" stage2 and set Emulation Type to "None"
5. Burn the CD
1. Use mkisofs to create a bootable iso. Run the following command from the level containing Chameleon's root folder (newiso):
# mkisofs -R -b cdboot -no-emul-boot -boot-load-size 4 -boot-info-table -o chameleon.iso newiso
2. Burn chameleon.iso
Bootable USB Drives
Chameleon USB keys can not boot the retail OS X DVD, but they come in handy as rescue tool to boot into a borked installation. Similarly, if you want to play safe, use them to test new kexts and other customizations for compatibility before applying them to your main chameleon installation. In this case, the stage2 loaders for HD's must be present ("boot" instead of "cdboot") in the Chameleon root directory.
For simplicity, this example uses a single Fat32 formatted partition and MBR. If you experience problems, try with HFS+ partition and/or GPT layout (remember to use boot1h stage1 loader for HFS+ partitions). gdisk is a great tool for creating GPT partition tables under linux.
1. Format the Usb stick to F32:
# mkfs.vfat -F32 /dev/sdx1
2. Copy the contents of Chameleon's root folder:
# cp -r Chameleon/newimg/* /mnt/usb/
3. Unmount the Usb stick:
# sudo umount /dev/sdx
4. Install Chameleon's stage0 boot loader to the usb device:
# dd if=Chameleon/i386/boot0 of=/dev/sdx bs=440 count=1
5. Install Chameleon's stage1 f32 boot loader to the usb partition:
# dd if=/Chameleon/i386/boot1f32 of=/dev/sdx1
Edit .plist files with Windows
USB key as kext testing ground
... . . . .