/etc/fstab created with nonexistant /dev/scd0 and /dev/scd1

Bug #8646 reported by Jason Pearce
22
Affects Status Importance Assigned to Milestone
udev (Ubuntu)
Fix Released
Medium
Matt Zimmerman

Bug Description

I just completed an install using a sounder 9 CD. When the install finished I
noticed that my cd-rom drives wouldn't auto-mount. Upon inspection I discovered
that their entries in /etc/fstab were as follows.

/dev/scd0 /media/cdrom0 udf,iso9660 ro,user,noauto 0 0
/dev/scd1 /media/cdrom1 udf,iso9660 ro,user,noauto 0 0

udev doesn't creat SCSI cd-rom devices as /dev/scd0 but instead as /dev/sr0.
Changing the lines in /etc/fstab to use the proper device file names fixe the
problem. The following lines work for me.

/dev/sr0 /media/cdrom0 udf,iso9660 ro,user,noauto 0 0
/dev/sr1 /media/cdrom1 udf,iso9660 ro,user,noauto 0 0

---output of 'scsi_info /dev/sr0'---
# scsi_info /dev/sr0
SCSI_ID="0,1,0"
HOST="0"
MODEL="PIONEER DVD-ROM DVD-304"
FW_REV="1.03"

---output of 'scsi_info /dev/sr1'---
# scsi_info /dev/sr1
SCSI_ID="0,2,0"
HOST="0"
MODEL="YAMAHA CRW8824S"
FW_REV="1.00"

Revision history for this message
Colin Watson (cjwatson) wrote :

The kernel documentation says:

 11 block SCSI CD-ROM devices
                  0 = /dev/scd0 First SCSI CD-ROM
                  1 = /dev/scd1 Second SCSI CD-ROM
                    ...

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

Should we fix udev?

Revision history for this message
Matt Zimmerman (mdz) wrote :

Hmm, I wasn't aware of that. I see that MAKEDEV now uses scd and symlinks sr to
scd. I think that udev should do the same.

Revision history for this message
Matt Zimmerman (mdz) wrote :

Correct me if I misunderstand, but I think the change from "sr" to "scd" needs
to be changed in the sysfs interface exported by the driver, while udev can
handle creating the sr -> scd symlinks

Revision history for this message
Herbert Xu (herbert-gondor) wrote :

Not quite. sr is the name of the kernel driver and that isn't going to change.
 Naming devices is user-space policy and should be set in udev.

Revision history for this message
Matt Zimmerman (mdz) wrote :

OK, I see how it works now. The default udev configuration uses a regex for
this case, so I didn't find it by searching. I'm not entirely convinced that
"scd" is more correct than "sr", though. Aren't there SCSI removable devices
which are not CD-ROMs?

Can you confirm that the information in devices.txt.gz is correct, and sr is
deprecated in favour of scd? If so, the udev changes are fairly trivial

Revision history for this message
Matt Zimmerman (mdz) wrote :

*** Bug 9215 has been marked as a duplicate of this bug. ***

Revision history for this message
Herbert Xu (herbert-gondor) wrote :

(In reply to comment #5)
> Can you confirm that the information in devices.txt.gz is correct, and sr is
> deprecated in favour of scd? If so, the udev changes are fairly trivial

Yes scd is the correct name however the sr links should be kept for compatibility.

Revision history for this message
Matt Zimmerman (mdz) wrote :

 udev (0.040-1ubuntu3) hoary; urgency=low
 .
   * Use "scd" device names in place of "sr", with a compatibility symlink for
     the latter (Closes: Ubuntu#1909)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.