Enabling AHCI causes BIOS to hang on POST

ahcipost

I have an ASUS P5QL Pro motherboard and a Seagate 7200.10 HDD. When I enable AHCI in the BIOS the BIOS hangs when detecting the HDD. After having searched around the web for a while this seems to be caused by a small (a few MBs) free space or partition at the end of the hard disk – and looking at the partition table, there is an unpartitioned 2 MB space area at the end indeed.

The question is how would I get rid of that space so the BIOS doesn't get a heart attack when it sees it? Windows 7's Disk Management doesn't allow me to do anything with that. Creating an unformatted partition using GParted (Ubuntu 10.10 Live CD) makes GParted crash if I start it again. I'm thinking of extending the Windows partition in GParted but I'm afraid of breaking the Windows installation.

What is a safe way to get rid of the extra space so I can use the SATA drive in AHCI mode, rather than IDE emulation (which works fine)?

EDIT:
This appears to be caused by the 100MB boot partition the Windows installer creates. As detailed in a thread in the Microsoft TechNet forums (see post by [RU] Ivan) it changes the disk geometry and spurious small unallocated pockets of space appear at the end of the drive.

EDIT 2:
Looks like the Intel southbridge doesn't like the first partition to be smaller than 8GB either. The first partition of of course the Windows 7 100MB boot partition.

• What you might try to do is to force windows to use the entire hard drive as a single partition. You could then both avoid the small system drive as well as attempt to eliminate the small pockets of space. This requires a reinstall of windows. The problem with Win7 is that it splits up system files onto both partitions. The 100MB partition can't be deleted (source).

Whenever you do hard drive experimentation, it is best to get a spare hard drive to do all of your work on. This protects your system from accidentally killing the OS and gives you a fall back in the event your experiment fails. You mentioned that you are looking to get a SSD. You could wait to experiment until you get this drive.

I have found two methods to get this to work.

Method 1: Use the GUI interface to re-size the automatically generated partition.

When you partition a drive, windows will automatically create the 100MB partition. What you do once this happens is delete all partitions except this 100MB one. You then extend the 100MB partition to fill the drive. (source)

Method 2: Interrupt the installer and partition the disk in the command line

At the first setup screen (Language, Keyboard, etc.) press SHIFT+F10. This will open a command prompt window. You then enter the following commands in order:

diskpart
list disk
select disk 0
clean
create partition primary
select partition 1
active
format fs=ntfs quick
exit
exit


Note: When you use the list disk command, your disk number may be different than disk 0. Change the "select disk" command as needed.

Note: You will have to type exit twice. One to close diskpart, and another to close the command prompt.

Once you return to the GUI, continue with the install. When you get to the partition screen, highlight the partition you just created and click Next. Windows will install to the partition you created and not create the 100MB boot partition. Instead, you will see a C:\Boot folder when the install is finished (like Vista has). (source)

There isn't much you can do when you have a buggy BIOS or chip set. Just because the hardware states that it supports an option, doesn't necessarily mean that the option will work.

Hope this helps