Monday, 7 February 2011

Guide 2

Prerequisites:
1) Virtualbox 4 with the Oracle VM VirtualBox Extension Pack installed.
2) Snow Leopard retail DVD or ISO.

Instructions:
1) Make a new OSX Server image in Virtualbox, call it "OSX", use all the defaults except make a bigger disk than 20GB - 40GB is a better number.
2) Go into the settings.
3) If you have enough RAM, change the RAM to 2048MB, but no more.
4) Change the Video RAM to 64MB, and enable 3D Acceleration.
5) Make sure that the Audio is set to Intel HDA, and make sure that the DVD is ahead of the Hard Disk in the boot device order.
6) In the Storage tab, either mount the Snow Leopard ISO, or direct it to your physical DVD drive with the Snow Leopard disk in it.
7) Quit the Virtualbox manager.
8) Open a command prompt and 'cd' to your Virtualbox install directory (Probably "c:/Program Files/Oracle/Virtualbox".
9) (The following step might not be necessary, or actually do anything. Unconfirmed)... If you are on a 64 bit host type: VboxManage modifyvm "OSX" --firmware efi64
10) Type: VBoxManage setextradata "OSX" VBoxInternal2/EfiGopMode 4
Alternatively use 0, 1, 2 or 3 to set the video resolution according to:
0 - 640x480
1 - 800x600
2 - 1024x768
3 - 1280x1024
4 - 1440x900
11) In a text editor, edit the OSX.vbox file found in ~USERNAME/VirtualBox VMs/OSX/
12) Find the line that says ExtraDataItem name="VBoxInternal2/EfiGopMode" value="4"/
13) Below this line, paste the following (exactly, all on one line, inside angled quotes as with the other entries*)
ExtraDataItem name="VBoxInternal2/SmcDeviceKey" value="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"/
14) Save the file and close your text editor.
15) Double click on the OSX.vbox file to launch the virtual machine.
16) After a little while, the Snow Leopard installer will start.
17) Open Disk Utility. Partition your disk - GUID, Mac OS Journaled. Close Disk Utility. Select the new drive partition you made, and let the install continue.
18) Optionally customize your install to remove language support, X11 support, printer drivers etc.
19) At the end of installation, it may crash when trying to reboot. In any case, unmount the DVD or ISO before either rebooting or resetting the Virtual machine.
20) Snow Leopard will boot from hard disk, go through the initial setup steps such as choosing timezone.
21) Run Software Update and bring everything up to date.
22) Take a backup of the OSX.vbox file in case Virtualbox manager later makes a change to it that causes your installation not to boot (e.g. removing the SmcDeviceKey line).

After installation (optional, maybe risky):
1) If CPU usage is always 100%, delete /System/Library/Extensions/AppleIntelCPUPowerManagement.kext and run 'sudo kextcache -system-caches' and reboot.
2) Edit the OSX.vbox file and raise the VRAM to 128MB.
3) If you deleted the kext above, you can add an extra CPU in Virtualbox manager.
4) EpiGopMode 5 is 1920x1200 if you have a big enough monitor.
5) Enable 64 bit Kernel by editing /Library/Preferences/SystemConfiguration/com.apple.Boot.plist
Change
Kernel Flags

to
Kernel Flags
arch=x86_64

Known issues:
1) Bootup is a verbose textual process rather than the Apple logo and spinner. Seems to be due to '-v' being hardcoded as a boot option in the emulated NVRAM.
2) Shared Virtualbox folders can't be used due to there being no Virtualbox Guest Additions for Mac (yet?)

* Blogspot won't let me enter things that look like raw HTML/XML.

Thursday, 3 February 2011

Guide

Prerequisites:
1) VirtualBox 4
2) iBoot and Multibeast.
3) An ISO of Snow Leopard retail version.
4) The DMG of the latest (10.6.6) combo updater.

Instructions:
1) Make a new OSX Server image in Virtualbox, call it "OSX", use all the defaults except make a bigger disk than 20GB - 40GB is a better number.
2) Go to settings and untick the "Enable EFI setting" in the System pane.
3) Mount iBoot.iso and boot from CD drive (you might have to press F12, then 'c').
4) Unmount iBoot, mount Snow Leopard ISO.
5) Press F5, then Enter. It will launch the SL installer.
6) Open Disk Utility. Partition your disk - GUID, Mac OS Journaled. Close Disk Utility. Select the new drive partition you made, and let the install continue.
7) After installation, mount iBoot.iso again and this time choose your new SL installation which will boot.
8) Run the 10.6.6 combo updater, do not allow it to reboot.
9) Run Multibeast, select EasyBeast and the System Utilities. Install it.
10) Unmount the iBoot iso in Virtualbox and reboot into Snow Leopard. iBoot is now no longer required.

Optional Virtualbox settings:
1) Raise the Video memory to 128MB and enable 3D acceleration.
2) Raise the main RAM to 2GB or more if you can spare it.
3) Install the Virtualbox Extension Pack to enable USB device support.

Known issues:
1) "About This Mac" will crash the Finder. System Profiler works properly when invoked directly.
2) Shut down/restart etc. will always kernel panic.
3) There is no choice of resolutions in the Display settings. Use the Virtualbox command line to do e.g. VBoxManage setextradata “OSX” “CustomVideoMode1″ “1600×960×32”
4) Shared Virtualbox folders can't be used due to there being no Virtualbox Guest Additions for Mac (yet?)
5) Sometimes fails to boot and sits on the Apple splash screen spinner forever. Just reset it.
6) Spotlight sometimes hangs, and sometimes has to do a full reindex for no apparent reason.

Links:

http://www.virtualbox.org
http://tonymacx86.com/
http://store.apple.com/us/product/MC573Z/A
http://support.apple.com/kb/dl1349