# sata/ahci/scsi problem

## bujecas

Hi, 

I have a SATA 160GB harddisk and a motherboard with the ICH6 SATA controller. The motherboard also has AHCI mode and the other OS(winxp) runs in that mode and I want to run Gentoo also in that mode. I recompiled the kernel with scsi and sata support, but now I have the problem to configure the lilo or grub, because I don't know the /dev that my hardisk is going to be... When I run grub without making changes to the previously configuration, it gives the error that can't mount the root on /dev/hda8.... I think that is because my hardisk is know on something called /dev/scsi... and not on /dev/hda... 

I've tried to disable the AHCI mode and running with SATA in auto mode (enhanced or combined) but with the new kernel it gives the same error that can't mount root on /dev/hda8...

needing some lights...

thnks.

PS: I'm using kernel 2.6.9 and Gentoo 2004.2. If it helps, the controller that appears in winxp is Intel 82801FR SATA AHCI Controller.

----------

## NeddySeagoon

bujecas,

At the moment, the kerenl has two different SATA drivers. One, configured under IDE options makes your SATA drive appear as a IDE drive, /dev/hda, /dev/hde or something like that. This driver is depreciated.

The other dtiver, configured under SCSI with make the same HDD appear as /dev/sda. So just now, you can take your pick, but /dev/sdN is the way things are moving.

You can only compile one of these drivers into the kernel or neither will work.

----------

## bujecas

hmm, I see... but specifically about the AHCI mode, when I compile the kernel with SATA SCSI, it will recognize the AHCI mode from the motherboard or there is some more other driver to do the AHCI mode job?

----------

## NeddySeagoon

bujecas,

It looks like the answer to your question is maybe ...

start here http://lwn.net/Articles/102222/

----------

## bujecas

I applied the patch-2.6.10-rc3 and now it has a ahci mode in the drivers/scsi/low-devel-drivers/SATA-support section. I compiled the kernel with this option. Now, I have this configuration in grub.conf:

title=Linux

root(hd0,6)

kernel /kernel-2.6.10-rc3 root=/dev/sda1

My doubt is what /dev/ I should choose know. I think /dev/hda is not the choice because the AHCI mode runs over SCSI then I think that should be /dev/sda... 

Besides that, when I reboot with the AHCI mode enabled in motherboard, the Grub hangs and won't boot to the choosing menu screen. I thought that could be the root(hd0,6) but if I boot with the AHCI mode disabled from the motherboard (running with SATA enhanced I think), the Grub boots to the menu without problems, then it won't boot the kernel but that another story.

Needing more lights.

Thnks.

----------

## moh

hi. i have this problem as well and i've been trying to find a way to do this for some time now.. it seems like grub totally dies when it tries to access any of my harddrives using AHCI, even when using a bootdisk.

unfortuantely, i haven't found anything yet, but if i do, i'll post it here.

----------

## bujecas

Yes, I give it up from Grub, I'm using Lilo now...

I've recompiled the kernel with scsi disk support with AHCI mode, and even deinstall the IDE disk support (also tried with it).

My lilo.conf lies on this:

boot=/dev/fd0

prompt

image=/boot/vmlinuz

label=linux

read-only

root=/dev/sda8

I'm also booting lilo from floppy. Using the sda8 it can boot, I think that it even mounts the root, but then it throws this error:

"fsck.ext3: no such file or directory while trying to open /dev/hda8"

I ask myself: "Why it stills using the /dev/hda8 when I set the root=/dev/sda8 in lilo?"

When it gives this error, then I can go into rescue mode in the system, and I check in /dev that there's only /dev/hda and no /dev/hda8. Ok I'm getting  a little confused here...

In the booting process, I can see messages telling that ahci is on scsi0 and those kind of stuff, so I thought that the thing was finally configured, but I was wrong....

Still needing lights...

tnks.

PS: I know that this subject is not about Gentoo especifically, but this forum is the only that is giving me some feedback and help about this problem.

----------

## SantaX

I guess /dev/hda8 is still in your /etc/fstab. You have to change that one to /dev/sda*, too.

----------

