User Tools

Site Tools


bypass_intel_sata_ahci_bios_hang_bug

This is an old revision of the document!


Certain Intel SATA controllers' firmware has a bug that will cause it to hang on boot if the disk's partition table is set up a certain way. (Seriously.)

It will hang on a screen similar to:

Serial ATA AHCI Bios, Version iSRC 1.20E
Copyright (c) 2003-2008 Intel Corporation                         23
** This version supports only HardDisks & CDROM drives **
Please wait. This will take a few seconds.

User 'kondra' on the Gigabyte forums did a good write-up on this, reproduced below. Suffice it to say that the firmware (stupidly) looks at the C/H/S ending entry of the first partition to help figure out disk geometry (well, it actually ignores this info, as does the OS, but boy does it choke if it's not a preferred value). Fix by changing the bytes at disk offset 0x1C3 to "FE FF FF".

Kondra's post:

kondra:
-----------------------------------------------------------------------------------------------------------------
Solution: GA-P35-DS3 Rev 1.0 BIOS F14 SATA AHCI Native Mode hangs at HDD detection
-----------------------------------------------------------------------------------------------------------------
The following is the solution for many hangs inside the AHCI controller device enumeration at BIOS startup.
In addition other errors that appear to be strange are also related to a combination of firmware and Windows
Setup CD bugs. If you follow the listed steps I am not responsible for any damage that may occur! Keep in
mind that I am a bloody noob, which still tries to understand how these computers work, but getting better
in it every day.


-----------------------------------------------------------------------------------------------------------------
Scenario 1
-----------------------------------------------------------------------------------------------------------------
Error
-------
- BIOS is set to AHCI native SATA Mode
  BIOS > Integrated Peripherals >
  SATA AHCI Mode = AHCI
  SATA Port0-1 Native Mode = Enabled
- HDD is connected
- at the AHCI device scan we see the following text on the screen:
  Serial ATA AHCI BIOS, Version iSrc 1.20E
  Copyright (c) 2003-2008 Intel Corporation
  ** This version supports only Hard Disk and CDROM drives **
  Please wait. This will take few seconds.
  Controller Bus#00, Device#1F, Function#02: 04 Ports, 02 Devices
- the cursor is blinking infinite and no device can be enumerated

Solution
----------
- turn off computer
- disconnect HDD
- turn on computer and go to BIOS
- set BIOS to Legacy IDE Mode
  BIOS > Integrated Peripherals >
  SATA AHCI Mode = Disabled
  SATA Port0-1 Native Mode = Disabled
- save BIOS changes and turn off computer
- connect the HDD which caused the problem and a 2nd HDD for launching XP
- in XP use a hex editor, I like to use "010 Editor" and open the PhysicalDrive of the HDD causing the hang
- in the MBR, which is the very first sector, set the 3 bytes starting at offset 0x1C3 to FE FF FF and save
  the changes to the PhysicalDrive
- now the controller can be set back to AHCI native mode in BIOS and the hang disappears

Simulate the problem
----------------------
- use a HDD with a MBR and an active 1st primary partition, this is normally a HDD for booting an OS
- use a hex editor and set the 3 bytes starting at offset 0x1C3 to 01 08 00
- set BIOS to AHCI native SATA Mode
  BIOS > Integrated Peripherals >
  SATA AHCI Mode = AHCI
  SATA Port0-1 Native Mode = Enabled
- after the next reboot the AHCI device enumeration will hang infinite

 ... <snip> ...

-----------------------------------------------------------------------------------------------------------------
Technical Description
-----------------------------------------------------------------------------------------------------------------
At MBR offset 0x1C3 we find the CHS address of the last absolute sector in the partition. For partitions which
begin or end beyond the 1024th cylinder, the three CHS bytes should always be filled with: FE FF FF. For smaller
partitions these values should have the correct calculated bytes and NOT FE FF FF. But the Gigabyte GA-P35-DS3
Intel ICH9 AHCI Controller has always problems with the real values, at least if we also change the partitions
start offset to align it for an SSD for example and do not use the standard partition start offset of 63 sectors.

The solution above has been successfully applied to the four disks in DOC when I upgraded him from the Atom motherboard to a Gigabyte EP45-DS3L Core2Duo motherboard.

bypass_intel_sata_ahci_bios_hang_bug.1357191875.txt.gz · Last modified: 2013/01/02 21:44 by tkbletsc

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki