Can OS X operating systems really run on x86 emulators?

All off topic discussions go here. Everything from the funny thing your cat did to your favorite tv shows. Non-programming computer questions are ok too.
User avatar
LieutenantHacker
Member
Member
Posts: 69
Joined: Sat May 04, 2013 2:24 pm
Location: Canada

Can OS X operating systems really run on x86 emulators?

Post by LieutenantHacker »

Inspired by this question several days ago on Superuser, I am curious if this is really possible and wonder if anyone has tested this.

Basically, will an x86 OS X version, such as Snow Leopard or Mountain Lion, work on an x86 emulator running on Windows/Linux/OS X itself (such as Bochs)?

The answerer in the linked page above claims that Snow Leopard worked, but when I tried it myself (10.6.7; Snow Leopard ISO/DVD install) absolutely nothing happens (no output from Bochs). Do you need special support or very custom settings added to Bochs (feature/version specific, plugin, setup/config files, etc.) that can assist in the emulation? This is not for actual use; just curiosity if it really works and some proof as well. I know lots of Linux distros and pretty much all Windows versions will work on Bochs, but I've searched and can't even find a single video/image/text confirmation of OS X x86 working/booting on Bochs.
The desire to hack, with the ethics to code.
I'm gonna build an 8-bit computer soon, with this as reference: http://www.instructables.com/id/How-to- ... -Computer/
User avatar
iansjack
Member
Member
Posts: 4689
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Can OS X operating systems really run on x86 emulators?

Post by iansjack »

I can't think of any good reason to run OS X in an emulator rather than a VM. It certainly runs on VMWare and VirtualBox. This is not to say that it is easy to make it run in such an environment; you can't just take an OS X install DVD and expect it to work on VMWare (unless you are running on a Mac). You need a few tricks and extra software.

Google will help you if you are interested. Note that it is not perfect and is not really (IMO) a viable way of running OS X (unlike, say Linux). If you want to run OS X on a normal PC it is better to do a native install (again, not entirely straightforward) and choose your hardware carefully. First rule - use an Intel processor.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Can OS X operating systems really run on x86 emulators?

Post by Combuster »

A non-mac running Mac OS is colloquially called a Hackintosh, and you'll find a lot under that keyword. Thing is that you need to hack Mac OS first as it normally checks if your hardware is an Apple machine or not, and what goes for a real computer often goes for a VM as well.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
iansjack
Member
Member
Posts: 4689
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Can OS X operating systems really run on x86 emulators?

Post by iansjack »

Not quite true that you need to hack OS X - you just need some additional installation software (basically a bootloader), which is all perfectly legal as it's derived from the open source Darwin sources. You can then install from standard Apple install media.

The biggest difficulty nowadays with building a hackintosh is getting hold of a legal copy of OS X - you already need a Mac to purchase any recent version and you also need a Mac to prepare the install media. So, unless you're into piracy, there's not a lot of point in the exercise other than curiosity or the desire to build an additional "Mac" more powerful than the one you already own.
User avatar
Owen
Member
Member
Posts: 1700
Joined: Fri Jun 13, 2008 3:21 pm
Location: Cambridge, United Kingdom
Contact:

Re: Can OS X operating systems really run on x86 emulators?

Post by Owen »

iansjack wrote:which is all perfectly legal as it's derived from the open source Darwin sources. You can then install from standard Apple install media.
The open source Darwin sources which have a specific usage restriction on them prohibiting their use in running OS X on a non-Apple computer
User avatar
LieutenantHacker
Member
Member
Posts: 69
Joined: Sat May 04, 2013 2:24 pm
Location: Canada

Re: Can OS X operating systems really run on x86 emulators?

Post by LieutenantHacker »

Thanks, but most of what has been said has been known. Basically, I will need a specific Hackintosh version in question to run it in Bochs? I know it works with virtualization, but I want to see it working with emulation, since I am curious and still have yet to see it in an emulator without virtualization/etc. I'll give it a shot though,I guess (Hackintosh on Bochs). If there's anything else I may not know regarding emulating OS X on Bochs or such, please fill me in.
The desire to hack, with the ethics to code.
I'm gonna build an 8-bit computer soon, with this as reference: http://www.instructables.com/id/How-to- ... -Computer/
User avatar
iansjack
Member
Member
Posts: 4689
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Can OS X operating systems really run on x86 emulators?

Post by iansjack »

Owen wrote:
iansjack wrote:which is all perfectly legal as it's derived from the open source Darwin sources. You can then install from standard Apple install media.
The open source Darwin sources which have a specific usage restriction on them prohibiting their use in running OS X on a non-Apple computer
Really? Where? http://directory.fsf.org/wiki/License:APSLv2.0
seuti
Member
Member
Posts: 74
Joined: Tue Aug 19, 2014 1:20 pm

Re: Can OS X operating systems really run on x86 emulators?

Post by seuti »

It works under VMware Workstation.
User avatar
LieutenantHacker
Member
Member
Posts: 69
Joined: Sat May 04, 2013 2:24 pm
Location: Canada

Re: Can OS X operating systems really run on x86 emulators?

Post by LieutenantHacker »

I know it works on VMWare, but that's not an emulator; it uses CPU virtualization. Emulators of x86 mimick an entire CPU using the actual CPU, plus all relevant hardware. Virtual machines don't emulate CPUs; they use the same CPU with VT and virtualization support to execute guest machine's code.
The desire to hack, with the ethics to code.
I'm gonna build an 8-bit computer soon, with this as reference: http://www.instructables.com/id/How-to- ... -Computer/
User avatar
Owen
Member
Member
Posts: 1700
Joined: Fri Jun 13, 2008 3:21 pm
Location: Cambridge, United Kingdom
Contact:

Re: Can OS X operating systems really run on x86 emulators?

Post by Owen »

iansjack wrote:
Owen wrote:
iansjack wrote:which is all perfectly legal as it's derived from the open source Darwin sources. You can then install from standard Apple install media.
The open source Darwin sources which have a specific usage restriction on them prohibiting their use in running OS X on a non-Apple computer
Really? Where? http://directory.fsf.org/wiki/License:APSLv2.0
Maybe things have changed. Last time I checked, most of the Darwin sources had additional non-APSL terms attached.
User avatar
iansjack
Member
Member
Posts: 4689
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Can OS X operating systems really run on x86 emulators?

Post by iansjack »

I think you may be confusing the licence of the open source Darwin kernel and the EULA of OS X itself. That is a separate issue and there is a great deal of discussion as to its validity when applied to an individual with a legally purchased copy of the software. Naturally, Apple will not provide any sort of support for such an installation, which is their perogative.

Suffice it to say that this is a civil issue, not a criminal one, and that there is no recorded case of Apple taking issue with an individual for a breach of that contract (although they have taken action against companies seeking to profit by ignoring the EULA).
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Re: Can OS X operating systems really run on x86 emulators?

Post by Brynet-Inc »

The newer releases of Mac OS X are distributed without cost, but AFAIK only legally obtainable from Apple's App Store.. but it can be found elsewhere.

Emulating OS X is likely difficult, as the GUI depends on GPU acceleration.. and considering Apple controls all official hardware, it may not have any software fallback for unsupported graphics that would be implemented by Bochs or QEMU. It would also likely be very slow without hardware assisted virtualization.

There were some patches for QEMU with Linux KVM, but I don't think it worked with the TCG emulator backend.

The source for Apple's kernel and userland is all BSD/APSL/Apache and even GPLv2, any conditions for running binary versions in emulators or on "Hackintosh" systems is likely in the EULA.. and EULAs are not legal everywhere anyway.
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
User avatar
LieutenantHacker
Member
Member
Posts: 69
Joined: Sat May 04, 2013 2:24 pm
Location: Canada

Re: Can OS X operating systems really run on x86 emulators?

Post by LieutenantHacker »

Seems interesting ... Could anyone confirm its operation on Bochs? That guy in the question I linked said it works "fine", but I tried getting it running with Hackintosh Snow Leopard, EFI, and a ton of other workarounds and all I see is a black screen; no splash screen even. I thought some kind of GPU emulation was present on Bochs; at least enough for some OS X drivers and acceleration. I can't get it working at all ... nada.
The desire to hack, with the ethics to code.
I'm gonna build an 8-bit computer soon, with this as reference: http://www.instructables.com/id/How-to- ... -Computer/
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Re: Can OS X operating systems really run on x86 emulators?

Post by Brynet-Inc »

Arguably this is not the best forum for these questions, as Combuster suggested, you may be better off asking on one of the many Hackintosh communities or even on the bochs mailing lists.
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
User avatar
bluemoon
Member
Member
Posts: 1761
Joined: Wed Dec 01, 2010 3:41 am
Location: Hong Kong

Re: Can OS X operating systems really run on x86 emulators?

Post by bluemoon »

Brynet-Inc wrote:The source for Apple's kernel and userland is all BSD/APSL/Apache and even GPLv2, any conditions for running binary versions in emulators or on "Hackintosh" systems is likely in the EULA.. and EULAs are not legal everywhere anyway.
The kernel is open source and GPL, however the "aqua desktop" and software bundles (Mail, Safari, etc) is not.
Even Mavericks are free to download now, Apple still put additional restrictions when grant you the license.

In particular, it subjected to the Mac App Store License, which
... you are granted a limited, non-exclusive license to install, use and run one (1) copy of the Apple Software on a single Apple-branded computer at any one time.

and later...

(i) to download, install, use and run for personal, non-commercial use, one (1) copy of the Apple Software directly on each Apple-branded computer running OS X Mountain Lion, OS X Lion or OS X Snow Leopard (“Mac Computer”) that you own or control;

(ii) If you are a commercial enterprise or educational institution, to download, install, use and run one (1) copy of the Apple Software for use either: (a) by a single individual on each of the Mac Computer(s) that you own or control, or (b) by multiple individuals on a single shared Mac Computer that you own or control. For example, a single employee may use the Apple Software on both the employee’s desktop Mac Computer and laptop Mac Computer, or multiple students may serially use the Apple Software on a single Mac Computer located at a resource center or library; and

(iii) to install, use and run up to two (2) additional copies or instances of the Apple Software within virtual operating system environments on each Mac Computer you own or control that is already running the Apple Software, for purposes of: (a) software development; (b) testing during software development; (c) using OS X Server; or (d) personal, non-commercial use.
I'm not a lawyer but it seems obvious you can only legally run Mac OS X with Apple's hardware, or with emulator/hypervisor on top of Apple's hardware (VMWare, Parallels, etc).
Post Reply