cdrecordを使えばコマンドライン上でも簡単にCDを焼くことができる。
準備
まず、使用する光学ドライブを指定するための情報を確認する。 ここでは、ATAPI(IDE)接続のデバイスのみを表示させる。
$ cdrecord -scanbus dev=ATAPI
上記のコマンドを実行するとこのような結果が得られる。
Cdrecord-Clone 2.01-dvd (i686-pc-linux-gnu) Copyright (C) 1995-2004 Jörg Schilling
Note: This version is an unofficial (modified) version with DVD support
Note: and therefore may have bugs that are not present in the original.
Note: Please send bug reports or support requests to http://bugzilla.redhat.com/bugzilla
Note: The author of cdrecord should not be bothered with problems in this version.
scsidev: 'ATAPI'
devname: 'ATAPI'
scsibus: -2 target: -2 lun: -2
Use of ATA is preferred over ATAPI.
Warning: Using ATA Packet interface.
Warning: The related Linux kernel interface code seems to be unmaintained.
Warning: There is absolutely NO DMA, operations thus are slow.
Using libscg version 'schily-0.8'.
scsibus0:
0,0,0 0) 'PIONEER ' 'DVD-RW DVR-106D' '1.06' Removable CD-ROM
0,1,0 1) *
0,2,0 2) *
0,3,0 3) *
0,4,0 4) *
0,5,0 5) *
0,6,0 6) *
0,7,0 7) *
使用したマシンではPioneer製のDVD-RWドライブが1台のみ接続されているので、それが表示されている。 この「1,0,0」の番号がふられている光学ドライブを用いてCDを焼くことにする。
ISOイメージを書き込む
コマンドは以下のとおり。
$ cdrecord -v -eject speed=16 dev=ATAPI:1,0,0 test_image.iso
それぞれのオプションの意味は次のとおり。
- v: 詳細なメッセージを表示する
- eject: 書き込みが終わったらCDを排出する
- speed: 書き込み倍数を指定する(ただしドライブが対応している場合のみ)
- dev: 使用するドライブの番号(cdrecord -scanbusで表示される番号)
実行すると下記のようになる。
cdrecord: No write mode specified.
cdrecord: Asuming -tao mode.
cdrecord: Future versions of cdrecord may have different drive dependent defaults.
cdrecord: Continuing in 5 seconds...
Cdrecord-Clone 2.01-dvd (i686-pc-linux-gnu) Copyright (C) 1995-2004 Jörg Schilling
Note: This version is an unofficial (modified) version with DVD support
Note: and therefore may have bugs that are not present in the original.
Note: Please send bug reports or support requests to http://bugzilla.redhat.com/bugzilla
Note: The author of cdrecord should not be bothered with problems in this version.
TOC Type: 1 = CD-ROM
scsidev: 'ATAPI:1,0,0'
devname: 'ATAPI'
scsibus: 1 target: 0 lun: 0
Use of ATA is preferred over ATAPI.
Warning: Using ATA Packet interface.
Warning: The related Linux kernel interface code seems to be unmaintained.
Warning: There is absolutely NO DMA, operations thus are slow.
Using libscg version 'schily-0.8'.
SCSI buffer size: 64512
atapi: 1
Device type : Removable CD-ROM
Version : 0
Response Format: 2
Capabilities :
Vendor_info : 'PIONEER '
Identifikation : 'DVD-RW DVR-106D'
Revision : '1.06'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Current: 0x0009
Profile: 0x001B
Profile: 0x001A
Profile: 0x0014
Profile: 0x0013
Profile: 0x0011
Profile: 0x0010
Profile: 0x000A
Profile: 0x0009 (current)
Profile: 0x0008
Using generic SCSI-3/mmc CD-R/CD-RW driver (mmc_cdr).
Driver flags : MMC-3 SWABAUDIO BURNFREE
Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R
Drive buf size : 1267712 = 1238 KB
FIFO size : 4194304 = 4096 KB
Track 01: data 698 MB
Total size: 802 MB (79:27.69) = 357577 sectors
Lout start: 802 MB (79:29/52) = 357577 sectors
Current Secsize: 2048
ATIP info from disk:
Indicated writing power: 4
Is not unrestricted
Is not erasable
Disk sub type: Medium Type A, high Beta category (A+) (3)
ATIP start of lead in: -11849 (97:24/01)
ATIP start of lead out: 359847 (79:59/72)
Disk type: Long strategy type (Cyanine, AZO or similar)
Manuf. index: 25
Manufacturer: Taiyo Yuden Company Limited
Blocks total: 359847 Blocks current: 359847 Blocks remaining: 2270
Speed set to 2822 KB/s
Starting to write CD/DVD at speed 16.0 in real TAO mode for single session.
Last chance to quit, starting real write 0 seconds. Operation starts.
Waiting for reader process to fill input buffer ... input buffer ready.
trackno=0
BURN-Free is ON.
Turning BURN-Free off
Performing OPC...
Starting new track at sector: 0
Track 01: 698 of 698 MB written (fifo 100%) [buf 79%] 14.4x.
Track 01: Total bytes read/written: 732313600/732313600 (357575 sectors).
Writing time: 308.368s
Average write speed 15.8x.
Min drive buffer fill was 77%
Fixating...
Fixating time: 19.575s
cdrecord: fifo had 11535 puts and 11535 gets.
cdrecord: fifo was 0 times empty and 3792 times full, min fill was 89%.
書き込みが終わると、-ejectオプションにより自動的にCDが排出される。
オーディオCDとして書き込む
オーディオCDとして書き込む場合は、-audioオプションを使用する。
cdrecord -v speed=4 dev=ATAPI:1,0,0 -audio track*.wav