How to repair your REAL Mac if you broke it with the chameleon bootloader.

This post is intended only for actual Apple (Mac) computer systems that are not booting due to accidental installation of the chameleon bootloader to the Apple computer system’s hard drive.

If you are one of the unlucky ones who ignored my numerous warnings or just accidentally pressed the wrong button while running the myHack installer from a real MAC here is an example of how to repair the partition scheme on a real MAC so that it will boot again – after accidentally installing the chameleon bootloader to the MAC’s internal hdd.

Note: I have not tested this myself – I’m not that adventurous when it comes to my real MAC, however these commands should work. Ultimately if nothing posted here works you will likely have to wipe the drive out completely and re-install OS X.

WARNING: Do not perform any of the following actions without backing up your critical data first. Fiddling with partition tables is dangerous. A simple typo could lead to complete data loss. You have been warned! [ You can backup critical data even if you can not access the system, if absolutely necessary, by removing the internal hdd and plugging it into another computer, the use of data recovery software may be required depending on circumstances. ]

GUID SOLUTION:

1) Boot your mac with an OS X Install DVD (doesn’t matter which version, whatever is installed on your system would be best).
2) Start Disk Utility
3) Select the OS X HDD/SSD that you screwed up (not specific partition)
4) Go to the Partition tab
5) Grab the lower right corner of your key partition and resize it a little bit (no matter how much/little you resize it as long as you change the partition size)
6) Click Apply. Relax, this will NOT erase your HDD/SSD, it only rewrites your GUID partition data that will fix your HDD/SSD.
7) Quit the Disk Utility and reboot.
8) Enjoy your restored Mac that should now boot normally!

MBR SOLUTION:

Boot your mac with an OS X Install DVD (doesn’t matter which version, whatever is installed on your system would be best) and use Terminal on it to run the following commands.

Once booted into the GUI, open a terminal and type

diskutil list

to get a list of all disks on your system. Assuming /dev/disk2 is your problematic disk with the MBR partition scheme, type

sudo fdisk /dev/disk2

to verify the current partitions on it (should list partitions on the disk, if not don’t worry it’s likely because of the chameleon bootloader). This command will not apply any changes. The drive with an “*” next to it is the active partition (if any). Now type

sudo fdisk -u /dev/disk2

which writes a new MBR (master boot record) while keeping current partition information.

In order to be able to boot from a partition, it must be flagged active. Type

sudo fdisk -e /dev/disk2

to open the drive in fdisk’s editing mode. It will possibly complain “could not open MBR file /usr/standalone/i386/boot0: No such file or directory”, this should be safe to ignore. The following transcript shows what to do next:

fdisk: 1> flag 2
Partition 2 marked active.
fdisk:*1> quit
Writing current MBR to disk.

You’re done! Cross your fingers and reboot your MAC…

If any of this is confusing to you please read the OS X fdisk man page for more information.

myHack Installer 1.0 RC4 Released

This version is now deprecated, consult the installer guide for a link to the latest version.

This release contains a number of improvements and new features.

Read full documentation here.

Changelog:

v1.0 RC4:

  • -Added “Chocolate Kernel”* which allows OS X 10.6 to be run on legacy Intel, AMD** & i5 processors.
  • -myHack Installer package now copies itself to the / of an installation device automatically.
  • -Added Snow Leopard port of lspci.
  • -Added native 64bit Snow Leopard build of IOATAFamily.kext for functional PATA (IDE) support.
  • -Updated pfix v1.1 to pfix v1.2.
  • -Updated PC EFI 10.3 to PC EFI 10.4.1.
  • -Updated default com.apple.Boot.plist to use EthernetBuiltIn=y.
  • -Refined and improved install scripts & the descriptions of each individual option.
  • -Important information regarding known issues embedded into installer “Read Me” section.

* For full release notes regarding the “Chocolate Kernel” please see the Downloads page.

** This kernel will run most AMD systems but it does not include on the fly CPUID patching so if you intend to use this on an AMD system you will need to obtain a third party tool to patch your binaries.

v1.0 RC3:

  • - Bugfix: PC EFI 10.3 was not properly installing over the Chameleon boot file in previous versions.
  • - Bugfix: OSInstall MBR MOD would sometimes not properly install when using RC2.
  • - OSInstall MBR MOD now checks for OSInstall.mpkg on target drive and is installed automatically.
  • - Graphics Enabler option added.
  • - Consolidated and simplified core options.

v1.0 RC2:

  • - Bugfix: Added permissions enabling script to post-install. Details posted on the v1.0 RC2 release page.
  • - Integrated OSInstall.mpkg & OSInstall framework into a single option.
  • - Changed openhaltrestart.kext option to selected by default.
  • - Added pfix v1.1 to installer.
  • - Improved kext descriptions.

v1.0 RC1:

Includes:

  • - Chameleon 2.0 RC3.
  • - PC EFI 10.3.
  • - Sample com.apple.Boot.plist for basic operation.
  • - Snow Leopard inspired myHack Chameleon boot theme.
  • - All of the kexts listed on the Downloads page.
  • - A number of bugfixes and snow leopard specific enhancements to the Chameleon installation scripts.
  • - Detailed descriptions of each custom option.

lspci Installer 1.0 Released

NOTE: You do not need this if you are using the myHack Installer.

This installer will install an x64 compatible Snow Leopard port of lspci. lspci is a popular UNIX utility that is used to display detailed information about the hardware devices in your system.

NOTE: This is for use with OS X 10.6 “Snow Leopard” ONLY – it is NOT compatible with previous versions of OS X.

To use type the following commands in a terminal:

For basic output type: lspci
For full list of advanced features type: lspci ?
To update the lspci hardware database type: update-pciids

Download myHack_lspci_Installer_1.0.mpkg.tar.bz2 here.

I was told that the original snow leopard port of lspci was done by the Evosx86 Team. My thanks go out to them for making this possible.

pfix v1.2 Released

This version is now deprecated, consult the downloads page for a link to the latest version.

This release contains important bugfixes.

Read full documentation here.

Changelog:

v1.2:

  • - Bugfix: When using tab completion to target a /Volume/SomeVolume it would include a trailing / – this would result in a double / [/Volume/SomeVolume//Extra for example]. A trailing / will now be trimmed automatically.
  • - Bugfix: sudo was missing from the start of the chown /Extra command – this would not present a problem to anyone who launched the script from the terminal with sudo ./pfix but it would cause a failure for anyone who ran it by double clicking it from the finder.

v1.1:

  • - Removed .sh extension and created executable format which can be double clicked in finder.

v1.0:

  • - First Public Release.