8

In a nutshell, I am trying to figure out for some Jetway engineers and myself, why the custom bios they made me does not allow SATA devices to boot in AHCI mode.

Obviously, this is difficult to ask considering its a *custom bios, but hopefully I can provide enough detail so that somebody could provide some ideas, because I am running out.

The board is a Jetway NF98. The original bios says American Megatrends at the top. I learned that they just provide the source code to compile (? or maybe just a logo?) but Jetway is the one who configures and produces the actual bios. So I reached out to Jetway, and they have been unbelievably helpful. I told them my goal, and they got right to it and shipped a custom bios.

The goal was simple, allow me to configure bios to refuse any other medium besides the disk connected via SATA Port 0 to be booted from. What they provided did almost exactly that, except it was not configurable, it just was set to not allow anything other than SATA Port 0 to boot.

So I plug my SATA disk in running a custom version of the Crux Linux distro, and bios reports please connect a disk, as if it sees none (even though a glance into bios settings shows a disk connected to port 0).

After some debugging I change the SATA-Mode from AHCI to IDE. This allows the disk to be seen, but boot still fails. This time it makes it a bit further, and fails when looking for root /.

To start, I have decent experience debugging Linux boot. Further, I have an exact copy (hardware & software wise) of this system, using the standard bios that came with the NF98. So I can take the disk, boot it in the standard bios, and everything is successful. When I put it in custom bios, not successful.

After further debugging, this is what I think I know:

-With sata mode as IDE

--Linux (crux) boots until looking for root

--Vista boots successfully

With sata mode as AHCI

--Linux (crux) does not boot successfully (more, the boot process doesn't start)

--Vista does not boot successfully (more, boot process doesn't start)

The Crux OS has slightly outdated custom kernel on it and uses initramfs (also custom). The Jetway engineers suggested upgrading the kernel, I thought fair enough, this did not help.

Then I figured I would try Arch Linux, which also failed in IDE mode, and wasn't seen in AHCI. This was a 3.0-ARCH kernel.

Next, and finally, I installed arch again, but this time to a single partition and used dev, not UUID or LABEL. In AHCI mode, still it was not seen. In IDE mode, still fails on transfer to root.

BUT, when I select Arch's fallback boot menu option, and SATA mode is IDE, I get semi successfully boot; that is I get to login prompt, but there is a decent amount of errors during boot. I am currently looking for what is making the difference.

My apologies for long text. Does anyone have any ideas as to why or where I should look to help figure out why the custom bios with SATA Mode AHCI does not boot?

1
  • 3
    Some of those boot failures are expected. If an OS was installed in IDE mode, you cannot boot that OS after switching to AHCI mode. You need to install the proper disk driver for boot, which is typically not a viable option; maybe a liveCD can accomplish this. Usually you have to do a full reinstall of the OS if the disk mode is changed
    – sawdust
    Mar 21, 2012 at 22:17

3 Answers 3

1

It may be that the AHCI mode just doesn't work very well with the American Megatrends BIOS. I had a similar problem with a Gigabyte GA-J1800N-D2H which looks like a similar board featuring an Intel J1800 SoC. I installed Linux Mint 17.2 with xfce 32 bit from a reliable CD-ROM. When the installation finished, it went to restart but got stuck in the shell with a message "ModemManager ... Could not acquire the org.freedesktop.ModemManager1". On attempting several reboots from the HDD, I would drop into into "(initramfs)" most times or get stuck at the message "ata1.00: failed command: READ FPDMA". I retried the installation after wiping the HDD and this made no difference.

After following several red herrings, I tried changing the SATA mode from AHCI to IDE in the BIOS and the machine booted and shut down perfectly. I went backwards and forwards a few times to make sure. THE INSTALLATION WAS PERFORMED IN AHCI MODE BUT WOULD ONLY BOOT AND SHUT DOWN IN IDE MODE.

Details of the BIOS are:

ID: 8A05AG03 Project name: J1800N-D2H Version: F4 Built: 04/29/2014 15:00:08

The board is acceptably responsive in IDE mode.

1

There are a few things to consider that might help anyone coming across this.

  1. Disks not detected in BIOS/UEFI when that BIOS is in UEFI(-only) mode: UEFI BIOSes only see GPT partitioned disks. If you can't see your disk it probably is an old MBR partitioned disk. Try chosing Legacy mode in your BIOS to detect MBR disks, change the disk mode to GPT using a partitioning tool, or clear the disk completely (remove all partitions, clear MBR).

  2. OS not booting when BIOS in AHCI mode but booting when BIOS in IDE mode: Your OS might not have the AHCI or IDE drivers installed after switching AHCI/IDE. In Windows 7, for example, the mode at the time of installation determines the type of drivers installed. You can set the HKLM/System/CurrentControlSet/Services/msahci/Start=0 and HKLM/System/CurrentControlSet/Services/pciide/Start=0 registry keys using regedit. It will then reinstall the right driver whenever you switch AHCI/IDE BIOS modes.

0

Windows (and possibly other OSes) does not install SATA drivers for AHCI Mode, unless it is active at boot time.

To resolve this within windows :-

Start in IDE (legacy) mode

  1. Run the Registry Editor (regedit.exe)
  2. Navigate to Registry Key: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Msahci
  3. Set the "Start" value to 0 (zero)
  4. Navigate to Registry Key: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Pciide
  5. Set the "Start" value to 0 (zero)
  6. Shut down
  7. Start up again, but before Windows boots go into the BIOS configuration

screens and change the disk mode to "AHCI". Save the new BIOS configuration and restart so that Windows boots. When Windows starts, it will detect the change, load new disk drivers, and do one more reboot to start up with them.

(source - https://www.neowin.net/forum/topic/987378-how-to-switch-from-ide-to-ahci-without-repairingreinstalling-windows/)

I'm sure there would be a similar process for the Linux OS's that are on your system.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .