LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   view optical media and optical drive information in CLI (http://www.linuxquestions.org/questions/linux-server-73/view-optical-media-and-optical-drive-information-in-cli-942882/)

m4rtin 05-02-2012 04:34 AM

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?

catkin 05-02-2012 05:20 AM

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


m4rtin 05-02-2012 06:50 AM

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 :rolleyes: Any suggestions for utilities which can display optical drive capabilities?

michaelk 05-02-2012 07:41 AM

Try
wodim -prcap

m4rtin 05-02-2012 07:52 AM

Quote:

Originally Posted by michaelk (Post 4668452)
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"?

michaelk 05-02-2012 08:44 AM

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.


All times are GMT -5. The time now is 05:38 AM.