LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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, 04: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, 05:20 AM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
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, 06: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, 07:41 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,727

Rep: Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919
Try
wodim -prcap
 
Old 05-02-2012, 07: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, 08:44 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,727

Rep: Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919
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.
 
Old 02-09-2015, 08:22 AM   #7
kozaki
Member
 
Registered: Jun 2004
Location: France, UE
Distribution: Arch Linux, Bodhi, Debian, Mageia, OpenMediaVault, Q4OS
Posts: 133

Rep: Reputation: 20
Thumbs up

Nice I had forgotten dvd+rw-mediainfo when diggin into a Pioneer pancakes burner to know what his problem comes from (it was the dust).
So we can have lots of information in seconds on the drive but also on the optical mediums:

Code:
cd-drive
displays most if not all informations on the drive capabilities. Also `more /proc/sys/dev/cdrom/info` gives a nice summary of that.

Code:
cd-info (--no-media-info)
to know on the medium's content, especially audio CDs. But it's a bit short for DVD.
Code:
wodim -prcap
to print all the speed capabilities of the optical disc

Code:
wodim -atip dev=/dev/sr0
displays the medium's driver flags and supported modes (ex TAO, PACKET, SAO, RAW...)

Code:
dvd+rw-mediainfo
to get the medium type; speed the burn was made; session status; tracks' number, size and length; if is bootable. Note: supports Blu-ray medias (untested by me).

Code:
udisks --dump
gives lots of informations about:
- Medium: type (ex optical_dvd_plus_rw) ; blank? ; filesystem (ex : iso9660 Joliet) ; date and time was burnt ; block size (ex : 2048) ; session status ; label ; Tracks' number and type (ex audio)
- Drive: medias type compatibility, Vendor, model and revision (aka firmware), interface

Code:
/lib(64)/udev/cdrom_id -d /dev/sr0
also gives some information:
Optical medium's type (ex media_cd_rom); Session's status.
 
Old 03-03-2016, 10:54 AM   #8
lfd
LQ Newbie
 
Registered: Mar 2016
Posts: 1

Rep: Reputation: 0
Quote:
Originally Posted by kozaki View Post
So we can have lots of information in seconds on the drive but also on the optical mediums:
I could not for the life of me find how to check the max write speed of blank CD media.
 
  


Reply



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 10:02 PM
[SOLVED] How do I get information about an optical disk? captfoss Linux - Hardware 5 01-14-2011 03:17 AM
TDK develops 1TB optical disc, leaves other optical storage feeling emasculated Jeebizz Linux - News 0 10-11-2010 11:56 AM
optical media caching? ninja master Linux - Software 1 08-11-2009 07:20 PM
Is there DMA for SATA Optical Drives? Or is my inspiron optical not supported (yet)? RHLinuxGUY Linux - Kernel 14 09-24-2006 03:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:25 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration