Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Hardware > Desktops > Mac Pro

Reply
 
Thread Tools Search this Thread Display Modes
Old Aug 6, 2009, 07:50 AM   #1
gugucom
macrumors 68020
 
gugucom's Avatar
 
Join Date: May 2009
Location: Munich, Germany
How to install an AHCI SATA driver in Windows XP, Vista and Win7

1. What this is about

This is about the installation of AHCI drivers to SATA ports for Windows. AHCI drivers (Advanced Host Controller Interface klick -> http://de.wikipedia.org/wiki/Advance...ller_Interface for Wiki) are advanced performance drivers for the SATA controller in your Mac Pro (ICH10R chips for Nehalem - ESB2 for all others). When you go to profiler in OS X and bring up ATA you will see that your disks will all be connected by AHCI protocols.

Windows natively uses legacy drivers instead of AHCI when you install it. It expects a BIOS command to select the AHCI mode. On a BIOS machine you simply use a software switch to select the configuration. On an EFI machine as the Mac, you have to manipulate the boot mechanism because the firmware has no user adjustable features. You actually edit your Master Boot Record (MBR) inside the GUID or MBR partition table with a terminal script. I will come to that later.

If you are making a fresh installation of Windows from the install disk you can pre load the AHCI drivers from the floppy facility (check the download link in section 3). In Vista and Win7 you do this from the installation window where you can format or partition drives. In XP you have to hit the F6 key in the beginning when XP starts to load from the optical disk.

This tutorial is based on the instructions from Ludachris at http://www.insanelymac.com/forum/ind...pic=126089&hl= Many thanks to him.

The shell script for the MBR patch is made by Johnsock. http://www.insanelymac.com/forum/ind...=post&id=49096 Also a big thank you to him.


2. Some potential traps to avoid

Some people like to use a unused ODD-SATA port for a Windows HDD or SSD. This is possible as soon as the AHCI driver is working. In order to make the AHCI installation you need to fit the Windows drive to a standard HDD port and make the installation according to section 5.

There is a bummer which may hit you if you already use a SW RAID in OS X with a pre 2009 machine. An OS X software RAID array prevents Windows from recognizing other SATA drives as internal. The installation program will tell you that you are installing to an external drive although you are setting your Windows drive properly up on one of the # 1-4 HDD bay.

To work around this problem you can physically remove the RAID disks and put them away for a moment . After installing Windows you can put the array back in and it will run without a problem again, so you need not be concerned to remove the array temporarily.

To substitute for your now missing array clone OS X to a single disk before you remove your array and when you have it taken out, fit that disk. Then you do your Windows installation stuff. When you are finished with Windows you remove the single disk and refit your array.

The 64-bit varieties of Vista and Win7 have 32-bit emulations installed which will allow you to run any 32-bit program. So they are much better to use. A word of warning to 2006 and 2007 Mac Pro owners. Your machines use a 32-bit EFI. It will not be able to read Windows install DVDs with multiple images like the anytime upgrade DVDs. The 32-bit EFI boot loader freezes when you try to load an install disk with multiple images. Known workaround at this time use Jowie's tweak or a similar method to make the file variables palatable to the EFI32 boot loader. http://forums.macrumors.com/showpost...9&postcount=21


3. Preparations

Download the Intel Matrix Storage Manager http://www.intel.com/support/chipsets/imsm/index.htm from this adress. If you run XP you also need the floppy disk facility that you find there. The executable we will need very much later when we are practically done changing the MP to AHCI but get hold of it for now.

Intel have reported that there was a Vista installation issue with their chips driver (Intel Matrixs storage) up to version 7.0. It is therefore recommended to use 8.8 now. Win7 is officially only supported by 8.9.

When you have made those downloads put the folder with the floppy facility on a USB stick or burn it on CD. If you are hell bent to use XP you will actually need floppies because XP will not let you use other means. Generally XP isn't desirable on a Mac Pro because it is only supported in 32-Bit and not in 64-Bit which will make most of your RAM (above 2 GB) memory useless.

Copy the zipped file with Johnsock's shell script which is attached to this posting to your OS X drive. You have to unzip it for use.

Next go to disk utility in OS X and make a list of the identifiers of your installed drives. You can right click the drive name or use the info button which tells you the internal name of each drive. If the drive is shown as disk2 note it with the extended code form that the shell script uses ( /dev/disk2 ). Make a paper record of that full name of the disk and make sure you copy exactly that code. You will need this later when you may have no access to disk utility and are doing some delicate terminal work. Finally at this point make a backup of your Windows installation if you care for it. You can use Winclone (free software) for the back up or at minimum set a restore point for Windows to get back to that version if you screw up the next step. Restore points can be set when you enter the program section where you find all the Windows internal backup and restore stuff.

There are reports that the MP3,1 model from 2008 cannot be put into AHCI mode normally. But some users succeeded by exchanging their optical drive from IDE to SATA or removing it completely before trying to boot Windows from the ODD-SATA ports. So it is recommended to take out any IDE drive.

4. A refresher about other drivers

When you have installed Windows load your Apple related drivers from the hybrid Leopard disk. All Leopard disks have a Bootcamp driver image on them which is acessible under Windows only. For 64-bit Windows you need to execute Bootcamp64.msi with admin rights. You find it in the drivers/apple folder on the leopard/SL disk. If it is not there you have a very old version and need to source those drivers somewhere from the internet. There are torrents and downloads from rapidshare available. Google Bootcamp 2.0.1 for that. In Win7 you have to apply the compatibility patch to Vista drivers before you can load the program. To get to compatibility mode right click the file and select the routine for compatibility. When you are done with the general Windows drivers and have installed all the Windows updates you will still need to activate the AHCI drivers for optimum performance. They will not be running at that stage.


5. This is the actual installation

5.1 Editing the registry

Now in case we use Vista or Seven we are going to edit the Windows registry as directed by Ludachris. This only needs to be done in Vista and Seven but not in XP because XP has no MS AHCI driver in the standard.

Quote:
Vista 32/64 Windows7 32/64
- Run Regedit (from the command prompt)
- Navigate to "High Key Local Machine\System\CurrentControlSet\Services\msahci"
- edit the "Start" key and change the value from what it is to "0"
- this will tell Vista to check for AHCI on next boot and install the AHCI driver if it is in AHCI mode
- this installs the generic AHCI Microsoft driver and it is really a poor driver for your hardware and you will need the Intel ones to get full performance.
This does not yet activate the AHCI driver. If you have pre loaded the Intel driver during the Windows installation it will load a better Intel legacy driver instead of the slow IDE. You can shut down and restart Windows now.

5.2 Installing the driver

After this reboot comes the tricky part. We will force Windows to take an AHCI driver, which it normally rejects and we will patch the master boot record (MBR) of the drive that holds the Windows installation.

In Windows device manager go to IDE/ATA devices. 2006, 2007 and 2008 Mac Pros have one device for the SATA ports; so its no question which to use. 2009 machines have two separate devices for the ODD and the HDD ports. Select the 4 port HDD device for the AHCI updating. Click properties and update the legacy driver to either the Microsoft or the Intel AHCI driver. It doesn't really matter which one you use. This AHCI installation cannot be done in automatic driver search mode. You have to tell Windows to look in the IDE ATA controller category for them. To find the MS AHCI 1.0 driver in Vista and Seven go to the manufacturer selection and look for Standard. You will have to scroll down to find it. For XP you have to load the Intel driver from from the Intel manufacturer list. If you havn't pre loaded the Intel drivers you should now use the Floppy utility you downloaded. Load these files from USB floppy or USB stick by clicking the have disk option. For pre 2009 you need to select the ESB2 driver. For Nehalem use the ICH10R driver. After this you must not reboot into Windows until you have patched the MBR. Force Windows to take this driver even if it thinks it is incompatible. It actually is but we will soon take care of this with the patch.

5.3 Patching the MBR in OS X

The next step is executing Johnsock's script to patch your MBR. This patch is absolutely necessary for every Windows. Pay particular attention to patch the right disk!!! If you patch an OS X disk that holds no Windows you are in serious trouble. The wrong disk selection will screw up your disk count and nothing will work right from there.

In OS X open the terminal utility. Type "sudo" and a blank. Then drag the unzipped script shell file into the terminal with your mouse. Input your admin password and follow the dialogue.

For this you will need the disk codes that you have noted on paper. The program tries to find your Windows disk but you have to make sure it finds the right one. It often suggests a wrong disk. Be really carefull to insert the complete name for the disk!! In our example it was /dev/disk2 for the second disk. Just inserting the number like 2, 0 or 3 or disk3 or disk4 will not work.

When you are done with patching your MBR the program will confirm to you that you were successfull. You shut down OS X and restart Windows. If you have done the patch right and selected the right controller for your chipset Windows should now show SATA drives and get busy to find the real AHCI drivers for them. If you installed MS AHCI 1.0 you can now switch to the Intel driver without problems. If you got it wrong Windows will malfunction with a BSD on loading. You can use special load options to go back to the last known good configuration which you hopefully established by setting the restore point or you can restore Windows by Winclone. Start all over with the registry edit until you got it right.

5.4 Installing the Intel Matrix Storage Manager

To load the Intel Matrix storage driver you can now execute the Intel executable package which we downloaded. It will be accepted by your machine. If you try installing that package before the patch it will tell you that you are loading a wrong package for your machine. Restart Windows after the storage driver has completely installed. In Vista and Win7 you have to run the executable as administrator. Now you should be all set.


6. Trouble shooting

What to do if you patch the wrong drive? I happened to patch my OS X drive which was partitioned in three partitions of which one was NTFS. So the patch program thought I had a Windows on it. I did not check it and so I went ahead and patched it. It turned out to be real bad news because now as long as this drive is in the system I get BSD and the patch method does not work any more.

I went back to the thread at Insanelymac and Johnsock had left instruction how to recover the backup MBR. It is stored in USERS/Yourname/backup.mbr

Johnsock advised to run in terminal:

sudo fdisk -y -u -f ./path/to/backup.mbr /dev/rdisk0

But that command is designed for drives with one partition I guess. So I modified my command to:

sudo fdisk -y -u -f /Users/gugucom/backup.mbr /dev/rdisk0

That command worked for me.


Feel free to challenge everything I have written here. I have only limited experience and will like to discuss any questions you have as good as I can. I tought the issue deserves its own thread so that we can collect the wisdom of all users here.
Attached Files
File Type: zip ahci-1.sh.zip (1.9 KB, 7682 views)
__________________
MP4,1●3,33GHz Octad●2*160GB SSD●12GB RAM●Blu-Ray●FireDTV-S2●SL/Vista64
uMBP●SL/Vista64
TC 2TB iPhone●16GB

Last edited by gugucom; Nov 8, 2009 at 12:36 PM. Reason: Advise for using ODD-SATA ports
gugucom is offline   0 Reply With Quote
Old Aug 6, 2009, 04:26 PM   #2
rtrt
macrumors 6502a
 
Join Date: Jan 2008
a

Last edited by rtrt; Aug 13, 2011 at 07:38 PM.
rtrt is offline   0 Reply With Quote
Old Aug 6, 2009, 04:44 PM   #3
gugucom
Thread Starter
macrumors 68020
 
gugucom's Avatar
 
Join Date: May 2009
Location: Munich, Germany
I had to find out about the AHCI driver in order to run my Blu-Ray ROM from the ODD-SATA ports. I never tried to boot from there but I guess you will have to fit the AHCI driver to do in Windows.
__________________
MP4,1●3,33GHz Octad●2*160GB SSD●12GB RAM●Blu-Ray●FireDTV-S2●SL/Vista64
uMBP●SL/Vista64
TC 2TB iPhone●16GB
gugucom is offline   0 Reply With Quote
Old Sep 12, 2009, 09:49 PM   #4
gugucom
Thread Starter
macrumors 68020
 
gugucom's Avatar
 
Join Date: May 2009
Location: Munich, Germany
I did a lot of debugging today because I went through it all again.
__________________
MP4,1●3,33GHz Octad●2*160GB SSD●12GB RAM●Blu-Ray●FireDTV-S2●SL/Vista64
uMBP●SL/Vista64
TC 2TB iPhone●16GB
gugucom is offline   0 Reply With Quote
Old Sep 13, 2009, 05:35 PM   #5
rtrt
macrumors 6502a
 
Join Date: Jan 2008
a

Last edited by rtrt; Aug 13, 2011 at 07:40 PM.
rtrt is offline   0 Reply With Quote
Old Sep 13, 2009, 08:33 PM   #6
SilverL
macrumors member
 
Join Date: Jan 2008
Got so frustrated with trying to get it working on my 2008 MacPro a while back, I just abandoned it since all I wanted was BluRay playback.

Enter PS3
SilverL is offline   0 Reply With Quote
Old Sep 14, 2009, 01:01 AM   #7
gugucom
Thread Starter
macrumors 68020
 
gugucom's Avatar
 
Join Date: May 2009
Location: Munich, Germany
Quote:
Originally Posted by SilverL View Post
Got so frustrated with trying to get it working on my 2008 MacPro a while back, I just abandoned it since all I wanted was BluRay playback.

Enter PS3
I really had to do it several times to write a half decent tutorial. There were several really bad descriptions in the first version. Sorry for that....

I even got it figured out for my MacBook Pro. On that I can only run MSAHCI 1.0 but it is way better than the legacy. Perhaps I will find the NVIDIA AHCI driver for my uMBP.
__________________
MP4,1●3,33GHz Octad●2*160GB SSD●12GB RAM●Blu-Ray●FireDTV-S2●SL/Vista64
uMBP●SL/Vista64
TC 2TB iPhone●16GB
gugucom is offline   0 Reply With Quote
Old Sep 14, 2009, 02:45 PM   #8
SilverL
macrumors member
 
Join Date: Jan 2008
Quote:
Originally Posted by gugucom View Post
I really had to do it several times to write a half decent tutorial. There were several really bad descriptions in the first version. Sorry for that....

I even got it figured out for my MacBook Pro. On that I can only run MSAHCI 1.0 but it is way better than the legacy. Perhaps I will find the NVIDIA AHCI driver for my uMBP.
No worries man, thanks for providing the information.
I'll probably give it another shot once I install Windows 7 on an external drive soon....
SilverL is offline   0 Reply With Quote
Old Sep 16, 2009, 10:24 AM   #9
gugucom
Thread Starter
macrumors 68020
 
gugucom's Avatar
 
Join Date: May 2009
Location: Munich, Germany
Quote:
Originally Posted by SilverL View Post
No worries man, thanks for providing the information.
I'll probably give it another shot once I install Windows 7 on an external drive soon....
Be advised that Intel released the version 8.9 for Win7. The other versions officially do not support Win7.

Versions under 8 do not support Vista.
__________________
MP4,1●3,33GHz Octad●2*160GB SSD●12GB RAM●Blu-Ray●FireDTV-S2●SL/Vista64
uMBP●SL/Vista64
TC 2TB iPhone●16GB
gugucom is offline   0 Reply With Quote
Old Oct 19, 2009, 12:14 PM   #10
inur
macrumors newbie
 
Join Date: Oct 2009
Unibody MBP and AHCI

Quote:
Originally Posted by gugucom View Post
I really had to do it several times to write a half decent tutorial. There were several really bad descriptions in the first version. Sorry for that....

I even got it figured out for my MacBook Pro. On that I can only run MSAHCI 1.0 but it is way better than the legacy. Perhaps I will find the NVIDIA AHCI driver for my uMBP.
You got it working on your unibody MBP? - Really strange because I cannot. Modifing the MBR does not trigger the AHCI drivers to be installed, and I get BCD when trying manually. Do you have any additional info on how tho get AHCI on unibody MBP's ?
inur is offline   0 Reply With Quote
Old Oct 19, 2009, 03:16 PM   #11
gugucom
Thread Starter
macrumors 68020
 
gugucom's Avatar
 
Join Date: May 2009
Location: Munich, Germany
Quote:
Originally Posted by inur View Post
You got it working on your unibody MBP? - Really strange because I cannot. Modifing the MBR does not trigger the AHCI drivers to be installed, and I get BCD when trying manually. Do you have any additional info on how tho get AHCI on unibody MBP's ?
Actually the order of things is generally the other way round. You force an AHCI driver which would cause a BSD if you would start Windows unmodified. Then you do the MBR patch and this will make Windows start with the AHCI driver without a BDS.

I could never find a Nvidia chipset driver which has a similar function as the Intel driver but in Vista and Seven you do get the MSAHCI 1.0 driver which isn't too bad.
__________________
MP4,1●3,33GHz Octad●2*160GB SSD●12GB RAM●Blu-Ray●FireDTV-S2●SL/Vista64
uMBP●SL/Vista64
TC 2TB iPhone●16GB
gugucom is offline   0 Reply With Quote
Old Oct 24, 2009, 01:48 PM   #12
JPamplin
macrumors regular
 
Join Date: Mar 2009
Location: Nashville, TN
@Gugucom,

I've already installed and activated Win7 on a dedicated drive in Bay 4 of my MacPro4,1 - Win7 is running, but the hard disk seems slower than it should be. I'm running Win7 Pro 64-bit.
  1. Would the AHCI driver increase drive performance?
  2. Is it possible to install these drivers after Win7 is installed? I.E., change the driver in Device Manager? I don't want to have to reinstall Win7 and use another activation (I think they count them) if the answer to 1) is "not really."
  3. I've read about data loss with Intel's 8.9 driver set - anyone see this?

Any help would be very... helpful.
__________________
Hack: 3.0 Ghz Q6600/8GB/GTS250 | 2011 Macbook Air 11" | 2008 MB Unibody 2.4/8GB/SSD&HD
JPamplin is offline   0 Reply With Quote
Old Oct 24, 2009, 02:09 PM   #13
gugucom
Thread Starter
macrumors 68020
 
gugucom's Avatar
 
Join Date: May 2009
Location: Munich, Germany
Quote:
Originally Posted by JPamplin View Post
Would the AHCI driver increase drive performance?
I would say that it would do with 99,99% certainty.


Quote:
Originally Posted by JPamplin View Post
Is it possible to install these drivers after Win7 is installed? I.E., change the driver in Device Manager? I don't want to have to reinstall Win7 and use another activation (I think they count them) if the answer to 1) is "not really."
You can install the AHCI driver at any stage of the Windows driver installation or updating process. That goes for XP and all 32 and 64-bit versions of Vista and Seven.

Just changing the driver in device manager will BSD your system on reboot. You need to mod the registry (Vista and 7 only) and patch the MBR in OS X with the terminal script.

Installing AHCI drivers has no impact on activation, unless you mess up and have no backup. Then you would have to start from scratch and activate. Even then activation should go without a hitch as the relevant hardware would be reported as identical. Having a Winclone or Windows internal backup makes much sense though. At minimum you need to set a restore point.

Quote:
Originally Posted by JPamplin View Post
I've read about data loss with Intel's 8.9 driver set - anyone see this?
Actually Intel received reports of frequent drive failures under 8.9 and changed their recommendation to 8.8 for all older Windows systems. They still recommend 8.9 for Windows7 though.

I have Windows Vista and Seven running on 8.9 on HDD and SSD and had no problems.
__________________
MP4,1●3,33GHz Octad●2*160GB SSD●12GB RAM●Blu-Ray●FireDTV-S2●SL/Vista64
uMBP●SL/Vista64
TC 2TB iPhone●16GB
gugucom is offline   0 Reply With Quote
Old Oct 24, 2009, 04:43 PM   #14
Infrared
macrumors 65816
 
Infrared's Avatar
 
Join Date: Mar 2007
Quote:
Originally Posted by JPamplin View Post
I've already installed and activated Win7 on a dedicated drive in Bay 4 of my MacPro4,1 - Win7 is running, but the hard disk seems slower than it should be. I'm running Win7 Pro 64-bit.
Bays 3 and 4 are reportedly problematic for the 2009 Mac Pros.

Could you try the drive in bay 1 or 2?
Infrared is offline   0 Reply With Quote
Old Oct 24, 2009, 04:53 PM   #15
Infrared
macrumors 65816
 
Infrared's Avatar
 
Join Date: Mar 2007
Quote:
Originally Posted by gugucom View Post
Actually Intel received reports of frequent drive failures under 8.9 and changed their recommendation to 8.8 for all older Windows systems. They still recommend 8.9 for Windows7 though.
Do you have a link, please?

Quote:
I have Windows Vista and Seven running on 8.9 on HDD and SSD and had no problems.
Windows 7 x64 with 8.9 here and no obvious issues.
Infrared is offline   0 Reply With Quote
Old Oct 24, 2009, 05:04 PM   #16
gugucom
Thread Starter
macrumors 68020
 
gugucom's Avatar
 
Join Date: May 2009
Location: Munich, Germany
Quote:
Originally Posted by Infrared View Post
Do you have a link, please?
http://www.intel.com/support/chipsets/imsm/index.htm
__________________
MP4,1●3,33GHz Octad●2*160GB SSD●12GB RAM●Blu-Ray●FireDTV-S2●SL/Vista64
uMBP●SL/Vista64
TC 2TB iPhone●16GB
gugucom is offline   0 Reply With Quote
Old Oct 27, 2009, 10:09 PM   #17
hms84
macrumors regular
 
Join Date: Jul 2007
One question,
Do I have to format my existing windows Vista??
This thing is really confusing me......
hms84 is offline   0 Reply With Quote
Old Oct 27, 2009, 11:13 PM   #18
gugucom
Thread Starter
macrumors 68020
 
gugucom's Avatar
 
Join Date: May 2009
Location: Munich, Germany
No, but you better make a backup before you start the installation. I will divide the Posting up into sections and mark the actual installation section.
__________________
MP4,1●3,33GHz Octad●2*160GB SSD●12GB RAM●Blu-Ray●FireDTV-S2●SL/Vista64
uMBP●SL/Vista64
TC 2TB iPhone●16GB
gugucom is offline   0 Reply With Quote
Old Oct 28, 2009, 01:01 PM   #19
hms84
macrumors regular
 
Join Date: Jul 2007
So in simple words,

1- Registry, Restart.
2- Microsoft drivers autoload, after all drivers are set restart to Mac.
3- Do the patch, Restart to Windows.
4- Install intel drivers, then restart in Windows...

ALL SET
hms84 is offline   0 Reply With Quote
Old Oct 28, 2009, 01:25 PM   #20
gugucom
Thread Starter
macrumors 68020
 
gugucom's Avatar
 
Join Date: May 2009
Location: Munich, Germany
Quote:
Originally Posted by hms84 View Post
So in simple words,

1- Registry, Restart.
2- Microsoft drivers autoload, after all drivers are set restart to Mac.
3- Do the patch, Restart to Windows.
4- Install intel drivers, then restart in Windows...

ALL SET
Sure, but I have seen all kinds of experienced people struggle with this.
__________________
MP4,1●3,33GHz Octad●2*160GB SSD●12GB RAM●Blu-Ray●FireDTV-S2●SL/Vista64
uMBP●SL/Vista64
TC 2TB iPhone●16GB
gugucom is offline   0 Reply With Quote
Old Oct 28, 2009, 05:21 PM   #21
BeerdedOne
macrumors member
 
Join Date: Oct 2009
Awesome.. question

This is a great guide, thank you gugucom!

For those who have thought about this longer than I have, is it likely that this procedure could break something if MS updates ACHI driver support under Win 7 in the future? I haven't taken a look at the script but wonder what the MBR patch is doing, exactly..
BeerdedOne is offline   0 Reply With Quote
Old Oct 28, 2009, 06:46 PM   #22
j2048b
macrumors 6502a
 
Join Date: Feb 2009
Location: Cali
awesome like blossom!

hey hey...
__________________
some stuff man, and you know this!!!
j2048b is offline   0 Reply With Quote
Old Oct 28, 2009, 07:19 PM   #23
gugucom
Thread Starter
macrumors 68020
 
gugucom's Avatar
 
Join Date: May 2009
Location: Munich, Germany
For those who are interested in the background of Johnsock's patch I quote his original post from insanelymac.com
http://www.insanelymac.com/forum/ind...=126089&st=40#
Remember that this describes an early rudimentary job which he later refined for various Windows versions with Ludachris. The method is based on an earlier program written by pipomolo42 for the GRUB boot loader.

Quote:
1. Copy MBR from Windows disk:
- sudo dd if=/dev/disk3 of=./original.mbr bs=1 count=446
- make sure that you substitute the proper disk number where I have disk3 above!
- this will make a 446 byte file containing the boot code. Don't get the entire 512 byte sector because the other bytes contain your partition table. If you jack up the partition table you won't be able to boot Windows.
2. I used the DOS DEBUG program to unassemble the boot code so that I could modify it. I'm not going to detail that process here, but I will be happy to elaborate in another post if anyone is interested. Long story short: there are only 3 unused bytes in the Vista boot code and the code for programming the configuration registers need 17 bytes. Fortunately, the boot code also contains text for some error messages: "Invalid partition table", "Error loading operating system", and "Missing operating system". These seemed a bit wordy for me, so I changed them to "Bad partition table", "Bad OS", and "No OS" respectively. This freed up a whopping 47 bytes that I could use for additional code.
3. This additional space needs to be contiguous so I moved my newly modified text to the end of the MBR code and then modified the pointers used in the boot program so that it could still find them. This put some empty space in-between the actual boot program and the error message text.
4. After examining the original MBR boot code I decided that the best place to put the AHCI configuration code was at the beginning, before jumping into the standard boot program. This meant I had to move the entire program down 47 bytes, placing the empty bytes at the beginning of the file. This required changing a few pointers in the original code so it would still run properly, but I got it working with a minimal effort.
5. I then put the code for AHCI configuration at the start of the MBR file and filled in the rest of the space with 0x90 (NOP opcode for you assembly language programmers) so that it would run my code at the beginning and then continue right on with the standard boot code afterwards.
6. Then, I wrote the modified MBR to the disk:
- sudo fdisk -u -f ahci.mbr /dev/rdisk3
- again, make sure you use the correct disk where I have rdisk3 above
- Also, you have to use rdisk instead of disk so that fdisk can access the RAW drive
7. After that I was able to reboot into Vista using AHCI mode

Credit goes to pipomolo42 for the original AHCI configuration modification for GRUB. The code I used was blatantly taken from his GRUB patch file although I did verify it against the 631xESB/632xESB I/O Controller Hub Datasheet and I understand how and why it works now.
Also, I must give mad props to the guys at twocanoes, authors of the awesome Winclone utility for the methods used for reading and writing the MBR from within OS X.
I think that this method is very likely to be unaffected by any changes MS makes in the near future. It covers Win systems spanning six or seven years and works on all of them.
__________________
MP4,1●3,33GHz Octad●2*160GB SSD●12GB RAM●Blu-Ray●FireDTV-S2●SL/Vista64
uMBP●SL/Vista64
TC 2TB iPhone●16GB
gugucom is offline   0 Reply With Quote
Old Oct 29, 2009, 11:26 AM   #24
BeerdedOne
macrumors member
 
Join Date: Oct 2009
Will Intel ACHI mod kill 7's support for TRIM in SSDs?

I'm exploring my options for SSD with TRIM implementation in Win 7, and I just read this over at the Anandtech forums, which gave me pause:

"There are significant limitations to TRIM at this point. The instruction only works in a supported OS (Windows 7 and some Linux builds) and only with supported drivers. Under Windows 7 that means you have to use a Microsoft made IDE or AHCI driver (you can't install chipset drivers from anyone else)."

At face value, this would indicate that Win 7 dual booters are going to lose support for TRIM if they replace the MS drivers with Intel's, right? Crap.

Then again, from gugucom's description of the legacy drivers installed on Mac Pro systems by Windows 7, I wonder if TRIM support is present at all?
BeerdedOne is offline   0 Reply With Quote
Old Oct 29, 2009, 01:06 PM   #25
gugucom
Thread Starter
macrumors 68020
 
gugucom's Avatar
 
Join Date: May 2009
Location: Munich, Germany
I think the more important issue in Windows is the defragmentation option. If you have enabled defragmentation you will quickly damage your SSD because it is not designed to be defragged.

Windows SATA driver in Bootcamp standard is MS and not Intel. With TRIM and AHCI it means you can only use Vista and Win7 which come with an MS AHCI 1.0 driver in the standard. XP does not naturally have the AHCI driver. MS AHCI will be less performant than an Intel driver. But if TRIM gives you additional performance advantages it may be justified to use it. It is certainly not a problem to install.

Anand says that Intel are going to fix the issue with 32nm TRIM software expected to be released in the current quarter. That is one more reason to use the Intel 2nd Gen SSDs. They are superior even without TRIM and are max compatible with RAID cards.
__________________
MP4,1●3,33GHz Octad●2*160GB SSD●12GB RAM●Blu-Ray●FireDTV-S2●SL/Vista64
uMBP●SL/Vista64
TC 2TB iPhone●16GB

Last edited by gugucom; Oct 29, 2009 at 01:14 PM.
gugucom is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Hardware > Desktops > Mac Pro

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
No internet or wireless in Windows XP through Bootcamp sketchygio Windows, Linux & Others on the Mac 2 Nov 24, 2011 05:49 PM
windows xp driver's jordanr1186 Windows, Linux & Others on the Mac 2 Apr 19, 2011 10:58 PM
Problem installing drivers in Windows XP juanweiser Windows, Linux & Others on the Mac 0 Jul 24, 2010 11:20 PM
Can i install 175.63 NVidia driver in sp2 xp bootcamp? weste47 MacBook Pro 16 Jul 14, 2008 06:49 PM
Audio with new MBPs in Windows XP/Vista not working keitaro85 MacBook Pro 3 Jun 6, 2007 07:16 AM


All times are GMT -5. The time now is 07:58 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC