Jump to content

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


  • Please log in to reply
404 replies to this topic

#101
0093g

0093g

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 1 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!

#102
PeterHolbrook

PeterHolbrook

    InsanelyMac Protégé

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

#103
ludacrisvp

ludacrisvp

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 374 posts
  • Gender:Male
  • Location:USA
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.

#104
Hellicon

Hellicon

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 1 posts
I got this working on my Santa Rosa Macbook Pro (2007) with Windows 7 and a new ssd. Took awhile, a few restores of windows and mbr backup, but its working.

Thanks!

#105
killer23d

killer23d

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 2 posts

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.

#106
inur

inur

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 2 posts

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.

#107
ludacrisvp

ludacrisvp

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 374 posts
  • Gender:Male
  • Location:USA

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.

#108
Espionage724

Espionage724

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 639 posts
  • Gender:Male
  • Location:Charleroi, PA 15022
What is AHCI anyway? Is it related to ACPI in anyway? I never quite understood what it was...

#109
ludacrisvp

ludacrisvp

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 374 posts
  • Gender:Male
  • Location:USA

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.


Posted Image
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.

#110
inur

inur

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 2 posts

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)

#111
Espionage724

Espionage724

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 639 posts
  • Gender:Male
  • Location:Charleroi, PA 15022
How could I tell if AHCI is enabled or not?

And does it make a "noticeable" difference if enabled or not?

#112
ludacrisvp

ludacrisvp

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 374 posts
  • Gender:Male
  • Location:USA
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.

#113
Jener

Jener

    InsanelyMac Protégé

  • Members
  • Pip
  • 9 posts
  • Gender:Male
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.

#114
ludacrisvp

ludacrisvp

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 374 posts
  • Gender:Male
  • Location:USA
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.

#115
agonyii

agonyii

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 2 posts
@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


#116
ludacrisvp

ludacrisvp

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 374 posts
  • Gender:Male
  • Location:USA
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.

#117
agonyii

agonyii

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 2 posts
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?

Posted Image

Regards

#118
moskitos3

moskitos3

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 1 posts

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

Attached Files



#119
killer23d

killer23d

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 2 posts

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-d...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.

#120
ludacrisvp

ludacrisvp

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 374 posts
  • Gender:Male
  • Location:USA
Actually why this is happening is because you aren't successfully enabling the AHCI mode.
Windows has the drivers loaded for AHCI and it crashes because it cannot find the AHCI controller.
Once you enable AHCI it will load just fine.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy