[Novalug] Device naming.
Bryan J. Smith
thebs413 at yahoo.com
Mon Mar 15 15:36:43 EDT 2010
The "/dev/sr*" block devices should be your default for read-only or
most ATAPI, SCSI, etc... optical drive firmware access.
Additionally, if the firmware supports character (byte-by-byte) access,
then they also get "/dev/sg*" character devices.
In a few, select cases -- depending on the firmware -- some devices
will also be assigned a "/dev/sd*" read/write block device as well.
P.S. These are all due to the firmware of the devices, not Linux. NT
has the same issues. E.g., Sony/Philips DVD+RW firmware does not
support character modes.
But at least it's well standardized, especially /dev/sr* on newer kernel/
distro releases. The former mesh of sd/sr v. hd (the latter which could
be optical or fixed disk, no differentiation) was an even worse situation.
----- Original Message ----
From: Ed James <edward.james at gmail.com>
One of my "fun projects" has been writing Java, then GTK+ GUIs to "directly"
access hardware via ioctl. This allows me to click a GUI button to "UNLOCK
DRIVE DOOR", "OPEN TRAY", "CLOSE TRAY", "LOCK DRIVE DOOR",
"DISPLAY UPC", etc. The program works on devices such as "/dev/cdrom",
"media/USB1", "dev'/fd0", etc.
So, questions are, am I obsolete now because I refer to device names such
as "/dev/cdrom"? I use old boxen, old RedHat installs because they do what
I want (for now). How should I be "addressing" devices today, should I
decide to upgrade, and how would this make my life nicer? Please don't
read anything into the questions, just take them literally.
More information about the Novalug