How to tell if the hard drive is PATA or SATA

hardwarepatasata

I have an ATA hard disk in my laptop, running Fedora 11, kernel 2.6.30.10-105.2.23.fc11.i586. 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?

Best Answer

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
Related Question