2006-11-05 10:09:28

by Andrew Walrond

[permalink] [raw]
Subject: Scsi cdrom naming confusion; sr or scd?

Documentation/devices.txt says:

"The prefix /dev/sr (instead of /dev/scd) has been deprecated"

but booting 2.6.18.2 from a scsi CD only works if I pass the kernel
parameter root=/dev/sr0 and fails with root=/dev/scd0

I guess the kernel ought to be taught about the scd* names aswell?

Andrew Walrond


2006-11-05 11:33:58

by Jan Engelhardt

[permalink] [raw]
Subject: Re: Scsi cdrom naming confusion; sr or scd?


> "The prefix /dev/sr (instead of /dev/scd) has been deprecated"
>
>but booting 2.6.18.2 from a scsi CD only works if I pass the kernel
>parameter root=/dev/sr0 and fails with root=/dev/scd0
>
>I guess the kernel ought to be taught about the scd* names aswell?

brw-r----- 1 root disk 11, 0 Mar 19 2005 /dev/scd0
brw-r----- 1 root disk 11, 0 Mar 19 2005 /dev/sr0

Plus I see sr0 being far more commonly used than scd0.
So I guess the doc is wrong.


-`J'
--

2006-11-05 14:00:15

by Alistair John Strachan

[permalink] [raw]
Subject: Re: Scsi cdrom naming confusion; sr or scd?

On Sunday 05 November 2006 11:33, Jan Engelhardt wrote:
> > "The prefix /dev/sr (instead of /dev/scd) has been deprecated"
> >
> >but booting 2.6.18.2 from a scsi CD only works if I pass the kernel
> >parameter root=/dev/sr0 and fails with root=/dev/scd0
> >
> >I guess the kernel ought to be taught about the scd* names aswell?
>
> brw-r----- 1 root disk 11, 0 Mar 19 2005 /dev/scd0
> brw-r----- 1 root disk 11, 0 Mar 19 2005 /dev/sr0
>
> Plus I see sr0 being far more commonly used than scd0.
> So I guess the doc is wrong.

udev only creates /dev/sr0, so I'm inclined to agree.

--
Cheers,
Alistair.

Final year Computer Science undergraduate.
1F2 55 South Clerk Street, Edinburgh, UK.

2006-11-05 14:06:44

by Arjan van de Ven

[permalink] [raw]
Subject: Re: Scsi cdrom naming confusion; sr or scd?

On Sun, 2006-11-05 at 12:33 +0100, Jan Engelhardt wrote:
> > "The prefix /dev/sr (instead of /dev/scd) has been deprecated"
> >
> >but booting 2.6.18.2 from a scsi CD only works if I pass the kernel
> >parameter root=/dev/sr0 and fails with root=/dev/scd0
> >
> >I guess the kernel ought to be taught about the scd* names aswell?
>
> brw-r----- 1 root disk 11, 0 Mar 19 2005 /dev/scd0
> brw-r----- 1 root disk 11, 0 Mar 19 2005 /dev/sr0
>
> Plus I see sr0 being far more commonly used than scd0.
> So I guess the doc is wrong.


and this is why it's wrong to make naming policy a kernel thing!
Userspace is the right place to do this (and there I suspect the name
will end up being /dev/cdrom)...... the kernel really shouldn't care at
all what the name is.
(I know for root= it currently has to if you don't have an initrd but..
well... that's sort of a nasty interface anyway; what if you have a usb
cdrom drive connected for example.. suddenly all your names changed)

--
if you want to mail me at work (you don't), use arjan (at) linux.intel.com
Test the interaction between Linux and your BIOS via http://www.linuxfirmwarekit.org

2006-11-05 14:41:14

by Oliver Neukum

[permalink] [raw]
Subject: Re: Scsi cdrom naming confusion; sr or scd?

Am Sonntag, 5. November 2006 15:06 schrieb Arjan van de Ven:
> and this is why it's wrong to make naming policy a kernel thing!
> Userspace is the right place to do this (and there I suspect the name
> will end up being /dev/cdrom)...... the kernel really shouldn't care at
> all what the name is.

I have to disagree. This precisely shows that the reverse is true.
This way the chance of having a default name guaranteed to work
is lost. If you want an alternate name, use a symlink.

Regards
Oliver

2006-11-05 16:38:17

by Michael Tokarev

[permalink] [raw]
Subject: Re: Scsi cdrom naming confusion; sr or scd?

Oliver Neukum wrote:
> Am Sonntag, 5. November 2006 15:06 schrieb Arjan van de Ven:
>> and this is why it's wrong to make naming policy a kernel thing!
>> Userspace is the right place to do this (and there I suspect the name
>> will end up being /dev/cdrom)...... the kernel really shouldn't care at
>> all what the name is.
>
> I have to disagree. This precisely shows that the reverse is true.
> This way the chance of having a default name guaranteed to work
> is lost. If you want an alternate name, use a symlink.

Yes, YES. That's what I always tried to say during similar discussions.

In additional to the "default name" (which is, strictly speaking, is NOT
"default" in many cases, such as when you have USB drives connected or
not and all the sdX and srY renumbering, but that's different story, and
many devices are still has "default name"), there's another reason: kernel
should name the devices *somehow*, and it'd better the name exists in /dev.
Think /proc/partitions for example -- I don't damn want to see device numbers
(major+minor) in there, and all the tools searching the whole /dev to find
the device node for it. By the way, lilo breaks if it can't find device
nodes in /dev listed in /proc/partitions, and I can't blame it.

/mjt