Linux - OSX - x86 Question

Discussion in 'General Mac Discussion' started by pjkelnhofer, Dec 16, 2003.

  1. pjkelnhofer macrumors 6502a

    pjkelnhofer

    Joined:
    Sep 8, 2003
    Location:
    Boston
    #1
    Let me start out by saying that I have far from a full understanding of how OS's work, but I have seen a bunch of things on-line recently of people running OS X with Linux on a PowerPC machine.
    This got me wondering, would it be possible (or has some one already achieved) running OS X via Linux on a x86 based machine.
    It seems like it would be possible. Linux is Unix based and so is OS X so why not.
    I have heard rumors that Apple has made versions of OS X that run on PC's but they have no intention of releasing it to the public.
    So has some enterprising person come up with their own solution?
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    This makes no sense!

    1) Linux is not Unix. Linux is a Unix like OS, but not Unix.

    2) OSX does not run as a layer on top of Unix (well sort of) like say x11. The OS is the whole thing.

    3) Just because it's Unix does not mean you can run a PPC (PowerPC) binary on an x86 both. You might as well ask (and if fact would be more correct) if you can run OSX on Solaris on Sparc (at least Solaris is a real Unix).

    Basically no.
     
  3. pjkelnhofer thread starter macrumors 6502a

    pjkelnhofer

    Joined:
    Sep 8, 2003
    Location:
    Boston
    #3
    Thanks, Robbie.
    You answered my questions. It was just a thought.
     
  4. Westside guy macrumors 601

    Westside guy

    Joined:
    Oct 15, 2003
    Location:
    The soggy side of the Pacific NW
    #4
    You can run OS X on a PPC Linux box inside an application called, appropriately enough, "Mac-on-Linux".

    http://maconlinux.net/
     
  5. AbeFroman macrumors newbie

    Joined:
    Dec 10, 2003
    #5
    robbieduncan,
    OS X uses Darwin. It's my understanding that Darwin is as much UNIX as Linux is UNIX and FreeBSD is UNIX. Not only that but Darwin is compatible with x86 computers. So then, to reitterate the original question, would it be possible to recompile OS X to work on x86? Well, we already know the answer to that- it is, Apple has admitted to doing it. But that doesn't mean we'll see that version on store shelves. I posted a question similar to this elsewhere in the forums. What I want to know is to what extent a PC running Darwin is compatible with a Mac running OS X.
     
  6. Powerbook G5 macrumors 68040

    Powerbook G5

    Joined:
    Jun 23, 2003
    Location:
    St Augustine, FL
    #6
    There are two problems that would prevent running OS X on x86 from my understanding, which are the fact that everything would have to somehow be compiled from PPC RISC code to x86 CISC code and the fact that in order to boot into Mac OS, you need a special Mac boot ROM.
     
  7. strider42 macrumors 65816

    strider42

    Joined:
    Feb 1, 2002
    #7
    I'm no expert, but here's what I udnerstand about this stuff.

    Darwin is based on BSD, which is based on the original AT&T Unix.

    Linux on the other hand was written by linus Torvalds originally and has no basis on unix. Its more accurately a unix clone or unix like OS. Unix and Linux to share a lot fo compatibilities because of things like x11.

    OS X is called by some a flavor or unix, other purists call it a unix based OS. In either case, technically OS X is closer to unix than linux is (thats neither good nor bad, just the truth)

    Darwin does have a version for x86. note that its not the same as the PPC version. You can't just take one and install it ont he other. x86 darwin was specifically compiled for that architecture. Same basic code though.

    Recompiling OS X to run on x86 is more comlicated than porting darwin (which is just the very base of the OS and whose ancestors were originally running on x86 anyway as part of Next and unix) Apple has never confirmed a port of OS X exists, but it seems to be pretty well accepted that it does exist.

    However, just because it exists does not mean its fully functional or works bug free.

    And whats more, just because the OS runs on x86, none of your mac programs would. They need to be compiled for the x86 processor. For full compatbility at that level, you'd have to be running a mac emulator in windows (which is different than mac on linux for the ppc, more akin to virtual PC for the mac). No adequate emulator exists. A few can emulate older processors, but nothing modern.

    I would imagine the same incomaptibilities exist with darwin. programs that run on ppc darwin would probably have to be recompiled to run on x86 darwin.

    No version of darwin is really OS X compatible. some ported unix stuff, but no commercial mac programs would run in darwin as its missing almost everything that makes OS x what it is (windowing system, quartz, etc, etc)

    So compatbility is a relative term. What do you actually want to accomplish.
     
  8. Makosuke macrumors 603

    Joined:
    Aug 15, 2001
    Location:
    The Cool Part of CA, USA
    #8
    strider42 explains it very well, but here's some supplimental explanation.

    Darwin, BECAUSE it is open source and the code is available, can be compiled to run on both x86 and PPC, probably in addition to other processors if you really wanted to.

    This is true of any piece of software you have the source for--depending on what OS features or assembly it uses, you might have to do a lot of adjusting, but given the source code of something you can usually get it to run on another chip architecture. Hence all the application ports that exist.

    OSX is not just Darwin, though--the core is basically Darwin, but all the goodies that make it familiar are not part of that. They are, furthermore, closed source. Meaning that although Apple can, and probably has, ported them to run on the x86 architecture, the rest of us cannot, and will never be able to unless Apple releases either the source or an x86 compatible version.

    And again, even if we did have an x86 compatible version of the full OSX, it would not run any of our current apps, without either an emulator (which would be little different than VPC in reverse) or an x86 port, which would be easier, but would still require the developers to do it.

    Other than emulators, there are only two grey areas: One would be command-line applications written for Darwin. They would probably complie, if you had the source, for either x86 or PPC Darwin, and I expect would compile under the command line in OSX as well.

    The other is direct-to-hardware emulation, which is I think what an earlier poster was picturing. It works somewhat like the current Classic environment. That is, if the platform you're trying to run uses the same chip/instruction set as the platform of your "main" OS, then you can just pass commands from the "emulated" OS right down to the hardware. This is why, for example, there are Windows emulators for x86 Linux that (I think) run much, much faster than VPC, and why Classic runs at close to the speed of OS9.

    However, this wouldn't work switching betwen PPC and x86, because the instruction set is different. Hence, it won't work at all.
     
  9. AbeFroman macrumors newbie

    Joined:
    Dec 10, 2003
    #9
    Well, since you asked what I actually want to accomplish...

    I have an idea.
    I'll go buy a barebones x86 system put open darwin on it and I'll connect it to my LAN. Would I be able to serve up Macintosh volumes with a setup like that? Could I also connect USB printers and share them in a way that would be compatible with Mac OS X Printer Sharing? Does that dwell in Darwin or is it exclusively limited to Mac OS X?

    OK, it's pretty obvious that this wouldn't work. But there is a larger question I have.

    Would an x86 server running Darwin have any advantages over an x86 server running any other OS (on an exclusively mac network)?

    How about drive format - does Darwin format drives on x86 systems with Mac OS HFS+ just like on regular macs? Does this even matter?
     
  10. Westside guy macrumors 601

    Westside guy

    Joined:
    Oct 15, 2003
    Location:
    The soggy side of the Pacific NW
    #10
    Since Rendezvous is based on an open standard I'd think there's no reason you couldn't do this (it won't necessarilly be easy though). There are Linux programs out there that take advantage of this standard, letting you share an "iTunes" playlist.

    Since I'm no longer a regular Linux user I can't give you the specifics; but I know folks who do this.
     
  11. bousozoku Moderator emeritus

    Joined:
    Jun 25, 2002
    Location:
    Gone but not forgotten.
    #11
    This link to Apple's development documentation may clear up what Mac OS X actually is: http://developer.apple.com/macosx/architecture/index.html

    Linux is a UNIX work-alike operating system that is based on Andrew Tanenbaum's Minix, which was itself based on version 7 AT&T UNIX.

    Yes, there are a lot of reasons why you wouldn't be able to run Mac OS X applications on Linux but, as previously posted, you can run Mac OS X on PPC Linux.

    The HFS+ file system is openly available by Apple, so even Linux users should be able to get it running--with work. The only thing is reading the data and swapping it, since x86 processors read data backwards from the rest of the world.

    I would imagine that Mac OS X-style printer sharing wouldn't be available but you can create queues on UNIX to remote systems' printers.
     
  12. Mord macrumors G4

    Mord

    Joined:
    Aug 24, 2003
    Location:
    UK
    #12
    apple:

    "This is a single Installer CD that will boot and install Darwin on Macintosh computers supported by Mac OS X 10.3, as well as certain x86-based personal computers."

    http://developer.apple.com/darwin/
     
  13. whooleytoo macrumors 603

    whooleytoo

    Joined:
    Aug 2, 2002
    Location:
    Cork, Ireland.
    #13
    This might interest you, it's an open source equivalent of OpenStep, which Cocoa is mostly based on.

    In theory, it should mean many Cocoa apps could just be recompiled to run on GNUStep on PC, but I don't know how complete it is.
     
  14. tomf87 macrumors 65816

    tomf87

    Joined:
    Sep 10, 2003
    #14
    The source code would be the same, since I believe (correct me if I'm wrong) the code was written in C. The compiler would take care of making the binary for the particular architechture. This is just the same as using the same C code on Solaris, Mac OS, and Linux, and compiling it.

    As for the boot loader, I guess the only reason for the Mac boot ROM is for the architecture of the hardware. Most x86, as you probably know, have a BIOS that would be similar to the Open Firmware. Actually, from what I've seen, the Open Firmware is very similar to Sun's Open Boot PROM.
     
  15. Powerbook G5 macrumors 68040

    Powerbook G5

    Joined:
    Jun 23, 2003
    Location:
    St Augustine, FL
    #15
    I thought Apple started requiring the Boot ROM in order to kill the clones and prevent any non Apple hardware from loading Mac OS and keep the platform closed.
     
  16. mougly macrumors newbie

    Joined:
    Aug 12, 2004
    #16

    no. contrary to all of your beliefs, darwin isn't an operating system, darwin is a kernel, a kernel once and still used in many flavours of unix. what you're wondering is like asking, "i'm going to install linux, kernel 2.6.5-14, is it going to format my drive as FAT32(vfat)?" darwin has and always will be unix, to the XcoreX. mac was wise, unlike microsoft and actually embeded darwin as their sort of "shell," very similar as dos was to windows 95. so to answer your question properly, no, it wont. it DOESN'T format your drive, the native operating system you have, or are trying to patch or compile it on was and will be the only one (unless you mkfs) to change/format your drive to a certain filesystem.
     
  17. mougly macrumors newbie

    Joined:
    Aug 12, 2004
    #17
    in addition to my previous post, if you WANT to run Mac OS on x86, it IS possible, and it HAS been done, i'm doing it right now. however if you want to use it with XP you've got to have some pretty hefty resources handy. i'm doing it through linux (2.6.5-14) on 3.2ghz/1GB DDR RAM/260GB SATA 10000RPM and it's running kinda sluggish, but it's still awesome.

    if you want it, you can compile it to run under cygwin(windows), it runs flawlessly under linux.

    the url is..

    [url]http://pearpc.sourceforge.net/screenshots [/url]
     
  18. Nermal Moderator

    Nermal

    Staff Member

    Joined:
    Dec 7, 2002
    Location:
    New Zealand
  19. AmigoMac macrumors 68020

    AmigoMac

    Joined:
    Aug 5, 2003
    Location:
    l'Allemagne
    #19
    It's crazy and geeky...

    Crazy: You reply a post from 8+ months ago!!! :eek:

    Geeky : There will be always those who want to do the "hardest" thing in computer science, no matter how perfect it runs but important is to do a "revolutionary" thing (Mac os X on x86, Mac on linux, Virtual PC, PearPC, Bosch) I would imagine that some one in the future will "reverse-engine" the whole Mac OS X to X86 including the iLife apps (apart of iTunes)...

    Ohh wait, I replied too :eek:
     
  20. yellow Moderator emeritus

    yellow

    Joined:
    Oct 21, 2003
    Location:
    Portland, OR
    #20
    I'll be a long, long, long, long time before Mac OS X (AquaOverDarwin), as we all know it, will be available to the general public to run on a x86 architecture. Why? I'll tell you, Apple is a hardware company. The bulk of their revenue still comes from their computer sales. I think we will all agree that they are trying to make gains in the software sale market. However, since 99% of the software they produce is for the Apple architecture, they have a limited group to sell to. So don't look for OSX on an x86 any time soon.
     
  21. federalists macrumors member

    Joined:
    Jun 17, 2004
    Location:
    Mountain View, CA
    #21
    is that you, ken brown? any slashdotters out there should recognize this claim by the president of the "Alexis de Tocqueville Institution." for all those who haven't been following this soap opera, you might be interested in the following recounts of the events:
    http://www.cs.vu.nl/~ast/brown/
    http://www.cs.vu.nl/~ast/brown/rebuttal/

    basically, andrew tanenbaum, the author of minix, says linux has nothing to do with minix after ken brown writes a book saying linux was a copy of minix, therefore the gpl is bad, etc etc.
     
  22. mougly macrumors newbie

    Joined:
    Aug 12, 2004
    #22
    to all you appleheads who want to run macos x on your x86 computers, myself and my friend have constructed a live cd, it installs linux on your computer barebones (our own x11/network support etc), and ppc-0.20, when it's done, it reboots and on x11initrd loads ppc as the desktop, from which you can install mac os ____. our ppc has been optimized under the GPL for P4 processors, so. if any of you are interested in trying it (posting from it now) drop us an email and i'll give you private ftp info for the ISO.

    drainsyth [ a t ] hotmail . com


    cheers, big ears.
     
  23. jhu macrumors 6502a

    jhu

    Joined:
    Apr 4, 2004
    #23
    solaris is a unix in name. if sun hadn't paid the opengroup for certification (or whoever certified unixes back then), solaris would not be a unix.
     
  24. MisterMe macrumors G4

    MisterMe

    Joined:
    Jul 17, 2002
    Location:
    USA
    #24
    Sun Microsystems licensed UNIX System V from AT&T years before the Open Group was ever thought of. Sun pays the Open Group to maintain the license.
     
  25. jhu macrumors 6502a

    jhu

    Joined:
    Apr 4, 2004
    #25
    true, there's heritage and name. if sun didn't pay the open group, solaris could not be called a unix.
     

Share This Page