OS X – Page 2 – jozefmares.com
Home Tags Posts tagged with "OS X"
Tag:

OS X

My post series about building true Mac-based workstation is coming to the end. Hack Pro has been working fine but one last thing was not done – sleep.

It wasn’t deal breaker but I like it when things work just like a charm. So I needed to add a little magic to boot process of my Hack Pro.

But first things first – check my hardware in this post as ways how to achieve correct sleep vary. This post is just about my motherboard and setup.

I hoped that my motherboard will work without patching DSDT but this is just not true. You need custom DSDT for Asrock Z68 Pro3-M, where you will patch wake function. Computer goes correctly to sleep but wont wake up.

First – make sure you have working hardware (sound card, ethernet, wifi, system definition and so on).

Second – try reboot few times to make sure everything is working. Boot with -v (check these boot flags) and check everything is working as expected.

Got it? Let’s go!

Get your copy DSDT Editor. You know what is DSDT is, right? You know how to work with it? If not, read something about it – you can harm your computer. :)

Patching DSDT for Asrock Z68 Pro3-M is very easy. Just extract DSDT from your machine, find line containing something like this:

PCI0.SBRG.SIOW (Arg0)

and delete it. Your line may vary, try search in file. Build DSDT.aml, copy it to /Extra and reboot.

Your machine should now sleep and resume like native Macs.

You can find few obstacles during basic steps with your Hackintosh. This post covers what you can do to resolve ones.

Your Hack Pro won’t boot after install on integrated graphic adapter

Go to BIOS / UEFI and change primary graphic adapter to discrete (PCI, PCI Express). I haven’t dig into problem but I think it has something with GraphicsEnabler.

Your Hack Pro won’t boot after install at all

You should try to boot with -v option to see what is going on. Usually if there is a problem with kernel extension (kext) you can try to boot with -x -v.

You see error with AppleIntelCPUPowerManagement.kext

You did not installed some utils from Multibeast like patched kexts. You do not need to reinstall whole system as some forums suggests. Just boot with install USB key, mount drive (it is in top menu – you need to remount it to read-write mode), start terminal and execute:

mv /System/Library/Extensions/AppleIntelCPUPowerManagement.kext /Users/YOUR_USERNAME/

Reboot with -f parameter passed to bootloader.

You see error related to ACPI_SMC_PlatformPlugin

You can even see in boot log (if you are debugging some problem always boot with -v):

ACPI_SMC_PlatformPlugin: :start - waitforservice(resourcematching(appleintelcpupower management) timed out...)

Try pass these parameters to boot loader:

PCIRootUID=1 -v

Sometimes is restart only thing you need.

You see just spinning wheel during boot

Try booting with GrahphicsEnabler=No

I’m desperate

Ask on forum, but give people informations like your hardware, OS X version, boot parameters, what you have installed from Multibeast and so on. Good luck!

You can try these forums and sites for example:

tonymacx86
InsanelyMac
Olarila

Recently, I felt in love with Homebrew as it is far better way to manage apps then Fink and Ports I used before.

I want to manage my Homebrew apps with Puppet and this is how I’m doing it.

Some research before coding and found this Homebrew module on github.

Install module wherever you want (depends on setup type – are you standalone or client/server driven?) and we are going to configure it.

I renamed module to osx-homebrew as I want every OS X specific modules visible by simple ls. So, where I type osx-homebrew you will have plain homebrew.

I have now for testing one Puppet master in virtual machine (this workflow will change soon) thus I installed module to $puppet_dir/modules on my master.

In node definition file (in my case only site.pp for now) configuration looks like this:

node 'hack-pro' {
class { 'osx-homebrew':
user  => 'jozef',
}

$pkglist = ['detox', 'nmap', 'git']

package { $pkglist:
ensure   => installed,
provider => brew,
require  => Class['osx-homebrew']
}
}

After test run I found one error:

Error: Could not prefetch package provider 'brew': Could not list packages: Execution of '/usr/local/bin/brew list --versions' returned 1: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/pathname.rb:853:in `expand_path': couldn't find HOME environment -- expanding `~/Library/Caches/Homebrew' (ArgumentError)
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/pathname.rb:853:in `expand_path'
from /usr/local/Library/Homebrew/global.rb:22:in `cache'
from /usr/local/Library/Homebrew/global.rb:41
from /usr/local/Library/brew.rb:18:in `require'
from /usr/local/Library/brew.rb:18

Unfortunately this error comes from changes in Puppet 3.X – there was introduced change where Puppet stripes $HOME variable.

You can find hotfix here.

Download it on Puppet master (in my case, find your own install path) to:

wget https://raw.github.com/nanliu/puppet-homebrew/89e5eb7408b13a87f2d229e3b023deca835201d8/lib/puppet/provider/package/homebrew.rb -O ./modules/osx-homebrew/lib/puppet/provider/package/homebrew.rb

In next run on Puppet client you will spot this:

[jozef @ hack-pro ~]$ puppet agent -t
Info: Retrieving plugin
Info: Loading facts in /Users/jozef/.puppet/var/lib/facter/has_compiler.rb
Info: Caching catalog for prg1
Info: Applying configuration version '1361584588'
Notice: /Stage[main]//Node[prg1]/Package[git]/ensure: created
Notice: /Stage[main]//Node[prg1]/Package[nmap]/ensure: created

Win!

One warning: this approach assumes you have compiler installed. If you are compiler-free you can install it with osx-homebrew module:

class { 'homebrew':
command_line_tools_package => 'command_line_tools_for_xcode_os_x_lion_aug_2012.dmg',
command_line_tools_source  => 'http://puppet/command_line_tools_for_xcode_os_x_lion_aug_2012',
}

You should notice that you must have command line tools pre-downloaded as Apple requires Apple ID to download them.

Automation of DMG files install and download security will be covered in some of next posts, for now you are on your own. :)