Chameleon > Patches

boot0md: dual boot Windows 7 and Mac OSX from Win7 drive

(1/15) > >>

dmazar:
Problem:
I have Win7 on one disk and Mac OSX with Chameleon on the other. Booting with OSX drive (set up as boot drive in BIOS) loads Chameleon and I can start OSX or Win7 from there. But …
If Windows drive is not the boot drive then some things are not working in Win: hybrid sleep, service pack 1 install, win7 disk image backup …

Solution:
Modified boot0 code - boot0md (multi disk) - can be installed in Win7 disk MBR. It can load Chameleon from other disks, or Win7 if Chameleon can not be found.

boot0md - same as boot0 but searches all disks:
- searches all BIOS accessible disks to find bootable HFS partition (with boot1h)
- if one is found then it boots it
- if not found, then searches all disks again but for active partition (e.g. Win7) and boots it

In my case now:
- boot0md is in MBR of Win7 disk and BIOS boots from it
- boot0md loads boot1h from MacOSX disk and loads it
- boot1h loads Chameleon's boot from MacOSX disk
- boot shows menu with MacOSX and Win7
- if Win7 is booted with it then hybrid sleep works

If MacOSX disk is removed, then boot0md loads Win7 directly.


Source attached.
- should be put in i386/boot0/ of Chameleon source tree and compiled with the rest of it because of config options

Compiled boot0md attached.


Install from terminal:
- determine windows disk with
diskutil list
- install with
sudo fdisk440  -f boot0md -u /dev/rdiskX


Notes: It works for me (see test cases), but I have it only for 2 days. So, it's not tested and proved enough.


Other possible solutions:

1. selecting boot drive from bios (F8 on my board) - most simple, ok if you does not switch between OSes too often

2. adding additional HFS partition to Win drive with Chameleon on it - I did not want more partitions

3. using Win boot loader BCD - EasyBCD can add new MacOSX entry (MBR method), boot0md can be put instead of provided MBR file and then this works for me - but I found Chameleon to be nicer

4. and many others, I'm sure …

Anyway, tweaking of boot loader code was the most interesting path to me, so I chosen that route. If nothing else, for fun …

dmazar:
Test cases:
-----------
TC 1

Disk0: MBR (boot0md), P1=Win7 (NTFS, bootable, active)
Disk1: GPT, P1=EFI, P2=MacOSX (HFS+, boot1h, boot), P3=MacOSX-Bak (HFS+, boot1h, boot)
Disk2: MBR, P1=Data3 (NTFS), P2=Data4 (exFAT)

Result: Loads Disk1/P2/chameleon; can boot MacOSX, MacOSX-Bak, Win7; Win7 hybrid sleep works

-----------
TC 2

Disk0: MBR (boot0md), P1=Win7 (NTFS, bootable, active)
Disk1: MBR, P1=Data3 (NTFS), P2=Data4 (exFAT)

Result: Loads Win7, hybrid sleep works

-----------
TC 3

Disk0: MBR (boot0md), P1=Win7 (NTFS, bootable, active)
Disk1: GPT, P1=EFI, P2=MacOSX (HFS+, not bootable), P3=MacOSX-Bak (HFS+, not bootable)
Disk2: MBR, P1=Data3 (NTFS), P2=Data4 (exFAT)

Result: Loads Win7, hybrid sleep works

-----------
TC 4

Disk0: MBR (boot0md), P1=Win7 (NTFS, bootable, active)
Disk1: GPT, P1=EFI, P2=MacOSX (HFS+, not bootable), P3=MacOSX-Bak (HFS+, not bootable)
Disk2: MBR, P1=Data3 (NTFS), P2=Data4 (exFAT)
Disk3 (USB): GPT, P1=Boot (HFS+, boot1h, boot)

Result: Loads Disk3 (USB)/P1/chameleon; can boot MacOSX, MacOSX-Bak, Win7; Win7 hybrid sleep works

Blackosx:
Hi dmazar - Welcome to the forum.

Your changes here look interesting and I think will help many users wanting to use Chameleon to boot Windows where it resides on a separate HDD. As you've mentioned already, opting to choose to boot the Windows HDD from BIOS (F8) is the simplest method for this situation, but your mod could prove to be favourable.

I don't currently have Windows installed anywhere on my system so I can't test that part of it immediately, though I can test the booting of OS X. I'll try it out tonight.

Thanks for your contribution.

dmazar:

--- Quote from: Blackosx on July 12, 2011, 04:43:38 PM ---Hi dmazar - Welcome to the forum.

--- End quote ---

Thanks.
Hope this will be of some use to somebody.

Blackosx:
Hi dmazar

I've finally got round to installing Windows 7 and have just tested your boot0md file.

Test details:
Disk0: MBR (boot0md), P1=System Reserved (NTFS, bootable, active), P2=Win7 (NTFS)
Disk1: GPT, P1=EFI, P2=Boot (HFS+, boot0hfs, boot1h, Boot), P3=MacOSX 10.6 (HFS+), P4 MacOSX 10.7 (HFS+)
Disk2 (USB): GPT, P1=Mac OSX Install DVD (HFS+, boot0, boot1h, boot)

- Selecting to boot Disk0 from BIOS (F12), boot0md finds Chameleon on Disk1/P2 and presents GUI where selecting to boot Disk0/P1 (System Reserved) boots Windows and hibernation works.

- Selecting to boot Disk1 from BIOS (F12), boot0hfs finds Chameleon on Disk1/P2 and presents GUI where Selecting to boot Disk0/P1 (System Reserved) boots Windows and hibernation fails as expected.

- Selecting to boot Disk0 from BIOS (F12), boot0md finds Chameleon on Disk1/P2 and presents GUI where selecting to boot Disk1/P3 works as expected.

- Selecting to boot Disk0 from BIOS (F12), boot0md finds Chameleon on Disk1/P2 and presents GUI where selecting to boot Disk1/P4 works as expected.

- Selecting to boot Disk0 from BIOS (F12), boot0md finds Chameleon on Disk2/P1 and presents GUI where selecting to boot Disk2/P1 works as expected.

Conclusion:
This works great. I'm more than happy to recommend this and use it on a separate HDD with Windows as the main system. Good work dmazar  ;D

Navigation

[0] Message Index

[#] Next page

Go to full version