My second attempt at a hackintosh: HP NC4200 laptop

Miscellaneous | Tuesday December 21 2010 16:38 | Comments (0)

With the knowledge I gained from putting Mac OSX Snow Leopard on my MSI K9AGM3/AMD Athlon64 X2, I decided to put it on my laptop as well, so I can bring it into college with me and work from there.

The specs of my laptop are as follows:

  • HP NC4200
  • Intel Centrino 1.8Ghz
  • Intel 900 series motherboard (I think)
  • 1GB RAM
  • Intel 2200bg wireless (iwi2200)
  • Intel VGA 915GM GMA 900 (could also be GMA950, not sure)
  • AC97 audio
  • Broadcom BCM5751M Eternet

I had originally tried to copy exactly the method for my first Hackintosh, but this gave me problems. On every boot, I got “Waiting for DSMOS“. I looked up some possible fixes, including replacing FakeSMC.kext and disabler.kext but nothing I seemed to do would work(EDIT: I found a fix for this. Don’t use mach_kernel!!)

I then looked into getting a different distribution of Mac Snow Leopard. The first one I came across was called iPortable OSX86. This is a USB loading version promising to work out of the box on any Intel machine, no questions asked! Quite the promise, and I was a bit skeptical, but I gave it a go anyway. I used Mac Leopard from VMWare to prepare the USB stick, and to my surpise…Kernel panic on first boot! This distro is actually designed to boot off a USB stick, not to install from USB. On first boot, it takes you through the process of setting up a new user account, as a normal Mac would, after a fresh install, and then it loads up the desktop directly off the USB stick!!! So you can go to any Intel PC, stick in the USB drive and you’ll have your personal Snow Leopard desktop in a minute or so!

So, intially I was getting a kernel panic on boot relating to ElliottForceLegacyRTC.kext. Simply removing this solved the kernel panic and then I could load up Snow Leopard without any problems!! Success! Almost. There was a few problems, mainly that there was no system clock, or Real-time Clock (RTC – Remember the kext I removed?). Also, when I tried to install anything, it would take maybe 5 attempts for the install to go through. It would either hang on “examining additional disks” or hang on “Preparing for installation“. Another problem was that it would not unmount drives a lot of the time, which is possibly related to the install issues.

Anyway, what I decided to do was, from the USB sticks desktop, prepare my laptop hard drive as if it was a USB stick that I was preparing for iPortable OSX86. So in other words, I was installing a portable version on a non-portable hard drive….makes sense?? 🙂

So I formatted the hard drive, making sure to check the MBR option. Used CopyCatX (included with iPortable OSX86) to apply the included image to the hard-drive and also used iPortable BootFix to make the drive bootable. This gave me the same ElliotForceLEgacyRTC.kext kernel panic so I just booted up into Windows 7 (Oh ye, did I neglect to mention I was dual-booting?) and removed the kext from System/Library/Extensions. I should point out, you will need MacDrive8 to access Mac OSX drives from Windows.

So, now I had a laptop dual-booting with Windows7 and Mac Snow Leopard. The only problem was I still had the above mentioned issues on the Mac. Not to mention no sound, video acceleration and no trackpad clicking (you know you tap the trackpad and it counts as a left-click?). I solved the audio problems with the AppleAC97Audio.kext, which can be found easily enough. I also enabled graphics acceleration (QE/CI) with these GMA900 kexts. The main problem I’m worried about is getting the RTC working. If I manually set the clock, it resets the CMOS so next time I boot into Windows, the clock is also reset. Its a bit of a pain, especially since if your clock is set before the date Snow Leopard was released, it warns you that Applications will behave erratically!

For fixing the RTC issues, apparently you need to patch your DSDT. This basically extracts stuff from your motherboard and changes it to suit the Mac. There is a DSDT patches that comes with iPortable, that I used to generate a dsdt.aml file, which is supposed to fix everything! I tried this but I couldnt get it working so I’m still stuck with no clock, and that issue with installing software. Also, I have a hunch that using this dsdt.aml file somehow helped me get QE/CI working, but I’m not sure.

For my wireless, apparently there’s no support for iwi2200, but luckily I had a USB wifi card with the RTL8187 chipset. This does come with manufacturer support so works perfect with the installer that you can get from their website. I never did manage to get my onboard (BCM5751M) ethernet card working.

So, as it stands, I have Snow Leopard booting fine with the chocolate_kernel (one of 5 included with iPortable OSX86), I have audio, wireless, QE\CI,no clock (RTC) and no ethernet. I also managed to install the latest iPhone SDK, after about 10 attempts and it runs and compiles seemingly fine. I was getting a problem when trying to load Interface Builder though. It just used to hang on load, with its icon jumping around in the Dock. This resolved itself after I installed the proper kexts for my graphics card, and enabled QE/CI. I have no idea if they are related or not, since I don’t have Quartz enabled on my other hackintosh and Interface Builder works fine on that!

I should also point out another thing. I kept getting a Kernel Panic every time I went into System Preferences. During one such Kernel panic, I managed to corrupt my boot sector and succumbed to the dreaded “Boot0: Done” error. For this, I had to eventually switch the active partition to the Windows “System Reserved” partition, and edit the Windows Boot menu using BCD-Edit. The bootloader that came with iPortable just died so was unusable. When you use BCDEdit in Windows, it uses Chameleon bootloader, which I was able to boot the mach_kernel with. However, since that causes a “Waiting for DSMOS” error, I had to boot from that USB stick, run OSX86Tools, click “Install Kernel”, select the “Chocolate_kernel” and install that. OSX86Tools just renames the kernel to mach_kernel, so now I have chocolate_kernel just renamed to mach_kernel and it works fine now. 😀

Success: My first Mac!

Miscellaneous | Friday December 10 2010 21:41 | Comments (2)

If you read my previous post about the Hackintosh, you will have noticed I was trying to work up a solution on my own AMD PC so that I could run  MacOS Snow Leopard. Well, I have finally managed to get it working, for the most part.

My Specs:

MSI K9AGM3 motherboard FD/F

AMD 690G chipset MS-7367

AMD Athlon 64 X2 Dual Core 4000+ 2.10Ghz


VGA: Onboard ATI X1200

Sound1: SB600 chipset ALC888

Sound2: Creative Audigy 4

NIC: Realtek RT8111B

Now, nothing there is the same, or even similar, to any hardware shipped in a Mac, so I’ve had to trawl the internet for kexts (Mac Drivers) to support my hardware. Also, as its not an Intel, I cannot use the default “Vanilla” kernel and Snow Leopard DVD. Because of this, I have employed the use of my trusty Imation Nano Pro 16GB USB stick to do the job for me!

Here’s how I did it:

Step1: Prepare the USB Stick.

For this, you need either a working Mac, or a VMWare image of a Mac. So, boot up the Mac, or VMWare image, and open Disk Utility, which is located in System-> Applications Folder. Insert the USB stick and select it from the left column. Go to “Erase”. Under “Volume Format” you need to select “Mac OS Extended (Journaled)”, name it whatever you want and click “Erase”. This will make your USB stick compatible with the Mac, and allow reading and writing to it.

I’ll assume you have an .iso image of Snow Leopard handy, which you made yourself somehow, or downloaded. So while still working with the USB stick, select “Restore” from the top right of Disk Utility. You will now need to drag your iso into the text box for “source”, and drag the USB partition1 into “Destination”. Click restore and wait half an hour  or so for this to complete.

Actually, while its restoring, you can search for, and download a tool called OSX86Tools. Its needed for this next bit.

Step 2: Make the USB stick bootable.

When the Restore is complete, open up OSX86Tools and click on “Install EFI/Run FDISK”. A little black box will pop up. Select the USB stick from the top drop-down menu, leave the rest, and click “Install EFI”. This will make the USB stick bootable. You can now reboot.

Step 3: Preparing your PC

You need to decide if you want to Dual Boot with your existing operating system, ie Windows, or if you want to just have a dedicated hard drive for Mac. Either way, there’s gonna be some formatting involved! For a dedicated hard-drive, you can do the formatting later during install (you know formatting deletes everything on your hard drive, by the way, yeah?). For dual boot, go into Windows and split your disk in two. I’m not going to tell you how to do this, because I don’t want to take responsibility if you mess it up! 😀 But you can Right-Click “My Computer”, select “Manage” and then “Disk Management”. You can play around in here with resizing and creating new partitions, or else get a dedicated Partition Program (AVOID PARTITION MAGIC. SERIOUSLY!!). Initially you want to format the chosen partition to FAT32, and Mac isn’t the biggest fan of NTFS. You’ll be formatting it again to Apples format during install anyway, but the Mac installer can just handle FAT32 better. So just do it!

Step 4: Installing Mac OS Snow Leopard.

This is the tricky part. If your computer is not set up to boot from USB, go into the BIOS and set this up (Google if you don’t know how).When it starts to read off the USB stick, you will see a “Darwin/X86”  screen. From here it will hopefully boot. If not, you can press either Escape or F8 and it will take you to a menu where you can put in special boot parameters (eg arch=i386 -v) to make it boot. If its working though, don’t bother with that. You should now be on the main Install screen. From here just select your language, and keep clicking through until it prompts for a hard drive to install to (“Select Destination”). DO NOT SELECT YOUR WINDOWS HARD DRIVE if you are dual booting. If you have the dedicated hard drive then you won’t see anything there. Click on “Utilities” up the top of the screen and select “Disk Utility”. This is the same program you used earlier with the USB stick (unless you burned the .iso to a DVD of course). Select the partition that you intend to use with Mac OS and click on “Erase”. As before, select “Erase”. Under “Volume Format” you need to select “Mac OS Extended (Journaled)”, name it whatever you want and click “Erase”. You can now close “Disk Utility” either by clicking the Red X button up the top left, or selecting “Disk Utility” from the very top left of the screen and quitting in there. This will now take you back to the “Select Destination” screen, and hopefully your hard drive should appear  there now. Select it and click Next.

Step 5: Customising the install

This bit will make or break your install!!

Every install is different for each motherboard, processor, audio chips, video chips, network cards  etc etc etc. Assuming you have decided not to install the original Apple install DVD, and have instead opted for one of the customised installs such as Hazard, kalway, or iDeneb, then the following part will look different. You see, the releaser of each of those editions has customised the installer to include different kexts (drivers) and different patches. They shouldnt stray too far from each other, but still, they’ll look different.  I can tell you what I selected but unless you have identical hardware to me, you will need to select different options. Simple as that.

So, I selected the Mobdin Kernel for AMD, VoodooHDA audio, LegacyAppleIntelPIIXATA and all the other AMD patches. (The chameleon loader comes with the AMD patch. If you are Intel, don’t forget to select a bootloader!)

Depending on which patches you choose for your own machine, you will get errors and crashes. If you get any problems, you just need to go back and select different options. Most new machines should be almost compatible these days so most people will have no problems. And even people who do have problems, can get them fixed with a bit of tinkering. If you can get the install completed and are having boot problems, press F8 before the chameleon loader starts and type “-x -v -f”. The -x loads in safe mode, the -v loads in verbose mode, ie outputs lots of text so you can see where the problem occurs, and -f forces the Mac to load kexts directly from the hard drive, ignoring the cache. Don’t worry about that for now….;)

There is one more thing. On my PC, when I booted up for the first time, it got me to create a new user account, which is all normal. However, once I filled in the details, it either hung indefinately, or it brought me through an infinite loop of asking me to fill in my details over and over again. The fix for this, is to boot into single user mode, by typing “-s” at the boot prompt. It should load up in under a minute and you’ll see some stuff above it relating to “fsck -fy”. Type in the few lines that it provides and now you’re into single user mode. From here, you will have to manually create your user account. Google it! 😉

So, with a bit more tinkering, you may get yourself an acceptably working substitute for a Mac, that you can finally run XCode and the iPhone SDK on sufficiently. At present, my machine is working OK, but because Hackintosh’s are relient on non-Apple employees making kexts to work with non-standard hardware, you can either get lucky and have kexts available to you, or you’ll never have support for certain devices, eg graphics card/sound cards/network cards.

I could get my ATI Radeon X1200 onboard graphics working to basic levels, but it looks like it will never get support for QE/CI. I managed to get a kext for it called EVOenable_X1800.kext, which got System Profiler to pick it up, but thats about it. No resolution change, no Quartz etc etc…

I also had to search high and low for a kext for my network card so I could just go online with it! I found a generic Realtek one which seems to have worked (RealtekR1000SL.kext).

So, thats it for now. I hope you enjoyed literally my longest ever blog post! If you have any questions, feel free to leave a comment!



Miscellaneous | Friday December 10 2010 20:24 | Comments (0)

As you may have realised by now, I don’t actually own a Mac, or even have easy access to one. Sure, we have the lab computers in college, but with my coursework and studying and stuff taking up most of my day, I resort to doing my coding at night! And Macs in a lab several miles away are not exactly ideal.

So….what am I gonna do about it???

Well, after a little bit more research, I have stumbled into the dark, murky underworld known as HackintOsh!! So what exactly is it…?

Well, as you may or may not be aware, Apple used to run their Macs on IBM PowerPC CPUs. The MacOS was then built around this type of chip, which is incompatible with your standard PC chips, like Intel Pentiums, and AMD Athlons etc etc. Recently (in 2006), Apple decided to move over to Intel chips in their new Macs. This opened up the world to Hackintosh. You see, by Apple moving over to Intel based processors, they now share a common architecture with your standard PC. So now, if someone changes a few things in the Mac operating system and tweaks it a little, in theory, it should work fine alongside a regular PC. Whereas previously, when Macs were IBM based, that would be impossible!

So in a nutshell, a hackintosh is basically a PC running MacOSX. This also means that anything you can run on a Mac, you can run on your own bog-standard PC….including the iPhone SDK.

Of course, the legality of this is in question. I’m not sure Apple appreciate losing potential customers, who don’t need to splash out on a Mac anymore, either! I managed to find a MacOSX Leopard DVD for roughly €30, so it’s not a bad start to development on a budget.

EDIT: I have run into some trouble with this. I forgot that my current PC actually has an AMD processor. According to a few sites online this is manageable, though, with some different drivers, or “kexts”.

Hello and Welcome

Miscellaneous | Sunday December 5 2010 21:36 | Comments (0)

Hi folks,

Welcome to my new blog!

I created this blog as part of my college project, in which I’ll be making my first iPhone app. This blog is partly here so I can keep track of what I have learned, and share it with anyone who’s interested! I intend to go over the tools used for programming on the iPhone, ie XCode, as well as languages such as Objective-C, C++, and maybe some Java. I might also throw in a few tips on how to use Mac OS X if I have time! 😀

After this project is complete, I hope to become a competent programmer who’ll actually still enjoy programming on the iPhone enough to have a little business on the side for a bit of money, but I think thats getting a little bit ahead of myself for now….

I can’t promise this will always be interesting, but if you’re thinking of getting into the field of iPhone app development, the experiences I post in this blog will hopefully help in some way! And if not, well, why not leave a comment and tell me how i can improve on my post!