Skip to content


Пишем CD/DVD-диски в linux

Прожиг дисковИз консоли диски можно записывать программой cdrecord (она же wodim). Для доступа к приводу используется интерфейс SCSI GENERIC (sg). Работать с программой рекомендуется с правами суперпользователя (root-а), поскольку иногда ядром ограничивается множество доступных SCSI-команд для непривелегированных пользователей. Сначала нужно узнать какое устройство в системе у нас соответствует пищущему приводу. Это можно сделать, например, следующей командой:

dmesg | grep -E "CD.*RW" -A 1
scsi 1:0:0:0: CD-ROM            Optiarc  DVD RW AD-7200A  1.05 PQ: 0 ANSI: 5
sr0: scsi3-mmc drive: 125x/125x writer dvd-ram cd/rw xa/form2 cdda tray

Здесь видно, что пишущему приводу соответствует устройство /dev/sr0. На него есть также симлинки:

ls -l /dev/dvdrw
lrwxrwxrwx 1 root root 3 Июн  4 19:32 /dev/dvdrw -> sr0
ls -l /dev/dvd
lrwxrwxrwx 1 root root 3 Июн  4 19:32 /dev/dvd -> sr0

Затем создаем iso-образ или берем готовый и записываем:

cdrecord -v -dev=/dev/sr0 -blank=fast /tmp/CentOS-5.2-i386-LiveCD.iso                                  
wodim: No write mode specified.                                                                                                    
wodim: Asuming -tao mode.                                                                                                          
wodim: Future versions of wodim may have different drive dependent defaults.                                                       
TOC Type: 1 = CD-ROM                                                                                                               
scsidev: '/dev/sr0'                                                                                                                
devname: '/dev/sr0'                                                                                                                
scsibus: -2 target: -2 lun: -2                                                                                                     
Linux sg driver version: 3.5.27                                                                                                    
Wodim version: 1.1.8                                                                                                               
SCSI buffer size: 64512                                                                                                            
Device type    : Removable CD-ROM                                                                                                  
Version        : 5                                                                                                                 
Response Format: 2                                                                                                                 
Capabilities   :                                                                                                                   
Vendor_info    : 'Optiarc '                                                                                                        
Identification : 'DVD RW AD-7200A '                                                                                                
Revision       : '1.05'                                                                                                            
Device seems to be: Generic mmc2 DVD-R/DVD-RW.                                                                                     
Current: 0x000A (CD-RW)                                                                                                            
Profile: 0x002B (DVD+R/DL)                                                                                                         
Profile: 0x001B (DVD+R)                                                                                                            
Profile: 0x001A (DVD+RW)                                                                                                           
Profile: 0x0016 (DVD-R/DL layer jump recording)                                                                                    
Profile: 0x0015 (DVD-R/DL sequential recording)                                                                                    
Profile: 0x0014 (DVD-RW sequential recording)                                                                                      
Profile: 0x0013 (DVD-RW restricted overwrite)                                                                                      
Profile: 0x0012 (DVD-RAM)                                                                                                          
Profile: 0x0011 (DVD-R sequential recording)                                                                                       
Profile: 0x0010 (DVD-ROM)                                                                                                          
Profile: 0x000A (CD-RW) (current)                                                                                                  
Profile: 0x0009 (CD-R)                                                                                                             
Profile: 0x0008 (CD-ROM) (current)                                                                                                 
Profile: 0x0002 (Removable disk)                                                                                                   
Using generic SCSI-3/mmc   CD-R/CD-RW driver (mmc_cdr).                                                                            
Driver flags   : MMC-3 SWABAUDIO BURNFREE                                                                                          
Supported modes: TAO PACKET SAO SAO/R96R RAW/R96R                                                                                  
Drive buf size : 866304 = 846 KB                                                                                                   
Beginning DMA speed test. Set CDR_NODMATEST environment variable if device
communication breaks or freezes immediately after that.
FIFO size      : 4194304 = 4096 KB
Track 01: data   696 MB
Total size:      800 MB (79:17.94) = 356846 sectors
Lout start:      800 MB (79:19/71) = 356846 sectors
Current Secsize: 2048
ATIP info from disk:
  Indicated writing power: 3
  Reference speed: 6
  Is not unrestricted
  Is erasable
  Disk sub type: High speed Rewritable (CAV) media (1)
  ATIP start of lead in:  -11240 (97:32/10)
  ATIP start of lead out: 359849 (79:59/74)
  1T speed low:  4 1T speed high: 10
  2T speed low:  4 2T speed high:  0 (reserved val  6)
  power mult factor: 1 5
  recommended erase/write power: 5
  A1 values: 24 1A D8
  A2 values: 26 B2 4A
Disk type:    Phase change
Manuf. index: 27
Manufacturer: Prodisc Technology Inc.
wodim: Cannot get next writable address for 'invisible' track.
wodim: This means that we are checking recorded media.
wodim: This media cannot be written in streaming mode anymore.
wodim: If you like to write to 'preformatted' RW media, try to blank the media first.
wodim: WARNING: Data may not fit on standard 74min disk.
Speed set to 1764 KB/s
Starting to write CD/DVD at speed  10.0 in real TAO mode for single session.
Last chance to quit, starting real write in    0 seconds. Operation starts.
Waiting for reader process to fill input buffer ... input buffer ready.
Performing OPC...
Blanking PMA, TOC, pregap
Blanking time:   17.965s
Performing OPC...
Starting new track at sector: 0
Track 01:  696 of  696 MB written (fifo 100%) [buf 100%]  10.2x.
Track 01: Total bytes read/written: 730816512/730816512 (356844 sectors).
Writing  time:  481.694s
Average write speed  10.0x.
Min drive buffer fill was 100%
Fixating...
Fixating time:   31.676s
BURN-Free was never needed.
wodim: fifo had 11512 puts and 11512 gets.
wodim: fifo was 0 times empty and 11422 times full, min fill was 78%.

Для любителей графических интерфейсов есть k3b (обычно имеется в стандартных репозиториях) или проприетарный Nero.

Posted in *nix.

Tagged with , .


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

You must be logged in to post a comment.