Using command-line to tell if a drive is 3.5/2.5 and ide/sata/pata ?
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Maybe try lshw -class disk or dmesg | grep -i SATA followed by dmesg | grep -in ataX where the ataX is ata1, ata2, ata3, etc that you see in the output of the first grep command.
Though that won't show the physical size (2.5/3.5). The lshw command should show model numbers you could google though.
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233
Rep:
first of all isn't ide/pata the same? you might be able to idenify that by looking in /proc
as for 3.5 2.5? if it's a desktop unit it's more than likely 3.5, if it's a laptop it's more than likely 2.5
as for sata/pata, it depends on how new the machine is, modern machines don't usually ship with pata drives anymore whereas older machines might have pata.
I don't think drives will report their physical dimensions (as opposed to their storage capacity).
What would be the point of this? You installed it, you should know its physical dimensions. Did it fit into the case?
IDE/SATA/PATA are a bit the same: the OS sees the drive and presents it to you as /dev/whatever so then you can use it.
The nomenclature used to be /dev/hdx but now it seems to be /dev/sdx
IIRC the sd prefix used to designate disks with a SCSI interface but other hardware was eventually presented to the OS as if it was a SCSI disk. With good reason - the SCSI standard was well documented, and worked well.
This is the point of an OS: It presents the hardware you have available in easy to understand and manipulate terms. It might be an ancient ESDI disk, but if the OS puts in enough layers of emulation, it'll behave (mostly) as if it was a SCSI disk.
Why are you asking this question and what is your exact problem?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.