LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 05-02-2012, 05:34 AM   #1
m4rtin
Member
 
Registered: Sep 2007
Posts: 261

Rep: Reputation: 16
Question view optical media and optical drive information in CLI


I have an optical media in an optical drive in a remote headless server. Is it possible to view:

1) optical media capabilities(is it a CD-R, CD-RW, DVD, supported speeds, supported max storage size)
2) optical drive capabilities(does it support writing to DVD's, speeds, is DVD-RAM or BD supported etc)


I checked drive capabilities using the wodim(1) inquiry option:

Code:
# wodim -inq dev='/dev/scd0' 
Device type    : Removable CD-ROM
Version        : 5
Response Format: 2
Capabilities   : 
Vendor_info    : 'HL-DT-ST'
Identification : 'RW/DVD GCC-4241N'
Revision       : '1.04'
Device seems to be: Generic mmc2 DVD-ROM.
#
..but information is rather short and insufficient(for example capabilities are not listed). If I do "wodim -vv dev='/dev/scd0' -dummy *.iso" I see the same information and nothing about the optical media is printed to sdtout.

In other words I search for something similar to Nero InfoTool, but on a Linux platform and CLI environment Any suggestions?
 
Old 05-02-2012, 06:20 AM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,557
Blog Entries: 28

Rep: Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178
Code:
root@CW8:~# /usr/bin/dvd+rw-mediainfo /dev/dvd
INQUIRY:                [SONY    ][DVD RW AD-7280S ][1.60]
GET [CURRENT] CONFIGURATION:
 Mounted Media:         13h, DVD-RW Restricted Overwrite
 Media ID:              RITEKW01    
 Current Write Speed:   2.0x1385=2770KB/s
 Write Speed #0:        2.0x1385=2770KB/s
GET [CURRENT] PERFORMANCE:
 Write Performance:     2.0x1385=2770KB/s@[0 -> 2252063]
 Speed Descriptor#0:    00/2252064 R@5.0x1385=6925KB/s W@2.0x1385=2770KB/s
READ DVD STRUCTURE[#10h]:
 Media Book Type:       00h, DVD-ROM book [revision 0]
 Legacy lead-out at:    2298496*2KB=4707319808
READ DVD STRUCTURE[#0h]:
 Media Book Type:       32h, DVD-RW book [revision 2]
 Last border-out at:    2045*2KB=4188160
READ DISC INFORMATION:
 Disc status:           complete
 Number of Sessions:    1
 State of Last Session: complete
 Number of Tracks:      1
READ FORMAT CAPACITIES:
 formatted:		2252064*2048=4612227072
 00h(800):		2297888*2048=4706074624
 10h(10):		2297888*2048=4706074624
 11h(10):		45824*2048=93847552
 13h(10):		45824*2048=93847552
 15h(10):		2297888*2048=4706074624
READ TRACK INFORMATION[#1]:
 Track State:           complete incremental
 Track Start Address:   0*2KB
 Free Blocks:           0*2KB
 Fixed Packet Size:     16*2KB
 Track Size:            2252064*2KB
FABRICATED TOC:
 Track#1  :             14@0
 Track#AA :             14@2252064
 Multi-session Info:    #1@0
READ CAPACITY:          2252064*2048=4612227072
 
Old 05-02-2012, 07:50 AM   #3
m4rtin
Member
 
Registered: Sep 2007
Posts: 261

Original Poster
Rep: Reputation: 16
Question

catkin, thank you for pointing out the dvd+rw-mediainfo utility! It works nice with DVD's:

Code:
# dvd+rw-mediainfo /dev/sr0 
INQUIRY:                [HL-DT-ST][RW/DVD GCC-4241N][1.04]
GET [CURRENT] CONFIGURATION:
 Mounted Media:         10h, DVD-ROM
READ DVD STRUCTURE[#0h]:
 Media Book Type:       00h, DVD-ROM book [revision 0]
 Legacy lead-out at:    2295104*2KB=4700372992
READ DISC INFORMATION:
 Disc status:           complete
 Number of Sessions:    1
 State of Last Session: complete
 Number of Tracks:      1
READ TRACK INFORMATION[#1]:
 Track State:           complete
 Track Start Address:   0*2KB
 Free Blocks:           0*2KB
 Track Size:            1801552*2KB
FABRICATED TOC:
 Track#1  :             14@0
 Track#AA :             14@1801552
 Multi-session Info:    #1@0
READ CAPACITY:          1801552*2048=3689578496
#
Although looks like it does not show the maximum supported speed. For CD's the cdinfo tool seems to do the job:

Code:
# cdinfo /dev/sr0
CD Info 1.1 | (c) 1996-98 Gerd Knorr & Heiko Ei�feldt
__________________________________
track list (1 - 1)
 nr: msf      lba      ctrl adr  type
  1: 00:02:00 (000000) 0x4 0x1 data 
170: 79:33:43 (357868) 0x4 0x1 data  (leadout)
__________________________________
what ioctl's report
get mcn     : 0000000000000
disc status : data mode 1
multisession: 0
audio status: no status
__________________________________
try to find out what sort of CD this is
CD-ROM with iso9660 fs
iso9660: 698 MB size, label `Ubuntu 9.04 i386                '
bootable CD   
#
Unfortunately looks like cdinfo does not show supported speeds and media detection(CD-R, CD-RW, CD-ROM) is faulty Any suggestions for utilities which can display optical drive capabilities?
 
Old 05-02-2012, 08:41 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 12,061

Rep: Reputation: 760Reputation: 760Reputation: 760Reputation: 760Reputation: 760Reputation: 760Reputation: 760
Try
wodim -prcap
 
Old 05-02-2012, 08:52 AM   #5
m4rtin
Member
 
Registered: Sep 2007
Posts: 261

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by michaelk View Post
Try
wodim -prcap
This works great So there is some sort of non-volatile memory in the optical device where this information is stored and it is requested with standardized multimedia commands by "wodim -prcap"?
 
Old 05-02-2012, 09:44 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 12,061

Rep: Reputation: 760Reputation: 760Reputation: 760Reputation: 760Reputation: 760Reputation: 760Reputation: 760
Yes, pretty much all drives (optical and storage) store manufacture, part number, firmware version, operating parameters etc in memory.

Back in the old old days one had to manually enter the hard drive parameters like number of cylinders, heads, sectors etc in the BIOS settings. Now the default setting is autodetect where the BIOS can poll the device and read everything.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] udev not detecting change in media for optical drive GamezR2EZ Linux - Software 7 02-18-2012 11:02 PM
[SOLVED] How do I get information about an optical disk? captfoss Linux - Hardware 5 01-14-2011 04:17 AM
TDK develops 1TB optical disc, leaves other optical storage feeling emasculated Jeebizz Linux - News 0 10-11-2010 12:56 PM
optical media caching? ninja master Linux - Software 1 08-11-2009 08:20 PM
Is there DMA for SATA Optical Drives? Or is my inspiron optical not supported (yet)? RHLinuxGUY Linux - Kernel 14 09-24-2006 04:11 PM


All times are GMT -5. The time now is 02:14 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration