16

Sometimes internal harddrives are available as /dev/sda (with subsequent media located in /dev/sdb etc), and other times available as /dev/hda. What is the difference between the two?

Does it vary between Linux distributions, or is it based on the computer hardware, or perhaps the harddrive type?

IQAndreas
  • 10,145
  • 21
  • 59
  • 79
  • @jasonwryan Ah, yes, that is definitely the same question, but asked in a different way. Thanks. – IQAndreas Dec 25 '14 at 06:41
  • If by "sometimes" you mean when you run a linux kernel from 10+ years ago... – psusi Dec 25 '14 at 15:40
  • 1
    @psusi By "sometimes" I mean reading guides online that indicate `/dev/hda` should be used in a command; didn't realize the article was that old (and despite that difference, still accurate) – IQAndreas Dec 25 '14 at 16:14

1 Answers1

18

Device files defined based on the controllers they are using.

  1. For IDE controllers device file name is - hda, hdb, hdc..
  2. For SCSI and SATA controllers device file name is - sda, sdb, sdc..
kirill-a
  • 2,883
  • 1
  • 16
  • 22
  • Actually, I'm in an Ubuntu 14.10 laptop right now, and my internal 2.5" IDE drive is showing up as `/dev/sda`. I can also attest to a desktop machine running the current Debian version using a 3.5" IDE-connected drive is showing up as `sda` as well. – IQAndreas Dec 25 '14 at 06:55
  • 1
    I found that it was changed in drivers, so devices now are shown as /dev/sda. If you use old drivers, the names will be the same as I described [link](http://superuser.com/questions/75102/any-reason-why-ide-disk-hda1-shows-up-as-sda1-under-knoppix-live-cd) – kirill-a Dec 25 '14 at 07:06
  • 1
    Linux has treated IDE drives as scsi and hdx has been unused for a decade or so. – psusi Dec 25 '14 at 15:41