Chameleon Bootloader

Posted by Andrew Premdas Thu, 29 Oct 2009 23:43:11 GMT

Just spent several hours pooching around with Chameleon Bootloader on my Hackintosh. I know have working bootloaders on two different disks, which is reassuring. Still got a long way to go. Want to summarise what I've learnt so far.

Parts of Chameleon

To install on a hard disk you have to deal with 3 different loaders.

  • stage0 - disk loader (boot0 - locates active partition & loads the partition booter)
  • stage1 - partition loader (boot1x - partition booter that loads the stage2 booter)(boot1h for HFS)
  • stage1 - root loader (boot - stage 2 boot loader)

These terms may not be technically correct, but they reflect my limited understanding and the location things are installed to.

When booting from a bios the first thing you have to do is choose which disk to boot. This will then load a boot0 file stored at the beggining of the disk before anything else. We install this file with a command like

fdisk -f boot0 -u -y /dev/rdiskX

where /dev/rdiskX is the identifier of the disk we want to put the bootloader on.

Boot0 is installed at the beginning of a partition before the root file system. We do this with a command like

dd if=boot1h of=/dev/rdiskXs1

Finally in the root of the partition we are booting we install boot0. This will load up related files stored next to it which configure the boot loader and prepare to boot the OS. Here we can just copy the files to the root of the partition.

GUID MBR and EFI

GUID is the default way to format a hard disk with OSX. It creates a hidden 200mb partition at the beginning of the disk called EFI. This is the perfect place on a Hackinstosh to keep the stage2 boot loader and all its related files.

EFI Updates

From netkas, these are updated stage2 loaders. We put these in the root folder (ideally of the EFI partition)

Other Documents

There is a really good pdf that I found which dramatically improves the documentation for chameleon (the readme is far to terse).

IPC Final

Posted by Andrew Premdas Sun, 08 Mar 2009 06:44:19 GMT

Been having some problems with my main OSX86 installation, so looking to fix these by installing IPC final

Torrent Software Crashes

I'm speculating this is due to my Time Machine fix of applying IONetworkingFamily.kext version 1.6.0. This seems to be confirmed by the fact that my alternate install works fine with Transmission and UTorrent.

If I have to choose then Time Machine will go - haven't really learned how to use it.

Voodoo Kernel

I'd quite like to try the Voodoo kernel - I think its such a good project.

Settings

Some new stuff

  • - Language Translations
  • Kernels
    • + 9.5.0 Voodoo Kernel
  • Fixes and Patches
    • + Seatbelt.kext 10.5.5
  • DSDT Patches
    • + Patch DSDT
  • Alternate Bootloaders
    • + Chameleon with piccy
  • + Applications (install all)

osx86 migrating user account

Posted by Andrew Premdas Sun, 04 Jan 2009 05:27:26 GMT

I keep my main user account on a seperate partition. To get it back on a new osx installation I have to do ...

Before you do any of this make sure you've tested the installation

Get Account Back

In System Preferences | Accounts

  • create a new admin account with user name Andrew Premdas
  • right click on account to select 'advanced options'
  • change home directory to /Volumes/users/andy
  • disable automatic login, or set it to new account

Account Functionality

Not enough to get the account back, want to get it working as before - lots to do here.

Terminal Colors

These depend on SIMBL plugin, what I did was to copy relevant files from previous working distribution to same location in new distribution. Most of the files I keep in my account, however the following have to be in the system to work

/Library/InputManagers ...

So as root you need to copy them from an old system to the new one e.g.

sudo cp -R /Volumes/Kalway/Library/InputManagers /Library

TextMate

Git

Gems

Testing an osx86 installation

Posted by Andrew Premdas Sun, 04 Jan 2009 05:01:12 GMT

So I've been working on new osx86 installations and things are looking good, but are they? Here is a list of tests I need to perform to ensure things really are good

GetHostUUIDString: unable to determine UUID for host. Error: 35

Look for these messages using console

After installing plist edit pro run the following command in terminal to see if it generates an error 35

pledit /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist

USB Hot Plug

Plugin USB stick into front USB ports and see if it mounts in Finder

Clean Restart

Do a restart, see if machine goes cleanly back to bios, and if it does it quickly.

Time Machine

Choose a disk for time machine successfully

SATA Hot Plug

Plug in one of my external sata drives see that it mounts in Finder

iPCosx86 update

Posted by Andrew Premdas Sat, 03 Jan 2009 17:00:24 GMT

Refining installation of ipc has enabled me to make some serious shortcuts. You may need to refer to my other ipc posts to fully understand this procedure.

  • run the ipc diskimage from spare targetting an empty partition and choosing my standard settings
  • use UInstaller to
    • apply AppleYukon2.kext
    • apply ethernet and graphics string
    • apply IONetworkingFamily.kext (1.6.0)
    • apply IOAHCIFamily.kext

after these two operations I end up with a new bootable osx installation which takes < 10 mins to create.

iPC first boot and problems

Posted by Andrew Premdas Sat, 03 Jan 2009 15:02:26 GMT

We are now ready to boot our new osx86 installation. Choose the correct drive using you bios then when you get to the boot menu press any key. Select correct partition. IMPORTANT set boot flags to -f -v

Boot Flags

  • -f this tells OSX to load all kext files individually (normally OSX caches them to save time). You only really need to do this on first boot

  • -v this tells OSX to show you boot messages, instead of showing default grey screen. This is really essential if your having problems.

OSX Initial Setup

Keyboard Identification

OSX fails to identify keyboard just press OK. When it asks you to press key next to left shift press lots of keys - this will cause keyboard identification to fail (a good thing). Now choose US Keyboard, UK keymapping.

Forms

You can ignore registration form (just don't fill in details). Create a user as noraml

Problems

GetHostUUIDString: unable to determine UUID for host. Error: 35

This error is a real pain, it occurs all over the place, but is supposed to have been fixed by the ethernet string in EFI. I had to fix it by patching /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist as suggested here and here

  • use PList Edit Pro to edit this file

    sudo pledit  /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist
    
  • reboot and use Console to see that errors have gone

Orange Drive Icons

This happens because OSX has not properly recognised your drives as SATA (thinks they're external). Fix by applying IOAHCIFamily.kext using UInstaller.

Time Machine Error

TimeMachine won't let you choose a drive citing inability to find network interface to drive. This is fixed by replacing IONetworkingFamily.kext using UInstaller. Replace existing 1.6.1 with 1.6.0 - requires reboot.

iPC post installation

Posted by Andrew Premdas Sat, 03 Jan 2009 14:33:22 GMT

Once you've installed the iPC osx86 distribution, there are a number of system dependent things you will want to do. Here is what I do on my main system

System Specs

Asus P5B Deluxe, 4GB Ram, SATA Disks using Intel AHCI (ICH8), Marvell 88E8056 Gibabyte Ethernet, USB external sound card

Networking

Networking doesn't work after install because distribution is missing kext for the 88E8056. Best thing to do is to add a kext for it using UInstaller. Look for kexts on my spares partition

  • AppleYukon2.kext

Video, Graphics Strings and EFI

We didn't do anything to help our video work in our installation. It turns out that instead of installing kexts to get video to work you can use the EFI boot loader instead. What you have to do is put some settings into your bios using the bootloader. In theory this is pretty complex as you have to write settings in XML then convert them into a hex format, then embed ... (well its complex). However UInstaller can do all this for you so

  • check Apply Ethernet EFI String
  • check Apply EFI String for graphics card
    • select NVidia GeForce 7600 GT 256MB

Apply Changes

I wouldn't apply anything else apart from these two changes. Make sure you install them to the correct volume and don't apply anything else. Now you should be ready to boot the new installation

iPC osx86 distribution

Posted by Andrew Premdas Sat, 03 Jan 2009 13:43:50 GMT

This is my choice of distribution for osx86

Use Disk Image run from partition

Main benefit of this distribution is there is no need to use DVD's. You can do everything from the disk image.

Patching Image

Updates for the distribution are distributed as ppf files. You can add these to the diskimage (.iso) using ppf-matic. Then check the result by using md5

Running the Image

  1. Open with diskimagemounter (default just double clik) then double click Install Mac OS X
  2. Choose volume you want to install to (ENSURE ITS EMPTY!! - erase with Disk Utility)
  3. Customise

Settings Selections

This may change ...

  • - Language Translations
  • Drivers
    • USB Drivers
      • + Patched USB Drivers
  • Fixes and Patches
    • + Shutdown/Restart
    • DSDT patches
    • + DSDT patches - patch DSDT
  • + Applications (install them all, though you may only need Universal OSx86 Installer)

Post Installation

After There is quite alot to do before you want to try and boot your installation

Osx86 Overview

Posted by Andrew Premdas Sat, 03 Jan 2009 12:56:18 GMT

Running a hackintosh as my main desktop involves keeping on top of quite alot of knowledge, which I'm prone to forget. This combined with the rapid development of hackintosh technology and the vastness of the osx86 forums means I need to keep more documentation about what I'm doing. Here I'll do an overview

Multiple Drives, Multiple Installations

Ideally you need to have more than one drive and more than one partition on each drive to work with. This is so you can maintain a working installation you can boot to when you bork your other installations. All of the following are HFS partitions (so we can put really big files e.g. disk images on them)

  1. Spare - used to store disk images and as a dumping ground
  2. osx - aims to be my main osx86 installation
  3. osx-alternate - aims to be my secondary osx86 installation
  4. osx-alternate-x - another alternative on seperate disk

The main reason for this is speed. Booting an OSX DVD is very slow, so we want to do everything on hard disk. The nature of hackintosh installation is that you will require alot of reboots before you get things correct, there is also a fair chance you'll bork an entire drive and not be able to boot from it.

Useful Tools

Universal OSx86 Installer known as "UInstaller" is the main tool of choice, though its so powerful you have to be very careful with it. This should be installed on all you osx installations

PList Edit Pro - helpful for editing plists, particularly the command line tool which is installed on first usage

Booting Drives

If you've borked a drive and can't boot it use UInstaller to install PC_EFI to volume (currently v9 Chameleon 1.0.12). This should get you back to at least having a boot menu

Updating hackintosh

Posted by Andrew Premdas Fri, 02 Jan 2009 13:42:07 GMT

A Long Awaited Update

I've put of updating my hackintosh for ages, but having finally got my replacement raptor from Western Digital, I've bitten the bullet, and in the processed destroyed my old desktop account!!

The osx86 distro I'm using is ipc, see also osx86 forums

The best thing about this distribution is you can just run the iso from a hard disk and install directly to a partition. This is very quick. The worst things about the distro is that its a beta, its cutting edge (10.5.6), it has loads of options and little documentation and it has some bugs.

However I've been able to get it working as follows

Simplest IPC Installation

Run iso and do following with settings

  • deselect Language Translations
  • Drivers | NVidia | NVdarwin 256 MB (works with 2 monitors - nvinject doesn't)
  • Fixes and Patches | DSDT | Patch DSDT

The other setting which I've tried and think I should use is

  • Fixes and Patches | Shutdown/Restart

Shutdown is now working on this install, but it seems slow

Install the above to an "empty" partition and then boot.

Setup

Have to

  • get through the installation garbage
  • get networking working
  • migrate settings

Because we are migrating, the initial account you create should be disposable and not clash with an account being migrated across.

Modifying Network Kext

Support for both my adaptors is broken in this distro, so I had to modify the 'Info.plist' of the AppleYukon2 plugin inside the IONetworkingFamily. This should be included in next update, so I'll not detail.

see post 4