Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.hardware > #924

Re: CDROM drive by UUID in fstab

From Haines Brown <haines@HistoricalMaterialism.info>
Newsgroups comp.os.linux.hardware
Subject Re: CDROM drive by UUID in fstab
References <877h1pwti1.fsf@engels.HistoricalMaterialism.info> <op.v6u83nhwa3w0dxdave@hodgins.homeip.net>
Date 2011-12-22 10:54 -0500
Message-ID <8739ccwqif.fsf@engels.HistoricalMaterialism.info> (permalink)

Show all headers | View raw


"David W. Hodgins" <dwhodgins@nomail.afraid.org> writes:

> On Wed, 21 Dec 2011 15:37:58 -0500, Haines Brown <haines@historicalmaterialism.info> wrote:
>
>> My question is, can I or should I set up my DVDRW drive with a UUID?
>
> No.  You could setup fstab entries using uuid for filesystems stored
> on a data disc, but not for the drive itself.

Understood

> Depending on which distribution and version you have, there is likely
> a file similar in name to /etc/udev/rules.d/70-persistent-cd.rules
> that controls which device name gets assigned to the drive.

There are two stanzas there for my dvd drive, which have the lines,
among others:

  SUBSYSTEM=="block", ENV{ID_CDROM}=="?*",
                      ENV{ID_PATH}=="pci-0000:00:1f.2-scsi-1:0:0:0", 
                      SYMLINK+="dvd", ENV{GENERATED}="1"

  SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", 
                      ENV{ID_PATH}=="pci-0000:00:1f.2-scsi-0:0:1:0", 
                      SYMLINK+="dvd5", ENV{GENERATED}="1"

However, thre is no /dev/dvd.

  $ ls -la /dev | grep dvd
  lrwxrwxrwx   1 root   root           3 Dec 22 09:49 dvd5 -> sr0
  lrwxrwxrwx   1 root   root           3 Dec 22 09:49 dvdrw5 -> sr0

Perhaps removing lines associated with my dvd drive in
700persistent-cd.rules and rebooting will reconstruct a /dev/dvd, but if
if that file already has a dvd line, why isn't there a /dev/dvd? 

But meanwhile, to play a dvd I assume I have to do:

  $ mplayer dvd://1 /dev/dvd5

The gui window merely flashes and this is from the trace of the calls:

execve("/usr/bin/mplayer", ["mplayer", "dvd://1", "/dev/dvd5"], [/* 27 vars */]) = 0
brk(0)                                  = 0x9580000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
...
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig -icanon -echo ...}) = 0
write(1, "\nPlaying /dev/dvd5.\n", 20)  = 20
open("/dev/dvd5.ifo", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/dev/dvd5.idx", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/home/haines/.mplayer/sub/dvd5.ifo", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/home/haines/.mplayer/sub/dvd5.idx", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/dev/dvd5", O_RDONLY|O_LARGEFILE) = 3
_llseek(3, 0, [4565041152], SEEK_END)   = 0
...
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 2048) = 2048
read(3, 0x95c73d8, 2048)                = -1 EIO (Input/output error)
read(3, 0x95c73d8, 2048)                = -1 EIO (Input/output error)
munmap(0xb4baf000, 2101248)             = 0
write(1, "libavformat file format detected"..., 34) = 34
_llseek(3, 0, [0], SEEK_SET)            = 0
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 2048) = 2048
...
read(4, "\1\1\200\0\0\0\0\0\2\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096) = 32
read(4, 0x95effd0, 4096)                = -1 EAGAIN (Resource temporarily unavailable)
close(4)                                = 0
munmap(0xb404f000, 633604)              = 0
munmap(0xb40ea000, 790528)              = 0
munmap(0xb41ab000, 633604)              = 0
munmap(0xb4246000, 790528)              = 0
write(1, "\nExiting... (End of file)\n", 26) = 26
munmap(0xb4d6f000, 266240)              = 0
exit_group(0)                           = ?

I don't know what to make of all this, but it seems that mplayer is
accessing the dvd disk in the drive and extracts some information, but
for some reason can't display it.

Haines Brown












>
> If you replace a drive, or switch which connector a drive is using
> a new entry will be added to that file, ensuring the device always
> gets the same name.
>
> Try deleting all of the non-comment lines from that file, and
> rebooting.  It should then create a entry assigning the drive
> to /dev/dvd.
>
> Regards, Dave Hodgins
>
>
> --
> Change nomail.afraid.org to ody.ca to reply by email.
> (nomail.afraid.org has been set up specifically for
> use in usenet. Feel free to use it yourself.)

Back to comp.os.linux.hardware | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

CDROM drive by UUID in fstab Haines Brown <haines@HistoricalMaterialism.info> - 2011-12-21 15:37 -0500
  Re: CDROM drive by UUID in fstab Bit Twister <BitTwister@mouse-potato.com> - 2011-12-21 21:49 +0000
  Re: CDROM drive by UUID in fstab J G Miller <miller@yoyo.ORG> - 2011-12-21 23:20 +0000
  Re: CDROM drive by UUID in fstab "David W. Hodgins" <dwhodgins@nomail.afraid.org> - 2011-12-21 20:00 -0500
    Re: CDROM drive by UUID in fstab Haines Brown <haines@HistoricalMaterialism.info> - 2011-12-22 10:54 -0500
      Re: CDROM drive by UUID in fstab J G Miller <miller@yoyo.ORG> - 2011-12-22 18:08 +0000
        Re: CDROM drive by UUID in fstab Haines Brown <haines@HistoricalMaterialism.info> - 2011-12-22 20:03 -0500
      Re: CDROM drive by UUID in fstab Bill Marcum <bill@lat.localnet> - 2011-12-22 17:54 -0500
        Re: CDROM drive by UUID in fstab Haines Brown <haines@HistoricalMaterialism.info> - 2011-12-23 06:15 -0500
          Re: CDROM drive by UUID in fstab Bit Twister <BitTwister@mouse-potato.com> - 2011-12-23 23:31 +0000
          Re: CDROM drive by UUID in fstab "David W. Hodgins" <dwhodgins@nomail.afraid.org> - 2011-12-23 22:37 -0500

csiph-web