# [Solved] Problem with sata drivers in kernel...

## dpetka2001

hello there...i have Abit IP35 mobo and i've recently bought a new sata hdd and i would like to compile the correct options in kernel in order for my hdd to be recognized...any hints?? thanks in advance...Last edited by dpetka2001 on Wed May 14, 2008 9:19 pm; edited 1 time in total

----------

## NeddySeagoon

dpetka2001,

Please post your lspci output so can see what hardware you have.

----------

## dpetka2001

```
jrn23@ ~ > lspci

00:00.0 Host bridge: Intel Corporation DRAM Controller (rev 02)

00:01.0 PCI bridge: Intel Corporation PCI Express Root Port (rev 02)

00:1a.0 USB Controller: Intel Corporation USB UHCI Controller #4 (rev 02)

00:1a.1 USB Controller: Intel Corporation USB UHCI Controller #5 (rev 02)

00:1a.2 USB Controller: Intel Corporation USB UHCI Controller #6 (rev 02)

00:1a.7 USB Controller: Intel Corporation USB2 EHCI Controller #2 (rev 02)

00:1b.0 Audio device: Intel Corporation HD Audio Controller (rev 02)

00:1c.0 PCI bridge: Intel Corporation PCI Express Port 1 (rev 02)

00:1c.1 PCI bridge: Intel Corporation PCI Express Port 2 (rev 02)

00:1c.2 PCI bridge: Intel Corporation PCI Express Port 3 (rev 02)

00:1d.0 USB Controller: Intel Corporation USB UHCI Controller #1 (rev 02)

00:1d.1 USB Controller: Intel Corporation USB UHCI Controller #2 (rev 02)

00:1d.2 USB Controller: Intel Corporation USB UHCI Controller #3 (rev 02)

00:1d.7 USB Controller: Intel Corporation USB2 EHCI Controller #1 (rev 02)

00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 92)

00:1f.0 ISA bridge: Intel Corporation LPC Interface Controller (rev 02)

00:1f.2 IDE interface: Intel Corporation 4 port SATA IDE Controller (rev 02)

00:1f.3 SMBus: Intel Corporation SMBus Controller (rev 02)

00:1f.5 IDE interface: Intel Corporation 2 port SATA IDE Controller (rev 02)

01:00.0 VGA compatible controller: nVidia Corporation G70 [GeForce 7600 GT] (rev a1)

03:00.0 IDE interface: JMicron Technologies, Inc. JMB368 IDE controller

04:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8056 PCI-E Gigabit Ethernet Controller (rev 13)

05:02.0 FireWire (IEEE 1394): Texas Instruments TSB43AB22/A IEEE-1394a-2000 Controller (PHY/Link)

05:03.0 Mass storage controller: Promise Technology, Inc. 20269 (rev 02)

05:05.0 Multimedia video controller: Internext Compression Inc iTVC16 (CX23416) MPEG-2 Encoder (rev 01)
```

here is the output of lspci...

----------

## NeddySeagoon

dpetka2001,

You need this setup plus the JMicron PATA option near the bottom of the SATA menu.

All your hard drives will become /dev/sd ....

Any CDROMS will become /dev/sr...

----------

## dpetka2001

thank you for your reply...i will try this as soon i get back home from work...one last question though...my mobo has an intel ich9 chipset and if i can recall correctly because i am not currently on my computer that option "Intel ESB, ICH, PIIX3, PIIX4 PATA/SATA support" as mentioned in the help of that option is about ich7 and ich8 chipsets...it doesn't mention anything about intel ich9 chipset and that is why i haven't tried that...i tried "achi support" for generic chipsets but that didn't help me...of course i didn't disable "ATA/ATAPI/MFM/RLL support" as i wasn't aware of having to do that...

----------

## Monkeh

Your ICH9R is in IDE mode. You'll want to set it to AHCI in the BIOS.

----------

## dpetka2001

as far as my mobo is concerned JMicron controller is responsible for the IDE mode...from onsite "x SATA 3Gb/s offer by Intel® ICH9R support Intel® Matrix Storage Tech(AHCI & RAID0/1/5/10)" is responsible for the SATA mode...is there a difference?? should i go with the above configuration suggested nevertheless??

----------

## NeddySeagoon

dpetka2001,

I wrote that guide in response to an ICH7 question, hence the ICH7 in its title

----------

## dpetka2001

do you think it might also be suitable in my situation even though i have an ich9r intel chipset?? should i go with it?? or might there be another option for an ich9r intel chipset?? because in this option in the kernel it says it is about ich5/6/7/8 sata...

----------

## NeddySeagoon

dpetka2001,

Yes it should be ok for you too.  Look in your lspci to see if your motherboard also has a Jmicron controller.

If so, you need the Jmicron PATA option on the SATA menu as well as the other options in the link.

----------

## dpetka2001

yes it does and i thought that might be the way from the first link you gave me...i just wanted to make sure that this option about intel sata controller was also suitable for my situation since i have a mobo with ich9r sata controller...thanks for your reply...i will go through with it and report back if i have any problems...

----------

## Monkeh

 *dpetka2001 wrote:*   

> as far as my mobo is concerned JMicron controller is responsible for the IDE mode...from onsite "x SATA 3Gb/s offer by Intel® ICH9R support Intel® Matrix Storage Tech(AHCI & RAID0/1/5/10)" is responsible for the SATA mode...is there a difference?? should i go with the above configuration suggested nevertheless??

 

The ICH9R has several modes. One is IDE emulation, which is pretty crap, and the other is AHCI, which is most definitely what you want it set to. It's an SATA only controller.

----------

## dpetka2001

i am trying to set the sata controller in BIOS in "ahci mode"...however when i try to boot then it cannot even load the bootloader and it fails with "hard disk failure"...when i set it back to "ide mode" it works just fine...i have 4 hdds on a promise ultra 133tx2 where also the 2 hdds with the 2 os (windows/linux) rely...with "ahci mode" it just doesn't seem to be able to boot from the pci ide card...why is this happening?? is there a solution??

----------

## NeddySeagoon

dpetka2001,

I suspect that when you switch to AHCI mode, your drives get renumbered by the BIOS thus the BIOS looks at the wrong drive to boot.

You will need to boot with a liveCD, discover the new drive numbering and reinstall the boot loader to the MBR.

----------

## dpetka2001

but i set the boot sequence in the BIOS such as following

```
1.bootable add on cards

2.first hdd on pci ide card

3.second hdd on pci ide card

4.third hdd on pci ide card

5.fourth hdd on pci ide card
```

i think it should try to boot from each hdd as set in the boot sequence in the BIOS...isn't that right?? when it doesn't find the mbr in the first hdd it should go on with the next isn't that right?? i will however try to boot from a live cd and see if there's a change in the numbering of the hdds...

----------

## dpetka2001

ok i got a reply from abit forums and someone said that i can't boot with the sata controller in "ahci mode" because when i installed windows (hence mbr) it was in "ide mode"...so now i have to go through another procedure to make it work...i hope i can get to make it work...

----------

## dpetka2001

i'm back to this topic because i still cannot find any answer...i switched to "ahci mode" and played a little with the boot sequence in BIOS and finally i think i managed to have to correct boot order...but when grub tries to load it says "grub loading stage1.5

grub loading

error 22"...so what should i do from here on?? any help please?? thanks in advance...

----------

## NeddySeagoon

dpetka2001,

```
22 : No such partition

     This error is returned if a partition is requested in the device

     part of a device- or full file name which isn't on the selected

     disk.
```

It looks like swapping the boot order has caused the BIOS to discover your disks in a different order, so the drive that you told grub to use for its files has a new number. The BIOS still loads grubs stage 1 but stage 1 looks in the wrong place for the rest of grub.

Try reinstalling grub to the MBR.

----------

## dpetka2001

i booted from knoppix and now i chrooted and am in the grub setup shell...when i type "root (hd" and press TAB only "hd(0,0)" completes automatically as if no other drives are available...same goes for "setup(hd0)"...how should i proceed??

----------

## dpetka2001

i booted from "gentoo small cd" and managed to see the other drives in grub setup,setup grub again in mbr and booted the machine...but now my monitor gets full of "grub grub grub

grub grub grub

grub grub grub

grub grub grub

grub grub grub

grub grub grub

grub grub grub

grub grub grub"...what is the meaning of this??

----------

## dpetka2001

when i try to setup grub in mbr it says the following among others 

```
running "emmbed /boot/grub/reiserfs_stage1_5 (hd1,0)"...failed (this is not fatal)

running "emmbed /boot/grub/reiserfs_stage1_5 (hd2,1)"...failed (this is not fatal)
```

where (hd2,1) is my root device and (hd1,0) is where mbr resides...(hd0) took precedence by the sata hdd...are these errors something i should worry about although it says it's not fatal??

----------

## dpetka2001

would someone suggest for a live cd with support for jmicron ide controller (that might be the problem why i couldn't see the other drives from grub menu in knoppix) except from gentoo small cd?? i would like to try with another one in case there's a problem with thw way gentoo small cd numbers the hdds...

----------

## dpetka2001

i'm trying to boot from the latest gentoo live cd but when i am in the grub shell it only recognizes the hdds directly plugged in on the mobo...the hdds that are on my pci ide card (Promise ultra 133x2) don't get recognized...thus i cannot get to issue the "root (hdx,y)" command as the hdd in which my linux installation resides is on the pci ide card...only the hdd where windows reside and the sata hdd get recognized...is there a solution to overcome this problem??

----------

## NeddySeagoon

dpetka2001,

The BIOS numbers your drives and makes the information available to the bootloader if it asks.

Its not a feature of grub.

The liveCD kernel has all the Promise options on, so it looks like it does not support your card.

We need to see its lspci line to be sure.

However, you can do the chroot steps to get into your Gentoo install from any liveCD that will see the drives on boot.

A gentoo CD is not requited,

----------

## dpetka2001

for some unknown reason my pc booted today out of the blue...i did the same thing from 3 different livecds (knoppix,ubuntu,kubuntu)...not all livecds saw the drives with the same number every time i tried...so when i tried to install grub through all 3 of them of course i did the setup with the recognized numbers specified each time i booted from a livecd...i also looked for an option in the kernel where auto-detection of the hdds could be disabled or maybe i could define how the hdds should be detected but i didn't find any such feature...only for the sata hdd not for the ide ones...the thing i remember for sure is that i temporarily disabled the sata controller from the bios and then it managed to boot for the first time...i enabled it again and things continued to work...i'm gonna do a clean install for windows and slipstream the sata drivers needed during the install so i can enable "ahci mode"...after that the ntloader will overwrite grub correctly?? should i then install grub on the partition where my gentoo resides and not on the mbr??

----------

## NeddySeagoon

dpetka2001,

If grub works stay with it on the MBR. If you install grub to a partition you have to find the installed grub boot sector and move it to Windows. You than use NTLDR to start grub whenever you want to run Linux.

Both ways work.

----------

