Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Is it possible to verify if the system has a DVD burner installed? I need this for a script.

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

As said in a comment, there is a cleaner way of doing that: wodim -prcap which gives exactly what you need.

Device seems to be: Generic mmc2 DVD-R/DVD-RW.

Also, dmesg | grep RW, in my case (DVD-RW/BD reader drive) it returns something like

[    2.399074] ata2.00: ATAPI: HL-DT-ST DVDRW/BDROM CT40N, A101, max UDMA/133
[    2.409247] scsi 1:0:0:0: CD-ROM            HL-DT-ST DVDRWBD CT40N    A101 PQ: 0 ANSI: 5

and wodim dev=/dev/cdrom -scanbus:

scsibus1:
        1,0,0   100) 'HL-DT-ST' 'DVDRWBD CT40N   ' 'A101' Removable CD-ROM
share|improve this answer
1  
wodim -prcap will give you better output about the capabilities of the device. –  JodieC Apr 8 '12 at 1:37
    
@JodieC didn't know about this one. Added to my answer –  Renan Apr 8 '12 at 1:40
add comment

Simply enough: lshal|grep dvdr

share|improve this answer
    
This works if the system uses HAL, and some newer distros (e.g. Arch Linux, newer Ubuntu versions) don't. –  Renan Apr 8 '12 at 1:16
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.