Debian(etch)ではwodimを使う風な情報を発見。
そもそも、『CD-Rを焼く』という行為自体を、おそらく片手(多くても両手)で足りるくらいしか経験した事がありません。しかも、GUIだけなので、実際に『CD-Rを焼く』という作業の詳細をまったくもって理解していません。
そんな訳で、CUIでCD-Rを焼いてみようと思います。
さて、以降、無駄に長い文章になるのでここで区切ります。結果を先に言うと、焼けませんでした。お先真っ暗。
何度も失敗を重ねて資料(情報)が錯綜しているので、最後に参考にしたWebページをのせておきます。
第05回 「cdrecord によるCD-R/RW の焼き方」
まずは、必要なパッケージをインストールします。
% sudo aptitude install wodim cdrkit-doc genisoimage
ここで、インストールしたドキュメントやmanなどを眺めつつ、作業の概要を整理しました。が、よくわからないので、雰囲気をつかむ為に実践に移ります。それでは、まずはドライブ情報を調べます。
% wodim -scanbus dev=ATAPI
scsibus0:
0,0,0 0) *
0,1,0 1) 'MATSHITA' 'DVD-R UJ-85J ' 'FBZ8' Removable CD-ROM
0,2,0 2) *
0,3,0 3) *
0,4,0 4) *
0,5,0 5) *
0,6,0 6) *
0,7,0 7) *
% wodim --devices
Beginning native device scan. This may take a while if devices are busy...
wodim: Overview of accessible drives (1 found) :
----------------------------------------------------------------------
0 dev='/dev/hdb' rwrw-- : 'MATSHITA' 'DVD-R UJ-85J'
----------------------------------------------------------------------
手元の環境(MacBookのParallelsのetch)では、`wodim --devices`だけで必要な情報は得られましたが、その情報を使っても焼けなかったので、`wodim -scanbus dev=ATAPI`も試してみました。
実はよく分からないまま、ファイルをそのまま焼いてみたりもしましたが、それは忘れてisoイメージを作ります。
% cd ~/tmp % mkdir image % echo "あいうえお" > image/file1.txt % genisoimage -o file1.iso -J -r -v -V test image/ % sudo mkdir /mnt/iso % sudo mount -t iso9660 -o loop file1.iso /mnt/iso % ls /mnt/iso 合計 1 -r--r--r-- 1 root root 16 2007-09-24 13:01 file1.txt % sudo umount /mnt/iso
isoイメージをマウントして中のファイルに問題がない(っぽい)事が分かったので、焼いてみます。
% wodim -v -eject speed=8 dev=0,1,0 -data file1.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: '0,1,0' scsibus: 0 target: 1 lun: 0 scsidev: 'ATA:0,1,0' devname: 'ATA' scsibus: 0 target: 1 lun: 0 Linux sg driver version: 3.5.27 Wodim version: 1.1.2 SCSI buffer size: 64512 atapi: -1 Device type : Removable CD-ROM Version : 0 Response Format: 2 Capabilities : Vendor_info : 'MATSHITA' Identification : 'DVD-R UJ-85J ' Revision : 'FBZ8' Device seems to be: Generic mmc2 DVD-R/DVD-RW. Current: 0x0009 (CD-R) 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: 0x0013 (DVD-RW restricted overwrite) Profile: 0x0014 (DVD-RW sequential recording) Profile: 0x0011 (DVD-R sequential recording) Profile: 0x0010 (DVD-ROM) Profile: 0x000A (CD-RW) Profile: 0x0009 (CD-R) (current) Profile: 0x0008 (CD-ROM) Using generic SCSI-3/mmc CD-R/CD-RW driver (mmc_cdr). Driver flags : MMC-3 SWABAUDIO BURNFREE Supported modes: TAO PACKET SAO Drive buf size : 1310720 = 1280 KB Beginning DMA speed test. Set CDR_NODMATEST environment variable if device communication breaks or freezes immediately after that. FIFO size : 12582912 = 12288 KB Track 01: data 0 MB padsize: 236 KB Total size: 0 MB (00:04.02) = 302 sectors Lout start: 1 MB (00:06/02) = 302 sectors Current Secsize: 2048 ATIP info from disk: Indicated writing power: 5 Is not unrestricted Is not erasable Disk sub type: Medium Type A, high Beta category (A+) (3) ATIP start of lead in: -11634 (97:26/66) ATIP start of lead out: 359846 (79:59/71) Disk type: Short strategy type (Phthalocyanine or similar) Manuf. index: 3 Manufacturer: CMC Magnetics Corporation Blocks total: 359846 Blocks current: 359846 Blocks remaining: 359544 Speed set to 1411 KB/s Starting to write CD/DVD at speed 8.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. Performing OPC... Starting new track at sector: 0 Track 01: 0 of 0 MB written. Track 01: writing 236 KB of pad data. Track 01: Total bytes read/written: 372736/614400 (300 sectors). Writing time: 6.615s Average write speed 1.6x. Fixating... Fixating time: 5.038s BURN-Free was never needed.
表示されたメッセージがよくわかりませんが、何となくデータが書き込まれたっぽい雰囲気です。
% sudo mount -t iso9660 /dev/hdb /mnt/iso
Password:
mount: block device /dev/hdb is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/hdb,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
% sudo mount /media/cdrom0
mount: block device /dev/hdb is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/hdb,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
% dmesg | tail
isofs_fill_super: bread failed, dev=hdb, iso_blknum=16, block=16
attempt to access beyond end of device
hdb: rw=0, want=68, limit=4
isofs_fill_super: bread failed, dev=hdb, iso_blknum=16, block=16
attempt to access beyond end of device
hdb: rw=0, want=68, limit=4
isofs_fill_super: bread failed, dev=hdb, iso_blknum=16, block=16
attempt to access beyond end of device
hdb: rw=0, want=68, limit=4
isofs_fill_super: bread failed, dev=hdb, iso_blknum=16, block=16
という訳で、どうもよく分かりません。OSX側でも読み取る事が出来ません。
OSX側で読み取れなくなっている(空ディスクと言われなくなった)ので、ディスクには何かしらのデータが書き込まれているような気がします。が、それがゴミくずになっているという事でしょうか。
SCSIとATAのあたりで何かが起きているのでしょうかね。一応、ドライブを認識して、CD-Rに書き込んでいる訳なので、動いている事は動いている模様。ディスクとの相性でしょうか。
さて、困ったものです。最悪、GUI(を使えるマシン)側にデータを持ち込んで焼けばいいのですが、データ移動を待つより人が動いた方が効率が良さそうです。なので、出来ればCUIで作業したいのですが、マシン(構成)が変われば大丈夫ですかね。
そんなこんなで、お恥ずかしながら、新しいサーバでバックアップデータを焼く作業は自分には無理そうですよ。

