Jump to content

[HOWTO] Boot Macs with Intel Chipset in AHCI Win7 Vista XP Linux


ludacrisvp
 Share

423 posts in this topic

Recommended Posts

I got it working too, but using the 'original' MBR (good_ahci.mbr) from johnsock. I didn't do it exactly like in the post above though.

 

Comparing the MBRs from 3 different Vista installs on different disks (johnsock's plus 2 of mine: one Bootcamp with OSX on the same disk; the other no Bootcamp, straight Vista) I found they were identical with the exception of the final 6 bytes (0x0 to 0x1B7 were identical). So I dd'd the first 0x1B8 (440 bytes) of johnsock's code onto /dev/diskX, not rdisk as suggested - when I umounted the disk in question /dev/rdiskX was no longer available. Is there a way to dd onto a mounted disk in MacOS? It told me the resource was unavailable until I umounted it.

 

The first attempt gave a BSOD (but too fast to see the code). Before trying this I'd installed the AHCI driver as suggested. I then tried again with 'Last Good Conf' so the AHCI driver was no longer installed. This worked! It detected the AHCI devices at startup, then I loaded the Intel Storage Matrix driver and no complaints.

 

ISM when opened shows a tree for the AHCI device with all my attached SATA drives underneath it, including NCQ enabled. I'm going to try it on the other disk (MacOS + Vista BootCamp) soon, but I'm going to get a problem dd'ing to the active disk.

 

Is this why you use fdisk by any chance? If you're wondering, I used dd because I know exactly what it does - I wasn't sure if fdisk might try to overwrite the whole MBR with only 440 bytes of data and lose the bytes which seem to be unique per disk.

 

More to come...

 

The final 6 bytes are the disk signature and is unique to each drive. It must match the one in the Windows registry and I should have omitted it. Thanks for pointing this out. I'll update my previous post accordingly.

 

As far as fdisk is concerned, you are correct about being able to use it on a mounted volume. That's why you have to use the rdisk. The -u parameter will update just the mbr specified by the file in the -f parameter. (Thanks to the WinClone guys for that piece of info!)

I haven't tested this yet, but I suspect that fdisk may need all 446 bytes when writing the MBR, so you may have to copy over the last 6 bytes from your original into the modified MBR file prior to writing it out to disk. I'm going to try it out and I'll let you guys know what I find.

 

It seems to be working on my main disk now too. The process was similar, but this time I tried not installing the MS AHCI drivers before laying the patch. This resulted in a BSOD (no driver, I presume). I then had to re-lay the original MBR, boot back into Windows and install the MS AHCI drivers (I did it only 1 of the 2 SATA devices shown, the one with my HD attached to it). Then I re-relaid the patched MBR, booted into Windows and it detected the AHCI device. From then on it was plain-sailing, I just repeated the process for the second SATA controller. For some reason my 09 Mac Pro presents a 2-port SATA controller and a 4-port SATA controller separately, which is why I had to do it twice.

 

For reference this time I laid the MBR patch using a linux LiveCD and dd. The patch was the 440 byte version I modified (by removing the last 6 bytes), rather than the 446 byte original patch from johnsock.

 

The main stumbling block seems to be Windows drivers, and getting everything set up in the right order so Windows knows to use the right one after you transition to AHCI mode.

 

Edit: I've since realised that the '2-port SATA controller' has not been picked up as SATA/AHCI, it still seems to be operating in legacy mode. I presume the original code was written to enable one device which controls all 4 internal HD ports AND the 2 optical ports on the older Macs; wheras Apple seems to have put 2 controllers on the 09 Mac Pro - one for the internal bays and one for the optical ports. That sound plausible? This probably contributed to my BSOD problems when I tried to install it the second time - I may have installed the MS AHCI driver on the wrong one of the 2 available ports on my first attempt.

 

using dd from a linux disc should work fine since you can unmount the drive you are working on. As far as the other ports on the '09 MP, I'll try to find some more detailed info on the controller configuration and see if there is something else that needs to be done.

 

I tried another method for installing the drivers that worked for me in XP. I'm going to try it in Vista when I get a chance. Here's what worked:

 

1. Once everything was installed, with SATA in legacy mode I extracted the drivers from the Intel Matrix installer app using the -a switch. This just extracts the files, but doesn't install them.

2. I then force installed the Intel drivers (not the generic Microsoft ones) on the SATA controller in device manager.

3. Then, I rebooted but not back into Windows. (Booting into Windows would blue-screen because the controller would still be in legacy mode)

4. Next, I applied the modified MBR to the disk and rebooted. This brought Windows up and all devices were re-detected using the Intel driver.

5. Finally, I installed the Intel Matrix software from the installer app natively and rebooted. This had everything up and running without using the Microsoft driver as an intermediate step.

 

I'm going to try the same method on Vista, but I see no reason why it wouldn't work the same way.

Link to comment
Share on other sites

ahci.zip

Here is a script for automating the MBR mod. It's not complete yet, but it does work on XP, Vista and Windows 7. Make sure you specify the correct disk if you are in a multi-disk environment. I tried to make it detect your Windows drive, but that part still needs some work. Let me know what you think.

Link to comment
Share on other sites

Hey John,

The auto detect didn't work for me.

One thought on picking your own drive would be to have some type of press "0" for disk0 "1" for disk1...

that way it would reduce more issues for those that cannot type properly or do not know the /dev/diskX path.

I did try it on my windows 7 drive but it kept booting into vista so I will have to look some more into that.

Otherwise its looking good.

Link to comment
Share on other sites

Sorry, I had to send my Mac Pro away for repair with a PSU problem so I won't be able to test your script for now. I'll hopefully get to try it on a non-critical disk when I get the machine back.

 

Sorry to hear about the PSU problem. I hope you get is back soon. Maybe I'll have some new tweaks to the scripts finished by the time you can test it. Let us know when you are back in the game

Link to comment
Share on other sites

Hi Guys

 

Thanks ever so much for sharing your conclusions so far. I've been wanting to do this for a while, having just upgraded my old sony 2x bd-re optical PATA drive for a new Pioneer SATA 8x BD-RE drive, whilst retaining the use of my existing 4 sata hard drives. So, much the same as the rest of you.

 

I'd like to get the NCQ etc benefits of using AHCI, but frankly am mostly interested in just getting the other 2 SATA ports up and running, so am willing to put back the need to do the MBR changes - although I'm keen to be a guinea pig for you to test the simplified steps you're trying to work out. Note in my case, I have a 2007 Mac Pro (the original?) with only Vista x64 installed. I've got the SATA drive with MacOSX sat on a shelf, but I cannot dual boot.

 

I've followed your second post, Johnsock, up to step 5, quoted below, but am not seeing the 2 optical drives I have attached to SATA 5 and 6 showing anywhere. So I guess I've done something wrong -- or should I not expect to see them or the ports until I've updated the MBR? It looked from your description that I should see them at step 5, but maybe I'm wrong.

 

 

Here is a summary of what I did to get this working:

 

1. Use Bootcamp Assistant to create Windows partition on separate drive.

2. Install Vista using normal Bootcamp method, formatting the partition as NTFS during setup.

3. Install Bootcamp drivers from Leopard DVD and then update/install any other drivers needed.

4. Install 'Standard AHCI 1.0 Controller' drivers from Vista. This requires forcing a driver update manually and will result in a warning that the hardware doesn't appear to be supported.

5. Reboot Vista and allow device detection to happen, resulting in another reboot. This will get the generic Microsoft AHCI driver installed which gives access to the ODD_SATA ports, but all SATA ports still operate in legacy mode.

6. Once everything was verified working, I copied the MBR from the Vista disk and modified it with the code that modifies the port mapping register on the ICH for AHCI non-combined mode.

[snip]

 

Here's a screenshot of my device manager after I've forced the MS Standard AHCI driver, but showing something none of yours shows, i.e. 4 IDE channels and 4 ATA, instead of 6 ATA. This sounds troubling.

 

Note I only forced the last item in the IDE controllers list, not the second from last. Should I have only forced the Serial ATA and not the Ultra ATA too?

 

I've also left open the Storage controller node, so you can comment on whether you have the ANM controller in your setup.

 

Anyone have a suggestion? I suppose it's faintly possible that the drivers etc are all OK, but the drives are not physically connected properly (although I have double checked that), but given I'm not seeing 6x SATA channels, I'm assuming its something else.

 

Many thanks for any input.

post-422492-1241518932_thumb.jpg

Link to comment
Share on other sites

Guys,

 

Thanks for the help. I think this thread will get me on the right track. Forgive me for being a newbie on much of this.

 

Here is my configuration. I have just gotten in a 2009 Mac Pro 8-core 2.66 GHz Nahalem. It came with 2 1TB SATA drives installed. I purchased another one and my plan is to leave OS X on drive 1, XP 64-bit on drive 2, and put Linux (CentOS 5.3 hopefully) on drive 3.

 

What I did yesterday was

 

1. Reformat drive 2 out of OS X to a FAT system just to make sure that when I went to install XP it would recognize it. That may not have been necessary

2. I then shut down, removed the OS X drive (leaving only drive 2), and restarted the computer and booted from the 64-bit XP install CD. I have left the 3rd drive blank at this point and not installed.

3. Installed 64-bit XP

4. Manually installed the video driver for the NVIDIA GT120 from the internet

5. Installed the RealTek sound drivers from the OS X Applications Install CD

6. Installed the Intel chipset drivers from the OS X Applications Install CD

 

At this point and after several reboots in the process everything at least works in XP with the exception of the Bluetooth USB Controller which I dont really care about at this point.

 

I am not running Bootcamp or any other bootloader at this point. I just hold down the option key and select which drive I want to boot from either OS X or Windows XP.

 

SO....Looking at this thread I am assuming that my hard drives are operating in legacy mode and not taking advantage of the full AHCI capabilities.

 

Can someone here recap completely what I need to do for 64-bit Windows XP on the 2009 Mac Pro machine that I have?

 

Also when I go to Linux on the 3rd drive, any suggestions? Will Linux have AHCI support by default?

 

Thanks,

Eric

Link to comment
Share on other sites

Hi Guys

 

Thanks ever so much for sharing your conclusions so far. I've been wanting to do this for a while, having just upgraded my old sony 2x bd-re optical PATA drive for a new Pioneer SATA 8x BD-RE drive, whilst retaining the use of my existing 4 sata hard drives. So, much the same as the rest of you.

 

I'd like to get the NCQ etc benefits of using AHCI, but frankly am mostly interested in just getting the other 2 SATA ports up and running, so am willing to put back the need to do the MBR changes - although I'm keen to be a guinea pig for you to test the simplified steps you're trying to work out. Note in my case, I have a 2007 Mac Pro (the original?) with only Vista x64 installed. I've got the SATA drive with MacOSX sat on a shelf, but I cannot dual boot.

 

I've followed your second post, Johnsock, up to step 5, quoted below, but am not seeing the 2 optical drives I have attached to SATA 5 and 6 showing anywhere. So I guess I've done something wrong -- or should I not expect to see them or the ports until I've updated the MBR? It looked from your description that I should see them at step 5, but maybe I'm wrong.

 

Here is a summary of what I did to get this working:

 

1. Use Bootcamp Assistant to create Windows partition on separate drive.

2. Install Vista using normal Bootcamp method, formatting the partition as NTFS during setup.

3. Install Bootcamp drivers from Leopard DVD and then update/install any other drivers needed.

4. Install 'Standard AHCI 1.0 Controller' drivers from Vista. This requires forcing a driver update manually and will result in a warning that the hardware doesn't appear to be supported.

5. Reboot Vista and allow device detection to happen, resulting in another reboot. This will get the generic Microsoft AHCI driver installed which gives access to the ODD_SATA ports, but all SATA ports still operate in legacy mode.

6. Once everything was verified working, I copied the MBR from the Vista disk and modified it with the code that modifies the port mapping register on the ICH for AHCI non-combined mode.

 

Here's a screenshot of my device manager after I've forced the MS Standard AHCI driver, but showing something none of yours shows, i.e. 4 IDE channels and 4 ATA, instead of 6 ATA. This sounds troubling.

 

Note I only forced the last item in the IDE controllers list, not the second from last. Should I have only forced the Serial ATA and not the Ultra ATA too?

 

I've also left open the Storage controller node, so you can comment on whether you have the ANM controller in your setup.

 

Anyone have a suggestion? I suppose it's faintly possible that the drivers etc are all OK, but the drives are not physically connected properly (although I have double checked that), but given I'm not seeing 6x SATA channels, I'm assuming its something else.

 

Many thanks for any input.

 

Looking at the screenshot you posted, I can see that Ports 4&5 are visible in windows. Ports 0-4 are the ones normally connected to the hard drive bays, while 4&5 are the ODD_SATA ports on the motherboard. It looks like the BD-RE drive is not being recognized, but I can't tell if it's Windows that doesn't see it or the controller. Do you have another SATA device you can plug into the ODD_SATA port to see if it is recognized? Also, have you tried the BD-RE drive elsewhere to make sure it is working?

I know that my ODD_SATA ports became active after completing Step 5 above and my SATA DVD-RW drive was recognized by Windows. You might also try booting to OS X temporarily (remove Windows drives and put your OS X one in there) to see if the BD-RE is recognized there. Let me know what you find out. I'll be happy to assist if I can.

 

Guys,

 

Thanks for the help. I think this thread will get me on the right track. Forgive me for being a newbie on much of this.

 

Here is my configuration. I have just gotten in a 2009 Mac Pro 8-core 2.66 GHz Nahalem. It came with 2 1TB SATA drives installed. I purchased another one and my plan is to leave OS X on drive 1, XP 64-bit on drive 2, and put Linux (CentOS 5.3 hopefully) on drive 3.

 

What I did yesterday was

 

1. Reformat drive 2 out of OS X to a FAT system just to make sure that when I went to install XP it would recognize it. That may not have been necessary

2. I then shut down, removed the OS X drive (leaving only drive 2), and restarted the computer and booted from the 64-bit XP install CD. I have left the 3rd drive blank at this point and not installed.

3. Installed 64-bit XP

4. Manually installed the video driver for the NVIDIA GT120 from the internet

5. Installed the RealTek sound drivers from the OS X Applications Install CD

6. Installed the Intel chipset drivers from the OS X Applications Install CD

 

At this point and after several reboots in the process everything at least works in XP with the exception of the Bluetooth USB Controller which I dont really care about at this point.

 

I am not running Bootcamp or any other bootloader at this point. I just hold down the option key and select which drive I want to boot from either OS X or Windows XP.

 

SO....Looking at this thread I am assuming that my hard drives are operating in legacy mode and not taking advantage of the full AHCI capabilities.

 

Can someone here recap completely what I need to do for 64-bit Windows XP on the 2009 Mac Pro machine that I have?

 

Also when I go to Linux on the 3rd drive, any suggestions? Will Linux have AHCI support by default?

 

Thanks,

Eric

 

Eric,

 

ludacrisvp had updated the 1st post in this thread with instructions for using my script. Make sure you refer to the updated part of that post when trying this out.

To sum up what needs to be done, you first need to force install the Microsoft AHCI driver using the Windows XP method outlined by ludacrisvp. Windows will then tell you to reboot to complete installation. At this point, boot into OS X, not Windows. From OS X, you can run the script I made to modify the MBR on your Windows disk. Make sure you use the correct disk, otherwise it won't work. ludacrisvp explains how to check this using the OS X Disk Utility app. After the MBR is modified, reboot into Windows and install the Intel Matrix drivers and you should be good to go.

If you need any additional information, let me know.

 

CK

 

Also, if you get any errors during this process, PM me with the information so I can help figure out what happened. Your setup is a little different than the ones we have tested so far and I would like to know if everything works correctly. I don't think there will be any issues, but I'll work on improving the script if you find anything that doesn't work the way it should. I'm currently working on improving the way the script searches for the Windows drive. That will keep you from having to find the drive number and then typing it in at the prompt.

Link to comment
Share on other sites

:unsure:

 

Hi thanks for all the hard work, though i'm not having success.

 

I'm trying to get the extra sata ports for my bluray drive to be seen in vista 64-bit.

 

I've done it several times, but after install of grub i end up with GRUB> flashing cursor

 

I have two drives.  Second drive just has data partitions, nothing else.

 

Main drive is like this:

 

efi

 

Osx

 

unallocated space

 

vista 64-bit

 

ubuntu 9.04 (64-bit)

 

I'm using the ubuntu /boot/grub directory for booting

 

With the ubuntu install grub is set up properly.  I copied the patched stage1, stage2 and menu.lst over (have corrected the menu.lst to give root (hd0,2) for vista partition.

 

I read that grub should be reinstalled to get the stages properly recognized.  I went through the instructions (note - i'm installing from command prompt in ubuntu 9.04 live cd mode terminal.

 

Sorry for any unclearness - bit late and i need to go to sleep.  Help would be greatly appreciated.

Link to comment
Share on other sites

:huh:

 

Hi thanks for all the hard work, though i'm not having success.

 

I'm trying to get the extra sata ports for my bluray drive to be seen in vista 64-bit.

 

I've done it several times, but after install of grub i end up with GRUB> flashing cursor

 

I have two drives.  Second drive just has data partitions, nothing else.

 

Main drive is like this:

 

efi

 

Osx

 

unallocated space

 

vista 64-bit

 

ubuntu 9.04 (64-bit)

 

I'm using the ubuntu /boot/grub directory for booting

 

With the ubuntu install grub is set up properly.  I copied the patched stage1, stage2 and menu.lst over (have corrected the menu.lst to give root (hd0,2) for vista partition.

 

I read that grub should be reinstalled to get the stages properly recognized.  I went through the instructions (note - i'm installing from command prompt in ubuntu 9.04 live cd mode terminal.

 

Sorry for any unclearness - bit late and i need to go to sleep.  Help would be greatly appreciated.

 

Could it be due to vista not being the last partition on the first disk or because the partition containing the stage1 and stage2 is not at the beginning.  I may try installing grub on a small partition on the second drive.  Any thoughts would be greatly appreciated.

Link to comment
Share on other sites

I just wanted to thank johnsock and ludacrisvp for writing all this up on the forumn. I used the newer method, which as ludacrisvp had mentioned to me, was much easier. The autodetect didnt work, but that wasn't a problem. Now I can see and use my Blu-Ray drive that is using the ODD_SATA port.

 

However, I have one problem. I can play DVDs and CDs through my LG GGC-H20L but when I insert either an HD DVD or a Blu-Ray, Vista says the drive is empty! I'm certain its not the drive itself, as in OS X, the disc comes up as media, I just can't play them. Can anyone help me as to how to remedy this situation and get windows vista to recognize the blu-rays and hd dvds? Thanks!

Link to comment
Share on other sites

The only thing I can think of would be to make sure you have a blu ray format software player.

There is a utility made by power DVD that will make sure your system can play them.

You may want to try another movie as well.

I don't have a bd drive in my pro so I can't be of too much help for you.

Link to comment
Share on other sites

  • 2 weeks later...

Big thanks to all who put this script together B)

 

With a bit of trepidation I ran it, the script autodetected my Vista64 drive and I replaced the mbr on the partition. On reboot it automatically installed the AHCI 1.0 Controller and my ODD SATA blu-ray drive popped up in the list! A quick restart and install of the Intel Storage Matrix drivers and here we are : Intel® ESB2 SATA AHCI Controller on my '06 Mac Pro.

 

Top work.

Link to comment
Share on other sites

Hi all,

 

Found this tread and it's very interesting, thanks. As I'm about to buy a Mac Pro 2009 model, I'd like to have a few precisions.

The Mac Pro 2009 doesn't have PATA anymore, its superdrive has been replaced by a SATA model and a second connector is ready for a second SATA superdrive.

 

So questions are :

- Does it mean the superdrives are now connected to the famous SATA ports 4 and 5 ?

- If not, are they connected to two others hidden SATA ports 6 & 7 ?

- Considering we can still install Windows via Bootcamp like in Mac Pro 2008 model, does it means this SATA ports are now recognized by Windows natively at boot sequence and then the manual procedure described here is useless in this 2009 model ?

 

Thanks for help.

Link to comment
Share on other sites

Hi all,

 

Found this tread and it's very interesting, thanks. As I'm about to buy a Mac Pro 2009 model, I'd like to have a few precisions.

The Mac Pro 2009 doesn't have PATA anymore, its superdrive has been replaced by a SATA model and a second connector is ready for a second SATA superdrive.

 

So questions are :

- Does it mean the superdrives are now connected to the famous SATA ports 4 and 5 ?

- If not, are they connected to two others hidden SATA ports 6 & 7 ?

- Considering we can still install Windows via Bootcamp like in Mac Pro 2008 model, does it means this SATA ports are now recognized by Windows natively at boot sequence and then the manual procedure described here is useless in this 2009 model ?

 

Thanks for help.

 

You are correct about all drives being SATA on the 09 Mac Pro. I'm not sure if there are any extra ports or not, but the standard six ports are all recognized by Windows. There is no need to do any tricks to enable the ports in Windows.

The benefit of the procedure described in this thread for you would be enabling AHCI mode. The 09 Mac Pro still uses legacy mode when booted into Windows (this is due to the EFI-BIOS emulation layer in the firmware) just like the older Mac Pro models. The difference in performance between legacy mode and AHCI mode will depend on the drives you have installed. A single, stock drive may not show much of a change, but faster drives or ones in a RAID array will benefit more. This is primarily due to the fact that native command queuing is only enabled in AHCI mode. I have Vista installed on a WD Velociraptor in my 06 Mac Pro and the difference is noticeable. I also use this patch on my MacBook Pro with an Intel X-25 SSD and the speed increase is huge.

I have also read on some other forums that some people needed AHCI enabled to get satisfactory performance from a Blu-Ray drive, but I can't confirm it personally.

I hope this rambling reply answers some of your questions. Let me know if you need any other info.

Link to comment
Share on other sites

Thanks for answer. I understand what benefits AHCI mode give.

Considering my Mac Pro 09 will have 0 to 3 SATA ports in a Mac RAID array (probably RAID5 via Apple Raid Card), I think about installing Vista on the SATA port 4, and a BR in port 5.

But if these ports 4 & 5 are natively recognized, does it mean they are also Windows bootable ? (which I remember is a different thing).

Thanks.

Link to comment
Share on other sites

Thanks for answer. I understand what benefits AHCI mode give.

Considering my Mac Pro 09 will have 0 to 3 SATA ports in a Mac RAID array (probably RAID5 via Apple Raid Card), I think about installing Vista on the SATA port 4, and a BR in port 5.

But if these ports 4 & 5 are natively recognized, does it mean they are also Windows bootable ? (which I remember is a different thing).

Thanks.

 

That is a very good question. Unfortunately, I don't know anyone who has tried to boot from port 4 or 5. Everyone I know with an 09 Mac Pro has only optical drives on these ports. You may have to be the guinea pig on this one. If you try it out, please let everyone know what you find out. I hope to upgrade to a new Mac Pro one of these days and it would be useful information to have.

Link to comment
Share on other sites

Lot of action in this thread lately - good to see! Thanks johnsock for your contribution, will try the script when i get a chance.

 

Of course the holy grail would be native EFI boot for Windows (at least Vista and 7 x64) so we wouldn't have to deal with the limitations of the bios emulation.

 

I don't know about everybody else but my Windows boot times are terrible. I haven't actually timed it, but i guess after rEFIt, bios emulation, various scsi/sas bios roms and eventually grub it must take up to 2 minutes on my setup, maybe longer. Windows itself boots fast, but all the other stuff is really annoying when you see how long it takes to get to your OSX desktop.

 

The modified mbr is great news and will definitely help, but i'm surprised nobody has figured out a way to boot Windows with EFI yet, although there seems some sort of progress with Ubuntu: https://help.ubuntu.com/community/MactelSup...EFI-Boot-Mactel

 

Anybody here tried with grub efi?

 

Also, does the mbr script work with Windows partitions as well or do i need to install on a seperate drive? Currently i've got OSX, XP32 and Vista64 all on one disk with MBR only (to avoid GPT hybrid) - OSX won't actually install on MBR but you can use Carbon Copy. Would the script still work?

 

Thanks!

Link to comment
Share on other sites

I'm glad so many people are trying out this script. I want to reiterate that the Windows drive detection is broken, but the script still works as described. You will most likely have to specify the actual drive that your Windows partition is on. I apologize for not getting that fixed, but I promise I'll get to it once I get to a good stopping place on the other project I'm working on (native OS X conversion of DTS to AC3 in a Matroska file) and get a day off from my regular job.

 

Lot of action in this thread lately - good to see! Thanks johnsock for your contribution, will try the script when i get a chance.

 

Of course the holy grail would be native EFI boot for Windows (at least Vista and 7 x64) so we wouldn't have to deal with the limitations of the bios emulation.

 

I don't know about everybody else but my Windows boot times are terrible. I haven't actually timed it, but i guess after rEFIt, bios emulation, various scsi/sas bios roms and eventually grub it must take up to 2 minutes on my setup, maybe longer. Windows itself boots fast, but all the other stuff is really annoying when you see how long it takes to get to your OSX desktop.

 

The modified mbr is great news and will definitely help, but i'm surprised nobody has figured out a way to boot Windows with EFI yet, although there seems some sort of progress with Ubuntu: https://help.ubuntu.com/community/MactelSup...EFI-Boot-Mactel

 

Anybody here tried with grub efi?

 

Also, does the mbr script work with Windows partitions as well or do i need to install on a seperate drive? Currently i've got OSX, XP32 and Vista64 all on one disk with MBR only (to avoid GPT hybrid) - OSX won't actually install on MBR but you can use Carbon Copy. Would the script still work?

 

Thanks!

 

sebhag:

 

I haven't tried the script out on a drive with multiple Windows partitions or on one that is not a hybrid format, but I don't see any technical reason why it would not work. The code modified by the script resides on the first sector of the drive and is the same for a standard Windows MBR format and for a hybrid GPT. It is run from the "BIOS" when running Windows and ignored by the EFI boot sequence when booting OS X. Let us know how it works if you try it out.

Link to comment
Share on other sites

Let us know how it works if you try it out.

 

Took some time and few re-installs/repairs but got there eventually... originally i used grub to hide Vista and XP from each other, but that seems to screw things up a little with the mbr script so once both partitions were visible it worked.

 

disk0s1 -> Leopard

disk0s2 -> old grub partition (unused)

disk0s3 -> Vista64

disk0s4 -> XP

 

Partition map is mbr only, but i might try native EFI boot with Ubuntu from a separate GPT drive and see if that gets me anywhere.

 

Thanks Ludacrisvp and johnsock for sharing!

Link to comment
Share on other sites

Nice work, johnsock.

 

I wonder if a similar approach could be used to enable VT-x.

 

After a cold-boot into Windows, VT-x is not enabled. Consequently Hyper-V

does not work on Server 2008. The usual advice is to enable VT-x in the BIOS

menu, but there is no BIOS menu for the Mac Pros[1]. Fortunately, VT-x is left

unlocked. This means it would be possible to enable VT-x and then lock it.

 

http://www.linux-kvm.org/page/Enable_VT-X_...ro_(Early_2008)

 

My suspicion is that this has to be done at an early stage for Hyper-V to work,

and perhaps it could be done in the boot sector code. The approach would be

to flip two bits of model specific register 0x3A (as I understand it - and I do not

understand much).

 

1: We're absolutely one hundred thousand percent sure there is no CSM BIOS

menu, are we? No special key combinations to get at it? Anyone tried F2 on a

non-Apple keyboard?.

Link to comment
Share on other sites

I got a request to post the source code for the changes made to the MBR that enable ACHI mode. Here is a listing of what I did:

 

MOV EAX,8000FA90

MOV DX,0CF8

OUT DX,EAX

MOV AL,40

MOV DX,0CFC

OUT DX,AL

RET

 

Configuring registers for a device on the PCI bus involves two port writes, one to specify the desired register and the next to specify the data to be written to that register. The output ports 0CF8 and 0CFC designate the PCI configuration register and data for that register respectively. 8000FA90 specifies the AHCI mode configuration register and 40 enables ACHI mode.

As stated in an earlier post, I got this code by examining the GRUB bootloader source that was linked to in the original post in this thread. I just had the idea to do the exact same thing in the MBR so as to not rely on an additional bootloader. I verified the code with the applicable Intel chipset documentation and PCI specification so I understood what was going on and then found a place to insert it.

All my script does is read in the unmodified MBR, shrink some error strings to make extra room avaliable without changing the meaning of the error messages and then places the AHCI enabling code at the end of the executable MBR code. This is done by writing the bytes of above code to the MBR starting with the final RET instruction (C3). When the MBR is loaded, it's usual code executes as normal, but it does not RETurn until after the AHCI code is executed.

If you examine the script I posted, you will find the string of bytes that represent the above code. There are probably more efficient ways of writing the script, but it was done in haste on one of my few days off from my regular job :unsure:

 

If anyone would like additional information or has suggestions to improve it, please let me know.

Link to comment
Share on other sites

Hi ludacrisvp, Thanks for a great motivation for the proper AHCI drivers. Plan to install AHCI on MacBook4,1 - 10.5.7, White (early 2008) 4gb ram on Boot Camp XP Home Edition (SP3).

Current driver : Intel® ICH8M 3 port Serial ATA Storage Controller

- 2828. Kindly advise if any difference towards this model ? thanks , mike

 

tongue.gif

Link to comment
Share on other sites

Hi ludacrisvp, Thanks for a great motivation for the proper AHCI drivers. Plan to install AHCI on MacBook4,1 - 10.5.7, White (early 2008) 4gb ram on Boot Camp XP Home Edition (SP3).

Current driver : Intel® ICH8M 3 port Serial ATA Storage Controller

- 2828. Kindly advise if any difference towards this model ? thanks , mike

 

tongue.gif

 

I went to try this on a iMAC witht he same chipset... for some reason it would not pick up the OS and replied with an Unknown OS. I dd it anyways just for kicks since there is a backup and it just boots to black :P

 

I dont know if this is due to the setup I have or not though...

Link to comment
Share on other sites

 Share

×
×
  • Create New...