2

Author Topic: [How To]: Installing OSX without access to a Mac  (Read 82161 times)

0 Members and 1 Guest are viewing this topic.

kbear

  • Observer
  • Posts: 17
Re: [How To]: Installing OSX without access to a Mac
« Reply #75 on: February 10, 2010, 12:20:47 PM »
If there is I haven't figured it out  :(

OK, I think I'm going to save myself some aggravation, and copy the entire Snow Leopard Mac OS X install DVD to a USB stick.

Only problem is, I can't mount it using the PDF instructions.

In the Parted Magic terminal I typed:
Code: [Select]
mkdir /s
losetup -o 1034489856 /dev/loop3 /dev/sr0

and got this response:
Code: [Select]
losetup:  /dev/loop3: No such file or directory
I tried to load the man page for losetup, to understand what it's supposed to do, but Parted Magic does not have one.

I typed losetup without arguments in case there was any online help. I got this result:
Code: [Select]
/dev/loop0: 0 /lib/unionfs/usr.sqfs
/dev/loop1: 0 /lib/unionfs/firmware.sqfs
/dev/loop2: 0 /lib/unionfs/modules.sqfs

No /dev/loop3 was listed.

Could you please explain what this command is supposed to do?

Isn't there an simpler way to access the hidden Mac OS X install partition from Windows? I could then use MacDisk to copy the files to the USB stick.

outragedtony

  • Observer
  • Posts: 13
Re: [How To]: Installing OSX without access to a Mac
« Reply #76 on: February 10, 2010, 01:48:11 PM »
To copy the whole disc with all partitions, just use
Code: [Select]
dd if=/dev/sr0 of=/dev/sdb
(assuming usb stick is on /dev/sdb and has no valuable data on it...)

Try it with dd for windows, should be the same (apart from the device naming scheme). You may want to add --progress and a bs option to speed things up.
« Last Edit: February 10, 2010, 02:04:16 PM by outragedtony »

kbear

  • Observer
  • Posts: 17
Re: [How To]: Installing OSX without access to a Mac
« Reply #77 on: February 10, 2010, 02:03:37 PM »
To copy the whole disc with all partitions, just use
Code: [Select]
dd if=/dev/sr0 of=/dev/sdb
(assuming usb stick is on /dev/sdb and has no valuable data on it...)

Try it with dd for windows, should be the same. You may want to add --progress and a bs option to speed things up.

Thanks. Problem is, I only want/need the third partition.  :(

UPDATE: I just tried the (losetup) procedure again from a PC (first try was from VirtualBox) and it worked. It seems this is VirtualBox-related problem after all.  :P

r0m30

  • Forum Moderator
  • Posts: 98
    • r0m30's OSX86 site
Re: [How To]: Installing OSX without access to a Mac
« Reply #78 on: February 10, 2010, 11:13:31 PM »
Could you please explain what this command is supposed to do?
The losetup command tells mount to look for the HFS+ partition at an offset other than the default (the beginning of the device).

Isn't there an simpler way to access the hidden Mac OS X install partition from Windows? I could then use MacDisk to copy the files to the USB stick.
The MacDisk page says it can read hybrid CD/DVDs, never used it. In MacDrive there is an option that lets you chose to show the ISO9660 data or the Mac data on a CD/DVD.

I thought you were trying to do this with free tools?  In earlier versions of the PDF I used MacDrive to read the install DVD but I changed to the PMagic mount so I didn't have to rely on a time limited trial or purchased software to access the the kernel and /S/L/E on the DVD.
--- r0m30 ---
HP Mini 1033CL (Costco) OSX Retail 10.6 Chameleon-2.0-RC3-r658
HP m9077c -  ASUS IPIBL-LA MoBo with Core 2 Quad Q6600
    Retail 10.6.2 Chameleon-2.0-RC4-r684

kbear

  • Observer
  • Posts: 17
Re: [How To]: Installing OSX without access to a Mac
« Reply #79 on: February 11, 2010, 10:09:49 AM »
I thought you were trying to do this with free tools?  In earlier versions of the PDF I used MacDrive to read the install DVD but I changed to the PMagic mount so I didn't have to rely on a time limited trial or purchased software to access the the kernel and /S/L/E on the DVD.

This is now a moot point, since I managed to mount the HFS+ Hybrid Mac OS X DVD partition from Parted Magic, using your PDF instructions.  :)

As I mentioned in my previous post, the problem had arisen from the fact that I was running Parted Magic on VirtualBox instead of a real PC. Once I brainstormed myself to try it on a real PC, your instructions worked like a charm.

As for MacDisk, the only limitation of the demo is the file size you can transfer from Windows, otherwise it's fully functional. It might prove useful (but certainly not essential) for making changes to the Chameleon Extras folder from Windows, without having to reboot from Parted Magic.

BTW, MacDisk could not mount the Mac OS X install DVD HFS partition. Either Apple did something decidedly non standard with it, or MacDisk is not up to date.

Which reminds me: do you know why the Mac OS X install DVD appears to have three partitions? one is for the BootCamp drivers, one for the actual installer, and one for... what? In OS X install DVDs that come bundled with hardware, there is a system diagnostics partition. But I would not expect this to be present in the retail DVD.

r0m30

  • Forum Moderator
  • Posts: 98
    • r0m30's OSX86 site
Re: [How To]: Installing OSX without access to a Mac
« Reply #80 on: February 11, 2010, 07:23:03 PM »
Which reminds me: do you know why the Mac OS X install DVD appears to have three partitions? one is for the BootCamp drivers, one for the actual installer, and one for... what? In OS X install DVDs that come bundled with hardware, there is a system diagnostics partition. But I would not expect this to be present in the retail DVD.

I never tried mount it so I don't know for sure what it is, I always assumed it was the HFS partition that told users of older Mac OS versions that their computer couldn't use the DVD because they didn't have HFS+ support.
--- r0m30 ---
HP Mini 1033CL (Costco) OSX Retail 10.6 Chameleon-2.0-RC3-r658
HP m9077c -  ASUS IPIBL-LA MoBo with Core 2 Quad Q6600
    Retail 10.6.2 Chameleon-2.0-RC4-r684

stephens

  • Entrant
  • Posts: 4
Re: [How To]: Installing OSX without access to a Mac
« Reply #81 on: February 21, 2010, 02:10:45 PM »
Just an update to this howto, because the Parted Magic USB boot is a nearly perfect solution for making changes; however, it lacks ONE critical tool -- IASL compiling/decompiling tools.

This is EASILY fixed, however!

Parted Magic can automatically install additional Slackware 12.x packages.  You simply need to place them in the /pmagic/pmodules directory on the USB key.

Thus, if you download the package from here: Precompiled IASL Package for Slackware, or the Direct Link, you can simply copy the .tgz file(s) into the /pmagic/pmodules directory for custom DSDT hacking while you're inside the Parted Magic distribution.  Parted Magic already has the glibc dependencies installed, so there's no need to fetch other files.

For the DSDT uninitiated, and as an extra to r0m30's howto, here's the quick run-down of my personal procedure:
Code: [Select]
# Dump the DSDT to a file:
cat /proc/acpi/dsdt > dsdt.aml

# Decompile the dsdt.aml file into dsdt.dsl:
iasl -d dsdt.aml

# Save a copy of your original dsdt.dsl file to the USB drive:
cp dsdt.dsl /f/dsdt-orig.dsl

# Make whatever changes you want using vi (or nano, or leafpad):
vi dsdt.dsl

# Save a copy of your custom dsdt.dsl to the USB drive:
cp dsdt.dsl /f/dsdt-custom.dsl

# Recompile the dsdt.dsl file into dsdt.aml:
iasl -ta dsdt.dsl

# Copy your custom dsdt.aml file to the partition you're installing to, Chameleon will recognize it in the / or /Extra directories:
cp dsdt.aml /c/

Someone let me know if this works as well for them as it did for me, it was exceptionally inconvenient to have to keep copying the dsdt.dsl|aml files around while testing!

Happy hacking!  ;D

P.S. Don't forget that lspci -vvvxxx is also available from within Parted Magic for additional system analysis.
P.P.S. Just in case the file goes away in the near future, I've attached it to this post for easy reference as well.
P.P.P.S. In before the sticky.. and first contribution/post!
« Last Edit: February 21, 2010, 02:31:59 PM by stephens »

stephens

  • Entrant
  • Posts: 4
Re: [How To]: Installing OSX without access to a Mac
« Reply #82 on: February 21, 2010, 02:27:13 PM »
One last note:

When mounting your OSX HFS+ partition from within Parted Magic after booting, or perhaps rebooting several times, it is wise to run fsck against the partition before mounting it; otherwise, it may not be writable.

Code: [Select]
# Substitute /dev/sda2 with whatever your HFS+ partition is, and run fsck against it:
fsck.hfsplus /dev/sda2

# Create a directory to mount the HFS+ partition on:
mkdir /c

# Mount the HFS+ partition (You can use -o ro, or -o rw, depending if you want to make it Read-Only or Read-Write as well):
mount /dev/sda2 /c

r0m30

  • Forum Moderator
  • Posts: 98
    • r0m30's OSX86 site
Re: [How To]: Installing OSX without access to a Mac
« Reply #83 on: February 21, 2010, 07:51:45 PM »
Just an update to this howto, because the Parted Magic USB boot is a nearly perfect solution for making changes; however, it lacks ONE critical tool -- IASL compiling/decompiling tools.

I did my initial DSDT patching in Windows, this would have been much easier, thanks

When mounting your OSX HFS+ partition from within Parted Magic after booting, or perhaps rebooting several times, it is wise to run fsck against the partition before mounting it; otherwise, it may not be writable.

Good tip, I'll add this to the update for RC5 when it is released.

Thanks!
--- r0m30 ---
HP Mini 1033CL (Costco) OSX Retail 10.6 Chameleon-2.0-RC3-r658
HP m9077c -  ASUS IPIBL-LA MoBo with Core 2 Quad Q6600
    Retail 10.6.2 Chameleon-2.0-RC4-r684

fillet54

  • Entrant
  • Posts: 1
Re: [How To]: Installing OSX without access to a Mac
« Reply #84 on: March 03, 2010, 08:25:56 AM »
I tried following your guide but i cannot get Chameleon to boot. I am installing to an internal sata drive and it does not boot from the hard drive. Instead i get a "No bootable device.." message.

any help would be appreciated.

r0m30

  • Forum Moderator
  • Posts: 98
    • r0m30's OSX86 site
Re: [How To]: Installing OSX without access to a Mac
« Reply #85 on: March 03, 2010, 08:45:54 PM »
I tried following your guide but i cannot get Chameleon to boot. I am installing to an internal sata drive and it does not boot from the hard drive. Instead i get a "No bootable device.." message.

any help would be appreciated.

Is you BIOS set to AHCI mode for your disks?
Do you have any required kexts for your chipset in /Extra/Extensions?
--- r0m30 ---
HP Mini 1033CL (Costco) OSX Retail 10.6 Chameleon-2.0-RC3-r658
HP m9077c -  ASUS IPIBL-LA MoBo with Core 2 Quad Q6600
    Retail 10.6.2 Chameleon-2.0-RC4-r684

Dunge

  • Entrant
  • Posts: 6
Re: [How To]: Installing OSX without access to a Mac
« Reply #86 on: March 04, 2010, 03:41:57 AM »
I don't know if I should create a new thread for this or use this one, but here it goes.

I'm trying to install SL since a while and just can't believe how many ways there are to do it, and how none seems functional. Look like OSX86 is a project where everyone is trying to develop the same thing their own way and sabotage the work of others, while writing parts of incomplete guide scattered through internet forums. I'm a C++ programmer and Linux user and never had difficulties like this before.

My hardware:
Asus P5W DH Deluxe
Core2Duo E6600 stock
GeForce 9800GTX
SATA DVD-RW plugged in a Intel SATA port. (TSSTcorp SH-S203B)
80gb  Maxtor IDE hard drive plugged in a Intel IDE port as first master. (6Y080L0)

Even though I got a original SL dvd, I first grabbed a pirate distro on a torrent site because I though it was the only way. Of course, it failed to boot, I don't remember how but we don't care. I then learned about myHack, but since I don't have a original Mac and neither have a 6gb USB drive, I can't use it. I then found out about certain EFI bootcd. I tried EmpireEFI, but it kernel panic in SL installation when entering disk tool or choosing disk to install. I then searched for my motherboard and found out a Polish thread on osx86.org.pl where a guy did a custom EFI bootcd for my motherboard. I updated my BIOS and set the bios options as he instructed (AHCI and cpu thingy). With his disk, I managed to format my hard drive in the disk tool, then started the installation. At 50% complete, it asked me to reboot the computer to finish installation. I rebooted on his bootcd, and the hard drive was not in the list of visible device. Booting on SL dvd again started the installation from scratch and gave the same result afterward. I asked him on his thread, and he is clueless.

Finally, I though I would step down one level and install chameleon myself, where I finally found this thread. Everything from your PDF guide seems to work great, I managed to format, partition the disk and copy every files. Regenerating the dsdt.aml from the dsdt.dsl output an error though, I can try it again if you need it. I then booted on the hard drive, saw the Chameleon background while it loaded bunch of kext. The Chameleon background then disappeared to give a black background, and in about 1second a few pages scrolled to end up with a kernel panic. Sorry I don't have a picture, but from what I could read it fail loading AppleACPIPCI, then it load fakesmc correctly, then it fail loading AppleUSBEHCI, then it kernel panic, which look like:

kernel trap at 0x35928fcd type 14=page fault
first line of the call stack is: 0x2fb43c48 : 0x21acfa (0x5ceb50 0x2fb43c7c 0x223156 0x0)
and last line is talking about kext : com.apple.iokit.IOATAFamily(2.5.0)@0x35924000 -> 0x35930fff

From what I can tell, IOATAFamily is causing the problem, but I guess this is an important kext? Here's the list of kext I put on my usb drive /Extra/Extensions directory, not sure about everything but I got a package for my motherboard and installed a few others from kext.com:
AHCIPortInjector.kext, ALCinject.kext, AppleAC97Audio.kext, AppleACPIPlatform.kext, AppleGenericPCATA.kext, AppleHDA.kext, AppleIntelIntegratedFramebuffer.kext, ApplePS2Controller.kext, AppleSMBIOS.kext, AppleUSBEHCI.kext, AppleUSBOHCI.kext, AppleUSBUHCI.kext, ATAPortInjector.kext, Disabler.kext, fakesmc.kext, IOAHCIBlockStorageInjector.kext, IOATAFamily.kext, IONetworkingFamily.kext, JMicronATAInjector.kext, NullCPUPowerManagement.kext, OpenHaltRestart.kext, PlatformUUID.kext.
Of course, I'm not sure about those who cause errors, but I'm not sure about the kext like Disabler which I took from the Chameleon .gz package in Optional Extra\Extensions\(10.6,Common) and copied there

Also, what's your opinion about using the boot file from netkas's PC EFI 10.6 instead of the Chameleon default one?
« Last Edit: March 04, 2010, 03:46:24 AM by Dunge »

r0m30

  • Forum Moderator
  • Posts: 98
    • r0m30's OSX86 site
Re: [How To]: Installing OSX without access to a Mac
« Reply #87 on: March 04, 2010, 05:07:19 AM »
First, the boot sequence you describe (chameleon, black screen with scrolling test) is what you should be getting.  That is how verbose (-v) mode works.

As the guide said "You should get your first Kernel Panic soon"

I would suggest starting with the minimum kexts in /Extra/Extensions and then adding kexts to fix each problem (Kernel Panic) as it occurs.  I know this is a slow and boring process but then you know why you have each kext installed and don't have a lot of extra kexts that may or may not be doing anything useful. 

I noticed a few things in you kext list, you are loading a IOATAFamily.kext and that is where you are getting your KP, maybe you should ask for help with that kext where you found it, I have no way of knowing what has been done to it. Also, you are loading AppleAC97Audio.kext and AppleHDA.kext  I don't see how you would need both unless you have multiple sound chips.  This is one of the reasons for the advice above.

The boot file from netkas's PC EFI 10.6 is really great if you have an ATI graphics card (the ATI support has been ported to Chameleon in the REPO) but you should be able to use the Chameleon boot file with your 9800GTX, you can certainly try it but I doubt it will fix your IOATAFamily problem.
--- r0m30 ---
HP Mini 1033CL (Costco) OSX Retail 10.6 Chameleon-2.0-RC3-r658
HP m9077c -  ASUS IPIBL-LA MoBo with Core 2 Quad Q6600
    Retail 10.6.2 Chameleon-2.0-RC4-r684

Dunge

  • Entrant
  • Posts: 6
Re: [How To]: Installing OSX without access to a Mac
« Reply #88 on: March 05, 2010, 01:06:56 AM »
Thx for the reply.
I did as you suggested, only booting with Disabler.kext (from Chameleon "\Optional Extra\Extensions\10.6\" directory, is that ok?), fakesmc.kext, NullCPUPowerManagement.kext and OpenHaltRestart.kext from the kext.com essential SL pack.

From the verbose lines, I see AppleACPICPU logs seems ok, then fakesmc which also seems ok, then AppleUSBEHCI whine about "Unable to initialize UIM" even though I don't have this kext anymore, is this one from the DVD? Then I see AppleYukon2 load, which also seems ok. It then stop there, and after a while write "Still waiting for root device." repetitively. My guess is that I'm missing some kext for the HDD, but how can I know which one to add next? If I have too much, it crash, if I have not enough it crash, so how the hell are you supposed to know what do to? Is there a list somewhere with every error message/kernel panic and which kext fix them?

Another question, does having any other hard drive than my targeted SL drive plugged (all in Intel controller) or any USB devices (such as the Parted Magic usb key or the Microsoft Xbox 360 Gamepad Wireless Receiver) change something on the kernel panic and needed kext? Probably, but it's a pain having to physically unplug every drives every time I want to try chameleon and  boot back in Windows­.

A final question, let's say I actually manage to start the SL installation, I guess I don't format the drive using the disk utility? I simply select the drive with Chameleon on it and press next?
« Last Edit: March 05, 2010, 01:27:22 AM by Dunge »

r0m30

  • Forum Moderator
  • Posts: 98
    • r0m30's OSX86 site
Re: [How To]: Installing OSX without access to a Mac
« Reply #89 on: March 05, 2010, 03:30:16 AM »
It then stop there, and after a while write "Still waiting for root device." repetitively.
This is the step in the guide where you have to figure out which drive is the DVD drive. From the guide:

Quote
"When Chameleon comes up press the right arrow key until your Chameleon disk is highlighted, press the space bar and enter “rd=disk?s3” (? = the bios drive number of your DVD) without the quotes at the boot: prompt and hit enter. If you get a message that says “Still Waiting for root device” you entered the wrong disk in your rd= parameter."

Is there a list somewhere with every error message/kernel panic and which kext fix them?
Not that I'm aware of, google is your friend, use keywords like the kext that is giving you the panic and add "OSX86" then trudge through the hits until you find a fix.  It's not a lot of fun or easy but that's the current state of OSX86.

A final question, let's say I actually manage to start the SL installation, I guess I don't format the drive using the disk utility? I simply select the drive with Chameleon on it and press next?
You need to use disk utility to add and format the OSX partition, use the "+" button to add a partition and make it HFS+ journaled.  The retail OSX DVD won't install on a non-journaled partition.  The Chameleon partition should be left there or else you wont have a boot loader.
--- r0m30 ---
HP Mini 1033CL (Costco) OSX Retail 10.6 Chameleon-2.0-RC3-r658
HP m9077c -  ASUS IPIBL-LA MoBo with Core 2 Quad Q6600
    Retail 10.6.2 Chameleon-2.0-RC4-r684