How to tell whether my HDD is IDE or SATA

The output of lspci on Ubuntu 16.04.2 LTS is:

00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e1)
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 01)
00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7-M Family) SATA Controller [IDE mode] (rev 01)
00:1f.3 SMBus: Intel Corporation NM10/ICH7 Family SMBus Controller (rev 01)
01:00.0 VGA compatible controller: NVIDIA Corporation G72M [Quadro NVS 110M/GeForce Go 7300] (rev a1)

Now I wonder if my HDD has IDE interface or SATA interface. How can I realize that?


Based on lspci, I feel like the HDD interface is IDE, but I see something about SATA on lspci output which makes me doubt it.


You have a SATA hard drive.

The reason that you are seeing IDE in there is actually quite simple: SATA can operate in one of two modes, AHCI or IDE.

Your controller appears to be in the IDE mode at the moment, as you can clearly see from the command output:

SATA Controller [IDE mode]

As for the difference between the two modes:

Only 2 major differences between AHCI and IDE mode.

AHCI allows for hot swapping of hard drives if the motherboard chipset also supports it, and it also enables NCQ for hard drives if they support it. IDE mode does not allow for either of these functions.

There is a small hard drive performance hit when you use IDE mode due to NCQ being disabled.

Intel PDf's on the AHCI standard if you wish to do some reading

The above quote is from this answer on Superuser.

And here's some more info about the difference between the two modes from the Crucial forums:

Depending on your system, multiple SATA controller modes may be available in your BIOS or UEFI to manage how an SSD operates with the rest of your system.

AHCI (Advance Host Controller Interface): The modern standard for SATA controller operation, this provides the best performance possible with a SATA storage device, combined with the best support for features to optimize an SSD's performance, such as TRIM. We recommend this mode for a majority of our users, and only deviating from this if needed for addressing compatibility and software problems.

IDE (Integrated Drive Electronics): A legacy standard dating back to the 1990s. Due to slower performance and worse support for modern hardware, we don't suggest using this mode over AHCI. An exception to this is if you are using an older system missing AHCI support, or are experiencing system instability using an SSD in another mode and need to use this mode for compatibility/testing purposes.

Note that the above modes may be reference differently by some motherboards, such as AHCI being called "Serial ATA" or IDE being labelled "Legacy" or just "ATA." If your SATA modes are not described in an obvious way, please refer to your system or motherboard documentation for clarification

.


To check sda run:

lsblk -So TRAN,NAME | grep sda

in my case:

sata   sda

To get all just run: lsblk -So TRAN,NAME, for other disks pipe it to | grep sdX.

Another thing you can do is to check what kernel module is being used for your device, in your case run:

lspci -vk -s 00:1f.2 

If you see things like sata controller or ahci it should be SATA.


00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7-M Family) SATA Controller [IDE mode] (rev 01)

That looks like a SATA controller pretending to be an IDE controller.

Some background:

When SATA was first introduced there was no standard interface to the OS. Each controller needed a different driver, this was a PITA. Later AHCI was introduced, this meant that the driver no-longer needed to be vendor-specific but still an AHCI driver had to be written and deployed for each OS.

When SATA started getting integrated into chipsets the chipset vendors often offered an IDE emulation mode, emulating the standard IDE controller that had been part of nearly all motherboards for a long time. The upside of this mode is that existing operating systems could be used without modification. The downsides include lack of support for NCQ, lack of support for hotplug and for desktop systems some IDE and SATA ports being unusable (The "standard" IDE controller only supported four drives). The chipset would also offer AHCI and/or Vendor-specific modes that allowed use of the full functionality of the controller.

Now I wonder if my HDD has IDE interface or SATA interface. How can I realize that?

It is probably SATA but we can't be 100% sure.

Many chip sets (I belive including the ICH7 series) offered a mixed mode where a mixture of IDE and SATA drives would be presented as drives on a simulated IDE controller pair. So I would not take the presense of "SATA" in the name displayed in LSPCI as hard evidence that the drive is actually SATA.

To increase the certainty look for other evidence. Maybe try hdparm to see if it can read a model number of the drive. Maybe look to see if you can find user or service manuals for your laptop (I assume it is a laptop based on the fact it's using a "mobile" ICH). Maybe try looking in the BIOS setup.