How can I tell if my hard drive is PATA or SATA?

I have an ATA hard disk in my laptop, running Fedora 11, kernel I am looking to upgrade the disk in here (would love to get an SSD) but I forgot if it’s a serial ATA or an old parallel ATA interface. There’s not much use upgrading to an SSD if it’s PATA…

How can I tell if the disk is connected via a PATA or an SATA interface?

Asked By: Josh


Update: For the record, @Gilles answer is better.

If it’s a PATA (ide) drive, then you will see it under /proc/ide. Here is my IDE DVD-Drive, for example, here is my output:

$ cat /proc/ide/hdb/model 

If it is a SATA drive, it will show up under /proc/scsi. You might be surprised to find it under ‘scsi’. I forget the exact reason (I’m going to ask that in another question), but I think that is because SATA uses the SCSI drivers.

Here’s a list showing a SATA drive on my system:

$ cat /proc/scsi/scsi 
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor: ATA      Model: WDC WD2500AAJS-6 Rev: 01.0
  Type:   Direct-Access                    ANSI  SCSI revision: 05
Answered By: Stefan Lasiewski

To see the device description for the controller (assuming an internal (PCI) controller), which usually contains SATA for SATA controllers:

lspci -d $(cat /sys/block/sda/device/../../../vendor):$(cat /sys/block/sda/device/../../../device)

If you want to type less, just browsing the output of lspci is likely to give you the answer in a laptop (many desktop have both kinds of interfaces so you’d have to look up the drive you’re interested in).

If that doesn’t give you the answer, to see what driver is providing sda (you can then look up whether that driver is for a PATA or SATA controller):

readlink -f /sys/block/sda/device/../../../driver

lshw would give you the details.

Answered By: Bijit

You can ask udev:

$ udevadm info -q property /dev/sda | grep -Ee '^ID_(BUS|ATA_SATA)='

If this command outputs ID_ATA_SATA=1, your drive is a (native) SATA drive. If it doesn’t, but it does output ID_BUS=ata, your drive is a PATA drive. If it outputs neither, your drive is something else.

Answered By: user3840170
Categories: Answers Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.