Author Topic: Install Chameleon using Linux or Windows?  (Read 48635 times)

0 Members and 1 Guest are viewing this topic.

gordonf

  • Observer
  • Posts: 10
Install Chameleon using Linux or Windows?
« on: October 13, 2009, 05:45:25 PM »
I'm looking at having to support EFI-like add-ons on generic PCs. Most of the examples for Chameleon are written for use on MacOS X, such as preparing a boot device on a real Mac for use on a separate PC.

Is there a non-Mac way to prepare a startup device for Chameleon? Ideally I'd like to take something like a Linux Live CD / USB or Bart PE-like CD / USB, and install the boot loader on an otherwise empty PC. I could use tools on the Live CD to edit the boot loader as needed. The target could either be another CD, a USB device or a disk partition prepared for just that PC.

Gringo Vermelho

  • Forum Moderator
  • Posts: 611
  • The gray monster energy hat
Re: Install Chameleon using Linux or Windows?
« Reply #1 on: October 13, 2009, 05:55:06 PM »
I'm sure many people would be interested in something like this.

To the best of my knowledge, right now the only way to install retail OS X from scratch is by installing a hacked distro first. Unless you have a real Mac and can work from that.

Maybe there's a way to use MacDrive or Transmac under Windows..and maybe syslinux to make something bootable...I saw Hagar has been experimenting with that over at the ProjectOSX forums but I don't know if he's gotten any further with it.

You can also find OS X "live DVDs" in some dark corners of the internets but again that's not ideal.
10.9.5 - ASUS P8Z77-V Pro - i5 3570K - GTX 660 - Chameleon 2.3 svn-r2xxx
How to...
Install Chameleon: http://forum.voodooprojects.org/index.php/topic,649
Make your own Chameleon boot CD: http://forum.voodooprojects.org/index.php/topic,484.msg2131.html#msg2131

thorazine74

  • Member
  • Posts: 57
Re: Install Chameleon using Linux or Windows?
« Reply #2 on: October 13, 2009, 07:35:31 PM »
There should be some ways to install chameleon without OS X but it doesnt seem to be easy.
You need to be able to create HFS+ partitions, that is working in latest versions of gparted, though I'm not sure how compatible with OS X they are though.
Apart from that you would need to install the mbr and the bootsector to the partition, there is dd for linux but I dont know if you could write the mbr with a similar command:

Code: [Select]
dd if=boot0 of=/dev/sdX
dd if=boot1h of=/dev/sdX1

And put the boot file in / of course but that should not be a problem.

Also it seems to be posible to put chameleon on a FAT32 partition, using boot1f32 instead of boot1h, but it seems to have some bugs of troubles, there is another thread here about other subject that also discuss this, but it doesnt detail what the problem is with boot1f32.
If that boot1f32 would work you could do it from windows using a standard FAT32 partition and tools like MBRWizard or HDHacker to save the mbr, I'm not sure how to write the bootsector, maybe there is a dd for windows that works or maybe using the dsfok tools used in grub4dos.

All of this assumes a MBR partition table, if you need to support GPT I'm not sure about the requirements, it is supported in recent gparted versions too and in Vista and Windows 7 I think. But I'm not sure if the process of installing mbr & bootsector would be the same.

Just some ideas, nothing I've ever tried, I guess we all have running hackintoshes to worry about this.
« Last Edit: October 13, 2009, 07:41:53 PM by thorazine74 »
Mac OS X 10.5.6 Retail (Updated to 10.5.7) with Chameleon 2.0 RC1+BootIt NextGen 1.86 (MBR Single Drive)
Gigabyte 73PVM-S2H + C2D + 2 Gb
2 SATA HD (AppleAHCIport.kext) + 1 PATA DVD+RW (DarwinATAPort.kext)
Realtek ALC889 (VoodooHDA.kext)
Geforce 8600GTS (EFI String) PS/2 M & KB: VoodooPS2.kext

gordonf

  • Observer
  • Posts: 10
Re: Install Chameleon using Linux or Windows?
« Reply #3 on: October 13, 2009, 10:29:26 PM »
Thanks for the input so far.

Doing this on Windows or Bart PE might not be impossible; there is a dd for Windows and even a PE built from Windows Server 2003 SP1 or later could support GPT partitions. This assumes that a FAT32-formatted volume would work. But I haven't yet seen a means to obtain a PC's DSDT from Windows in order to patch it.

On the Linux side, a Live CD/USB with gpartd and dd could work, assuming the resulting volume works, either HFS+ or FAT32. The Ubuntu Live CD lets me obtain the DSDT though, and I've seen how to patch the thing in the same environment.

It sounds like it should be possible, but as was said, no one's tried before.

Gringo Vermelho

  • Forum Moderator
  • Posts: 611
  • The gray monster energy hat
Re: Install Chameleon using Linux or Windows?
« Reply #4 on: October 14, 2009, 01:50:23 AM »
But I haven't yet seen a means to obtain a PC's DSDT from Windows in order to patch it.

You can use Lavalys Everest Corporate Edition to dump all your ACPI tables.

Then decompile the DSDT with iasl and patch it by hand. Or you can use Koalala's ACPIPatcher (requires .net framework) to compile/decompile and automatically fix a few things. You will probably still need to clean up after it by hand though.
10.9.5 - ASUS P8Z77-V Pro - i5 3570K - GTX 660 - Chameleon 2.3 svn-r2xxx
How to...
Install Chameleon: http://forum.voodooprojects.org/index.php/topic,649
Make your own Chameleon boot CD: http://forum.voodooprojects.org/index.php/topic,484.msg2131.html#msg2131

D0nR0sa

  • Guest
Re: Install Chameleon using Linux or Windows?
« Reply #5 on: October 14, 2009, 04:41:25 AM »
Hi, I know that there is a way to install Chameleon from an Ubuntu Live CD, because I got it to work one time, but I can't remember everything. I know that I formatted a 200 MB partition with GParted in HFS+ and then tried the normal installing method (can't remember the commands, sry). I killed my whole partition table, but I was able to rescue it with Test Disk (took 2 1/2 hours : ). Then it worked.

Sorry that I can't remember much things, but I try to do it again at the moment and hope I'll find a better solution.

Gringo Vermelho

  • Forum Moderator
  • Posts: 611
  • The gray monster energy hat
Re: Install Chameleon using Linux or Windows?
« Reply #6 on: October 14, 2009, 09:07:19 AM »
That sure sounds like fun.  ;D
10.9.5 - ASUS P8Z77-V Pro - i5 3570K - GTX 660 - Chameleon 2.3 svn-r2xxx
How to...
Install Chameleon: http://forum.voodooprojects.org/index.php/topic,649
Make your own Chameleon boot CD: http://forum.voodooprojects.org/index.php/topic,484.msg2131.html#msg2131

Superhai

  • VoodooLabs
  • Posts: 102
Re: Install Chameleon using Linux or Windows?
« Reply #7 on: October 14, 2009, 01:09:42 PM »

Doing this on Windows or Bart PE might not be impossible; there is a dd for Windows and even a PE built from Windows Server 2003 SP1 or later could support GPT partitions. This assumes that a FAT32-formatted volume would work. But I haven't yet seen a means to obtain a PC's DSDT from Windows in order to patch it.


iasl can dump the DSDT from windows.
But my question is why you want to install chameleon from a linux/windows based boot disk?

gordonf

  • Observer
  • Posts: 10
Re: Install Chameleon using Linux or Windows?
« Reply #8 on: October 14, 2009, 05:04:55 PM »
Quote
iasl can dump the DSDT from windows.
But my question is why you want to install chameleon from a linux/windows based boot disk?

This is for the PC that doesn't already have MacOS X, or the user that doesn't have access to a running MacOS X installation.  I'd like to be able to walk up to a non-EFI PC with an empty hard drive, with just a boot device in hand, be it CD or USB, and install Chameleon on it. From there I'd install my EFI operating system or systems.

gordonf

  • Observer
  • Posts: 10
Re: Install Chameleon using Linux or Windows?
« Reply #9 on: October 14, 2009, 05:37:59 PM »
I found the iasl kit for Windows, and I can make the ACPI patcher 0.5 beta compile a .dsl file into a .asl file I extracted using iasl. (hm, the ACPI patcher included an iasl.exe already. Guess I have all I needed there.)

So, with the Chameleon binaries, a dd.exe, an iasl.exe and the ACPI patcher, it appears I can put together a Bart PE or something that should let me build a Chameleon boot device or partition tailored for a given PC. My first attempt at compiling the .dsl produced warnings; this must be the cleanup that needs to happen that Gringo mentioned.

To support GPT the PE would need to be based on Windows Server 2003 SP2, or Vista or later, but if Chameleon can boot off an MBR-partitioned USB device or CD does that device even need to be GPT? The target's hard drive would obviously be GPT, but the OS installer can do that.

If I can build a USB boot device with the Chameleon boot loader with all this, things should get interesting...

If I fail there I'll try the same approach from Ubuntu; that much seems to have been done before, once or twice.

D0nR0sa

  • Guest
Re: Install Chameleon using Linux or Windows?
« Reply #10 on: October 14, 2009, 10:42:33 PM »
OK, finally I was abled to reproduce my way to install Chameleon from Ubuntu.
I copied the boot file to the chameleon partition(hfs+) and thenI used:

dd if=boot1h of=/dev/sda1
dd if=boot0 of=/dev/sda

This messes up your partition table, but you can rewrite it with testdisk, (took this time only 30 seconds, because I tried nothing with the partitions before). After this it works like a charm.

Hope I could help, and sorry for my English (I'm German)
D0nR0sa

Kabyl

  • VoodooLabs
  • Posts: 158
Re: Install Chameleon using Linux or Windows?
« Reply #11 on: October 15, 2009, 08:14:04 AM »

dd if=boot0 of=/dev/sda


You don't want to do that!

D0nR0sa

  • Guest
Re: Install Chameleon using Linux or Windows?
« Reply #12 on: October 15, 2009, 03:56:36 PM »
First time I did it, I had no odea what I did, and I know it's a very bad method, because it overwrites your mbr but it works in combination with testdisk (i know it sounds crazy). I also tried to install with a kalyway 10.5.2 install disk and the integrated terminal(with fdisk, not dd), but that messed up my windows bootloader.
« Last Edit: October 15, 2009, 03:58:15 PM by D0nR0sa »

Kabyl

  • VoodooLabs
  • Posts: 158
Re: Install Chameleon using Linux or Windows?
« Reply #13 on: October 15, 2009, 05:53:29 PM »
We included a modified fdisk in the binary tarball that keeps the NT sig. Linux' fdisk probably does that too.

gordonf

  • Observer
  • Posts: 10
Re: Install Chameleon using Linux or Windows?
« Reply #14 on: October 15, 2009, 08:30:50 PM »
Thanks for all of the input so far. I'm going to try putting together a step-by-step list here, using Ubuntu, and run it by you all to see what I'm missing so far...

I would have preferred to see steps to install Chameleon to a USB device and make that bootable, but the steps I've seen so far point to installing it on its own partition on the target disk. I'll use that as a starting point.

1) Prepare Ubuntu live USB, add iasl and dd, assume target PC is completely empty or is OK to be empty.

2) Boot live USB, obtain dsdt.aml:
sudo cat /proc/acpi/dsdt > dsdt.aml

3) Decompile dsdt.aml and edit resulting dsl file:
iasl -d dsdt.aml
(should create dsdt.dsl)

4) After editing dsdt.dsl as required (cmos fix, device edits, and so on) recompile:
iasl -ta dsdt.dsl

5) Create GPT partition on target disk using gpartd, format as HFS+

6) Copy Chameleon binaries, add needed kexts and modified dsdt.aml to target partition according to manual install steps

7) Use dd to make partition bootable: (where "X" is target disk)
dd if=boot0 of=/dev/sdX (doesn't this destroy any existing MBR/GPT?)
dd if=boot1h of=/dev/sdX1

8) Reboot from target partition, and (hopefully) boot from an OS installation CD and install normally

What am I missing so far?

Again I'm looking for an end result where the machine is ready to install an OS. I would prefer not using a separate boot partition, creating a Chameleon bootable USB stick, but maybe the steps are the same and I just use gpartd and dd on the stick instead of sd0?