Linux SATA Drive is Being Displayed as /dev/hda Instead Of /dev/sda

Q. My SATA drive is being displayed as /dev/hda instead of /dev/sda. How do I fix this problem and make sure I get /dev/sda and speed of SATA under Linux operating systems?

A. This is usually related to BIOS settings. Reboot your system and enter into BIOS setup:

ADVERTISEMENTS

Check BIOS settings

Make sure Parallel ATA is “Enabled”

Make sure “Native Mode Operation” is set to “Serial ATA”

Also, set SATA Controller Mode option to “Enhanced”

Save the changes and reboot the server. Now Linux should rename the SATA drive from /dev/hda to /dev/sdb.

Make sure kernel is compiled with SATA support

Usually vendor kernel from Debian/RHEL/Rehat/Fedora comes with SATA enabled. Sometime you may compile custom kernel. If this is case run following command to find out if SATA kernel support is compiled:
grep -i SATA /boot/config-$(uname -r)
Sample output:

CONFIG_SATA_AHCI=m
CONFIG_SATA_INIC162X=m
CONFIG_SATA_MV=m
CONFIG_SATA_NV=m
CONFIG_SATA_PMP=y
CONFIG_SATA_PROMISE=m
CONFIG_SATA_QSTOR=m
CONFIG_SATA_SIL=m
CONFIG_SATA_SIL24=m
CONFIG_SATA_SIS=m
CONFIG_SATA_SVW=m
CONFIG_SATA_SX4=m
CONFIG_SATA_ULI=m
CONFIG_SATA_VIA=m
CONFIG_SATA_VITESSE=m

Make sure ata_piix and libata driver loaded and the disk shows as /dev/sda if DMA is enabled:
lsmod | egrep 'ata_piix|libata'
Sample output:

ata_piix               24580  5 
libata                177312  5 pata_acpi,ata_generic,pata_marvell,ata_piix,ahci
scsi_mod              155212  9 ib_iser,iscsi_tcp,libiscsi,scsi_transport_iscsi,sbp2,sr_mod,sd_mod,sg,libata
dock                   16656  1 libata
🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNCentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
5 comments… add one
  • John Jeffers Nov 29, 2008 @ 0:29

    On openSuSE all drives are shown as /dev/sd? no matter what kind of drives they are including usb drives.

  • ranjeet Aug 24, 2009 @ 13:00

    no never Becoz system automatically generated partition name . if u want to change then u can change becouz linux is open sources

  • Edward Quick Aug 2, 2010 @ 14:09

    Thanks Vivek, I just installed centos 5.5 which was running like a dog until I spotted I had the same problem you describe above. My bios options for SATA were a bit different to yours but after playing with those, it’s all working. Nice one! :)
    Ed.

  • Rahul Panwar Nov 20, 2010 @ 5:55

    Thanks a lot, Vivek,
    Following option works for me:
    set SATA Controller Mode option to “Enhanced”

    It also increases the performance of my HDD.

    Rahul

  • Mark Dec 13, 2011 @ 6:59

    I was having the same symptoms as you, but none of your solutions helped because my hard drive was corrupted. It took almost 3 hours to get to 50% formatted — I wasn’t really paying attention. I’ve formatted IDE133 drives in less than a minute with centos — so I figured something was up. I popped another SATA drive into my box, and I was installing centos, and past formatting in no time.

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.