public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Who/what names hard drives /dev/sda, /dev/sdb, etc
@ 2013-06-07  4:16 Chris Stankevitz
  2013-06-07  5:31 ` Fast Turtle
  2013-06-07  9:43 ` Philip Webb
  0 siblings, 2 replies; 6+ messages in thread
From: Chris Stankevitz @ 2013-06-07  4:16 UTC (permalink / raw
  To: gentoo-user@lists.gentoo.org

Hello,

Who or what decides to name a hard drive /dev/sda vs /dev/sdb?

How does it decide what order to enumerate the drives on my computer?

When in the boot process does is a disk given a name like "/dev/sda"?

Thank you,

Chris


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] Who/what names hard drives /dev/sda, /dev/sdb, etc
  2013-06-07  4:16 Chris Stankevitz
@ 2013-06-07  5:31 ` Fast Turtle
  2013-06-07  9:43 ` Philip Webb
  1 sibling, 0 replies; 6+ messages in thread
From: Fast Turtle @ 2013-06-07  5:31 UTC (permalink / raw
  To: Gentoo User List

[-- Attachment #1: Type: text/plain, Size: 1494 bytes --]

The /dev/ (h/s)da is actually from the kernel itself with the (H) being
deprecated as it's from the old ide/pata setup (hda was always ide 0-0
(same setup grub uses) designated as master) while 0-1 was the slave. 1-0
would then be hdb while 0-1 would have been hdc with hdd being 1-1 (the
last two being slaves).

The (S) designation is due to the change in the kernel hardware subsystem,
where they started moving all of the various drive types to a single,
simpler uniform setup based around the scsi code. It's also why when
manually configuring a kernel, if you enable usb storage (flash/sd/mmc)
you're told you need scsi support in the help.

All of these changes have been implemented by the kernel team comprised of
Linus Torvald and all of the maintainers for the express purpose of
simplifying the code base while reusing as much of the existing code as
possible in a far more modular manner - easier to fix/maintain and by
becoming more modular, it's easier to add new features to the kernel as
they're developed, which is why if you look at the configuration of a 3.4
series compared to the 3.8 you see lots of things have and are being moved.


On Thu, Jun 6, 2013 at 9:16 PM, Chris Stankevitz
<chrisstankevitz@gmail.com>wrote:

> Hello,
>
> Who or what decides to name a hard drive /dev/sda vs /dev/sdb?
>
> How does it decide what order to enumerate the drives on my computer?
>
> When in the boot process does is a disk given a name like "/dev/sda"?
>
> Thank you,
>
> Chris
>
>

[-- Attachment #2: Type: text/html, Size: 1915 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] Who/what names hard drives /dev/sda, /dev/sdb, etc
@ 2013-06-07  5:58 Thomas Mueller
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Mueller @ 2013-06-07  5:58 UTC (permalink / raw
  To: gentoo-user

> Who or what decides to name a hard drive /dev/sda vs /dev/sdb?

> How does it decide what order to enumerate the drives on my computer?

> When in the boot process does is a disk given a name like "/dev/sda"?

> Thank you,

> Chris

I believe it depends on how the drives are connected. 

/dev/sda would be the default boot drive, though modern computers can be configured to boot from any drive recognized by the BIOS or UEFI.

Older versions of the Linux kernel named IDE/ATA hard drives, and CD/DVD drives too, as /dev/hda, /dev/hdb and so on.

Tom



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] Who/what names hard drives /dev/sda, /dev/sdb, etc
  2013-06-07  4:16 Chris Stankevitz
  2013-06-07  5:31 ` Fast Turtle
@ 2013-06-07  9:43 ` Philip Webb
  2013-06-07 16:32   ` Chris Stankevitz
  1 sibling, 1 reply; 6+ messages in thread
From: Philip Webb @ 2013-06-07  9:43 UTC (permalink / raw
  To: gentoo-user

130606 Chris Stankevitz wrote:
> Who or what decides to name a hard drive /dev/sda vs /dev/sdb?

You, when you connect up the drives in the box, if you build it ;
the manufacturer, if you buy the machine ready-built.
If the latter, open the box -- carefully (smile) --
& check the connections inside with the mobo manual.

> How does it decide what order to enumerate the drives on my computer?

The drive which the mobo calls 'SATA1' wb  /dev/sda  etc.

> When in the boot process does is a disk given a name like "/dev/sda"?

That's done by 'udev' based on what BIOS tells it.

-- 
========================,,============================================
SUPPORT     ___________//___,   Philip Webb
ELECTRIC   /] [] [] [] [] []|   Cities Centre, University of Toronto
TRANSIT    `-O----------O---'   purslowatchassdotutorontodotca



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] Who/what names hard drives /dev/sda, /dev/sdb, etc
  2013-06-07  9:43 ` Philip Webb
@ 2013-06-07 16:32   ` Chris Stankevitz
  2013-06-07 16:45     ` staticsafe
  0 siblings, 1 reply; 6+ messages in thread
From: Chris Stankevitz @ 2013-06-07 16:32 UTC (permalink / raw
  To: gentoo-user@lists.gentoo.org

On Fri, Jun 7, 2013 at 2:43 AM, Philip Webb <purslow@ca.inter.net> wrote:
>> When in the boot process does is a disk given a name like "/dev/sda"?
>
> That's done by 'udev' based on what BIOS tells it.

Hi Philip,

Is this a true statement:

Some people do not use udev.  These people still have a /dev/sda.
Therefore something other than udev is giving drives the name
"/dev/sda".

Thank you,

Chris


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] Who/what names hard drives /dev/sda, /dev/sdb, etc
  2013-06-07 16:32   ` Chris Stankevitz
@ 2013-06-07 16:45     ` staticsafe
  0 siblings, 0 replies; 6+ messages in thread
From: staticsafe @ 2013-06-07 16:45 UTC (permalink / raw
  To: gentoo-user

On Fri, Jun 07, 2013 at 09:32:41AM -0700, Chris Stankevitz wrote:
> On Fri, Jun 7, 2013 at 2:43 AM, Philip Webb <purslow@ca.inter.net> wrote:
> >> When in the boot process does is a disk given a name like "/dev/sda"?
> >
> > That's done by 'udev' based on what BIOS tells it.
> 
> Hi Philip,
> 
> Is this a true statement:
> 
> Some people do not use udev.  These people still have a /dev/sda.
> Therefore something other than udev is giving drives the name
> "/dev/sda".
> 
> Thank you,
> 
> Chris
> 
Yes, the kernel does this.
-- 
staticsafe
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
Please don't top post - http://goo.gl/YrmAb
Don't CC me! I'm subscribed to whatever list I just posted on.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-06-07 16:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-07  5:58 [gentoo-user] Who/what names hard drives /dev/sda, /dev/sdb, etc Thomas Mueller
  -- strict thread matches above, loose matches on Subject: below --
2013-06-07  4:16 Chris Stankevitz
2013-06-07  5:31 ` Fast Turtle
2013-06-07  9:43 ` Philip Webb
2013-06-07 16:32   ` Chris Stankevitz
2013-06-07 16:45     ` staticsafe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox