Login Main site Create account

12.03.2008 22:34

How Google's search results can ruin your whole day...


It was one of these days when I had nothing better to do at evening than googling around without any special reason. This day was yesterday, BTW, and suddenly I stumbled upon a website describing a method of getting OSX installed on nearly any x86 based PC. I wanted to write this article completely on my new hackintosh, but I just recognized that some of the important keys for writing this blog entry don't work, like f.ex. < or > as well as some other things, so stay tuned, I'll switch back to my other PC and will continue this article in a second...

Well, back to life.
I'd like to summarize the steps needed to get this beast installed (for educational purposes only, of course, doing things like this is illegal as you might have guessed).

First of all, get the patched installation medium of your choice (I chose iATKOS v1.0ir2 which worked quite fine on my system) and burn it to an empty DVD-R.
Boot your system off this medium and follow the onscreen instructions. Before "Agree"ing to the License statements, click on "Utilities" -> "Disk Utility" and create a volume for your OSX installation. Be careful while doing this, you can easily erase all the data on your harddisk(s) with one wrong click!
I for myself didn't want to kill my notebook and therefore I used a currently unused notebook lying around at my desk at work for this experiment. It's a Lenovo Thinkpad R60e, nothing special, but it contains hardware that seems to be fully supported for osX86-like experiments...
When using the entire disk for your OSX installation, make sure to choose the MBR partition type (no Apple or GUID stuff, MBR is just fine) and create a new partition (or format an existing one dedicated to your new OSX installation) with the Apple HFS+ filesystem.
As I've gone about more than ten times through this installation process today I can say that it doesn't matter what filesystem type + options you choose, I decided to stick with "Mac OS Extended (Case-sensitive, Journaled)".

Close the disk utility and read the installation instructions and hints carefully. At this point it is good to know what hardware _EXACTLY_ is built into your target system. I booted a linux live CD prior to installing OSX on this system to get the necessary information. You should print out or write down the output of the following commands just in case:
1. Determine your CPU type and the available extensions
cat /proc/cpuinfo

Pay attention to the "flags" and "model name" sections.

2. Your builtin extension cards and chipsets
lspci

Note the chipset of your graphics card, sound card, wired and wireless
NICs as well as the motheboard chipset.

3. All other relevant information that might help you
dmesg 

Ok, writing down dmesg isn't funny, but you know what you're looking for

4. MAC-Adress of your wired NIC
ifconfig eth0 | sed -n 's/.*HWaddr \(.*\)/\1/p'

This is only needed if your wired NIC isn't supported out of the box and
if the driver to be used has the zero-MAC issue (e.g. after initialization,
the NIC has its MAC address set to 00:00:00:00:00:00)
If anyone is interested in the outputs for my Lenovo Thinkpad R60e, here are the files:
Now click "Agree" and choose the destination partition to install OSX to (should now be visible in the wizard after formatting it with HFS+). Before hitting the "Install" button click on "Customize" to make changes to the packages and patches being installed.
I can't tell you what to choose here because that depends heavily on the hardware being used, but for the Lenovo Thinkpad R60e, the following options worked:
[X] iATKOS v1.0i Main System
[-] Bootloader
    [X] Darwin x86 bootloader
    [ ] Darwin EFI
[ ] Patches
[-] Drivers
    [ ] VGA
    [-] System
        [ ] S-ATA
	[X] AppleSMBIOS.kext netkas
	[X] Intel Speedstep
	[ ] Ext2fs
    [-] Network
        [X] IO80211Family.kext 10.4.5
	[X] Wireless patch
Now apply these settings, click install and wait for about 20 to 30 minutes for the installation to complete.

After reboot, try to pull out the DVD to see if the system is able to boot from your harddrive. Mine was not and so I had to look for a solution to this problem which I found here. This howto was written for getting the GUID bootloader fixed so it needed a few adoptions to make it fix the x86 MBR bootloader. Here's the magic:
1. Boot with the DVD
Insert the iATKOS boot DVD and wait for the Darwin/x86 prompt to appear

2. Start a rescue shell
Press F8, then type `-s` at the prompt

3. Change to the bootrecords directory
cd /usr/standalone/i386

4. Copy an image of the partition boot record to your OSX partition
dd if=boot1h of=/dev/rdiskXsY bs=512 count=1

(where X is the disk number and Y is the partition number on which you installed Leo)

5. Copy an image of a valid MBR to the MBR of your hard disk
dd if=boot0 of=/dev/diskX bs=400 count=1

(where X is again the disknumber)
If you already have a bootloader installed in the MBR and want to include
the Darwin/x86 bootloader into the existing bootloader have a look at the
many {dual,triple,quad}-boot HOWTOs available on the osX86 project wiki.

6. Reboot the system
reboot

Take out the DVD, your system should now boot off the disk
If this didn't work for you, don't worry, you can still boot your installed system with the help of the installation DVD. Simply leave it in the drive and wait for the timer to count down, it will then boot your installed system.

Click through the "Customize your MAC" dialogues and try to configure your network. Configuring the network didn't work for me (neither the wired nor the wireless connection), because the wired NIC (Broadcom BCM5751) wasn't supported by the installed kernel and the wireless NIC won't let itself configure with this network setup thinggie, so I chose "This Mac is not connected to the internet" and continued.
So now let's have a look at my NICs.
I found a kext (kernel extension??) file for the BCM5751 cards with the help of Google, copied it on a USB stick and installed it on my Hackintosh as mentioned below:
1. Search Google for AppleBCM5751Ethernet.kext and download the zip-file

2. Copy the zip-file to your Hackintosh (I used an USB-stick to transfer the archive)

3. Plug the stick into your Hackintosh and copy the archive to a temporary folder

   cp /Volumes/<label-of-your-usb-stick>/AppleBCM5751Ethernet.kext.zip /tmp

4. Change the directory and extract the archive

   cd /tmp && unzip AppleBCM5751Ethernet.kext.zip

5. Change the ownership of the contents to meet the system requirements

   chown -R root:wheel AppleBCM5751Ethernet.kext

6. Change the permissions of the contents to meet the system requirements

   chmod -R 755 AppleBCM5751Ethernet.kext

7. Move this extension to the default extension store

   mv AppleBCM5751Ethernet.kext /System/Library/Extensions

8. Reboot for the changes to take effect
After Reboot, your system should recognize the NIC, check this by clicking on "Go" -> "Utilities" -> "Terminal".
Ah, well, the Terminal. Nice, BTW, but not as good as it could be, there are some things that drive me nuts when using this terminal emulation, but I'll elaborate about that later on.

To do system related tasks and configuration, you need to switch to a privileged user. Using `su -` doesn't work (dunno why at the moment, but I'll find out) so you need to use the `sudo -s` command. Enter the password of the user you created during the installation wizard and you should get the root prompt (indicated by the '#' sign at the end of the prompt).
Now type `ifconfig` to see all available network interfaces. Watch out for interfaces named "en0" or "en1". In my case, "en0" was the wired NIC and "en1" was the wireless NIC.
As this all is a big pile of hackery, the BCM5751 kext doesn't read out the MAC-address of your NIC correctly, so it's set to 00:00:00:00:00:00 by default which is bad. Now it's time to get the piece of paper you wrote down the MAC address to earlier and set it manually (please note that setting hw-related options with ifconfig is only supported when the connection is down, so don't plug the cable in or deactivate the interface):
ifconfig en0 ether 11:22:33:44:55:66
Now everything should be set and you should get your network connections up and running. BTW: You'll have to do this after every reboot of your Hackintosh unless you find out how to make this change permanent and if you do, please tell me!
The next thing I tried was to configure the wireless NIC (an Atheros AR5212 in my case), which did sort of work out of the box, but as I mentioned above, the installation wizard won't let me configure it and all of these funky "Turn Airport On" buttons didn't work, so what could I do?

I decided to ask the "OSX Network Assistant" for help by starting "System Preferences" -> "Network". At the bottom of this dialogue there's an "Assist me..." button, click on it. Choose "Diagnostics...", select the AirPort item and click through the wizard. Don't worry if it yells at you with "Can't turn Airport on" in the first place, it was able to activate it in a second try although there was no visual confirmation that Airport was really turned on and so I was very excited to see my SSID in the list of available wireless networks. BTW I'm also unable to control the state of my AirPort with the "tray icon" in the Finder title bar (I don't know what this is called by you Apple guys, so please don't beat me for calling it a "tray icon"). From now on, everything was straight forward, after entering the WPA passphrase, I was connected and online in just a few seconds.
Unfortunately, these settings are not permanent, so I need to walk through this wizard each time I boot my Hackintosh, but I can live with that at the moment. Again, if you know a way of making this permanent, please don't hesitate to drop me a few lines about that.

All other hardware seems to work fine right now, I can play sound, watch movies and according to the "System profiler" I have accelerated graphics too (I can't really confirm by now as I don't know how to do this, but give me some time...). Maybe I'll try to tune the performance of the video card a bit with an article I found on either insanelymac or at the osX86 project wiki, don't remember anymore. It's about turning of some CRT related stuff, etc.
Some things seem to be broken though, e.g. when installing updates OSX complains about "Your computer is not connected to a power source" although it is properly connected (maybe this is due to me having no battery plugged in?) and there are a few other things that seem to be buggy too, but hey, it wasn't supposed to run at this hardware at all, so after all, I'm quite satisfied with the current state of this installation.

As you might know, I'm not a big fan of any fruits (especially apples) and therefore I'm not feeling very comfortable with this system by now, but maybe that'll change once I figured out how to get rid of the remaining annoyances :)

Some questions to be answered:
  • How can I input > and < or even a | on this system?
  • Why do the key strokes Home, End, Page Up, Page Down, etc. not work?
  • Do the Fx-keys have any special function on an OSX system?
  • Why does Shift-PageUp/Down not scroll the Terminal window?
  • Why does CTRL-U not work properly in the terminal application?
  • Why is the Mail application unable to delete Mails on my IMAP server (Error message: IMAP command "UID COPY" failed. Error in IMAP command returned by server)
  • How can I get the system back online if it fell asleep? None of the known-to-me key combos work...
  • ...

It's already late down here and so I'll stop this entry by now, but there will be updates for sure about this topic, so stay tuned :)

Oh, well, a few additional things:
The windows logo key on your keyboard is mapped to the MacOS option key by default.
Trying to type the '@' sign might kill running applications if you're used to type it using AltGr+q. On your Hackintosh, use "Option (Windows logo key)" + "l (small 'L')" to get the '@' sign.
You should register yourself at http://forum.insanelymac.com because it contains a lot of useful information about this whole experiment and all of the downloads (additional drivers, patches, etc...) can only be downloaded by registered users.
Oh and last but not least, if you're going to make "Software Updates", don't include newer MacOS Versions in your updatery, otherwise your system won't boot anymore after installing this update ;)
If you don't like the MacOS Terminal check for an application called "X11" in the "Utilities" menu. You can get a friendly xterm there which feels like being on a real operating system ;)

Oh, and because everyone likes to see screenshots, here's a screenshot (simply press "Alt + Shift + 3" to make a photo of your current desktop) of my Hackintosh system:
OSX Screenshot
Comments added earlier to http://tuxx-home.at/archives/2008/03/12/T22_34_45/index.html:
Guest on 2008-03-18 14:13:37 wrote:
did you use the .torrent download for the uphuck image?

Michael W.
Alexander Griesser on 2008-03-18 16:27:31 wrote:
Yes, for further details drop me a mail.
Guest on 2008-04-09 16:45:03 wrote:
hello folks, my sony VAIO VGN-FE31Z work fine with iAKTOS 10.5
Alexander Griesser on 2008-04-09 23:09:49 wrote:
Running this software on a Sony Vaio sounds very nice! I have a Sony Vaio lying around at work, but I don't think that I'm allowed to hack it this way ;)
Guest on 2008-09-30 18:48:17 wrote:
hello, I copied the kext zip, used an USB-stick to transfer the archive.
but I don't understand how to mount usb flash drive from terminal?
Alexander Griesser on 2008-10-02 10:22:51 wrote:
You don't need to mount it. On MacOSX, it is just there after you plugged it in (some kind of automounting).

If your USB stick has the label "KINGSTON" for example, it's already mounted in the directory /Volumes/KINGSTON/ so you can safely copy the file away from ther using this command:


cp /Volumes/KINGSTON/AppleBCM5751Ethernet.kext.zip /tmp
Guest on 2009-04-13 21:53:59 wrote:
Bei meinen extensa 5220 (acer) läuft osx auch sehr gut. Nur der Lan-Treiber macht Zicken: Auch Broadcom, allerdings BCM 5787M. Jedenfalls ist die Lösung für das Problem mit der Mac-Adresse dort über hexedit gelöst. Genau: Hexedit anstelle von ifconfig ether. Siehe: http://www.insanelymac.com/forum/index.php?showtopic=144675

Und übrigends die Tastaturbelegung läßt sich auch ganz einfach ändern, es gibt ein pc-Tastaturlayout irgendwo auch dort in obigen forum.
Mal gegoogelt... Das hier ist das gleiche:
http://heavyhackintosh.blogspot.com/2009/02/how-to-normale-pc-tastaturbelegung.html

http://rapidshare.com/files/195089013/PC_DE.zip
---gehört in user / libary / keyboard layouts
Evtl. mit Text Editor an eigene Schleptoptastatur anpassen. Kann man unter Linux ja wunderbar Tastaturcodes ermitteln.

Your comment (HTML tags will be stripped !!):

To verify You are not a bot, type down text from this image.

Your try: