Ubuntu – How to find out the device Id of the unmounted DVD

devicesdvdmount

When I put a DVD into the DVD drive, it appears in Nautilus Places, but is not automatically mounted. (this is by personal choice).

In this unmounted state, mount (of course) reports nothing, and likewise for df..
but Nautilus is aware of the DVD hardware unit and has read the Label; which it shows in Places

So it seems to me that Nautilus has already accessed the DVD devices (Did it temporarily mount it?)…

The main point of my question was to determine how to find the device Id of an unmounted device .. but as I've been writing this, I now think it may not be as simple as that…

This issue came up because I wanted to test this command
cat iso-pieces.* | growisofs -Z /dev/dvd=/dev/stdin,
but then realized that I didn't know how to get my DVD's device Id.
… and does the above command requires a mounted device, or does it write directly to the device? … as you can see, I'm a bit vague about devices 🙂
Come to think of it maybe Nautalus read the DVD device directly, because when all is said and done, something has to read/write directly to it.

info growisofs says:

Under Linux it will most likely be an ide-scsi device such as "/dev/scd0

How can I find this Id via a script?

Best Answer

So here it is my comment as an answer finally: if you think about those entries in /dev as "device ids" then you have already the answer: it's maybe /dev/scd0 as you wrote. You may want to examine entires like /dev/dvd, usually udev (which manages /dev entries) creates it as a symlink for the proper device of your dvd drive. You can use than /dev/dvd with growisofs (or other tools) but for sure you can also use the entry symlink of /dev/dvd points to. As you noted too, it's nice to examine the output of command mount when your media is mounted, so you know the device name from it then!

Related Question