Ubuntu – Can’t boot into fresh install of Ubuntu with AHCI enabled


I had previously a Windows XP installation on a RAID1 array (controlled via Intel Matrix Storage Manager). I decided to ditch it and install Ubuntu 12.04 (using "software RAID"). So first I reset both disks to non-RAID and then launched the Ubuntu installation. When it finished and the computer rebooted, the BIOS froze with this message on the screen:

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.

Controller Bus#00, Device #1F, Function #02: 06 Ports, 02 Devices

I have the Gigabyte GA-EP45-DS4 motherboard with the latest BIOS (F10b). However, I learned there is probably a bug in the SATA BIOS which causes the hang when the previous OS was installed in IDE mode but is now accessed in AHCI mode (see for example this link).

So I completely wiped both disks (by running this command from GParted Live CD: dd if=/dev/zero of=/dev/sda bs=1M, although I am not sure if it is enough), then ran the Ubuntu installation again. Unfortunately the problem persists. I am not experienced enough to edit the partition table manually (as this post suggests). Is there any other way to work around this issue?

EDIT: My BIOS offers three modes: IDE, AHCI and RAID (XHD). The latter one causes the same problem as AHCI.

Best Answer

After a few days of trying, I finally managed to sort out the issue. It turns out it was indeed a bug in the AHCI BIOS described in this discussion. So I booted using the Parted Magic CD and I mounted a USB stick with a copy of wxHex Editor. Ran the editor and manually changed the two bytes (0x1C3 and 0x1C4) of the MBR on both disks to the values the above link suggests (0xFE and 0xFF). Rebooted and voilĂ , both disks were successfully recognized!