3

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

Renan
  • 16,976
  • 8
  • 69
  • 88
daisy
  • 53,527
  • 78
  • 236
  • 383

2 Answers2

4

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
Renan
  • 16,976
  • 8
  • 69
  • 88
1

Simply enough: lshal|grep dvdr

Jodie C
  • 1,869
  • 12
  • 13
  • This works if the system uses HAL, and some newer distros (e.g. Arch Linux, newer Ubuntu versions) don't. – Renan Apr 08 '12 at 01:16