'volname' defaults to the wrong device

Asked by bdowd

The CD device is named /dev/cdrom0. An iso9660 CD is inserted.
In 7.10 '/usr/bin/volname' would read the volume name from the default device /dev/cdrom0 by issuing the command '/usr/bin/volname'
In 8.04 '/usr/bin/volname' returns a NULL string, but '/usr/bin/volname /dev/cdrom1' correctly reads the volume name off of /dev/cdrom0

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu eject Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was originally filed as bug #224490.

Revision history for this message
Adam Buchbinder (adam-buchbinder) said :
#1

This is, I think, due to device IDs not matching up between gutsy and hardy, leaving /dev/cdrom pointing nowhere.

Revision history for this message
Adam Buchbinder (adam-buchbinder) said :
#2

volname is written to only try to read the default CD drive, /dev/cdrom; this is specified at configure time. However, if that's the only CD drive you have, it should have a symlink from /dev/cdrom to the proper device. There may have been some kind of driver change between Gutsy and Hardy which invalidated the previous device path. Do this:

$ less /etc/udev/rules.d/70-persistent-cd.rules

and if I'm correct, you'll see what appear to be two different CD-ROM drives listed, with two different paths (e.g., "pci-0000:00:1f.1-scsi-1:0:0:0"). One will include SYMLINK+="cdrom", but it's the wrong one.

To fix this, move the existing 70-persistent-cd.rules out of the way and restart udev.

$ cd
$ sudo mv /etc/udev/rules.d/70-persistent-cd.rules .
$ sudo /etc/init.d/udev restart

At this point, you should be able to run "less /etc/udev/rules.d/70-persistent-cd.rules" again and see that it's only listing one CD drive, which should have /dev/cdrom as a symlink pointing toward it.

Please let me know if you have any trouble after doing this.

Can you help with this problem?

Provide an answer of your own, or ask bdowd for more information if necessary.

To post a message you must log in.