overdue-scratch

Author Topic: boot0md: dual boot Windows 7 and Mac OSX from Win7 drive  (Read 48274 times)

0 Members and 1 Guest are viewing this topic.

dmazar

  • Member
  • Posts: 52
Re: boot0md: dual boot Windows 7 and Mac OSX from Win7 drive
« Reply #60 on: November 06, 2011, 12:17:36 AM »
I'm glad you did it. And forwarding your thanks to guys who are working on Chameleon.  ;)

CoolFX

  • Entrant
  • Posts: 4
Re: boot0md: dual boot Windows 7 and Mac OSX from Win7 drive
« Reply #61 on: November 09, 2011, 10:13:44 PM »
Hello...

Sorry to ask you guys for this ,but i just can't do it by myself.....

I have Chimera 1.6 and Lion on one drive and Windows 7 on the other (i dont have the system reserved partition).

This is my diskutil list:

/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *1.0 TB     disk0
   1:               Windows_NTFS Windows 7               150.0 GB   disk0s1
   2:                  Apple_HFS Downloads               450.1 GB   disk0s2
   3:                  Apple_HFS Time Machine            399.9 GB   disk0s3
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *400.1 GB   disk1
   1:                        EFI                         209.7 MB   disk1s1
   2:                  Apple_HFS Lion                    399.7 GB   disk1s2

I downloaded boot0workV2 and in terminal i did :
sudo fdisk440 -f /Users/CoolFX/Downloads/boot0workV2/boot0md -u /dev/rdisk1

Now my windows dont boot by it self.... it only boots if i select it from chimera bootloader.

What am i doing wrong?
Please help me, this is driving me crazy!!!

Thank you!

Blackosx

  • Forum Moderator
  • Posts: 1150
Re: boot0md: dual boot Windows 7 and Mac OSX from Win7 drive
« Reply #62 on: November 09, 2011, 11:31:48 PM »
So you have Chameleon already installed on disk1, along with your Lion partition, and you have written boot0md (boot0workV2) to the MBR of disk1. But from the diskutil list you posted, disk1 is your Lion installation?

Boot0md can be used in this way and that's how I use it, but from the OP, the main point of boot0md is:
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.
So didn't you mean to write boot0md to the first 440 bytes of the MBR for disk0?

For reference, the most recent version of the boot0md code (boot0workV2) is now in the Chameleon trunk code. I've attached it for reference:

If you feel you've damaged your MBR for Windows, then you can always repair your boot sector by booting from the Windows DVD.
« Last Edit: November 09, 2011, 11:35:23 PM by Blackosx »
10.10.5 / 10.11 GM1 | Asus Maximum IV Gene-Z | i7-2600 3.40GHz | 4GB | Radeon 5770 1GB

CoolFX

  • Entrant
  • Posts: 4
Re: boot0md: dual boot Windows 7 and Mac OSX from Win7 drive
« Reply #63 on: November 10, 2011, 11:59:42 AM »
Thanks for the quick reply Blackosx.

i downloaded your file and did the following:

computer-2:~ CoolFX$ diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *1.0 TB     disk0
   1:               Windows_NTFS Windows 7               150.0 GB   disk0s1
   2:                  Apple_HFS Downloads               450.1 GB   disk0s2
   3:                  Apple_HFS Time Machine            399.9 GB   disk0s3
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *400.1 GB   disk1
   1:                        EFI                         209.7 MB   disk1s1
   2:                  Apple_HFS Lion                    399.7 GB   disk1s2
computer-2:~ CoolFX$ sudo fdisk440 -f /Users/CoolFX/Downloads/boot0md -u /dev/rdisk0
Password:

   -----------------------------------------------------
   ------ ATTENTION - UPDATING MASTER BOOT RECORD ------
   -----------------------------------------------------

Do you wish to write new MBR? [n] y
computer-2:~ CoolFX$ exit
logout

and the result is :
 - when i boot with the lion hard drive disabled on my bios: i get Boot0:Error
 - when i boot with the lion hard drive enabled on my bios: chimera loads up and i can boot both operating systems.

(remember Chimera is installed on Lion Hdd).

Your file is already compiled so i just have to do the command in terminal right?? do i have to reinstall chimera?
I'm completely lost here... Don't know what i'm doing wrong!
Thanks again...

dmazar

  • Member
  • Posts: 52
Re: boot0md: dual boot Windows 7 and Mac OSX from Win7 drive
« Reply #64 on: November 10, 2011, 12:44:26 PM »
I guess the problem is because you have HFS partitions on Win drive. The first phase for boot0md is: search first drive for hfs+ bootable partition (partition with boot sector signature) - if found it will try to load from there

Can you try with debug version on disk0? it should write some letters which you can post here and we'll see what's happening. I'm attaching here some version from earlier post in this thread - can not build fresh one right now.

CoolFX

  • Entrant
  • Posts: 4
Re: boot0md: dual boot Windows 7 and Mac OSX from Win7 drive
« Reply #65 on: November 10, 2011, 08:33:41 PM »
Ok Dmazar... Here it is!!

/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *1.0 TB     disk0
   1:               Windows_NTFS Windows 7               150.0 GB   disk0s1
   2:                  Apple_HFS Downloads               450.1 GB   disk0s2
   3:                  Apple_HFS Time Machine            399.9 GB   disk0s3
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *400.1 GB   disk1
   1:                        EFI                         209.7 MB   disk1s1
   2:                  Apple_HFS Lion                    399.7 GB   disk1s2
computer-2:~ CoolFX$ sudo fdisk440 -f /Users/CoolFX/Downloads/boot0workDBG -u /dev/rdisk0
Password:

   -----------------------------------------------------
   ------ ATTENTION - UPDATING MASTER BOOT RECORD ------
   -----------------------------------------------------

Do you wish to write new MBR? [n] y


Now the results:

Bios with Lion hdd drive disabled:
PDptptlptpPDptptlptlpPDptptlptpE

Bios with Lion hard drive enabled but boot from windows hard drive:
PDptptlptpPDptptlptlpDptpppGll+

Bios with Lion hard drive enabled but boot from lion hard drive:
Both Operating Systems boot fine but windows don't have hibernation.

Hope this helps.... :)
Thanks...

dmazar

  • Member
  • Posts: 52
Re: boot0md: dual boot Windows 7 and Mac OSX from Win7 drive
« Reply #66 on: November 10, 2011, 09:40:32 PM »
I think it helps.

Bios with Lion hdd drive disabled:
PDptptlptpPDptptlptlpPDptptlptpE
If I'm reading it correctly, active partition on first disk is disk0s2 but this one is not bootable. Make Win7 partition active and win7 should load if only this disk is enabled.

Bios with Lion hard drive enabled but boot from windows hard drive:
PDptptlptpPDptptlptlpDptpppGll+
This one boots from Win7 disk and is finding disk1s2 partition bootable. If you have Chameleon installed there it should allow you to boot win7 and hibernation should work. Is it working?

I'm attaching debug description. Hope this helps.

Blackosx

  • Forum Moderator
  • Posts: 1150
Re: boot0md: dual boot Windows 7 and Mac OSX from Win7 drive
« Reply #67 on: November 10, 2011, 09:47:05 PM »
Hey dmazar. Thanks for helping out.
@CoolFX - you're in good hands now  :P
10.10.5 / 10.11 GM1 | Asus Maximum IV Gene-Z | i7-2600 3.40GHz | 4GB | Radeon 5770 1GB

CoolFX

  • Entrant
  • Posts: 4
Re: boot0md: dual boot Windows 7 and Mac OSX from Win7 drive
« Reply #68 on: November 11, 2011, 12:44:36 AM »
GREAT!!!! IT WORKED!!!!  ;D ;D ;D

I don't know how the hell did my windows partition got inactive!!!!
I've just marked has active on windows and boom, everything is working has it should now!!!!
I have a perfect dual boot Lion and Windows 7 fully working thanks to you guys!!!

I'm glad there are people like you guys helping us out!!!

Many many thanks Blackosx and dmazar.

dmazar

  • Member
  • Posts: 52
Re: boot0md: dual boot Windows 7 and Mac OSX from Win7 drive
« Reply #69 on: November 11, 2011, 10:40:49 AM »
Good  :) Glad it works.

Hi Blackosx. This is the piece of puzzle I'm familiar with so ...  I'll try to help if I can.

CoBrA2168

  • Entrant
  • Posts: 1
Re: boot0md: dual boot Windows 7 and Mac OSX from Win7 drive
« Reply #70 on: August 09, 2012, 12:49:26 AM »
I just wanted to say that I signed up on these forums specifically to thank you guys for this work.

I was in a similar situation - I had Windows 7 on an SSD, OSX Mountain Lion on another, and I was trying to find an elegant way to pick my OS upon restart.  Chimera is great, but I found that my sleep wasn't working (and I spent hours trying to install Windows 7 SP1, don't get me started on that...).

This modification did the trick.  Thanks again!!

NaG8toR

  • Entrant
  • Posts: 2
Re: boot0md: dual boot Windows 7 and Mac OSX from Win7 drive
« Reply #71 on: February 21, 2013, 04:33:41 PM »
this is my setup
Disk0: P1=System Reserved (NTFS, bootable, active), P2=Win7 (NTFS), , P3=MacOSX 10.8 (HFS+)
and i was trying dmazar(http://forum.voodooprojects.org/index.php/topic,2091.msg10290.html#msg10290) solution to fix win 7 hibernate/sleep problem. now i wrote the boot0md file from dmazar attached file to the System Reserved partition MBR and set Partition 2(win7) as active now when i try to boot to windows from chameleon it display some dummy characters on the screen and nothing but the Mac OSX still works fine.
so is it that i should have written the boot0md to the Partition 2(Win7) instead of the System Reserved one or is it some other problem.
thanks.

dmazar

  • Member
  • Posts: 52
Re: boot0md: dual boot Windows 7 and Mac OSX from Win7 drive
« Reply #72 on: February 21, 2013, 06:52:38 PM »
Well, you do not need this solution (boot0md) if you have Win and OSX on the same disk. boot0md can help when Chameleon (and OSX) is on one disk and Windows on the other.

Plus you incorrectly installed boot0md to System Reserved partition PBR (Partition Boot Record = first sector of the partition) and by this destroyed Windows PBR boot code. boot0md is meant to be installed to disk MBR (Master Boot Record = first sector of the disk).

You'll have to boot with Windows install CD or USB and repair Windows boot. This would probably overwrite your Chameleon's boot0 (or boot0hfs) code in MBR and you will not be able to boot from the HD. You'll have to have USB with Chameleon to be able to boot OSX, and then you would be able to reinstall Chameleon's boot0 (I can recommend boot0hfs).
So:
1. make sure you have USB with Chameleon which you can use to boot OSX
2. boot from Win install and repair Win boot records
3. boot OSX from USB and repair Chameleon (use boot0hfs for MBR)
4. make System Reserved partition as active

NaG8toR

  • Entrant
  • Posts: 2
Re: boot0md: dual boot Windows 7 and Mac OSX from Win7 drive
« Reply #73 on: February 22, 2013, 07:29:13 AM »
My Bad :-[ i figured that out yesterday and repaired windows with bootrec then redo ur method but this time
fdisk440  -f boot0md -u /dev/rdisk0 instead of fdisk440  -f boot0md -u /dev/disk0s1  :)
finally make System Partition active.
now everything works. Thank you dmazar for this awesome solution!!!
PS i needed this because if the System Reserved partition is the active one, it will go straight to windows and it'll never load Chameleon. but now with the boot0md on the MBR everything is working.

dmazar

  • Member
  • Posts: 52
Re: boot0md: dual boot Windows 7 and Mac OSX from Win7 drive
« Reply #74 on: February 22, 2013, 10:54:38 PM »
Ok. Note that there are:
- boot0 - loads active partition from the disk
- boot0hfs - loads first bootable HFS+ (or EFI) partition from the disk, even if not marked active
- boot0md - similar to boot0hfs, but scans multiple disks