ned Productions – Installing Apple MacOS X on a Standard Laptop

by . Last updated .

Last night I succeeded in installing Apple MacOS X 10.4.6 on my standard PC laptop!

What follows are some notes, mostly for my own record, but which may prove of use to others too. As I am based in Europe, the European Copyright Directive applies here which prohibits the distribution, broadcasting, communication or making available to the public of anything "if the person knows, or has reasonable grounds to know, that by so doing he is inducing, enabling, facilitating or concealing an infringement of any copyright or any rights related to copyright". The most obvious is that this page may facilitate an infringement of copyright.

Therefore this page cannot be viewed by anyone who does not have a valid licence for Apple MacOS X. If you do not have a valid license for Apple MacOS X, you should immediately close this page in your web browser. Furthermore, this page does not detail how to circumvent the digital rights protection mechanisms used by Apple to prevent installation on standard PC hardware as this would be a further offence under the EUCD, nor does it link to nor provide technologies which could be used to circumvent any digital rights protection.

Hardware

I have a pretty bog standard laptop, a Clevo D400J:

Clevo D400J Specification
CPU 。Mobile AMD AthlonTM 64 (62W) 3400+
  (2.20GHz, 1 MB L2 cache, uPGA754)
Core Logic 。VIA® K8N800 + VT8235CE
Display 。15.0" SXGA+ (1400x1050) TFT
Memory 。64-bit DDR data channel
。Two 200-pin SODIMM sockets, supporting DDR400
。1GB of RAM, based on two 512MB SODIMM Modules
Video Controller 。VIA® K8N800 integrated S3 Unichrome
。Shared Memory Architecture up to 64MB
。128 bit graphic engine
。UtraAGP 8X
。Fully DirectX®  9.0 support
Storage 。One 2.5" 9.5mm(H) Western Digital 5400rpm HDD
。One 12.7mm(H) Sony DVD-RW/CD-RW drive
。Supporting Master mode IDE , ATA-33/66/100/133 (Ultra DMA)
Keyboard 。A4 size keyboard, Multi-Language support
。Built-in Touchpad with scrolling function
Sound System 。AC'97 2.2 Compliant Interface
。3D stereo enhanced sound system
。Virtual 6-channel audio output
。Sound-Blaster PROTM Compatible
。S/PDIF Digital output (5.1 CH)
。1x Built-in Microphone
。2x Built-in Speakers
I/O Ports 。3x USB 2.0 ports
。1x Serial port
。1x Parallet port (LPT1), supporting ECP/EPP
。1x External CRT monitor output
。1x PS/2 port
。1x Headphone jack
。1x Microphone jack
。1x S/PDIF output jack
。1x RJ-45 port for LAN
。1x RJ-11 port for Modem
。1x DC-In jack
Card Reader 。Embedded 4-in-1 Card Reader (MS/MS Pro/SD/MMC)
PCMCIA 。1x Type II PCMCIA socket
Communication 。10/100BASE-TX Realtek Fast Ethernet on board
。Intel 2200BG 802.11b+g MiniPCI Wireless LAN
。Integrated V.90/56K MDC Modem (V.92 compliant)
。300K-pixel Video Camera module
Power 。Full Range 90W AC adapter - AC input 100~240V, 50~60Hz, DC output 20V, 4.5A
。Chageable Standard 8-cell Smart Li-lion battery pack, 4400mAh
Security 。Kensington® Lock
Dimension 。329(W) x 275(D) x 36.5(H)mm, 13.0"(W) x 10.8"(D) x 1.4"(H)
。3.5Kg with 8 cells Lithium-lion battery

Installation

  1. Firstly you need suitable hardware. You need a SSE2 capable processor, either AMD or Intel. You probably need an Intel, AMD, VIA, ATI or NForce based chipset. You need a reasonable VESA implementation in your video adaptor. My laptop above does all of this. You may need to disable Legacy USB support in the BIOS to get things working correctly (FreeBSD also requires this).
  2. You need a prepatched MacOS X bootable DVD image. I used Mac.OS.X.Tiger.10.4.6.X86-HOTiSO which you can find on binary newsgroups or via BitTorrent. Having burned this to a DVD, you also need a bootable Linux DVD eg; SuSE and maybe PartitionMagic if you don't have a free primary partition.
  3. Make at least a 6.5Gb primary partition by shuffling around your existing ones using PartitionMagic. It has to be primary like FreeBSD requires. You might also want a FAT32 drive so you can access your Windows, Linux and MacOS X files from all three systems.
  4. Boot the Linux DVD and go into Rescue mode. Run fdisk /dev/hda and print the partition table using 'p'. If there are any warnings at all, you must fix them (eg; partition table not in order, or cylinder end not correct). PartitionMagic doesn't always get this correct and FreeBSD's installer is notorious for screwing up your CHS compatibility table in way you normally never notice (as everything uses the LBA table). Change the type of your destination partition to hex 0xaf using the 't' command. Write table to disc using 'x' and reboot using the MacOS X DVD.
  5. The MacOS X DVD install takes ages. No really, ages. It's very slow. But after ten minutes of accessing the DVD it should boot to the installer. If it doesn't, your hardware probably isn't compatible.
  6. Firstly, you need to format your install partition as HFS. Run Utilities=>Disc Utility. Choose the partition with the Journalled MacOS type. Choose the Erase tab. Type in the name 'Apple MacOS X' into the disc label, and hit Erase. If you get an error about not being able to read your partition map, you have an error somewhere in your partition tables. Boot into Linux via the install DVD and use fdisk to fix them. Remember, your partition must be a primary one.
  7. Return to the installer, and keep punching Continue. Your newly created partition will be the only option, so after choosing that go to the next page in the wizard and make sure you choose Customise at the bottom. In the list of installables, you can probably deselect printer drivers and language translations but you will NEED to install the AMD and SSE2 patches (last item).
  8. The installer will now verify the install disc. This takes ages (20 mins). It then installs the files, also taking ages (I reckon about 35-40 mins). Finally it'll be done, so reboot removing the install DVD.
  9. You should now boot back into windows. Time to install a MacOS X boot option! Log in as administrator and copy this file into C:\. Making sure hidden files are shown, open C:\boot.ini in Notepad. Add the following option to the bottom: C:\chain0="MacOS X". Reboot. [If you have problems with this section, see http://www.j79zlr.com/howto.php?id=6 about how to peel a bootloader and make SURE you installed to a primary partition]
  10. You should now see a MacOS X option in the NT boot screen. Choose it. You'll now get the MacOS X boot loader. Hit the down arrow key so it shows a list. Choose the partition you installed to which will be called 'Apple MacOS X'.
  11. MacOS X should now boot. However, it may fail with a kernel panic 'commpage no match on last routine'. If this happens, it's because your CPU doesn't support SSE3 and for some odd reason, the HOTiSO image above doesn't install a suitably patched kernel. If this happens, boot off the MacOS X install DVD. When you reach the installer, choose Utilities=>Terminal. Now type 'cp /mach_kernel /Volumes/Apple\ MacOS\ X/' which copies an AMD and SSE2 patched kernel (the one the installer booted from) over the one on your main system. Reboot.

    NOTE: I get more email about this stage than any other. People don't read what I just said properly. Firstly, if it boots off the install DVD and doesn't off your hard disc, YOU ARE NOT COPYING THE KERNEL OVER CORRECTLY. I think the backslashes escaping spaces in the 'cp' command confuse non-Unix people. What does the 'cp' command above do? It copies "/mach_kernel" (the kernel binary in the root directory of the install DVD) into "/Volumes/Apple MacOS X" (the root directory of the Apple MacOS X installation on your hard drive. The install DVD searches your hard drive for HFS+ partitions (ie; the one you created above) and mounts each into "/Volumes" so you can access them. If you chose a different name for the partition than above, IT WILL BE CALLED A DIFFERENT NAME IN /Volumes). Any email on this subject which is explained by this note I will from now on simply bin - if you still don't understand, go read a Unix man page for bash and cp. Also, try 'cd /Volumes' and 'ls' to see what is mounted if you can't remember what you named your partition.
     
  12. You'll now reach the Apple MacOS X desktop. You should feel pretty elated and excited at this point! However, there will probably be some problems - some stuff won't work and your screen resolution will be wrong. You may also have some warning boxes about kernel modules not loading correctly. Make a note of which ones have not, as you may be able to fix these.
  13. Firstly the screen resolution, as it makes fixing everything else much easier. Reboot, and when you get to the Apple MacOS X bootloader now type '?video'. You should get a list of video resolutions. On my laptop, 1400x1050x32 is the native resolution so now type '"Graphics Mode"="1400x1050x32"'. If your computer now boots with the correct resolution, time to make it permanent - open a Terminal (in Applications), type 'sudo -s' and 'cd /Library/Preferences/SystemConfiguration'. Now type 'pico com.apple.Boot.plist' and in this file, add after the other options '<key>Graphics Mode</key>' followed by '<string>1400x1050x32</string>'. Reboot to test.

You may at this point be done if you have really compatible hardware. Like most though, you'll need some drivers for various peripherals which you can find at the Hardware=>Drivers forum at http://forums.osx86project.org/ or http://wiki.osx86project.org/wiki/index.php/3rdPartyDrivers.

NOTE TO READERS: If you have some PC device eg; a network card or USB device which Apple MacOS X isn't detecting, or correctly loading the drivers, or otherwise not working, do not bother emailing me about it! I don't know the answer - I have installed this once on one laptop, I am no expert, please search the forums above for someone with the same device as you do. Be aware that many devices, even if they supposedly come with an Apple driver, may rely on EHCI or other Apple hardware only facilities which obviously a hacked copy won't provide.

Here's what worked and didn't on my laptop:

  • The onboard Realtek network adaptor just works. You can go straight onto the internet. This is really handy for searching http://www.osx86project.org/ for solutions.
  • The right mouse button already opens context menus.
     
  • The DVD-RW drive is recognised, and furthermore recognised as being capable of writing to DVD's, but its firmware is unsupported.
  • Sound, which is an AC97 based solution. There is an error about AppleAC97Audio.kext not loading correctly at boot. This is fixable (see below).
  • It doesn't recognise that I'm on a laptop, and hence show battery options. This is fixable (see below).
  • Disc i/o isn't using bus mastering DMA, and therefore is slow (6Mb/sec versus 30Mb/sec). This is fixable (see below).
  • CPU clock and voltage throttling (ie; Cool n' Quiet), which means the laptop fan is always going. This is fixable (see below).
  • The Apple key, used for copying stuff to the clipboard etc, isn't available. Alt seems to map to the Apple key. This is fixable (see below).
  • The " and @ keys, # and ` keys are swapped on the keyboard. This is fixable (see below).
     
  • The inbuilt Intel 2200BG wireless card isn't recognised. There is a thread about this in http://forums.osx86project.org/, but currently it's not going anywhere.
  • The inbuilt card reader isn't recognised. As it isn't supported under Linux nor Windows XP x64 either, it likely will never be.
  • USB ports were recognised, but inserting a flash disc has no effect. Apparently this got broken in 10.4.4 and replacing IOUSBFamily.kext from 10.4.3 will fix the problem.
  • The inbuilt USB based webcam isn't recognised. Probably related to the above.
  • Sleep doesn't work.

What are my impressions of speed? MacOS X is definitely fast, much faster than Linux (SuSE 10) on my laptop. It feels faster even than FreeBSD 6.0 which is definitely faster than Linux. It's not quite as fast as Windows XP, and definitely not as fast as Windows XP x64 which really shifts on my laptop but Windows does have accelerated video drivers helping it along. One thing you really notice - MacOS X still does the flashy graphics animations and it's never slow, even though it's a VESA driver. XOrg could learn a thing or two here because its VESA driver is not quick and KDE does chug when redrawing the screen.

Comparing to other Macs using XBench:

Results	50.46	
	System Info		
		Xbench Version		1.2
		System Version		10.4.6 (8I1119)
		Physical RAM		1024 MB
		Model		ADP2,1
		Drive Type		HTS541080G9AT00
	CPU Test	73.87	
		GCD Loop	106.41	5.61 Mops/sec
		Floating Point Basic	93.09	2.21 Gflop/sec
		vecLib FFT	46.33	1.53 Gflop/sec
		Floating Point Library	80.48	14.01 Mops/sec
	Thread Test	75.64	
		Computation	53.90	1.09 Mops/sec, 4 threads
		Lock Contention	126.80	5.45 Mlocks/sec, 4 threads
	Memory Test	78.33	
		System	80.69	
			Allocate	143.99	528.76 Kalloc/sec
			Fill	77.31	3758.75 MB/sec
			Copy	57.81	1193.97 MB/sec
		Stream	76.11	
			Copy	72.75	1502.70 MB/sec
			Scale	73.30	1514.43 MB/sec
			Add	79.64	1696.60 MB/sec
			Triad	79.27	1695.88 MB/sec
	User Interface Test	33.02	
		Elements	33.02	151.55 refresh/sec
	Disk Test	34.16	
		Sequential	59.79	
			Uncached Write	56.19	34.50 MB/sec [4K blocks]
			Uncached Write	55.00	31.12 MB/sec [256K blocks]
			Uncached Read	67.91	19.87 MB/sec [4K blocks]
			Uncached Read	61.73	31.03 MB/sec [256K blocks]
		Random	23.91	
			Uncached Write	8.07	0.85 MB/sec [4K blocks]
			Uncached Write	63.10	20.20 MB/sec [256K blocks]
			Uncached Read	65.90	0.47 MB/sec [4K blocks]
			Uncached Read	81.19	15.07 MB/sec [256K blocks]

... where 100 is a dual 2GHz PowerPC G5. As you can see, my AMD Athlon64 3400 compares very well, being very similar in speed (apart from the vecLib stuff which is PowerPC only). Lock contention is excellent on AMD Athlon64 processors as you can see, and really apart from the User Interface which doesn't have accelerated graphics, it's about 75% of its speed.

Fixing the Sound (AC97)

Download this and unstuff it into your root directory on 'Apple MacOS X' drive (Safari will decompress it for you, but if not then use 'unzip'). Open a terminal and type the following:

sudo -s
<type your password>
cp -R /AppleAC97Audio.kext /System/Library/Extensions/
cd /System/Library/Extensions/AppleAC97Audio.kext/Contents/PlugIns/
kextload AppleAC97AudioIntelICH.kext
(at this moment, it should load without error)
rm /System/Library/Extensions.kextcache
kextcache -k /System/Library/Extensions

Thanks to macgirl for this improved AppleAC97Audio.kext.

Fixing the battery

Download this and unstuff it into the desktop, which should yield a PowerManagement.bundle. Open /System/Library/SystemConfiguration. Delete the existing one first, then copy in the new one. After rebooting, MacOS X should recognise you're on a laptop and display a battery indicator in the top menu bar.

Thanks to keithpk for this improved PowerManagement.bundle.

Fixing the disc i/o

You simply need to enable the driver for your IDE controller. In my case, this was AppleVIAATA.kext. Open a terminal and type the following:

sudo -s
<type your password>
cd /System/Library/Extensions
chown -R root:wheel AppleVIAATA.kext
chmod -R 755 AppleVIAATA.kext

Now reboot, making sure you enter -x at the bootloader for kernel options to bypass the caches. If it worked (check System Profiler=>Extensions and you should see the VIA driver loaded), you must now make it permanent using the following in Terminal:

sudo -s
<type your password>
cd /System/Library/Extensions
mv AppleVIAATA.kext IOATAFamily.kext/Contents/PlugIns
rm /System/Library/Extensions.kextcache

After reboot it should now use the VIA driver.

Fixing the fan going on a laptop all the time

This bugged me so much I went off and wrote a driver which reads CPU throttling states from ACPI under MacOS X and throttles the processor according to load. You can download it from here.

Fixing the modifier keys

While Alt does act as Apple key, it's easier for Windows and Linux users if you remap them to more familiar keys. Open System Preferences=>Keyboard & Mouse=>Keyboard=>Modified Keys and set as follows: Caps Lock: Option, Control: Command, Option: Option, Command: Control.

Now you can do stuff like Ctrl-C, or Ctrl clicking to add to current selection, or Ctrl-Caps Lock when copying to alias instead.

Fixing the keyboard layout (really only useful for British keyboards)

Copy this file to /Library/Keyboard Layouts. Go to System=>Preferences=>International=>Input Menu and choose "British (@"\|'~ fixed)". If you can't see it, log out and log back in. Choose the option "Use one input source in all documents" and tick "Show input menu in menu bar". Now click on the flag in the top menu bar and choose the new layout.

Note that this mechanism doesn't entirely work for everything. For example, my \ key on the laptop just isn't seen so I mapped it to Windows-key Z with Shift-Windows-key Z producing |. Also, some Apple MacOS programs ignore the input source and will give you your wrong keyboard layout no matter what but it's better than nothing.

Making all hidden files visible in Finder

This one annoys me - I like to be able to see all my files! Open a Terminal and type:

defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder

Add header files to Spotlight for searching

This is very useful when you're trying to track down what header files include which others, and of course to search for stuff inside them. Open a Terminal and type:

mdimport /usr/include
mdimport /usr/local/include
mdimport /System/Library/Frameworks

You want to make sure you have your hard disc controller sorted out before doing this as it takes quite a while.


Contact the webmaster: Niall Douglas @ webmaster2<at symbol>nedprod.com (Last updated: 2006-04-23 00:00:00 +0000 UTC)