You are not logged in.

#1 2008-08-08 16:29:54

jordanwb
Member
From: Ontario, Canada
Registered: 2008-07-01
Posts: 151

/dev/sda for Arch but /dev/hda for custom kernel. Why?

My laptop does not have a scsi or sata hard drive. So why does Arch's kernel view the drive as /dev/sda1 while a custom kernel views it as /dev/hda like it should?

Offline

#2 2008-08-08 16:44:52

patroclo7
Member
From: Bassano del Grappa, ITALY
Registered: 2006-01-11
Posts: 915

Re: /dev/sda for Arch but /dev/hda for custom kernel. Why?

Because months ago the IDE subsystem in the linux kernel has been functionally replaced by the PATA subsystem which uses just that naming convention (sdX instead of hdX). IDE is still included in the linux kernel, but is considered legacy. However, some distributions (most notably Slackware) still default to IDE.
In a "custom kernel" (if you mean a kernel with the default config as in the kernel.org tarball)), both IDE and PATA drivers are compiled in, but actually IDE prevails in a normal boot sequence.


Mortuus in anima, curam gero cutis

Offline

#3 2008-08-08 17:17:05

jordanwb
Member
From: Ontario, Canada
Registered: 2008-07-01
Posts: 151

Re: /dev/sda for Arch but /dev/hda for custom kernel. Why?

I see, what why does using a new system warrant sharing a naming convention where it's easy to forget which drive is which.

Offline

#4 2008-08-08 17:35:57

patroclo7
Member
From: Bassano del Grappa, ITALY
Registered: 2006-01-11
Posts: 915

Re: /dev/sda for Arch but /dev/hda for custom kernel. Why?

This is a legitimate question, but it's not arch specific: you should ask a linux kernel developer (or just browse the LKML archives, I am sure that there is a reason whatsoever for this choice). Arch just use by default the newest drivers. In the case of a hard drive where the root system can reside, the name of the device can not be fixed by something like an udev rule, so I guess that it is in some way hardcoded in the driver itself.

Last edited by patroclo7 (2008-08-08 17:43:26)


Mortuus in anima, curam gero cutis

Offline

#5 2008-08-08 17:46:59

jordanwb
Member
From: Ontario, Canada
Registered: 2008-07-01
Posts: 151

Re: /dev/sda for Arch but /dev/hda for custom kernel. Why?

I guess I can live with myself. ;-)

Offline

#6 2008-08-08 17:47:31

patroclo7
Member
From: Bassano del Grappa, ITALY
Registered: 2006-01-11
Posts: 915

Re: /dev/sda for Arch but /dev/hda for custom kernel. Why?

http://kernelnewbies.org/Linux_2_6_19#h … 1328b1ddce
I agree that no reason was given for the naming convention, which caused lots of problems in many distributions.


Mortuus in anima, curam gero cutis

Offline

#7 2008-08-08 23:39:38

jordanwb
Member
From: Ontario, Canada
Registered: 2008-07-01
Posts: 151

Re: /dev/sda for Arch but /dev/hda for custom kernel. Why?

Hmm that does not at all seem like a good explanation. The same goes for USB drives. It's not Scsi. To make it really clear:

PATA (aka IDE): /dev/hdX#
SATA: /dev/sdX#
RAID/SCSI: /dev/rdX#
USB: /dev/udX#

BTW what does your sig mean?

Last edited by jordanwb (2008-08-08 23:40:02)

Offline

#8 2008-08-09 07:52:11

rooloo
Member
Registered: 2008-07-09
Posts: 218

Re: /dev/sda for Arch but /dev/hda for custom kernel. Why?

Hmm that does not at all seem like a good explanation.

Drivers/ide suffers from many ugly and obscure problems, and re-implementing it on top of libata has been much easier than fixing the unfixable drivers/ide mess

you don't think fixing broken and ugly code is a good thing? Let me guess, you think sdxX is somehow more ugly then hdxX?

btw, if you use persistent block device naming scheme, you wouldn't need worry about naming conventions. http://wiki.archlinux.org/index.php/Per … ice_naming

Offline

#9 2008-08-09 09:46:20

patroclo7
Member
From: Bassano del Grappa, ITALY
Registered: 2006-01-11
Posts: 915

Re: /dev/sda for Arch but /dev/hda for custom kernel. Why?

My guess is that the s in the sdX for an IDE/PATA disk is for SATA, not for SCSI. The idea behind could be that both PATA and SATA rely now on libata, are analogous devices supported by similar driverss and should therefore be classified/labelled in the same way.

I agree with rolo that both the naming conventions seem equally acceptable. The real problems arouse in the past (around 2.6.19) when one and the same disk changed name after a kernel update, requiring the user to revise fstab and the grub configuration.


Mortuus in anima, curam gero cutis

Offline

#10 2008-08-09 10:04:55

klixon
Member
From: Nederland
Registered: 2007-01-17
Posts: 525

Re: /dev/sda for Arch but /dev/hda for custom kernel. Why?

Nah... the s stands for scsi... it uses the scsi subsystem, same as usb does for harddrives and cdroms (and mass-storage for usb thingies).
The reason for switching to libata was because the old system was becoming too convoluted to be maintained properly. Libata is much easier to maintian as it reuses a lot from scsi (is in layered on top) so there is less to maintain, and it is easier to maintain, and it is easier to extend (as in new drivers)


Stand back, intruder, or i'll blast you out of space! I am Klixon and I don't want any dealings with you human lifeforms. I'm a cyborg!

Offline

Board footer

Powered by FluxBB