Jump to content

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


ludacrisvp
 Share

423 posts in this topic

Recommended Posts

Thanks john and ludacris. I used the script method on my MacPro today and it worked perfectly. The only hitch was that I was running Windows 7 on disk1 and MacOS X + Vista on disk0. If I tried to modify disk1 as the script suggested, no OS would be recognized. But modifying the disk0 MBR worked and the script detected that MBR as Windows 7, despite being on the other disk. Obviously my Windows 7 install used the existing Vista MBR. I'm impressed that the script method still working considering Vista and Windows 7 both having entries in the MBR.

 

Thanks again, the script worked beautifully considering my unusual setup and your instructions were spot on!

Link to comment
Share on other sites

I haven't noticed that, lol most likely because I never ever use it.

I don't install all the boot camp {censored} inside of windows.

I only install the drivers needed for the hardware to run properly.

If I want to change my OS I will pick it out of the rEFIt menu at boot.

 

I am pretty sure that if it really doesn't work there won't be a way to fix it.

But maybe there is a way. You could try to re-install the boot camp stuff if you like and see if that does it.

Link to comment
Share on other sites

Has anyone noticed that when you install AHCI on Vista and Windows 7 the Boot Camp Control Panel stops working entirely? Any solutions?

 

I have the same problem with my Macbook too, basically Boot Camp control panel needs to check the HDD for the HSF partition, since it is modified by the script, it can no longer see it; so it quits.

 

If you use a Macbook, you will need to use the control panel to change trackpad, keyboard settings, etc. Those settings are stored in the registry as hex. What I did was, load up a fresh copy of Windows, change all the settings I need, then I finally run the script.

 

You can still change default boot disk through MacOS.

Link to comment
Share on other sites

Hello all,

 

I apologize for not responding to many of your posts here. I've been out of the country with limited internet access and very busy with work for a while. I will try to answer all questions that I can once I get a chance to go through all the posts I've missed. I want to address this and some other questions specifically since I've had some PM's about them while I was away.

 

My script WILL NOT work with the nVidia MCP79 chipset since it does not use the same PCI configuration registers as the Intel ESB/ICH models. I don't know all of the systems that use this chipset, but I know the new Unibody MB/MBP models are affected, as well as the MBA apparently. Pre-unibody models have Intel chipsets and work fine, as do all Mac Pro models. I can't speak for the iMac and Mac Mini models, but I suspect that the newer ones use the MCP79 as well. Someone please confirm this for everyone here.

 

I have a new unibody MBP and I'm working on a solution for enabling AHCI, but I'm not having much luck so far. The main problem is that nVidia does not publish the needed documentation for their chipsets, so I have no reference material to work with. I'm sure this information is available to their licensees, but I'm not one. If anyone here has access to low level programming specifications for the MCP79 and is allowed and/or willing to share it, please PM me with the details. Any nVidia engineers here, your help would be greatly appreciated.

 

Also, there have been a few questions about the script not working for some people who have used the rEFIt bootloader. I have not had a chance to see if rEFIt installs it's own MBR, but it appears that this MAY be the case. I'm working this out currently and I'll update the script accordingly if this turns out to be true. If anyone can confirm or deny that rEFIt modifies the MBR, please let me know.

 

I've also been thinking of making a native OSX application for patching the MBR that would take the place of the script. What do you guys think? It would require a little work on the front end but would be easier for me to modify if needed down the road. Bash scripts are great, but they hurt my head.

 

I'm glad to see this is getting some use and I hope we can figure out how to get AHCI working on the newer systems. I'll post updates if they become available.

 

Great work. Thank you. Did you make any progress on AHCI enabling your unibody MBP? Deleting OS X and running Windows 7 Exclusively using MBR only should do the job right? - but that beats the purpose of having a Mac :-) Any help would be appreciated.

Link to comment
Share on other sites

Great work. Thank you. Did you make any progress on AHCI enabling your unibody MBP? Deleting OS X and running Windows 7 Exclusively using MBR only should do the job right? - but that beats the purpose of having a Mac :-) Any help would be appreciated.

Unfortunately no.

Because you have the nvidia chipset and not an Intel one the locations for the PCI configuration settings are not at the same address.

So sending the command meant for the Intel chipset to the NVIDIA one would be like trying to use a usb mouse in a firewire jack or like pressing the print button and having firefox open instead.

 

The storage location of the intel one is in New York, NY

The storage location of the nvidia one is in Atlantis.

 

Once we find "Atlantis" we then need to find out what the codes are for "Enable AHCI" and "Enable Legacy Mode"

Once that is done johnsock could try and make a script to modify the MBR for the nvidia chipset, and I could try to modify the Stage2 of the GRUB boot loader to see if it works too. However we are unable to test anything because neither of us have the proper chipset.

Link to comment
Share on other sites

What is AHCI anyway? Is it related to ACPI in anyway? I never quite understood what it was...
Nope, it is not related to ACPI at all.

Basically think of it as it enables all the advanced features of SATA.

Enabling all 6 SATA ports on the MacPro instead of the legacy limit of 4 ports.

Hot Swapping and Native Command Queuing are the main points.

 

The Advanced Host Controller Interface (AHCI) is an Intel programming-specification which defines the operation of Serial ATA host-controllers (also known as host bus adapters) in a non implementation-specific manner. The specification describes a system memory structure for computer hardware vendors to exchange data between host system memory and attached storage-devices. As of June 2008, the current version of the specification is v. 1.3.[1] AHCI offers software developers and hardware designers a standard method for detecting, configuring, and programming SATA/AHCI adapters. AHCI is separate from the SATA 3Gb/s standard, although it exposes SATA's advanced capabilities (such as hot-plugging and native command queuing) such that host-systems can utilize them.

 

Many SATA controllers offer selectable modes of operation: legacy Parallel ATA emulation, standard AHCI-mode, or vendor-specific RAID. Intel recommends choosing RAID mode on their motherboards (which also enables AHCI) rather than the plain AHCI/SATA mode for maximum flexibility, due to the issues caused when the mode is switched once an operating system has already been installed.[2] Legacy-mode is a software backward-compatibility mechanism intended to allow the SATA-controller to run in legacy operating-systems which are not SATA-aware.

 

AHCI is fully supported out of the box for Microsoft Windows Vista, Windows 7 and Linux operating systems from kernel 2.6.19.[3] NetBSD also supports drivers in AHCI mode out of the box in certain versions. OpenBSD has had an AHCI driver since OpenBSD 4.1. FreeBSD supports AHCI as well. AHCI support for Solaris 10 has been introduced in the 8/07 release [4]. Older operating systems require hardware-specific drivers to support AHCI.

 

NCQ.png

This can reduce the amount of unnecessary drive head movement, resulting in increased performance (and slightly decreased wear of the drive) for workloads where multiple simultaneous read/write requests are outstanding, most often occurring in server-type applications.

Link to comment
Share on other sites

Unfortunately no.

Because you have the nvidia chipset and not an Intel one the locations for the PCI configuration settings are not at the same address.

So sending the command meant for the Intel chipset to the NVIDIA one would be like trying to use a usb mouse in a firewire jack or like pressing the print button and having firefox open instead.

 

The storage location of the intel one is in New York, NY

The storage location of the nvidia one is in Atlantis.

 

Once we find "Atlantis" we then need to find out what the codes are for "Enable AHCI" and "Enable Legacy Mode"

Once that is done johnsock could try and make a script to modify the MBR for the nvidia chipset, and I could try to modify the Stage2 of the GRUB boot loader to see if it works too. However we are unable to test anything because neither of us have the proper chipset.

 

 

I get it, we must find Atlantis :-) Good work though, reading this thread got me up to spean on what on how AHCI works. Im really hoping Atlantis is found, I have a MBP 2009, with an Intel X-25m and I'm only getting 125 mb/s in read (on my thinkpad it is more like 225 mb/s)

Link to comment
Share on other sites

Some say that it does and some say that it doesn't, there were benchmarks posted of the difference in transfer speeds on the OnMac forums and they did show that under heavy disk use AHCI disks were better performers.

 

To find out if you are on windows side I would open device manager and look under "IDE ATA/ATAPI Controllers" and see if anyone listed in there has AHCI in their name.

Or if you are using more than 4 SATA devices you have to be in AHCI mode.

 

Under OSX look in system profiler under SATA and it will tell you if you are using an AHCI controller.

Link to comment
Share on other sites

Hello everyone,

 

I tried for 2 days to get the script to work and finally can report success!

Couple of things I thought I would share in case anyone else is having the same issues I had:

 

My setup:

 

Mac Pro 3,1 (Early 2008)

Disk 0 - Mac OS X Snow Leo Server

Disk 1 - Data Disk (Mac Extended)

Disk 2 - Data Disk (NTFS)

Disk 3 - Windows 2008 R2 x64

 

Steps I took:

 

1 - Used Bootcamp Assistant to select an entire drive for Windows

2 - Installed Windows 2008 R2 x64

3 - After complete install and logging in Windows as Administrator, I run Regedit to change the registry

 

Now here is an important thing: Windows automatically backs up the system configuration entry in the registry.

So I changed the msahci entry in all places:

 

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002

 

Under those locations, I changed services\msahci\Start to 0.

 

4 - Reboot into Mac OS and run the ahci.sh script with the -n option (to not write to the MBR)

5 - Manually write the ahci.mbr using the following command:

 

fdisk -u -f ahci.mbr /dev/rdisk3

 

In the script, the command writes to /dev/disk3 and every time I tried I would get BSOD.

After following the above steps, everything is now working and I can finally see all the ports in Windows.

 

Of course, don't forget to install Intel's latest Storage Management software.

 

I hope this helps someone.

Link to comment
Share on other sites

I wonder if the issues were caused by using windows 2008 R2.

I don't know if the script could modify it properly and therefore refused to overwrite the MBR just in-case it was corrupt.

It would appear that it did make the modified MBR for you but it wouldn't write it to the drive.

When the script was made I supplied the MBR for the Windows 7 system for john to modify.

You may want to post the original MBR from windows 2008 so that john can look at modifications to it.

I think that those registry backups are used for the "Last known good configuration" choice when you fail to boot your system.

 

I really like the Modified MBR method that johnsock was able to make but there is the chance that it will not be compatible with all of the different operating systems that come out unless he makes more revisions to add OS support each time a new one comes out. The fail-safe method would be to use the GRUB bootloader allowing you to enable AHCI for any OS that GRUB can boot. This may be helpful for any Linux users or people that use other OSs that aren't supported by the script.

Link to comment
Share on other sites

@johnsock

 

Hi John,

 

In order to enable AHCI support on Win 7, under Terminal in OSX I have recieved the message 'WARNING: Unrecognized OS. Do you want to continue? (Y/N)' therefore I did not want to proceed. I am running Windows 7 RTM 64bit on Mac Pro (2008). Prior to the step I did the registry hack (put 0 for AHCI). Now I wonder what could happen if I proceed with that kind of message.

 

Thanks in advance!

 

moth3r-mac:~ moth3r$ sudo -s
Password:
bash-3.2# /Users/moth3r/Downloads/ahci.sh /dev/disk0s2
AHCI Master Boot Record Patch 1.0

Scanning drives...
Windows partition found on /dev/disk3
Do you want to use this drive? (Y/N)y
Backing up MBR from /dev/disk3 to ./backup.mbr
MBR backup complete.

WARNING: Unrecognized OS. Do you want to continue? (Y/N)n

Link to comment
Share on other sites

Most likely it would work fine, but that is the reason that the backup is made of the MBR in case it doesn't work right you are still able to use it.

It may say unknown because the MBR that I gave johnsock from windows 7 was from the release candidate so they may have changed something minor in the 2 versions.

 

The reason that I say it shouldn't matter is because the part of the MBR that is modded is a very small chunk (a few of the beginning bytes of the 512 bytes in the MBR).

From what I know from talking with john is that the beginning is basically the same on all the windows MBR and only the end changes.

So if I were you I would give it a try.

Link to comment
Share on other sites

First of all thx Ludacris for the fast reply!

 

I had my graphic card serviced for two days so today I have patched my HDD for the first time. To my surprise under Windows 7 afterward nothing was changed at all. No new hardware detected and no IDE & HDD Controllers shown with AHCI in mind. Hmm, I am pretty sure I have patched the right hdd because that was the only one Windows system detected. I have used manual mode to specify it right as well. As you cam see on the image it is the Disk0s2, the drive bellow master. I could get anything patched under Disk0 (master) because no OS detected at all. Now I am kinda confused what I did wrong?

 

diskutil.th.png

 

Regards

Link to comment
Share on other sites

UPDATE: 4-29-09

Here is a newer, easier method to perform the modifications to your existing setup with a script made ...

To just download his AHCI modification file click here

It is still a work in progress but it does save a lot of work.

 

Here is a quick how to for his script.

 

Vista 32/64 Windows 7 32/64

- Run Regedit

- Navigate to "HKLM\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.

I have problems with 1st option (johnsock's script).

What I'm doing:

1. Install fresh Windows 7 x64 (without BootCamp Drivers)

2. changing Start Value in registry

3. Reboting to Windows

4. Reboting do Mac OS X

5. Run johnsock's script on disk0 (1st partition with macosX, 4th with windows 7)

6. Rebooting to Windows (windows is finding same drivers, but drive is still working in ATA)

7. Rebooting Windows and installing Intel Matrix Storage Manager 8.9

8. Rebooting windows and now I've got a problem!

 

My system is restarting while is loading - all the time!

 

Can somebody help me?

 

If I have MacOSX and Windows on the same disk - I still should patch "disk0" or maybe disk0s3?

 

I've got MacBook Pro 3.1 (2007) with C2D 2.4GHz, 4GB RAM DDR2 667, 320GB Seagate 7200, ICH8M sata controller, MAC OS X 10.6.1

 

windows7mbr.zip is actual patched MBR

achimbr.zip - mbr which I patched

backup.mbr.zip - backup which was made while patching

windows7mbr.zip

ahcimbr.zip

backup.mbr.zip

Link to comment
Share on other sites

I have problems with 1st option (johnsock's script).

What I'm doing:

1. Install fresh Windows 7 x64 (without BootCamp Drivers)

2. changing Start Value in registry

3. Reboting to Windows

4. Reboting do Mac OS X

5. Run johnsock's script on disk0 (1st partition with macosX, 4th with windows 7)

6. Rebooting to Windows (windows is finding same drivers, but drive is still working in ATA)

7. Rebooting Windows and installing Intel Matrix Storage Manager 8.9

8. Rebooting windows and now I've got a problem!

 

My system is restarting while is loading - all the time!

 

Can somebody help me?

 

If I have MacOSX and Windows on the same disk - I still should patch "disk0" or maybe disk0s3?

 

I've got MacBook Pro 3.1 (2007) with C2D 2.4GHz, 4GB RAM DDR2 667, 320GB Seagate 7200, ICH8M sata controller, MAC OS X 10.6.1

 

windows7mbr.zip is actual patched MBR

achimbr.zip - mbr which I patched

backup.mbr.zip - backup which was made while patching

 

I have the same problem too, BSOD! At the end, I found out it is the Matrix Storage Driver that is causing this. This is what you should do:

 

1) Restart the computer, load into Boot Camp

 

2a) When the screen is black (before it loads Windows), keep hitting F8. That should bring up the Boot option menu. Choose "Repair", that should being you to the Windows Repair, and it should automatically default to Start-up Repair, if it doesn't, do that.

 

2b) If it prompts for Start-Up Repair, then do it.

 

3) Start-Up Repair should realize that there is a driver issue, it should prompt for a System Restore, Do it.

 

4) If everything goes well, it should be using the Standard MS AHCI driver.

 

5) Download the Intel chipset software http://www.station-drivers.com/telechargem...rivers.com).exe and install, it should automatically update the AHCI.

 

If this doesn't work, then you will have to reinstall Boot Camp again, and DO NOT use the Matrix Storage driver.

Link to comment
Share on other sites

A user on Macrumors posted the following

 

.... changing the "Start" subkey value... to 0

in this key allows the AHCI driver to be loaded on boot:

 

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\msahci

 

.....

 

This is a description of what the Start subkey values mean:

 

[ Quoted From: http://support.microsoft.com/kb/103000 ]

Start	 REG_DWORD	 Start constant
Specifies the starting values for the service as follows:

START TYPE	 LOADER	 MEANING

0x0			Kernel	 Represents a part of the
(Boot)					driver stack for the boot
					  (startup) volume and must
					  therefore be loaded by the
					  Boot Loader.

0x1			I/O		Represents a driver to be loaded
(System)	   subsystem  at Kernel initialization.

0x2			Service	To be loaded or started
(Auto load)	Control	automatically for all startups,
		   Manager	regardless of service type.

0x3			Service	Available, regardless of type,
(Load on	   Control	but will not be started until
demand)		Manager	the user starts it (for example,
					  by using the Devices icon in
					  Control Panel).

0x4			Service	NOT TO BE STARTED UNDER ANY
(disabled)	 Control	CONDITIONS.
		   Manager

 

I have always had to do the MBR patch for Vista and Win7 on top of changing the registry sub key. Now I'm wondering if setting the sub key from 4 to 3 instead to 0 would avoid doing the MBR patch.

 

 

I also have an update on using AHCI mode on my uMBP. I managed to set the MS AHCI 1.0 driver successfully with the registry mod and the MBR patch method.

 

Of course I could not use the Intel driver because the chipset is Nvidia's MCP97. I had no luck to find an appropriate driver at Nvidia's web site, neither in manual nor in automatic mode.

 

At least I do have AHCI with the MS driver and perhaps someone can point me to a source for the proper Nvidia driver.

Link to comment
Share on other sites

  • 2 weeks later...

Well I can tell you that unfortunately that will not do anything for you.

This is because it is not able to switch the mode at the hardware level.

This would only change what drivers windows is trying to load on top of the hardware.

The MBR and GRUB modifications make an on-the-fly change to the EFI firmware settings to put the controller back into AHCI mode before it tells Windows to begin the windows loader. You could see this as you make a change in your bios and every time you reboot your bios settings are reset (like having no battery inserted in the motherboard) and you have to make your change every time you boot.

 

Post a screenshot of this from your windows install on the mac and I can tell you for sure if you are in AHCI or not.

post-176965-1259045742_thumb.jpg

Link to comment
Share on other sites

  • 1 month later...

Hello,

 

on january 20 2010 apple released the bootcamp update 3.1 - windows 7 support

 

is the ahci function enabled once the new bootcamp package is installed under windows 7 on a early 2009 nehalem mac pro machine?

 

any information or experience anybody???

 

thank you

Link to comment
Share on other sites

99.9% sure that it will not change the mode to AHCI for the 2009 MacPro.

This is because the system is set to legacy mode before booting when you are not using the modified booting procedure.

The update issued by Apple is only applied inside Windows. Sorry.

Link to comment
Share on other sites

I have a Macbook Pro 17" 2,1. It is a 2007 model. I don't see the controller hardware you specifically show at the top of this thread.

 

But the AHCI is not a hardware spec but rather an API spec for hardware. Thus it would be possible to create drivers for older hardware, so long as it meets the requirements of the AHCI spec.

 

Does anyone know if the hardware on older Macbook Pros such as mine has driver support?

 

My hardware is:

Model Name:    MacBook Pro 17"
 Model Identifier:    MacBookPro2,1
 Processor Name:    Intel Core 2 Duo
 Processor Speed:    2.33 GHz
 Number Of Processors:    1
 Total Number Of Cores:    2
 L2 Cache (per processor):    4 MB
 Memory:    2 GB
 Bus Speed:    667 MHz
 Boot ROM Version:    MBP21.00A5.B08
 SMC Version:    1.14f5
 Serial Number:    W87060EWW0M
 Sudden Motion Sensor:
 State:    Enabled

Serial ATA:

Intel ICH7-M AHCI:
 Vendor:    Intel
 Product:    ICH7-M AHCI
 Speed:    1.5 Gigabit
 Description:    AHCI Version 1.10 Supported

Link to comment
Share on other sites

 Share

×
×
  • Create New...