CD-Writing HOWTO <author>Winfried Trümper <tt/<winni@xpilot.org>/ <date>v2.9.3, 23 July 2000 <trans>JF Project <tdate>1 November 2000 <abstract> <!-- This document explains how to write CD-ROMs under Linux. --> この文書は Linux での CD-ROM の焼きかたについて説明したものです。 </abstract> <toc> <!-- <sect>Introduction --> <sect>はじめに <p> <!-- Many people use Linux to burn CD-ROMs, because it is reliable and easy. No bluescreens while burning and no headaches about getting the right combination of hard- and software. It just works once properly set up. The CD-writing HOWTO explains the setup, how to put data on the media and gives some interesting applications kindly submitted by the readers. --> Linux を使って CD-ROM を焼いている人はたくさんいます。 信頼性が高く、しかも簡単だからです。 CD を焼いている途中でブルースクリーンになったりしませんし、 ハードとソフトの正しい組合せを追い求めて頭が痛くなることもありません。 一度ちゃんと設定すれば、後は正しく動いてくれます。 この CD-Writing-HOWTO では、設定のやりかた、 メディア(媒体)にデータを載せる方法、 そして、親切な読者が教えてくれた面白いアプリケーションを紹介します。 <!-- <sect1>Copyright, license and terms of usage --> <sect1>著作権、ライセンス、利用条項 <p> Copyright Winfried Trümper 1996-2000. All rights reserved. Redistribution and use, with or without modification, are permitted provided that the name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. In this sense, translations are welcome and need not to be authorized by me. <bf> The author disclaims all warranties with regard to this document, including all implied warranties of merchantability and fitness for a certain purpose; in no event shall the author be liable for any special, indirect or consequential damages or any damages whatsoever resulting from loss of use, data or profits, whether in an action of contract, negligence or other tortious action, arising out of or in connection with the use of this document. </bf> <!-- Short: read and use at your own risk. No money-back guarantee. If you want to understand why this document has always been under a very weak license and not under the gnu GPL or similar restrictive, then you should read this article from the german computer magazine c't: <url url="http://www.heise.de/tp/deutsch/inhalt/te/8375/1.html"> (currently only in German language). --> 要するに: 自分自身の責任でこの文書を読んだり使ったりしてください。 返金保証はありません。 ずっと前から、この文書のライセンスはとても弱いものにしています。 GNU GPL または類似の制限の下にはありません。 その理由を知りたければ、ドイツのコンピュータ雑誌 c't にあった、 この記事を読んでみてください: <url url="http://www.heise.de/tp/deutsch/inhalt/te/8375/1.html"> (現在はドイツ語のみ). <!-- <sect1>Availability --> <sect1>筆者が対応できること <p> <!--O As the editor of this document I mostly sum up what other people report to me. I'm not a software developer nor an expert in hardware, so for specific problems with hard- or software you may want to ask somebody else. What always makes sense is to report solutions for problems not already covered by the HOWTO to me. --> 私はこの文書の編集者であり、 他のかたから寄せられる報告内容をまとめるのが主な作業です。 私はソフトウェア開発者ではありませんし、 ハードウェアのエキスパートでもありません。 ハードやソフトに特化した問題については、誰か他の人に聞いてみてください。 私にとって常に意味のある報告とは、 この HOWTO にまだ載っていない問題の解決方法です。 <p> <!-- I get several hundred e-mails concerning the CD-Writing HOWTO each year. So please be patient with me, as I cannot always answer within hours. However, I read everything immediately and put you on my CDR-queue. Before you ask a question, please make sure you are aware of the newest version of this document; it is always available from <url url="http://www.guug.de/~winni/linux/">. --> 筆者は CD-Writing HOWTO に関するメールを毎年数百通受け取ります。 ですから返事は辛抱強く待ってください。 筆者は必ずしも数時間以内に返事を書いたりできるわけじゃありませんから。 しかし筆者の CD-R キュー - やることリスト - に入っているものについては、 即座に読んで返事を出しています。質問する前に、 見ているのがこの文書の最新版かどうか確かめてください。最新版はいつも <url url="http://www.guug.de/˜winni/linux/"> から手に入ります。 <!-- <sect1>Suggested readings --> <sect1>お勧めの資料 <p> <!--O You may need the handbook for your Linux-distribution to learn about installing a new kernel. I'm really clueless about this issue when it comes to any other Linux distribution than my own. --> 新しいカーネルのインストール方法について学ぶなら、 お使いの Linux ディストリビューション向けの参考書が必要かもしれません。 私が自分で使っていないディストリビューションに関しては、私はなんら知りません。 <!-- The <url url="http://www.fadden.com/cdrfaq/" name="CD-R FAQ"> is a general FAQ about compact-disk recordables (CD-R), CD-writers and the required software. --> <url url="http://www.fadden.com/cdrfaq/" name="CD-R FAQ"> は、 記録可能な CD-ROM (CD-R) や CD ライタ、 必要なソフトウェアに関する一般的な FAQ です。 <!-- As most CD-writers can be used to read CD-ROMs, too, you may want to read the <it>Linux CD-ROM HOWTO</it>, the <it>Linux SCSI HOWTO</it> and the <it>Linux Kernel HOWTO</it>. --> ほとんどの CD ライタは CD-ROM の読み取りもできるので、 <it>Linux CD-ROM HOWTO</it>, <it>Linux SCSI HOWTO</it>, <it>Linux Kernel HOWTO</it> も読んでおくといいでしょう。 <!-- <sect1>Terminology ... lasers at maximum ... fire! --> <sect1>用語集 ... レーザー出力最大 ... 発射! <p> <!-- <it>CD-ROM</it> stands for <it>Compact Disc Read Only Memory</it>, a storage medium utilizing an optical laser to sense microscopic pits on a colorful shimmering disk. The pits represent the bits of the information and are so petite that some billions of them fit on the disc. Thus a CD is a mass-storage medium. --> <it>CD-ROM</it> は <it>Compact Disc Read Only Memory (読み取り専用のコンパクトディスク)</it> の略で、 カラフルに光る円盤上の微小な穴 (ピット) を光レーザーで読み取る仕組みの 記録メディアです。ビットデータを記録するのがその穴で、極めて小さいため、 たくさん (数十億個) の穴をディスクに置くことができます。 だから CD は大容量記録メディアなのです。 <!-- The term <it>CD-R</it> is a short form of <it>CD-ROM recordable</it> and refers to a CD that doesn't have those microscopic pits on its surface. Thus it is empty. The CD-R has a special chemical film inside into which pits can be burned. This is done by giving the laser which normally just senses the pits a little bit more power so it burns the pits. This action can only be taken <bf>once</bf> on a CD-R. You can leave out some areas for later writing, creating a so called <it>multi-session CD</it>. --> <it>CD-R</it> は <it>CD-ROM recordable</it> (記録可能な CD-ROM) の略であり、表面に微小な穴がない CD のことです。 したがって、中身はもともと空っぽです。CD-R の、 穴を焼き付けるほうの面の内部には特殊な化学フィルムが入っています。 この焼き付けは、普通は微小な穴を調べるためだけのレーザーに、 少し多めにパワーを与えることで行います。 この動作は CD-R では<bf>一度</bf>しか行えません。 後で書き込むために領域を残しておくことができます。 これがいわゆる<it>マルチセッション CD (multi-session CD)</it>なのです。 <!-- The <it>CD-ROM rewritable</it> (short: <it>CD-RW</it>) was developed to work around the limitation of CD-R media. With a CD-RW burner the laser can do both, burn pits into the media and also melt the media back into its original state. This is possible, because the laser does not really burn holes into the media, which would get lost in a puff of smoke. A decent analogy for the technique is an ice-hockey game: by driving over the ice, a players (laser) leave scratches in it. The pattern in the ice (media) is a recording of what happened on the ice during one round. In between the periods of the game, the Zamboni cleaning car drives over the ice and fills the scratches by melting the very top layer of the ice. (Zamboni is <it>the</it> brand name for cleaning cars in ice-hockey stadiums). This way the pattern on the ice is cleared and a new round can begin. The scientific term for evaporating, condensing, melting and freezing is "phase change", thus the name "phase change devices" for CD-RW-writers. --> <it>CD-ROM rewritable</it> (再書き込み可能な CD-ROM, 略称は <it>CD-RW</it>) は、CD-R メディアの制限を回避するために作られたものです。 CD-RW ライタなら、メディアに穴を焼き付けることも、 逆にレーザーでメディアをで融かして元の状態に戻すことも、両方できます。 これができるのは、実際にはレーザーはメディアを焼いて穴を開けていないから、 メディアが煙になって消えたりはしていないからです。 この技術の分かりやすい例えとしては、アイスホッケーのゲームがあります: 氷の上を滑ることによりプレイヤー (レーザー) は氷に傷を残します。 氷 (メディア) 上のパターンは、1 ラウンドの間に氷の上で起きたことの記録です。 ゲームのピリオド間には Zamboni と呼ばれる清掃車が氷の上を走り、 氷のごく表面に近い層を融かすことによって傷を埋めていきます。 (Zamboni はアイスホッケー場で使われている清掃車のブランド名です。) <!-- fujiwara: なんで Zamboni という名前にこだわるんだろう(^_^; cleaning car でいいじゃんかよー。 --> このようにして氷の上のパターンは消され、 新しいラウンドが始められるようになります。 気化、液化、融解、凍結を指す科学用語は「相変化」なので、 CD-RW ライタは「相変化デバイス」と呼ばれます。 <!-- This HOWTO deals with the task of writing CD-Rs and CD-RWs. Welcome on board, captain. --> この HOWTO 文書は CD-R と CD-RW への書き込み作業を扱います。 戦闘ブリッジへようこそ、艦長。 <!--O <sect2>Adaptor vs. Adapter --> <sect2>Adaptor 対 Adapter <p> <!--O The the most frequent spelling within the kernel sources is adapter (adapter: 4283, adaptor: 154). Even more important, the parameters of module options and aliases are naturally affected, like in "scsi_hostadapter". So in order to achieve a consistent spelling throughout configuration examples and document text, I follow that convention regardless of the correct spelling. --> (訳注: 「アダプタ」の、o と e の綴りの揺れのこと) カーネルのソースにおいて、多く出現するのは adapter という綴りのほうです。 (adapter: 4283 件, adaptor: 154 件) さらに重要なこととして、カーネルモジュールのオプション・パラメータや別名 (alias) で使う綴りのほうも、当然ながら上記の影響を受けて ``scsi_hostadapter'' といったようになります。 正式な綴りはともかく、設定例や文書を通して綴りを統一するため、 私はこの慣習に従うことにします。 <!-- <sect1>Supported CD-writers --> <sect1>サポートしている CD ライタ <p> <!-- USB CD-writers are currently not supported at all. Apart from that you can safely assume that most newer IDE/ATAPI- and SCSI-writers work under Linux. Newer drives are mostly MMC-compliant and are therefore supported. If the SCSI-version of a particular writer works, the IDE/ATAPI-version will most likely work and vice versa. However, some people want to get a warm and fuzzy feeling by reading the exact model of their writer in some sort of compatibility list. That is the reason why I didn't throw the following list out of the HOWTO. Here is a comprehensive summary of drives reported to work with cdrecord: --> 今のところ、USB 接続の CD ライタは全くサポートされていません。 そのへんを除けば、最近の IDE/ATAPI 接続のライタと SCSI 接続のライタは Linux 上で動作すると思って差し支えありません。 最近のドライブのほとんどは MMC 準拠ですのでサポートされています。 ある CD ライタの SCSI 版が動作するならば、 その IDE/ATAPI 版もほぼ確実に動作しますし、その逆も成り立ちます。 とはいうものの、自分が使っているライタの正確なモデル名を 何らかの互換リストで見て安心したがっている人も一部にいます。ですから、 私も以下のリストをこの HOWTO から削っていません。 以下に挙げるのは、cdrecord で動作することが報告されたドライブをざっと まとめたものです: <tscreen><verb> Acer: CDRW 4432A, CDRW 6206A, CD-R/RW 6X4X32, 8432A BTC: BCE 621E (IDE) Compro: CW-7502, CW-7502B Creative: MK 4211, RW 4224E, Delta: OME-W 141 Dysan: CRW-1622 Elite: Elite b444.41 Goldstar: CED-8041B Grundig: CDR 100 IPW Guillemot: Maxi CD-R 4X/8X HP: SureStore 4020i, SureStore 6020i, C4324, C4325 CD-writer+ 7100, 7200i, 7500e, 8100i, 8110i, 8200i Plus, 8250i, 9100i, 9110i, 9200e, 9210, 9300i, 9310i Hi-Val: CDD 2242, CDD-3610, Iomega: ZIPCD 4x650 JVC: XR-W 2001, XR-W 2010, XR-W 2040, XR-W 2042, XR-RW 2224, YR 2626 Kiss: CDRW (no model given) Kodak: PCD 200, PCD 225, PCD 260, PCD 600 Matsushita: matsushita is the japanese name for panasonic, please see there Memorex: CRW-620, CDR-622, CRW-1622, CRW-2224, CDRW-4420 Microboards: PlayWrite 2000, PlayWrite 4000RW, PlayWrite 4001RW MicroNet: MasterCD Plus 4x4, MasterCD Plus 4x6 Mitsubishi: CDRW-226 Mitsumi: CR-2401-TS, CR-2600 TE, CR-2801 TE, CR-4801 TE, CR-4802 TE, CR-4804 TE Nomai: 680.RW Olympus: CDS 615E, CDS 620E Optima: DisKovery 650 CD-R OTI: CDRW 965, CDRW 975 (Socrates 1.0) Panasonic: CW-7285, CW-7502, CW-7503, CW-7582 Philips: CDD-521/10, CDD-522, CDD-2000, CDD-2600, CDD-3600, CDD-3610, CDD 4201 PCA 267cr, PCA 460 RW, PCRW 404, Omniwriter 26, Omniwriter 26A, CDRW800 Pinnacle: RCD-100, RCD-1000, RCD-5020, RCD-5040 Pioneer: DW-S114X Plasmon: CDR 480, CDR 4220, RF-4100, RF-4102, CDR 4400 Plextor: CDR PX-24 CS, PX-412 C, PX-R412 C PX-R 810Ti, PX-R 820T, PX-W 4220Ti, PX-W 8220T, PX-W 8432T Plexwriter RW 4/2/20 Procom: PCDR 4 REC: 820s Ricoh: RO-1420C+, MP 1420C, MP 6200S, MP 6201S, MP 7040A, MP-7060A Samsung: SW-204 Sanyo: CRD-R24S Smart and Friendly: CD-RW226, CD-R1002, CD-R1002/PRO, CD-R1004, CD-R 2004, CD-R 2006 PLUS, CD-R 2006 PRO, CD-RW 2224, CD-R 4000, CD-R 4006, CD-R 4012, CD-RW 4424A CD-R 8020, CD-R 8220 Sony: CDRX 100E, CDRX 120E, CDRX 140S-RP, CDU 920S, CDU 924, CDU 926S, CDU 928E, CDU 948S Taiyo Yuden: EW-50 TEAC: CD-R50S, CD-R55S, CDR-55S, CDR-55K, CDR-56S-400, CD-R56S-600, R56S-614 Traxdata: CRW 2260, CDR 4120, CDR 4120 Pro, CDRW 4260, CDRW 4424, CDR 4800 Turtle Beach: 2040R Waitec: wt 2036, wt 2444ei WPI (Wearnes): CDRW-622, CDR-632P Yamaha: CDR-100, CDR 102, CDR-200, CDR-200t, CDR-200tx CDR-400, CDR-400c, CDR-400t, CDR-400tx, CDR-400Atx CDW-2216E, CRW-2260, CRW-2260t, CRW-4250tx, CRW-4260t, CRW-4260tx, CRW-4261, CRW-4416S, CRW-6416S, CRW-8424E </verb><!-- <it>Table: CD-writers supported under Linux</it></tscreen> --> <it>表: Linux が対応している CD ライタ</it></tscreen> <!-- The detailed list of models which have been reported to work or not to work under various Unix-like operating systems is available online from <url url="http://www.guug.de:8080/cgi-bin/winni/lsc-orig.pl">. --> 各種 UNIX 系 OS で動作、あるいは動作しなかったことが報告された モデルの詳細なリストは、 <url url="http://www.guug.de:8080/cgi-bin/winni/lsc-orig.pl"> からオンラインで入手できます。 <!-- 原文のコメント --> <!-- url="http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdwriters-1.6.html" --> <!-- If your hardware isn't supported you can still use Linux to create an image of the CD. You may wish to do so because most burning software for DOS does not deal with RockRidge-extensions (Unix-like filesystems on CD-ROM). In a second step, you can use DOS or Macintosh software to write the image to the CD-R. --> お使いのハードウェアがサポートされていなくても、Linux を使って CD の イメージを作成することができます。DOS の CD 書き込みソフトウェアのほとんどは RockRidge 拡張 (CD-ROM 上の UNIX 風ファイルシステム) を扱えないので Linux を使うといいでしょう。 Linux でイメージを作った後のステップとして、DOS や Macintosh のソフトウェアを使って CD-R にイメージを書き込むのです。 <!-- <sect1>Supported "features" --> <sect1>サポートされている「機能」 <p> <!-- Two There are two classes of utilities: the hardware drivers and the data-formatters. The hardware drivers support the following features: --> <!-- 原文先頭の Two はペーストミス? (morimoto) --> ユーティリティには 2 種類あります。 すなわちハードウェアドライバとデータフォーマッタです。 ハードウェアドライバは以下の機能をサポートします: <!-- <tscreen><verb> Supported Feature cdwrite-2.1 cdrecord-1.6 cdrdao IDE/ATAPI yes yes yes Parallel Port no yes yes CD-RW no yes yes Audio CD yes yes yes Data CD-ROM yes yes partial Multisession partial yes no TAO (Track at once) yes yes yes DAO (Disk at once) no partial yes packet writing no no no </verb><it>Table: </it></tscreen> --> <tscreen><verb> サポートする機能 cdwrite-2.1 cdrecord-1.6 cdrdao ---------------------------------------------------------- IDE/ATAPI ○ ○ ○ パラレルポート × ○ ○ CD-RW × ○ ○ オーディオ CD ○ ○ ○ データ CD-ROM ○ ○ 一部 マルチセッション 一部 ○ × TAO (Track at once) ○ ○ ○ DAO (Disk at once) × 一部 ○ パケット書込 × × × </verb> <it>表: </it></tscreen> <!-- <tt>cdwrite</tt> is unmaintained software referenced only for completeness. Please use <tt>cdrecord</tt> instead, as it supports a wider range of hardware and has significantly more features. The main benefit of cdrdao is the ability to create audio CDs without two seconds of silence between the tracks (writing in disk-at-once (DAO) mode). --> <tt>cdwrite</tt> は既にメンテナンスされなくなっているソフトウェアで、 上の表を埋めるためだけに入れています。 その代わりに <tt>cdrecord</tt> を使ってください。というのも、 こちらの方が多くのハードウェアに対応していますし、 機能も盛りだくさんだからです。cdrdao の主な利点は、 トラック間に 2 秒間の無音状態が入らない CD を作る機能です (disk-at-once (DAO) モードの書き込み)。 <!-- The tools classified as "data-formatters" organize the data on the media ("put a filesystem on it"). --> 「データフォーマッタ」に分類されるツールは、 メディア上のデータを組織化してまとめます (「データをファイルシステム上に置きます」)。 <!-- <tscreen><verb> Feature mkisofs mkhybrid mkvcdfs -\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\ ISO 9660 yes yes no RockRidge yes yes no El Torito yes yes no HFS no yes no Joliet yes yes no Multisession yes yes no CD-Extra yes yes no Video-CD no no yes </verb><it>Table: </it></tscreen> --> <tscreen><verb> 機能 mkisofs mkhybrid mkvcdfs ------------------------------------------------------------ ISO 9660 ○ ○ × RockRidge ○ ○ × El Torito ○ ○ × HFS × ○ × Joliet ○ ○ × マルチセッション ○ ○ × CD-Extra ○ ○ × Video-CD × × ○ </verb> <it>表: </it></tscreen> <!-- The most obvious difference between the ISO 9660 filesystem compared to the ReiserFS or Extended-2 filesystem is: you can't modify files once they are written. Other limitations of the ISO-9660-filesystem include: --> ISO 9660 ファイルシステムが ReiserFS や ext2 ファイルシステムと最も大きく違うのは、 ISO 9660 は一度書き込むとファイルの修正ができないという点です。 ISO 9660 ファイルシステムにはその他に以下のような制限があります: <itemize> <!-- <item> only 8 levels of sub-directories allowed (counted from the top-level directory of the CD) --> <item> サブディレクトリを(トップレベルから数えて) 8 階層までしか作れない <!-- <item> maximum length for filenames: 32 characters --> <item>ファイル名の最大長が 32 文字 <!-- <item> 650 MB capacity --> <item> 容量が 650 MB である </itemize> <!-- <it>RockRidge</it> is an extension to allow longer filenames and a deeper directory hierarchy for the ISO-9660 filesystem. When reading a CD-ROM with RockRidge extensions under Linux, all the known properties of files like owner, group, permissions, symbolic links appear ("feels like a Unix filesystem"). These extensions are not available when reading the CD-ROM under DOS or the heterogenous Windows-family of operating systems. --> <it>RockRidge</it> は、ISO 9660 ファイルシステムで長いファイル名と 深いディレクトリ階層を扱えるようにする拡張です。 RockRidge 拡張で焼かれた CD-ROM を Linux で読む時には、所有者、 グループ、パーミッション、シンボリックリンクといったファイル属性は 全て見えます (「UNIX のファイルシステムみたいな感じだね!」)。この拡張は、 DOS や、各種 Windows ファミリの OS で CD-ROM を読み取る時には使えません。 <!-- <it>El Torito</it> can be used to produce bootable CD-ROMs. For this feature to work, the BIOS of your PC must support it. Roughly speaking, the first 1.44 (or 2.88 if supported) Mbytes of the CD-ROM contains a floppy-disk image supplied by you. This image is treated like a floppy by the BIOS and booted from. (As a consequence, while booting from this virtual floppy, your original drive A: (/dev/fd0) may not be accessible.) --> <it>El Torito</it> を使えば、起動可能な CD-ROM を作れます。 ただし、お使いの PC の BIOS がこの機能をサポートしていないと、 実際に CD からはブートしません。 大まかに言うと、CD-ROM の最初の 1.44 MB の部分に (サポートされていれば 2.88 MB の部分も)、 用意しておいたフロッピーディスクのイメージを入れます。 BIOS はこのイメージをフロッピーのように扱い、そこから起動します。 (その結果、この仮想的なフロッピーから起動している途中は、 元々のドライブ A: (/dev/fd0) にはアクセスできません。) <!-- <it>HFS</it> lets a Macintosh read the CD-ROM as if it were an HFS volume (the native filesystem for MacOS). --> <it>HFS</it> を使えば Macintosh 上で HFS (MacOS のネイティブなファイルシステム)同様に CD-ROM を読むことができます。 <!-- <it>Joliet</it> brings long filenames (among other things) to newer variants of Windows (95, 98, NT). However, the author knows of no tool that allows long filenames under plain DOS or Windows 3.11. --> <it>Joliet</it> は(代表的な機能として)、最近の Windows 系 OS (95, 98, NT)で長いファイル名を使えるようにします。しかし筆者は、素の DOS や Windows 3.11 で長いファイル名を使えるようにするツールを全く知りません。 <!--O <it>Video-CDs</it> can be directly played on DVD-devices. --> <it>Video-CD</it> は、DVD デバイスで直に再生できます。 <!-- Section 2.8 lists the availability of the mentioned software. --> 名前を出したソフトウェアについては、2.8 節でまとめます。 <!-- <sect1>Mailing Lists --> <sect1>メーリングリスト <p> <!-- If you want to join the development team (with the intention to actively <it>help</it> them), send e-mail to cdwrite-request@other.debian.org and put the word <tt>subscribe</tt> in body of the message. --> (活発に<it>手伝う</it>という意志を持って)開発チームに参加しようと思う なら、本文に <tt>subscribe</tt> と書いたメールを cdwrite-request@other.debian.org に送ってください。 <!-- <sect>Setup the Linux-system for writing CD-ROMs --> <sect>CD-ROM を焼くための Linux の設定 <p> <!-- This section applies to the following types of CD-writers: SCSI, IDE/ATAPI and the devices for the parallel port. USB CD-writers are not supported as of May 2000. Non-SCSI writers require compatibility drivers, which make them appear as if they were real SCSI devices. On the one side such a unifying strategy is easy ("everything is SCSI"), because on the application level you can share your knowledge with other users regardless of their kind of CD-writer. On the other side, you have to reconfigure applications like audio CD players or the mount utility to reflect the change of the driver name. For example, if you accessed your ATAPI CD-writer through the device file /dev/hdc before, you will have to access it through /dev/scd0 after activating the SCSI compatibility drivers. --> この章は SCSI、IDE/ATAPI、そしてパラレルポート接続タイプの CD ライタに 適用できます。USB 接続の CD ライタは 2000 年 5 月の時点では サポートされていません。SCSI 以外のライタには互換ドライバが必要です。 このドライバは、これらのデバイスを 本物の SCSI デバイスであるかのように見せかけます。 ある面では、このような統一化 (「全てのデバイスが SCSI である」) は簡単です。 なぜなら、アプリケーションレベルでは CD ライタの種類に関わらず 他のユーザと知識を共有できるからです。 その反面、ドライバ名の変更を反映させるため、 CD プレイヤーのようなアプリケーションや、 マウントユーティリティの再設定を行わなければなりません。 例えば、今まではデバイスファイル /dev/hdc 経由で ATAPI 接続の CD ライタにアクセスしていたとしても、SCSI 互換ドライバを有効にした後は /dev/scd0 経由でアクセスしなければならなくなります。 <!-- Once you succeed setting up your hardware and the rest of your Linux-system, the command <tt>cdrecord -scanbus</tt> shows you a list of devices on your SCSI busses. The goal of this section is to guide you in setting up your Linux-system, so that you finally end up seeing something like: --> 一度ハードウェアとその他の Linux システムの設定がうまくできれば、 <tt>cdrecord -scanbus</tt> コマンドの実行により SCSI バスに接続されている デバイスの一覧が表示されます。この章の目的は、 最終的に次のような出力が得られるよう Linux システムを設定する手伝いをすることです: <tscreen><verb> shell> cdrecord -scanbus Cdrecord release 1.7a1 Copyright (C) 1995-1998 Jög Schilling scsibus0: 0,0,0) 'Quantum ' 'XP34300 ' 'F76D' Disk 0,1,0) 'SEAGATE ' 'ST11200N ' '8334' Disk 0,2,0) * 0,3,0) 'TOSHIBA ' 'MK537FB/ ' '6258' Disk 0,4,0) 'WANGTEK ' '5150ES SCSI 36 ' 'ESB6' Removable Tape 0,5,0) 'EXABYTE ' 'EXB-8500-85QUE ' '0428' Removable Tape 0,6,0) 'TOSHIBA ' 'XM-3401TASUNSLCD' '3593' Removable CD-ROM 0,7,0) * scsibus1: 1,0,0) 'Quantum ' 'XP31070W ' 'L912' Disk 1,1,0) * 1,2,0) * 1,3,0) 'TEAC ' 'CD-R55S ' '1.0H' Removable CD-ROM 1,4,0) 'MATSHITA' 'CD-R CW-7502 ' '4.02' Removable CD-ROM 1,5,0) * 1,6,0) 'YAMAHA ' 'CDR400t ' '1.0d' Removable CD-ROM 1,7,0) * </verb><!-- <it>Listing: Detecting devices on your SCSI bus</it></tscreen> --> <it>リスト: SCSI バスでのデバイスの検出</it></tscreen> <!-- The example was provided by Jo"rg Schilling and shows a total of four CD-writers. Please note that -scanbus also reports other devices, e.g. regular CD-ROMs and hard disk drives. The last column gives the SCSI description of the device, from which you cannot clearly distinguish ordinary CD-ROM drives from those with burning capability. But the product identification (middle column) often has hints about the feature in form of a R, -R or -RW. --> この例は Jörg Schilling さんから頂いたもので、全部で 4 つの CD ライタ が表示されています。-scanbus オプションは他のデバイス(例えば普通の CD-ROM やハードディスク)も表示するので注意してください。 各デバイスにおける最後のカラムは、 それがどんな SCSI デバイスかを説明したものです。 この項目では、普通の CD-ROM ドライブと、 CD を焼く機能を持った CD-ROM ドライブとをはっきりとは区別できません。 しかし、製品識別文字列 (真ん中の項目) を見れば、 機能に関するヒントが R, -R, -RW といった形で得られることがよくあります。 <!--O <sect1>Quickstart --> <sect1>やってみよう <p> <!--O This section is an attempt to provide an fast and easy description of the configuration. Not all possible setups are covered, but please go on and try it out anyways. First of all, check the Linux kernel version printed by the command "uname -r". It should be something like 2.0.X or 2.2.Y, where X is higher than 36 and Y is higher than 11. If you run older versions or the so called development kernels, you are on your own. Installing a new kernel is as much work as fixing an old one, so I have removed all hints you need for buggy kernels. --> この章は、設定に関して手早く簡単な解説をしてみようというものです。 あらゆる設定をカバーしてあるわけではありませんが、どうか構わず、 やってみてください。まず最初に、``uname -r'' コマンドで表示されるバージョン 番号をチェックしてください。2.0.X とか 2.2.Y みたいな感じになるはずです。 ここで X は 36 以上、Y は 11 以上とします。 もっと古いバージョンのやつだとか、いわゆる開発版カーネルだったら、 あなたにお任せです。 新しいカーネルをインストールするというのは古いものを直すのと同じぐらい 大変ですから、 バグいカーネルに対して必要なヒントの類は全部消しました。 <!--O The listing below shows a set of commands you could start with. The commands create device file entries under /dev unless they already exists. --> 下に載せる一連のコマンドで設定開始です。デバイスファイルのエントリを、 まだそれがないものに関して、/dev の下に作成します。 <tscreen><verb> test `whoami` = 'root' || echo "You must be root to execute the commands." cd /dev/ umask -S u=rwx,g=rwx,o-rwx [ -f loop0 ] \ || ./MAKEDEV loop \ || for i in 0 1 2 3 4 5 6 7; do mknod loop$i b 7 $i; done [ -f sg0 -o -f sga ] \ || ./MAKEDEV sg \ || for i in 0 1 2 3 4 5 6 7; do mknod sg$i c 21 $i; done </verb><it> <!-- Listing: creating of devicefiles --> リスト: デバイスファイルの作成</it></tscreen> <!--O Hardware access is usally implemented through device files under Linux. So before any other thing you make sure those files do exists in the directory /dev. Still nobody could give me a compelling reason why this has not been automated through techniques like the device filesystem (devfs). The devfs is available for years know, brings a safer (!) and a far clearer naming of devices and makes the device entries appear automatically under /dev. Some prominent people argue devfs is not the perfect solution, but they do not come up with anything better, not even something comparable and last but least nothing available and tested now. Lets start to use devfs, so I can remove the above commands from this document. (<url url="http://www.atnf.CSIRO.AU/~rgooch/linux/kernel-patches.html">) --> Linux においては、ハードウェアへのアクセスは一般にデバイスファイルを 通す形で実装されます。ですから、何よりも先に、これらのファイルが /dev ディレクトリにちゃんと存在することを確かめないといけません。 とはいうものの、なぜこのへんがデバイス・ファイルシステム (devfs) といった技術を通して自動化されていないのか、 その理由をずばり私に教えてくれた人はいません。 devfs は何年も前から利用可能でしたし、より安全 (!)、 デバイスの名称もはるかに明快になるし、 デバイスのエントリは自動的に /dev 以下に現れるというのに。 devfs は完璧な解ではないと論じていらっしゃるご高名な方々もいらっしゃいますが、 彼らはいい代案どころか、 devfs と比較になるような何かを出しているわけですらないし、 他に何かテスト済みのものが利用できるわけでもないのです。 devfs を使いはじめてみませんか。 そうすれば、上に述べたコマンド群はこの文書から取っちゃえるのです。 (<url url="http://www.atnf.CSIRO.AU/~rgooch/linux/kernel-patches.html">) <!--O Next thing to ensure is, that the Linux kernel is equiped with the necessary drivers. The following commands check various files for the presence of drivers in the running Linux kernel. Usally the command "cdrecord -scanbus" should trigger an automatic loading of all drivers. In case a driver is not present in the kernel afterwards, it is reported and the modularized driver (module) is manually loaded through insmod. --> 次に確認すべきことは、その Linux カーネルに 必要なドライバが付いているかどうかです。 以下のコマンドは、いま動作中の Linux カーネルについて、 ドライバの所在を確かめるために、いろんなファイルをチェックします。 通常は、``cdrecord -scanbus'' コマンドがきっかけとなって、 必要なドライバは自動的に読み込まれます。 その後もドライバがカーネルにないようなら、そのことが報告され、 insmod を使って、 モジュール化されたドライバ (モジュール) が手動で読み込まれます。 <tscreen><verb> test `whoami` = 'root' || echo "You must be root to execute the commands." cdrecord -scanbus > /dev/null if ! (pidof kerneld || test -f "/proc/sys/kernel/modprobe"); then echo "Neither kerneld nor kmod are running to automatically load modules". fi report_no_autoload() { echo "Ensure the module $1 is loaded automatically next time." } if test ! -f "/proc/scsi/scsi"; then report_no_autoload scsi_mod && insmod scsi_mod fi if ! grep "^........ sg_" /proc/ksyms > /dev/null; then report_no_autoload sg && insmod sg fi if ! grep "^........ sr_" /proc/ksyms > /dev/null; then report_no_autoload sr_mod && insmod sr_mod fi if ! grep "^........ loop_" /proc/ksyms > /dev/null; then report_no_autoload loop && insmod loop fi if ! grep iso9660 /proc/filesystems > /dev/null; then report_no_autoload iso9660 && insmod iso9660 fi echo "The following is only needed for IDE/ATAPI CD-writers." if ! grep ide-scsi /proc/ide/drivers > /dev/null; then report_no_autoload ide-scsi && insmod ide-scsi fi cdrecord -scanbus </verb><it> <!-- Listing: Testing for drivers --> リスト: ドライバのテスト</it></tscreen> <!--O Please read the next chapter if insmod complains about missing module files. If you are in text mode (console), the loading of modules may cause some messages to be printed on your screen. If you are in graphics mode (X11, KDE, Gnome), you can recall these messages with the command dmesg. --> insmod が「モジュール・ファイルがない」と文句を言ってくる場合は、 次の節を読んでください。 テキストモード (コンソール) で使っている場合は、 モジュールがロードされると、画面に何かメッセージが表示されるはずです。 グラフィックスモード (X11, KDE, Gnome) なら、dmesg コマンドで メッセージを再び呼び出せます。 <!--O There are several ways to load the modules next time you start up your Linux system: --> 次に Linux システムを立上げたときにもモジュールが読み込まれるようにする方法は いくつかあります。 <!--O <tscreen><verb> (1) Put the relevant insmod command into the startup sequence (a shell script named rc.local or equivalent). (2a) Run kerneld or kmod and (2b) configure them in /etc/modules.conf (to be more precise, you configure the utility modprobe, which is called by the daemons) </verb></tscreen> --> <tscreen><verb> (1) 適切な insmod コマンドを起動シーケンスに組み込む (rc.local などの名前のシェル・スクリプト) (2a) kerneld か kmod を動かして、 (2b) /etc/modules.conf にて設定する (より正確に言えば、上のデーモンから呼び出されるところの modprobe ユーティリティを設定する) </verb></tscreen> <!-- なんで verb tscreen なんだよ おい (morimoto) --> モジュールがロードされるようにするには、 /etc/modules といった設定ファイルのリストにそのモジュールを追加するか、 kerneld か kmod デーモンを走らせておきます。両方とも、カーネルが何か モジュールの必要性に気づいたときに必要なモジュールを自動的にロードして くれるデーモンです。 <!--O People with a SCSI-writer can skip the rest of this section, because cdrecord will most likely already detect their hardware. If not, then please send me an email with some information about your setup, so I can improve the section about SCSI-writers. --> SCSI のライタを持っている人はこの章の残りは飛ばして結構です。 このあたりのハードウェアなら、大概の場合 cdrecord が検出してくれている はずです。だめだったら、設定状況について私にメールを送ってください。 そうすれば SCSI ライタについての章を改善できますので。 <!--O Now to the people with CD-writers for IDE/ATAPI. As written in the previous chapter, you have to load the compatibility driver ide-scsi. But this driver can only access your CD-Writer if no other driver has already done so. In other words, you have to tell the regular IDE driver to leave your CD-writer unrecognized, so the ide-scsi driver can grab it. --> では、IDE/ATAPI の CD ライタをお持ちのかたの番です。前の節で書いたように、 互換ドライバ ide-scsi をロードしなければなりません。ただし、このドライバは、 他のドライバがすでに CD ライタに手を出していない場合に限り CD ライタに アクセスできます。言い換えれば、 普通の (互換ドライバでないほうの) IDE ドライバに、 その CD ライタを認識しないよう教え込んでおかなければいけません。 そうしておけば、ide-scsi ドライバが CD ライタを「にぎれる」わけです。 <tscreen><verb> hda = IDE bus/connector 0 master device hdb = IDE bus/connector 0 slave device hdc = IDE bus/connector 1 master device hdd = IDE bus/connector 1 slave device </verb><it><!-- Table: device file names of IDE/ATAPI devices --> 表: IDE/ATAPI のデバイスファイル名</it></tscreen> <!--O The table above shows the relation of device file names and the placing of devices on the IDE busses. The device file name representing your CD-Writer has to be passed to the driver in the Linux kernel. Example: hdb=ide-scsi. Such a setting should be added to lilo.conf or chos.conf if the driver is statically compiled into your kernel, which seems to be the most common setup. If you need to pass more than one parameter to the kernel, then seperate them with spaces (like shown in the chos example). The next two listings show example configurations containing more lines than just the relevant append-line. Please note the append- and cmdline-entries are image-specific (ie. don't add them immediatly at the top). --> 上の表は、デバイスファイルの名前と、そのデバイスの IDE バス上の位置と の関係を示しています。デバイスファイルの名前は、Linux カーネルのどの ドライバを通してお使いの CD ライタが使われるかを示しています。例えば hdb=ide-scsi など。こういった設定は、そのドライバがカーネルに静的に コンパイルされて入っている場合 (訳注: そのドライバをモジュールとして 動的にロードするのではない場合) は、lilo.conf や chos.conf に書きます。 おそらく、これがもっと一般的なケースでしょう。 カーネルに複数のパラメータを渡したい場合は、 (chos の設定例のように)、それらをスペースで区切ってください。 次に示すリスト 2 つの設定例には、 適切な append 行以外にもいろいろ書いてあります。 append と cmdline の行は、カーネル・イメージごとの設定であることに 注意してください。 (言い換えれば、設定ファイルの先頭に直に足してはだめです) <!-- 以下のパラグラフは、原文でもコメントアウトになりました (morimoto) --> <!--O All other variants like hdb=ignore or hdb=none will not do what you need. "Ignore" just means "no autoprobing" and "none" will even block access to the device for ide-scsi. --> <!-- 以下に設定例のリストを 2 つ 示します。他にも hdb=ignore とか hdb=none なんて設定もできますが、 こうしたいわけじゃないですよね? ``ignore'' は単に ``no autoprobing'' (自動検出しない) という意味ですし、``none'' だと ide-scsi ドライバから デバイスへのアクセスが遮断されます。 --> <tscreen><verb> image=/boot/zImage-2.2.14 label=Linux read-only append="hdb=ide-scsi" </verb><it>Listing: Example configuration for lilo (/etc/lilo.conf)</it></tscreen> <tscreen><verb> linux "Linux 2.1.14" { image=/boot/zImage-2.0.37 cmdline= root=/dev/hda5 readonly hdb=ide-scsi } </verb><it><!-- Listing: Example configuration for chos (/etc/chos.conf) --> リスト: chos の設定例 (/etc/chos.conf)</it></tscreen> <!--O If the driver for IDE/ATAPI CD-ROMs is loaded as a module, then the above won't make any difference to you, but make sure you include the options-line from the next listing. The last three lines of that listing are generally suggested to further automate the loading of the required modules. --> IDE/ATAPI CD-ROM のドライバがモジュールとしてロードされている場合なら、 上記の設定はあなたの環境に何ら影響を及ぼしませんが、次のリストにある options の行が入っていることを確認してください。リスト末尾の 3 行は、 必要となったモジュールの読み込みをより自動化するための設定として 一般にお奨めできるものです。 <!--O <tscreen><verb> options ide-cd ignore=hdb # tell the ide-cd module to ignore hdb alias scd0 sr_mod # load sr_mod upon access of scd0 #pre-install ide-scsi modprobe imm # uncomment for some ZIP drives only pre-install sg modprobe ide-scsi # load ide-scsi before sg pre-install sr_mod modprobe ide-scsi # load ide-scsi before sr_mod pre-install ide-scsi modprobe ide-cd # load ide-cd before ide-scsi </verb><it>Listing: Example configuration for /etc/modules.conf</it></tscreen> --> <tscreen><verb> options ide-cd ignore=hdb # ide-cd モジュールに、 # hdb は無視するよう指定 alias scd0 sr_mod # scd0 にアクセスがあったら # sr_mod をロード #pre-install ide-scsi modprobe imm # 一部の ZIP ドライブの場合のみ # アンコメントせよ pre-install sg modprobe ide-scsi # sg の前に ide-scsi を読み込む pre-install sr_mod modprobe ide-scsi # sr_mod の前に ide-scsi を読み込む pre-install ide-scsi modprobe ide-cd # ide-scsi の前に ide-cd を読み込む </verb><it>リスト: /etc/modules.conf の設定例</it></tscreen> <!--O If your CD-writer is the only CD-ROM attached to your machine, then remember you have to access the CD-ROM in the writer through the device file /dev/scdx where x=0,..,8. You may want to change the symbolic name cdrom to point to the new device file name. The listing below shows the command to achieve this with the example scd0. --> もし、マシンについている CD-ROM ドライブがその CD ライタだけなら、 CD-ROM へのアクセスも、デバイスファイル /dev/scd<em/n/ (<em/n/ は 0 から 8) を通して、そのライタを使って行わなければならない ことに留意してください。cdrom というシンボリックな名称で、その新しい デバイスファイルを指すように変更するのもいいでしょう。以下のリストは、 例えば scd0 に対してそうするためのコマンドです。 <tscreen><verb> cd /dev && rm cdrom && ln -s scd0 cdrom </verb><it><!-- Listing: Making cdrom a symbolic name for scd0 --> リスト: cdrom を scd0 を指すシンボリックな名前にする</it></tscreen> <!--O If your CD-writer and CD-ROM-drive are two different devices, then don't change the cdrom symlink. --> CD ライタと CD-ROM ドライブが(物理的に)別のデバイスなのなら、cdrom の シンボリックリンクを変更してはいけません。 <!-- 原文でコメントアウトされています (morimoto) --> <!--O <sect2>Special notes for kernel versions up to 2.2.9 <p> Up to kernel version 2.2.9, don't enable CONFIG_SCSI_MULTI_LUN ('probe for multiple luns') and ide-scsi support at the same time, there is an ide-scsi bug which prevents this. Some users reported conflicts with pre-compiled binaries and the 2.2-release. This is a problem with the Linux kernel. Possible solutions: <itemize> <item>It may go away if you recompile cdrecord so that it adopts to the actual values in linux/include/scsi/sg.h. These values must be the values of the running kernel due to the dumb sg user interface. <item>It may be caused by a loadable sg driver which cannot get enough memory that is suitable for DMA (Kernel releases up to 2.2.5). </itemize> --> <!--O <sect2>Special notes about SCSI CD-writers --> <sect2>SCSI CD ライタに関する特別な注意 <p> <!--O Please make sure that your writer is recognized by the BIOS of your SCSI hostadaptor card. Every SCSI hostadaptor scans the SCSI bus after power on and reports all devices found connected to the bus. The report includes the SCSI ID of the devices and their product label. It makes no sense to proceed unless your CD writer is listed in that report. --> お持ちのライタが SCSI ホストアダプタ・カードの BIOS で認識されることを確認してください。 SCSI ホストアダプタというものは、電源投入後に SCSI バスをスキャンして、 自分が発見した、バスに接続されているデバイスをすべて報告します。 報告には、デバイスの SCSI ID と製品名が入っています。 お使いの CD ライタがこの報告内容に含まれていない場合は、 何をやっても意味はありません。 <!--O If you plan to connect your SCSI device through the parallel port (not to confuse with the IDE drives for the parallel port), you need a special active cable and a special kernel driver. Read <url url="http://www.torque.net/parport/parscsi.html"> to learn more about this option. --> SCSI デバイスをパラレル・ポートを介して接続しようと思っているなら、 (パラレル・ポートに接続する IDE ドライブの話とごっちゃにしないこと) 特別なアクティブ・ケーブルとカーネル・ドライバが必要です。 詳しくは <url url="http://www.torque.net/parport/parscsi.html"> を読んでください。 <!--O <sect2>Special notes about CD-writers for the parallel port --> <sect2>パラレル・ポート接続の CD ライタに関する特別な注意 <p> <!--O I have no clue about this, sorry. Please read <url url="http://www.torque.net/parport/paride.html"> or your local file /usr/src/linux/Documentation/paride.txt. --> これについてはさっぱりわかりません。ごめんなさい。 <url url="http://www.torque.net/parport/paride.html"> を見るか、 ローカルファイル /usr/src/linux/Documentation/paride.txt を見てください。 <!--O <sect2>Compiling missing kernel modules (optional) --> <sect2>ないカーネル・モジュールをコンパイルする (任意) <p> <!--O You don't need to read this section if you hardware is already sucessfully recognized and configured by the previously described configuration steps. --> ここまでの設定に関する説明で、 お持ちのハードがちゃんと認識されて設定できているのなら、 この章を読む必要はありません。 <!-- The Linux kernel can be equipped with drivers for various features. You can compile the drivers into the kernel image statically or you can compile them as a module for on-demand loading. The last method is preferred for drivers not essential for bringing your Linux-system into life, because your kernel will be smaller and faster then. However, some drivers are essential for the system to come up and you shouldn't compile them as a module. Example: if your system lives on an IDE hard disk, you must have the driver for IDE hard disks in the kernel -- not as a module. --> Linux カーネルはさまざまな機能のためのドライバを装備しています。 ドライバはカーネルイメージに静的に組み込むか、動的ロードできる モジュールとして組み込むことができます。Linux システムを動かすために 本質的でないドライバは後者の方法がいいでしょう。なぜならカーネルが 小さくなり、したがって高速になるからです。しかし、一部のドライバは システムを立ち上げるためにどうしても必要であり、モジュールとして組み込むべき ではありません。例えば、システムが IDE ハードディスク上にある場合には、 IDE ハードディスク用のドライバはカーネル内になければならず、モジュール にはできません。 <!-- There are three different types of CD-writers: SCSI, IDE/ATAPI and external writers that work through the parallel port. The table shows how to configure the Linux kernel for those hardware types. The first column of the table is the section of the kernel configuration menu, where you can find the setting. The second column is the description of the feature (taken from the kernel configuration menu, too). The third column gives the name of the resulting module. The columns named SCSI, IDE and PP contain the necessary options for the associated hardware (PP = parallel port). --> CD ライタには異なる 3 種類のものがあります。すなわち SCSI, IDE/ATAPI のライタと、パラレルポート経由で動作する外付けライタです。 それぞれのハードウェアについてLinux カーネルをどのように 設定すればよいかを表に示します。表の最初のカラムはカーネル設定メニュー でのセクションです。ここに設定があると思います。2 番目のカラムは カーネルの機能の説明です(これもカーネル設定メニューからの引用です)。 3 番目のカラムは、できるモジュールの名前です。SCSI, IDE, PP という カラムは、対応するハードウェアにとって必要なオプションです (PP はパラレルポートのことです)。 <!-- <tscreen><verb> Sect. Description Module SCSI IDE PP --> <tscreen><verb> セクション 説明 モジュール SCSI IDE PP ------------------------------------------------------------ BLOCK Enhanced IDE/MFM/RLL... Y BLOCK IDE/ATAPI CDROM ide-cd M BLOCK SCSI emulation support ide-scsi M BLOCK Loopback device loop M M M PARIDE Parallel port IDE device paride Y/M PARIDE Parallel port ATAPI CD-ROMs M PARIDE Parallel port generic ATAPI M PARIDE (select a low-level driver) Y SCSI SCSI support scsi_mod Y/M Y/M SCSI SCSI CD-ROM support sr_mod Y/M Y/M SCSI Enable vendor-specific Y Y SCSI SCSI generic support sg Y/M Y/M SCSI (select a low-level driver) Y FS ISO 9660 CDROM filesystem iso9660 Y/M Y/M Y/M FS Microsoft Joliet cdrom... joliet Y Y Y </verb><!-- <it>Table: driver selection for different writer types</it></tscreen> --> <it>表: 各種ライタ用のドライバ選択</it></tscreen> <!-- Y stands for yes and means you should put the beast into the kernel. M stands for module and means you should or must compile this feature as a module. Y/M gives you the option to decide between either (order indicates choices with less potential problems). Empty settings don't need to be modified and not changing them increases the chance that the resulting kernel will work for you (if it did before...). Especially in environments where SCSI and ATAPI devices are mixed, you better build most things as modules. --> Y は 'yes' を表し、カーネルに組み込むべきであることを示します。 M は 'module (モジュール)' を表し、その機能はモジュールとしてコンパイル すべき、あるいはコンパイルしなければならないことを示します。Y/M ならば どちらかを選ぶことができます(問題が起こる可能性が小さい方を選びましょう)。 空の部分は変更する必要がないことを表します。 このような設定は変えないほうが、作ったカーネルが動作する可能性が高いでしょう (前に動いた実績があれば…)。特に、SCSI デバイスと ATAPI デバイスが混在 している環境では、ほとんどのものをモジュールとして作成する方がよいでしょう。 <!-- Compiling loopback device is optional. It allows you to test the image before writing it to the media. If you want to be able to read CD-ROMs, you need support for the ISO 9660 filesystem. This driver automatically includes RockRidge Extensions. The Microsoft Joliet CD-ROM extensions have to be explicitly added to the ISO 9660 filesystem. In any case, you need a low-level driver for your hardware. Low-level refers to the driver, which interacts directly with the hardware. For SCSI and the parallel port, there are a lot of low-level drivers available. --> ループバックデバイスはコンパイルしなくてもかまいません。このデバイスを 使うと、イメージをメディアに書き込む前にテストすることができます。 CD-ROM を読み取りたければ、ISO 9660 ファイル システムをサポートする必要があります。このドライバは自動的に RockRidge 拡張を含みます。Microsoft Joliet 拡張は、明示的に ISO 9660 ファイルシステムに追加しなければなりません。いずれの場合にも、 ハードウェアに対応した低レベルドライバが必要です。低レベルドライバとは、 直接ハードウェアと通信するドライバのことです。SCSI やパラレルポートの 場合には、たくさんの低レベルドライバがあります。 <!--O Installing the resulting Linux-kernel is beyond the scope of this HOWTO. Please consult the documentation of your Linux-distribution. --> できた Linux カーネルをインストールする方法については、この HOWTO の 範囲から外れます。お使いの Linux ディストリビューションの説明書に あたってください。 <!--O Users of RedHat Linux be aware that you have to compile in the features "Ramdisk support" and "Initial ramdisk". Furthermore, you have to generate a new ramdisk with the new modules by issuing a command like "mkintrd -\-preload ide-cd initrd-2.2.14.img 2.2.14". --> RedHat Linux のユーザなら、``Ramdisk support'' と ``Initial ramdisk'' 機能がコンパイルされて含まれるようにしないといけないことを押えておいて ください。さらに、その新しいモジュールで新しい ramdisk を生成しないと いけません。こんなふうにコマンドを実行します: ``mkinitrd --preload ide-cd initrd-2.2.14.img 2.2.14'' <!-- If you are on your own, then try to install a package called "Linux Kernel source", which was shipped with your distribution. Afterwards issue the following commands: If you are lucky, then just install a package called "Linux Kernel source", which was shipped with your distribution. Afterwards issue the following commands: --> 自分自身のマシンをお使いであれば、ディストリビューションに付属している 「Linux カーネルソース」というパッケージをインストールするだけです。 その後で以下のコマンドを実行します: <!-- <tscreen><verb> cd /usr/src/linux make menuconfig # follow instructions and menu make dep make zImage # or "make bzImage" # insert a floppy-disk before proceeding dd if=arch/i386/boot/zImage of=/dev/fd0 make modules make modules_install </verb><it>Table: making a bootable floppy disk</it></tscreen> --> <tscreen><verb> cd /usr/src/linux make menuconfig # 説明とメニューに従います make dep make zImage # または "make bzImage" # 先に進む前にフロッピーディスクを挿入します dd if=arch/i386/boot/zImage of=/dev/fd0 make modules make modules_install </verb> <it>表: 起動可能なフロッピーディスクの作成</it></tscreen> <!-- This will produce a bootable floppy disk. If you are really clueless about this whole stuff, you better read other documentation like the Kernel HOWTO or get help from a friend before you completely this whole stuff, you better get help from a friend before you completely mess up your system. Remember the kernel is the heart of the system. --> これによって起動可能なフロッピーディスクができます。この作業全体が本当 にわからないのであれば、システムをぐちゃぐちゃにしてしまう前に Kernel HOWTO といった他の文書を読むか、友達の助けを求めるべきでしょう。 カーネルがシステムの中心部分であることを忘れてはいけません。 <!--O If your kernel allows it, compile the driver for IDE/ATAPI CD-ROMs as a module. If not, disable it (N) and use the driver for SCSI CD-ROMs instead. For the 2.2 series of the Linux kernel, it is no longer possible to run the drivers for IDE and SCSI on the same physical device at the same time (if you still have 2.0.36, read below). --> カーネルが許すならば、IDE/ATAPI CD-ROM 用のドライバをモジュールとして コンパイルします。それができなければこれを無効(N)にして、SCSI CD-ROM 用のドライバを使います。バージョン 2.2 系列のカーネルでは、 同じ物理デバイスで IDE と SCSI のドライバを同時に使うことは できなくなりました (まだ 2.0.36 を使っているなら後の説明を読んでください)。 <!-- <sect1>Get the user software for burning CD-Rs --> <sect1>CD-R を焼くためのユーザソフトウェアの入手 <p> <!-- A more detailed survey of tools related to produce CD-ROMs is available from <url url="http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdb.html">. --> CD-ROM を作成するためのツールに関する詳しい調査の結果が <url url="http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdb.html"> にあります。 <!-- <sect2>Command line utilities --> <sect2>コマンドライン用ユーティリティ <p> <!-- One of the following packages are required to generate images of CD-Rs (only required for data CD-ROMs): --> CD-R のイメージ (データ CD-ROM の場合のみ) を生成するためには、 以下のパッケージのいずれかが必要です: <quote> <url url="ftp://tsx-11.mit.edu/pub/linux/packages/mkisofs/"> (mkisofs)<p> <url url="ftp://ftp.ge.ucl.ac.uk/pub/mkhfs"> (mkhybrid) </quote> <!-- To write images to the CD-R, you need one of the following software packages: --> イメージを CD-R に焼くためには、以下のパッケージのいずれかが必要です: <quote> <url url="ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/"> (cdrecord) <p> <url url="http://www.ping.de/sites/daneb/cdrdao.html"> (cdrdao) <p> <url url="http://www.munich-vision.de/vcd/"> (mkvcdfs) </quote> <!-- Don't trust the man page of old versions of <tt>mkisofs</tt> which state you need version 1.5 of <tt>cdwrite</tt>. Just use cdrecord and you are fine. Please note that newer versions of cdrecord ship with an enhanced version of mkisofs and some extra tools in the subdirectory misc/ (readcd, isosize) not found elsewhere. --> 古い<tt>mkisofs</tt> のオンラインマニュアルにはバージョン 1.5 の <tt>cdwrite</tt> が必要だと書かれていますが、これを信じてはいけません。 黙って cdrecord を使ってください。それで大丈夫です。 新しいバージョンの cdrecord には改良版の mkisofs が付属していることと、 他では見つからない追加ツールがいくつか misc ディレクトリ(readcd, isosize)にあることに注意してください。 <!-- <sect2>Graphical user interfaces (optional) --> <sect2>GUI (無くてもかまいません) <p> <!-- Front-ends are really front-ends under Linux. That means, you still have to install the command-line utilities, but you access them in a better looking manner. --> Linux においては、フロントエンドは本当にフロントエンドです。つまり、 フロントエンドだけあってもだめで、コマンドライン用のユーティリティを インストールしなければなりません。でも、 フロントエンドは使う時の見栄えをよくしてくれます。 <!-- <it>X-CD-Roast</it> is a program package dedicated to easy CD creation under Linux. It combines command line tools like <tt>cdrecord</tt> and <tt>mkisofs</tt> into a nice graphical user interface. --> <it>X-CD-Roast</it> は Linux で CD を簡単に作成するためのプログラム パッケージです。これは <tt>cdrecord</tt> や <tt>mkisofs</tt> のような コマンドライン用のツールと組み合わせて用いるもので、 使いやすい GUI を提供します。 <quote> <url url="http://www.fh-muenchen.de/home/ze/rz/services/projects/xcdroast/e_overview.html"> </quote> <!-- <it>BurnIT</it> is a JAVA front-end to cdrecord, mkisofs and cdda2wav-0.95 making it a complete package for burning CDs on the Unix platform. It is available from --> <it>BurnIT</it> は cdrecord の Java 版フロントエンドであり、 cdda2wav-0.95 を加えれば UNIX 環境で CD を焼くための完全な環境が作れます。これは <quote> <url url="http://sunsite.auc.dk/BurnIT/"> </quote> から入手できます。 <!--O <it>CD-Tux</it> is a character based frontend for the programs mkisofs and cdrecord. "It creates an easy to use enviroment for doing almost anything to a CD in full color through the use of the (in)famous NCURSES Library. And it does all this whith an executable of under 75K." --> <it>CD-Tux</it> は mkisofs と cdrecord のための、 キャラクタベースのフロントエンドです。 「CD に対してできる操作ならなんでも可能な使いやすい環境を、 あの素晴らし(く..もないか) NCURSES ライブラリを使って、 フルカラーでつくり出しています。実行バイナリは 75K に満たないサイズです。 <quote> <url url="http://www.datadictator.co.za/cdtux/"> </quote> <!-- <sect>Burning CD-Rs --> <sect>CD-R を焼く <p> <quote> <!-- <it>"If to smoke you turn I shall not cease to fiddle while you burn."</it> (Roman emperor Nero about burning his own classic-CDs, AD64. He misunderstood it completely and burned Rome down.) --> <it>「もしおまえを煙と化すなら、焼き上がる間にフィードルでも奏でて時を過ごそう」</it> (ローマ皇帝ネロが A.D. 64 年に彼のクラシック CDを焼いた時の言葉です。 彼は完璧に考え違いをして、ローマを焼き払っちゃたんですけどね) </quote> <!-- fujiwara: 高橋さん、ありがとうございます(^_^)。 --> <p> <!-- Writing CD-ROMs consists of two steps under Linux: --> Linux 上での CD-ROM 作成は 2 つの手順で行います: <itemize> <!-- <item> packaging the desired data (files, music or both) into files with special formats --> <item> 必要なデータ (ファイルや音楽、あるいはその両方) を特殊なフォーマットのファイルにパッケージングする <!-- <item> writing the data from the files to the CD-R with the utility <tt>cdrecord</tt> --> <item> <tt>cdrecord</tt> ユーティリティを使って、 このデータをファイルから CD-R に書き込む </itemize> <!-- This chapter describes the steps for data and audio CDs in greater detail. --> この節では、データ CD とオーディオ CD を焼く手順を詳細に説明します。 <!-- <sect1>Writing CD-ROMs (pure data) --> <sect1>CD-ROM (データのみ)を焼く <p> <!-- Note that collecting the data to put onto a CD usually takes longer than one expects. Consider that missing files cannot be added once the CD is written and fixated. This is also true for CD-RW, which can currently only be rewritten as a whole. Using the multi-session feature is no option for single files, as it consumes much space for a new complete table of contents (TOC). UDF is not ready yet for Linux. --> CD に焼くためのデータの収集には普通、思っているより時間がかかります。 一度 CD を書き込んで、固着させてしまったら、足りないファイルを追加する ことはできないことに注意してください。 これは、現在は全体まるごとの再書き込みしかできない CD-RW の場合でもそうです。 ファイルを 1 個追加するためにマルチ・セッション機能を使うなどというのは 話になりません。 新しい table of contents (TOC) をまるまる使うため、 多くのスペースを食ってしまうからです。 UDF はまだ Linux では使えません。 <!-- Also keep in mind that a certain amount of the free space of a CD is used for storing the information of the ISO-9660-filesystem (usually a few MB). 620 MB data will always fit on a 650 MB CD-R. --> また、CD の空き容量が ISO 9660 ファイルシステムの情報のため ある程度 (普通は数 MB) 使われてしまうことを覚えておいてください。 620 MB のデータなら確実に 650MB の CD-R に収まるでしょう。 <!-- <sect2>Creating an image of the later CD-ROM --> <sect2>後で CD-ROM となるイメージの作成 <p> <!-- Before any storage medium (e.g. floppy disk, hard disk or CD) can be used, it must get a filesystem (DOS speak: get formatted). The filesystem is responsible for organizing and incorporating the files that should be stored on the medium. --> どんな記録メディア(例: フロッピーディスク、ハードディスク、CD)でも、 利用可能にするにはファイルシステムを作らなければなりません (DOS でいうところのフォーマットです)。ファイルシステムの役割は、 メディアに保存されるファイルを組織化し、まとめることです。 <!-- The usual utilities for creating filesystems on hard disk partitions write an empty filesystem onto them, which is then mounted and filled with files by the users as they need it. A writable CD is only writable once so if we wrote an empty filesystem to it, it would get formatted and remain completely empty forever. This is also true for rewritable media as you cannot change arbitrary sectors yet; you must erase their whole content. --> ハードディスクのパーティション上にファイルシステムを作る普通の ユーティリティは、空のファイルシステムをパーティション上に作成します。 このファイルシステムには、ユーザの必要に応じてファイルが 入っていきます。これに対して、書き込み可能な CD は一度しか 書き込めません。したがって、空のファイルシステムを書き込んでしまうと、 フォーマットこそされますが、永遠に空っぽのままになってしまいます。 同じことは書き換え可能なメディアについても言えます。 というのも、任意のセクタを変更することはまだできず、 全体の内容を消さなければならないからです。 <!-- So what we need is a tool that creates the filesystem while copying the files to the CD. This tool is called <tt>mkisofs</tt>. A sample usage looks as follows: --> したがって、必要となるのはファイルを CD に書き込むための ファイルシステムを作るツールです。このツールは <tt>mkisofs</tt> と呼ばれます。このツールの使用例を以下に示します: <!-- <tscreen><verb> mkisofs -r -o cd_image private_collection/ `----------' `-----------------' | | write output to take directory as input </verb></tscreen> --> <tscreen><verb> mkisofs -r -o cd_image private_collection/ `---------' `-----------------' | | 書き込み先 入力に使うディレクトリ </verb></tscreen> <!-- The option '-r' sets the permissions of all files to be public readable on the CD and enables RockRidge-extensions. You probably want to use this option unless you really know what you're doing (hint: without '-r' the mount point gets the permissions of <tt>private_collection</tt>!). --> オプション `-r' は CD 上の全てのファイルのパーミッションを誰でも読める ように設定し、RockRidge 拡張を有効にします。自分が何をしているのかを 完璧に把握している人ならともかく、普通はこのオプションを使うとよいでしょう (ヒント: `-r' がないと、マウントポイントは <tt>private_collection</tt> のパーミッションを拾ってしまいます!)。 <!-- <tt>mkisofs</tt> will try to map all filenames to the 8.3 format used by DOS to ensure the highest possible compatibility. In case of naming conflicts (different files have the same 8.3 name), numbers are used in the filenames and information about the chosen filename is printed via STDERR (usually the screen). Don't panic: Under Linux you will never see these odd 8.3 filenames because Linux makes use of the Rock Ridge extensions which contain the original file information (permissions, filename, etc.). --> <tt>mkisofs</tt> は全てのファイル名を DOS が使う 8.3 形式に対応させようとします。これは互換性をできるだけ高めるためです。 名前が重なった場合 (別のファイルが同じ 8.3 形式の名前になった場合) には、 ファイル名に数字が使われ、決まったファイル名に関する情報が標準エラー出力 (通常は画面) に出力されます。でもあわてないでください。 Linux 上では、このようなへんてこな 8.3 形式のファイル名を見ることはありません。 というのも、Linux は元のファイル情報 (パーミッション、ファイル名など) を持っている Rock Ridge 拡張を使うからです。 <!--O Remeber do use the Option -J (MS Joliet extensions) or use mkhybrid if you want to generate a more Windows-friendly CD-ROM. For HFS CD-ROMS used on the Macintosh, you better read the man-page of mkisofs' bigger sister mkhybrid for details on various options. --> さらに Windows との親和性が高い CD-ROM を作りたい場合は、 -J オプション (マイクロソフトの Joliet 拡張) か、mkhybrid を使ってください。 Macintosh で使われている HFS CD-ROM の場合は、 mkisofs の姉にあたる mkhybrid のマニュアル・ページを読んで、 いろんなオプションについて詳しく調べたほうがいいでしょう。 <!-- Now you may wonder why the output of <tt>mkisofs</tt> is not directly sent to the writer device. There are three reasons: --> もしかすると、<tt>mkisofs</tt> の出力が直接 CD ライタデバイスに 送られないのはどうしてかと思うかもしれません。これには 3 つの理由があります: <itemize> <!-- <item><tt>mkisofs</tt> knows nothing about driving CD-writers. --> <item><tt>mkisofs</tt> は CD ライタの駆動について何も知らない <!-- <item>You may want to test the image before burning it. --> <item>イメージを焼く前にはテストをする方がよい <!-- <item>On slow machines it would not be reliable (see section 4.). --> <item>遅いマシンだと信頼性が低い (4 章を参照) </itemize> <!-- There is a method to write a CD-R in one go, which will be described below. --> CD-R を一気に焼く方法があります。これを以下で説明します。 <!-- One also could think of creating an extra partition and writing the image to that partition instead to a file. I vote against such a strategy because if you write to the wrong partition due to a typo, you can lose your complete Linux system. Read: that happened to me... Furthermore, it is a waste of disk space because the CD-image is temporary data that can be deleted after writing the CD. However, using raw partitions saves you the time for deleting files of 650 MB size. --> 追加のパーティションを作成し、ファイルではなくそのパーティションへ イメージを書き込もうと思うかもしれません。筆者はこういったやり方には反対です。 というのも、コマンドをタイプミスして 間違ったパーティションに書き込みを行ってしまうと、 Linux システムが全て壊れてしまうからです (注意! 私はやってしまいました…)。 また、これはディスク容量の無駄使いです。なぜなら、CD イメージは一時的 なデータであり、CD への書き込みを行った後は削除できるからです。しかし、 raw パーティションを使えば、650MB のサイズのファイルを消す時間を 節約することができます。 <!-- <sect2>Test the CD-image --> <sect2>CD イメージのテスト <p> <!-- Linux has the ability to mount files as if they were disk partitions. This feature is useful to check that the directory layout and file access permissions of the CD image matches your wishes. Although media is very cheap today, the writing process is still time consuming, and you may at least want to save your time by doing a quick test. --> Linux は、(CD イメージ)ファイルを あたかもディスクのパーティションであるかのように マウントできます。この機能は、CD イメージのディレクトリ構成やファイル のパーミッションが希望通りかどうかを確認する時に便利です。現在は メディアも非常に安くなりましたが、それでも書き込みにはとても時間がかかるので、 少なくとも簡単なテストを行って、時間を節約するとよいでしょう。 <!-- To mount the file <tt>cd_image</tt> created above on the directory <tt>/cdrom</tt>, give the command --> これまでの作業で作った <tt>cd_image</tt> を <tt>/cdrom</tt> ディレクトリにマウントするには、以下のコマンドを使います: <tscreen><verb> mount -t iso9660 -o ro,loop=/dev/loop0 cd_image /cdrom </verb></tscreen> <!-- Now you can inspect the files under <tt>/cdrom</tt> -- they appear exactly as they were on a real CD. To umount the CD-image, just say <tt>umount /cdrom</tt>. (Warning: On Linux kernels prior to 2.0.31 the last file on <tt>/cdrom</tt> may not be fully readable. Please use a more recent kernel like 2.0.36. The option -pad for cdrecord applies to audio CDs only and the option -pad for mkisofs requires a patch, which is as much work to apply than to upgrade to a bug-free Linux kernel.) --> ここで <tt>/cdrom</tt> 以下のファイルを詳しく調べます。これは焼きあがった CD-ROM にあるものと全く同じです。CD イメージをアンマウントするには、 <tt>umount /cdrom</tt> を使います。(警告: 2.0.31 以前の Linux カーネルでは、 <tt>/cdrom</tt> の最後のファイルを完全には読めません。ですから 2.0.36 といったもっと新しいカーネルを使ってください。 cdrecord では -pad オプションはオーディオ CD にしか使えず、mkisofs で -pad オプションを使うにはパッチを当てる必要があります。 このパッチを当てる作業は、バグのない Linux カーネルに更新するより大変です。:-) <!-- Note: --> 注意: <quote> <!-- Some ancient versions of <tt>mount</tt> are not able to deal with loopback devices. If you have such an old version of <tt>mount</tt>, then upgrade your Linux-system. Several people have already suggested putting information about how to get the newest mount utilities into this HOWTO. I always refuse this. If your Linux distribution ships with an ancient <tt>mount</tt>, report it as a bug. If your Linux distribution is not easily upgradable, report it as a bug.<p> If I include all the information that is necessary to work around bugs in badly designed Linux distributions, this HOWTO would be a lot bigger and harder to read. --> 古いバージョンの <tt>mount</tt> にはループバックデバイスを 扱えないものがあります。このような古いバージョンの <tt>mount</tt> を使っているなら、Linux システム自体を新しくしましょう。 最新の mount ユーティリティの入手に関する情報をこの HOWTO に入れようと 提案してくれた方は今までに何人もいますが、筆者は必ず断っています。 お使いの Linux ディストリビューションに古すぎる <tt>mount</tt> が付属しているのなら、それはバグとして報告すべきです。<p> 作りの悪い Linux ディストリビューションのバグを回避するために 必要な情報を全て載せてしまったら、 この HOWTO はとても長く読みにくくなってしまいます。 </quote> <!-- <sect2>Write the CD-image to a CD --> <sect2>CD イメージを CD に焼く <p> <!--O This section only covers writing data CDs in TAO mode, because it is the most frequently used mode for data. For more information about the differences of TAO and DAO, please see the chapter about audio CD-Rs. If you use DAO mode with the tool cdrdao, then remember to add a dummy audio track at the end of the TOC file (see the README). --> データを焼く場合に最もよく使われるのは TAO モードなので、 この章では TAO モードでのデータ CD の焼き込みだけを扱っています。 TAO と DAO の違いについてもっと詳しく知りたければ、 オーディオ CD-R に関する節を読んでください。 cdrdao で DAO モードを使った場合は、 ダミーのオーディオ・トラックを TOC ファイルの最後に付けるのを忘れずに。 (README 参照) <!-- Not much more left to do. If you haven't already tried, it's a good time for the command --> やることはもうあまり残っていません。まだやってなければ、そろそろ 次のコマンドを実行してみましょうか: <tscreen><verb> cdrecord -scanbus </verb></tscreen> <!-- This will tell you to which SCSI device your CD-writer is attached to. All other methods of guessing the information printed so nicely by cdrecord ! have been removed from the HOWTO. --> このコマンドは CD ライタがどの SCSI デバイスに接続されているかを 表示します。こういった情報の推定は cdrecord で非常にうまくできるので、 他の方法はこの HOWTO から消しました。 <!-- Before showing you the last command, let me warn you that CD-writers want to be fed with a constant stream of data. So the process of writing the CD image to the CD must not be interrupted or a corrupt CD will result. It's easy to interrupt the data stream by deleting a very large file. Example: if you delete an old CD-image of 650 Mbytes size, the kernel must update information about 650,000 blocks on the harddisk (assuming you have a blocksize of 1 Kbyte for your filesystem). That takes some time and is very likely to slow down disk activity long enough for the data stream to pause for a few seconds. However, reading mail, browsing the web, or even compiling a kernel generally will not affect the writing process on modern machines. --> CD を焼くという最後のコマンドを実行する前に、CD ライタには 定常的にデータを流すことが必要だということを注意してください。 したがって、CD イメージを CD に書き込む処理の妨害をしてはいけません。 さもないと、焼き損ねの CD ができてしまいます。 巨大なファイルを削除すれば簡単にデータの流れを止めることができます。 例: 古い CD イメージ、つまり 650MB の大きさのファイルを削除すると、 カーネルはハードディスク上の 650,000 ブロック分の情報を更新しなければなりません (このファイルシステムでは 1 ブロックが 1KB であるものとします)。 これにはある程度の時間がかかり、 ディスクの動作が遅くなってデータの流れが数秒間止まることもありえます。 しかし今時のマシンでは普通、メールを読んだり、WWW をブラウズしたり、 カーネルを再構築したくらいでは書き込みに影響しません。 <!-- Please note that no writer can re-position its laser and continue at the original spot on the CD when it gets disturbed. Therefore any strong vibrations or other mechanical shocks will probably destroy the CD you are writing. --> 邪魔が入った時にレーザーの位置を直し、 CD 上の邪魔が入る前の位置から焼き続けることができる CD ライタなど存在しない点に注意してください。 したがって、強い振動や機械的な衝撃があると、 書き込み中の CD は壊れてしまうでしょう。 <!-- When you are mentally prepared, dress up in a black robe, multiply the SCSI-id of the CD-writer with its SCSI-revision and light as many candles, speak two verses of the ASR-FAQ (newsgroup alt.sysadmin.recovery) and finally type: --> 心の準備ができれば、さぁ魔法使いの黒いローブをまとい、 CD ライタの SCSI ID と SCSI のリビジョンの数字を掛け合わせて その数だけロウソクを灯し、ASR-FAQ (newsgroup alt.sysadmin.recovery) にあ る 2 つの文句を唱えた上で、最後のコマンドを入力します: (訳注: 日本のユーザであれば、 鯛と神酒を供え、四方に盛り塩をし、滝に打たれて瞑想しておくのもいいでしょう) <!-- <tscreen><verb> shell> SCSI_BUS=0 # taken from listing 1 "scsibus0:" shell> SCSI_ID=6 # taken from listing 1 "TOSHIBA XM-3401" shell> SCSI_LUN=0 shell> cdrecord -v speed=2 dev=$SCSI_BUS,$SCSI_ID,$SCSI_LUN \ -data cd_image # same as above, but shorter: shell> cdrecord -v speed=2 dev=0,6,0 -data cd_image </verb></tscreen> --> <tscreen><verb> shell> SCSI_BUS=0 # リスト 1 の "scsibus0:" の部分を見た shell> SCSI_ID=6 # リスト 1 の "TOSHIBA XM-3401" の部分を見た shell> SCSI_LUN=0 shell> cdrecord -v speed=2 dev=$SCSI_BUS,$SCSI_ID,$SCSI_LUN \ -data cd_image # 上のコマンドと同じ意味ですが、こちらの方が短い shell> cdrecord -v speed=2 dev=0,6,0 -data cd_image </verb></tscreen> <!-- For better readability, the coordinates of the writer are stored in three environment variables with natural names: SCSI_BUS, SCSI_ID, SCSI_LUN. --> 読みやすさを高めるために、CD ライタの SCSI バス上の位置は、自然な名前の 3 つの 環境変数 (SCSI_BUS, SCSI_ID, SCSI_LUN) に格納されます。 <!-- If you use cdrecord to overwrite a CD-RW, you must add the option "blank=..." to erase the old content. Please read the man page to learn more about the various methods to blank the CD-RW. --> cdrecord を使って CD-RW を上書きする時には、古い内容を消すために ``blank=...'' というオプションを指定しなければなりません。CD-RW の中身を 消すための色々な方法については、オンラインマニュアルを見てください。 <!-- In times where everybody except me owns a 400 Mhz machine, people feed the output of mkisofs directly into cdrecord: --> 筆者以外のは人はみんな 400MHz のマシンを持っているのではないかと 時々思うのですが、多くの人は mkisofs の出力を直接 cdrecord に 送り込んでいます: <!-- <tscreen><verb> shell> IMG_SIZE=`mkisofs -R -q -print-size private_collection/ 2>&1 \ | sed -e "s/.* = //"` shell> echo $IMG_SIZE shell> [ "0$IMG_SIZE" -ne 0 ] && mkisofs -r private_collection/ \ |cdrecord speed=2 dev=0,6,0 tsize=${IMG_SIZE}s -data - # don't forget the s --^ ^-- read data from STDIN </verb></tscreen> --> <tscreen><verb> shell> IMG_SIZE=`mkisofs -R -q -print-size private_collection/ 2>&1 \ | sed -e "s/.* = //"` shell> echo $IMG_SIZE shell> [ "0$IMG_SIZE" -ne 0 ] && mkisofs -r private_collection/ \ |cdrecord speed=2 dev=0,6,0 tsize=${IMG_SIZE}s -data - # s を忘れないこと --^ ^-- 標準入力からデータを読む </verb></tscreen> <!-- The first command is an empty run to determine the size of the image (you need the mkisofs from the cdrecord distribution for this to work). You need to specify all parameters you will use on the final run (e.g. -J or -hfs). Maybe your writer does not need to know the size of the image to be written, so you can leave this dry run out. The printed size must be passed as a tsize-parameter to cdrecord (it is stored in the environment variable IMG_SIZE). The second command is a sequence of mkisofs and cdrecord, coupled via a pipe. --> 最初のコマンドはイメージの大きさを調べるためにカラ実行 (dry-run) します (これを行うには、cdrecord のパッケージに入っている mkisofs が必要です)。 お使いの CD ライタは書き込むイメージの大きさを知る必要がないかも しれませんが、そういう場合は、カラ実行してみる必要はありません。 実際に実行する時に使う引数を全部指定しなければいけません (-J とか -hfs)。 出力されたサイズは cdrecord に tsize パラメータとして渡されます (この値は環境変数 IMG_SIZE に格納されます)。2 番目のコマンドは mkisofs と cdrecord をパイプ経由で組み合わせて並べたものです。 <!-- これきっとペーストミスだね。略 (morimoto) --> <!--O The --> <!-- <sect1>Writing audio CDs --> <sect1>オーディオ CD の書き込み <p> <!--O Writing audio CDs is very similar to the steps described above for data CDs. You can choose between two techniques: DAO or TAO. TAO (track at once) is less suitable for music, because you will hear clicks between the individual tracks. It is described first anyways, because it is a little bit easier to deal with and DAO is not available for all drives yet. --> オーディオ CD の書き込みは、既に説明したデータ CD の書き込みの手順と よく似ています。 書き込む方法には DAO と TAO の二種類があります。 TAO (track at once) は音楽用途にはあまり向いていません。 TAO でオーディオ CD を焼くと、 トラック (曲) ごとに「プチッ」という音が聞こえてしまうからです。 ともあれ、TAO のほうがちょっとだけ扱いやすいし、 DAO はまだすべてのドライブで扱えないので、 TAO のほうを最初に解説します。 <!--O The main difference compared to writing data CD-Rs is the format of the images. ISO-9660 (or whatever filesystem you prefer) would not be suitable, because no audio CD player is able to deal with filesystems. Instead the audio data must be writen as "16 bit stereo samples in PCM coding at 44100 samples/second (44.1 kHz)". --> データ CD-R に書き込むときとの主な違いは、イメージのフォーマットです。 オーディオ CD プレイヤーはファイルシステムを扱えませんから、 ISO-9660 (や、何でもいいですからお好みのファイルシステム) ではうまくありません。 その代りに、オーディオ・データは 「44100 サンプル/秒(44.1 kHz)で PCM コーディング された 16 ビットステレオのサンプル音声」で書き込む必要があります。 <!-- One utility to convert your sound files into the required format is sox. Its usage is straightforward: --> サウンドファイルを必要なフォーマットに変換するユーティリティのひとつに sox があります。sox の使い方は簡単です: <tscreen><verb> shell> sox killing-my-software.wav killing-my-software.cdr </verb></tscreen> <!-- This command would convert the song killing-my-software from the WAV-format into the CDR audio-format. See the man page for sox for more details about formats and filename-extensions sox recognizes. Because the output of the manual conversion takes up much disk space, it was made a built-in feature of cdrecord for the sound formats WAV and AU. So as long as your sound files have the extensions .wav or .au (and the sample rate "stereo, 16 bit, 44.1 kHz"), you can use them as audio tracks without manual conversion into the CDR format. However, cdrecord requires the size of the sound data to be a integer multiple of 2352 and to be greater than 705,600 bytes, which is not fullfilled for some WAV files. For such files the usage of sox is needed to pad the audio data up to 2352 bytes. --> このコマンドは killing-my-software という歌を WAV 形式から CDR 音声形式に 変換します。sox が認識するファイル形式とファイル名の拡張子については オンラインマニュアルを見てください。 手作業での変換結果を出力するには大量のディスク容量が必要なので、 cdrecord には WAV, AU フォーマットを読み込む機能が組み込まれました。 したがって、音声ファイルの拡張子が .wav または .au (かつサンプルレートが 「ステレオ、16 ビット、44.1 kHz」)ならば、 手作業で CD-R フォーマットに変換しなくても、 オーディオ・トラックとして使うことができます。 ただ、cdrecord の制約として、 音声データの大きさが 2352 バイトの整数倍、かつ 705,600 バイト以上の 大きさである必要があります。 WAV ファイルの全てが必ずしもこうなっているわけではありません。 そういうファイルの場合は、sox を使って 2362 バイトの整数倍の大きさにまで、オーディオ・データに余白を入れて 引き延ばす必要があります。 <!--O <sect2>Writing audio CDs (TAO) --> <sect2>オーディオ CD の書き込み (TAO) <p> <!--O An audio CD consists of audio tracks, which are organized as separate images when using TAO mode. So if you want to have ten tracks on your CD, you have to make ten images. --> TAO モードの場合、 オーディオ CD は各曲独立したイメージから成るオーディオ・トラックで 構成されます。 CD に 10 曲入れたいなら、イメージを 10 個作るわけです。 <!-- Cdrecord writes CD images as audio tracks if the option -audio is specified. The other options are identical to those used for writing data-CDs (unless you have very special requirements). These three examples all do the same thing, but read the tracks from different sound file formats: --> cdrecord は、-audio オプションが指定されるとオーディオトラックを CD イメージとして書き込みます。他のオプションについてはデータ CD を書き込む時と同じです (非常に特殊な要求がある場合は除きます)。 以下の 3 つの例は全て同じ処理を行いますが、 トラックの読み込みは異なる形式のサウンドファイルから行われます: <tscreen><verb> shell> cdrecord -v speed=2 dev=0,6,0 -audio track1.cdr track2.cdr... shell> cdrecord -v speed=2 dev=0,6,0 -audio track1.wav track2.wav... shell> cdrecord -v speed=2 dev=0,6,0 -audio track1.au track2.au... </verb></tscreen> <!--O By doing this, you will produce an audio CD which has a 2 seconds of pause between audio tracks. One notable format not directly readable by cdrecord is MPEG Layer 3. To convert files in this format to the CDR-format, you can use the command "mpg123 -\-cdr - track1.mp3 > track1.cdr". The option -\-cdr ensures the track is encoded in the required format (see above). Older versions of mpg123 require -s instead of the plain - to write to stdout. The other direction (converting from WAV to MPEG) can be done with LAME for WAV-files (extract the track with cdda2wav from the audio CD and encode it into MP3 with the help of LAME). --> こうすれば、各曲の間に 2 秒ずつ間をあけたオーディオ CD を作れます。 cdrecord が直接読めない重要なファイルフォーマットの一つが MPEG Layer 3 です。 このフォーマットを CD-R フォーマットに変換するには、 ``mpg123 --cdr - track1.mp3 > track1.cdr'' としてください。 --cdr オプションで、エンコードしたいフォーマットを指定します(上記参照)。 古いバージョンの mpg123 だと、標準出力に出すには、 ただの - でなく -s オプションを付けます。 逆方向の変換 (WAV を MPEG にする) には、 WAV ファイルを LAME で処理してください。 <!--O To create a CD-R from a whole bunch of MP3-files, you can use the following command sequence: --> 多数の MP3 ファイルからまとめて CD-R を作るには、 以下のコマンド列を使います: <tscreen><verb> for I in *.mp3 do mpg123 --cdr - "$I" | cdrecord -audio -pad -nofix - done cdrecord -fix </verb></tscreen> <!-- Depending on the speed of your machine, you may want to slow down writing to "speed=1" (cdrecord option). If you use "speed=4", your machine must be able to play the MP3-file at quadruple speed. mpg123 consumes much CPU-time! If you are in doubt, try an empty run with -dummy (keeps the laser switched off). --> マシンの速度によっては、書き込み速度を ``speed=1'' (cdrecord のオプション) に落とす方がよいかもしれません。``speed=4'' を使うと、マシンは MP3 ファイルを 4 倍速で演奏できなければなりません。mpg123 は CPU 時間 を大量に消費します! どうすべきか分からなければ、-dummy コマンド (レーザーのスイッチを切ったままにする) を指定して cdrecord をカラ実行してください。 <sect2>DAO <p> <!-- If you want to get rid of the pauses between the audio tracks, you have to use disk-at-once (DAO) recording versus the (individual) track-at-once (TAO) recording described above. Support for DAO is currently most advanced in cdrdao. Please see its homepage for details. --> オーディオトラック間の無音部分をなくしたければ、disk-at-once (DAO) 書き込みを使わなければなりません。これは既に説明した(トラックを一つずつ焼く) track-at-once (TAO) 録音の反対です。DAO のサポートは現在 cdrdao が最も進んでいます。詳しくは cdrdao のホームページを見てください。 <!--O If you master the CD in DAO mode, then you use a monolithic image (sound file) and control track information with a configuration file. --> DAO モードで CD マスターを作るなら、 単一のイメージ (音声ファイル) にし、 設定ファイルでコントロール・トラック情報を与えてください。 <tscreen><verb> CD_DA TRACK AUDIO FILE "live.wav" 0 5:0:0 INDEX 3:0:0 TRACK AUDIO FILE "live.wav" 5:0:0 5:0:0 TRACK AUDIO FILE "live.wav" 10:0:0 5:0:0 INDEX 2:0:0 </verb></tscreen> <!-- <sect1>Mixed mode CD-ROMs --> <sect1>混合モードの CD-ROM <p> <!--O There is not much to say about this topic. Just indicate the type of the (subse quent) images with the options -data and -audio. Example: --> この話題については書くことはあまりありません。-data オプションや -audio オプションを使って、(後に続く)イメージの種類を指定するだけです。 例を以下に示します: <tscreen><verb> cdrecord -v dev=0,6,0 -data cd_image -audio track*.cdr </verb></tscreen> <!-- <sect>Dear Winfried,... --> <sect>親愛なる Winfried へ... <p> <!-- This is the section usually known as "frequently asked questions with answers". If you have a problem with your partner, kids or dog, just send it in, as long as it is related to writing CD-Rs or is otherwise entertaining. --> この章はいわゆる「良く聞かれる質問とその答え(FAQ)」です。 CD-R に関わる話なら、いや単に面白いだけの話であっても、奥さんや子供や 飼い犬がどうしたこうしたということでも構いませんから、送ってください。 <!-- <sect1>How sensitive is the burning process? --> <sect1>焼き付けとはどれくらい厳しい処理なんでしょうか? <p> <!-- Test it. Use the option -dummy to do an empty run of cdrecord. Do everything you would do otherwise and watch if the burning process survives. --> 実際に試してください。cdrecord の -dummy オプションを使って カラ焼きをします。同時に他の考え付く処理を全て実行し、 CD を焼く処理が生き残るかどうかを見てみましょう。 <!-- If you feed cdrecord directly from mkisofs, then disk intensive processes such as updating the <it>locate</it> database lower the maximum flow rate and may corrupt the CD. You better check such processes are not started via <tt>cron</tt>, <tt>at</tt> or <tt>anacron</tt> while you burn CD-Rs on older machines. --> mkisofs から直接 cdrecord にデータを送る場合には、<it>locate</it> データベースの更新などのディスクに負荷をかける処理によって 最大フローレートが小さくなってしまい、CD を焼き損ねることがあります。 古いマシンでは、CD-R を焼いている最中に <tt>cron</tt>, <tt>at</tt>, <tt>anacron</tt> がこういったプロセスを起動しないように確認しておくべきでしょう。 <!-- <sect1>Has file fragmentation a bad impact on the throughput? --> <sect1>ファイルの断片化で性能に悪影響が出ますか? <p> <!-- Fragmentation of files is usually so low that its impact isn't noticed. However, you can easily construct pathological cases of fragmentation, which lower the throughput of your hard disks under 100 kbytes/second. So don't do that. :-) --> ファイルの断片化は通常は小さいので、気付かない程度の影響しかありません。 しかし、断片化のせいで異常な状態になることもままあります。この場合、 ハードディスクのスループットは 100 kB/秒以下になります。 ですから、そんなことをしてはいけません :-) <!-- Yes, files on a hard disk get fragmented over the years. The faster, the fuller the filesystem is. Always leave 10% or 20% free space, and you should run fine with respect to writing CD-Rs. --> もちろん、何年も使っているとハードディスク上のファイルは断片化してきます。 ファイルシステムがいっぱいになっていると断片化も早くなります。常に 10% から 20% の空き容量を残していれば、CD-R についてはうまく動作するはずです。 <!-- If you're uncertain then look at the messages printed while booting. The percentage of fragmentation is reported while checking the filesystems. You can check for this value with the very dangerous command --> 不安であれば、起動時に出力されるメッセージを見ましょう。 断片化のパーセンテージがファイルシステムのチェックの時に出力されます。 以下の危険なコマンドを使ってこの値をチェックすることができます: <!-- <tscreen><verb> shell> e2fsck -n /dev/sda5 # '-n' is important! [stuff deleted -- ignore any errors] /dev/sda5: 73/12288 files (12.3% non-contiguous) </verb></tscreen> --> <tscreen><verb> shell> e2fsck -n /dev/sda5 # '-n' が重要! [途中は省略 -- エラーが出ても無視してください] /dev/sda5: 73/12288 files (12.3% non-contiguous) </verb></tscreen> <!-- In this example the fragmentation seems to be very high -- but there are only 73 very small files on the filesystem. So the value is <it>not</it> alarming. --> この例ではファイルの断片化がかなり多くなっているように見えますが、 このファイルシステム上には、非常に小さいファイルがたったの 73 個あるだ けです。したがって、断片化の率は特に気にするほどでは<it>ありません</it>。 <!-- There is an experimental utility called e2defrag to defragment extended-2 filesystems. The current version does not work reliable enough to use it even for private environments. If you really want to defragment your filesystem, make a backup copy (better: two copies), practice restoring the data, then create a new filesystem (that will destroy the old) and restore the data. This sketch is currently the safest technique. --> ext2 ファイルシステムのデフラグ(断片化をなくす)のための e2defrag という実験的なツールがあります。 現在のバージョンは、仮に個人的な環境で使うだけとしても、 信頼性が十分ではありません。本当にファイルシステムのデフラグ を行いたいのなら、ファイルシステムのバックアップを取り(できれば 2 つ)、 このデータの書き戻しの練習を行った上で、新しいファイルシステムを作成し (これにより古いファイルシステムは消えます)、データを書き戻してください。 これが現時点で最も安全な方法です。 <!-- <sect1>Is it possible to store the CD-image on an UMSDOS-filesystem? --> <sect1>UMSDOS ファイルシステム上に CD イメージを置けますか? <p> <!-- Yes. The only filesystem that isn't reliable and fast enough for writing CD-ROMs from is the <it>network filesystem</it> (<it>NFS</it>). --> できます。信頼性が低く、CD-ROM の書き込みのための速度も 不十分なファイルシステムは<it>NFS</it>(<it>network filesystem</it>)だけです。 <!-- I used UMSDOS myself to share the disk-space between Linux and DOS/Win on a PC (486/66) dedicated for writing CD-ROMs. --> 筆者自身は CD-ROM 作成専用の PC(486/66)でUMSDOS を使い、 Linux と DOS/Windows でディスクの共有をしています。 <!-- <sect1>Isn't there some way to get around the ISO-9660 limitations? --> <sect1>ISO 9660 の制限を回避する方法は何かありますか? <p> <!-- Yes. You can put any filesystem you like on the CD. But other operating systems than Linux won't be able to deal with this CD. --> できます。好きなファイルシステムを CD 上に作ることができます。ただし、 Linux 以外のオペレーティングシステムではこの CD は扱えないでしょう。 <!-- Here goes the recipe: --> 手順を以下に示します: <itemize> <!-- <item>Create an empty file of 650MB size. --> <item>サイズが 650MB の空のファイルを作成します。 <tscreen><verb> dd if=/dev/zero of="empty_file" bs=1024k count=650 </verb></tscreen> <!-- <item>Create an extended-2 filesystem on this file --> <item>このファイル上に ext2 ファイルシステムを作成します。 <tscreen><verb> shell> /sbin/mke2fs -b 2048 empty_file empty_file is not a block special device. Proceed anyway? (y,n) y </verb></tscreen> <!-- <item>Mount this empty file through the loopback devices (you need a reasonable new mount for this; read above). --> <item>ループバックデバイスを使って、この空のファイルをマウントします (十分に新しい mount コマンドが必要です。前述の説明を見てください)。 <tscreen><verb> mount -t ext2 -o loop=/dev/loop1 empty_file /mnt </verb></tscreen> <!-- <item>Copy files to /mnt and umount it afterwards. --> <item>ファイルを /mnt にコピーし、その後でアンマウントします <!-- <item>Use <tt>cdrecord</tt> on empty_file (which is no longer empty) as if it were an ISO-9660-image. --> <item>(もう空ではない)empty_file を ISO 9660 イメージと同じように扱って <tt>cdrecord</tt> を実行します。 </itemize> <!-- If you want to make an entry in <tt>/etc/fstab</tt> for such a CD, then disable the checking of the device file on system startup. For example: --> このような CD に対して <tt>/etc/fstab</tt> のエントリを作りたければ、 システム起動時のデバイスのファイルのチェックを無効にしてください。 以下に例を示します: <tscreen><verb> /dev/cdrom /cdrom ext2 defaults,ro 0 0 </verb></tscreen> <!-- The first 0 means "don't include in dumps" (backup), the second (=important) one means "don't check for errors on startup" (fsck would fail to check the CD for errors). --> 最初の 0 は「dump の対象にしない」(バックアップ対象にしない)という意味です。 2 番目の 0 (こちらが重要) は「起動時にエラーのチェックをしない」という意味です (この CD のエラーを調べると fsck は失敗します)。 <!-- <sect1>How to read the tracks from audio CDs? --> <sect1>オーディオ CD からトラックを読み出す方法は? <p> <!-- There are several software packages available. The newest one is "cdpranoia" and can be downloaded from --> これを行うためのソフトウェアがいくつかあります。最新のものは ``cdparanoia'' であり、以下の場所からダウンロードできます: <quote> <url url="http://www.xiph.org/paranoia/"><p> </quote> <!-- Or you want to try the combination of "cdda2wav" and "sox", available from sunsite and its mirrors: --> これ以外にも、``cdda2wav'' と ``sox'' を組み合わせて使うこともできます。 これらのソフトウェアは sunsite とそのミラーサイトから入手できます: <quote> <url url="ftp://sunsite.unc.edu/pub/Linux/apps/sound/cdrom/cdda2wav0.71.src.tar.gz"><p> <url url="ftp://sunsite.unc.edu/pub/Linux/apps/sound/convert/sox-11gamma-cb3.tar.gz"> </quote> <!-- <tt>cdda2wav</tt> enables you to get a specific interval (or a whole track) from your audio CD and converts it into a .wav-file. <tt>sox</tt> converts the WAV files back into the (audio CD) cdda-format so it can be written to the CD-R using <tt>cdrecord</tt>. You don't necessarily need <tt>sox</tt> if you use a recent version of <tt>cdrecord</tt>, because it has built-in support for .au and .wav files. --> <tt>cdda2wav</tt> を使うと、オーディオ CD から特定の区間 (あるいはトラック全体) を取り出して、 これを .wav ファイルに変換することができます。 <tt>sox</tt> は、<tt>cdrecord</tt> を使って CD-R を焼けるように wav ファイルを (オーディオ CD の) cdda フォーマットに戻します。 最近のバージョンの <tt>cdrecord</tt> を使っているならば <tt>sox</tt> は必要ありません。 というのも、これは .au, .wav ファイルに対応しているからです。 <!-- <sect1>How to probe for SCSI devices after boot? --> <sect1>起動後に SCSI デバイスを検出する方法は? <p> <!-- The file <tt>drivers/scsi/scsi.c</tt> contains the information --> <tt>drivers/scsi/scsi.c</tt> ファイルに以下の情報が載っています: <!-- <tscreen><verb> /* * Usage: echo "scsi add-single-device 0 1 2 3" >/proc/scsi/scsi * with "0 1 2 3" replaced by your "Host Channel Id Lun". * Consider this feature BETA. * CAUTION: This is not for hotplugging your peripherals. As * SCSI was not designed for this you could damage your * hardware ! * However perhaps it is legal to switch on an * already connected device. It is perhaps not * guaranteed this device doesn't corrupt an ongoing data transfer. */ </verb></tscreen> --> <tscreen><verb> /* * 使用法: echo "scsi add-single-device 0 1 2 3" >/proc/scsi/scsi * ここで "0 1 2 3" は実際の "ホスト チャネル ID LUN" に置き換えます。 * この機能はベータ版であると思ってください。 * 注意: これは周辺機器の活線抜挿のための機能ではありません。SCSI * 自体がそのように設計されていないため、ハードウェアを壊してしま * うことがあります! * しかし、既に接続されているデバイスの電源を入れるのは問題ないと思い * ます。このデバイスが転送中のデータを壊さないことの保証は多分できま * せん。 */ </verb></tscreen> <!-- Please note that this should only be used if your add SCSI devices to the end of the chain. Inserting new SCSI devices into an existing chain disturbs the naming of devices (directory /dev) and may destroy the complete content of your hard disk. --> これを使うべきなのは SCSI デバイスがチェーンの最後にある場合だけである 点に注意してください。新しい SCSI デバイスを既にあるチェーンに入れると、 デバイスの名前付け(/dev ディレクトリ)が狂ってしまい、ハードディスクの 内容が全部壊れてしまうかもしれません。 <!--O Some kernel versions do not like re-scanning the SCSI bus at all and your system may freeze solid when trying out the above. You have been warned. --> カーネルのバージョンによっては、SCSI バスの再スキャンを嫌うものもあります。 上にある操作を行うと、システムが固まってしまいます。 はい、警告はしましたからね! <!-- <sect1>Is it possible to make a 1:1 copy of a data CD? --> <sect1>データ CD をまるごとコピーすることはできますか? <p> <!-- 以下 FIXME なところは原文ママ (morimoto) --> <!-- FIXME: this is highly unclear --> <!-- FIXME: add this The correct answer is yes and no. Yes, you can make a 1:1 copy of an ISO data image. You cannot make a 1:1 copy if there is any copy-protection in the means of subcode data - - at least, not without a drive that can do MMC-DAO-Raw-Writing. Many Plextors can do this. Yamahas can't. --> <!-- FIXME: add this: cdrdao copy - -source-device 0,2,0 - -device 0,5,0 - -buffers 64 --> <!-- Yes. But you should be aware of the fact that any errors while reading the original (due to dust or scratches) will result in a defective copy. --> できます。ただし、オリジナルの読み取り中に (ホコリや傷のために) エラーが 起きると、壊れたコピーができる点には注意してください。 <!-- Please note that both methods will fail on audio CDs! You have to use cdrdao or cdda2wav on audio CDs. --> 以下に説明するどちらの方法もオーディオ CD だと失敗するので注意! オーディオ CD では cdrdao か cdda2wav を使わなければなりません。 <!-- First case: you have a CD-writer and a separate CD-ROM drive. By issuing the command --> 例 1: CD ライタおよび、それとは別の CD-ROM を持っているものとします。 以下のコマンドを実行することにより、<tt>/dev/scd0</tt> に接続した CD-ROM ドライブからデータを読み取って、これを直接 CD ライタに書き込む ことができます: <tscreen><verb> cdrecord -v dev=0,6,0 speed=2 -isosize /dev/scd0 </verb></tscreen> <!-- you read the data stream from the CD-ROM drive attached as <tt>/dev/scd0</tt> and write it directly to the CD-writer. --> <!-- Second case: you don't have a separate CD-ROM drive. In this case you have to use the CD-writer to read out the CD-ROM first: --> 例 2: 別に使える CD-ROM ドライブが無いものとします。この場合にはまず、 CD ライタを使って CD-ROM を読み出します: <tscreen><verb> dd if=/dev/scd0 of=cdimage </verb></tscreen> <!-- This command reads the content of the CD-ROM from the device /dev/scd0 and writes it into the file "cdimage". The contents of this file are equivalent to what <tt>mkisofs</tt> produces, so you can proceed as described earlier in this document (which is to take the file cdimage as input for cdrecord). If you want to see a progress-meter and other fancy stuff, then you can also use Joerg Schillings <tt>sdd</tt>. --> このコマンドは CD-ROM の内容を /dev/scd0 から読み取り、これをファイル ``cdimage'' に書き込みます。このファイルの内容は <tt>mkisofs</tt> が作る ものに相当するので、この文書の前の方で述べたように処理を進めることが できます (ファイル cdimage を cdrecord の入力とします)。進行状況表示や その他の凝った表示が見たければ、Jöerg Schillings さん作の <tt>sdd</tt> を使ってください。 <!-- In case you run into errors, then install a recent version of cdrecord, which ships a tool called "readcd" (found under misc/). It gives you the same result as dd, but reads sectors on the CD-ROM several times in case of errors. --> エラーに出会った場合には、最新版の cdrecord をインストールしてください。 これには ``readcd'' というツールが入っています (misc/ ディレクトリにあります)。 このツールでは dd と同じ結果が得られますが、 エラーの場合には CD-ROM のセクタを複数回読み込みます。 <!-- <sect1>Can Linux read Joliet CD-ROMs? (obsolete answer) --> <sect1>Linux で Joliet 形式の CD-ROM は読めますか? (古いお答え) <p> <!-- Yes. Newer Kernels (2.0.36 and the upcoming 2.2) have built-in support for the joliet format. Remember you have to use both options in your /etc/fstab: the keywords iso9660 and joliet (later is really an extension). For more details, see <url url="http://www-plateau.cs.berkeley.edu/people/chaffee/joliet.html">. --> 読めます。新しいカーネル(2.0.36 と 2.2 系列)には、 Joliet 形式のサポートが組み込まれています。 /etc/fstab には iso9660 と joliet の両方の オプションを指定しなければならない点に注意してください (joliet は実際には拡張です)。詳しくは <url url="http://www-plateau.cs.berkeley.edu/people/chaffee/joliet.html"> を見てください。 <!-- <sect1>How do I read/mount CD-ROMs with the CD-writer? --> <sect1>CD ライタを使って CD-ROM の読み取りやマウントをする方法は? <p> <!-- Just as you do with regular CD-ROM drives. No tricks at all. Note that you have to use the scd devices (SCSI CD-ROM) to mount CD-ROMs for reading, even if you have an ATAPI CD-ROM (remember you configured your ATAPI devices to act like SCSI). Example entry for /etc/fstab: --> 普通の CD-ROM ドライブと同じようにします。変わったことは全くありません。 ただし、ATAPI CD-ROM を使っていても、読み取りのために CD-ROM をマウントするには scd デバイス (SCSI CD-ROM) を使わなければならない点に注意 (ATAPI デバイスが SCSI のように動作する設定にしたことを思い出してください)。 /etc/fstab の設定例を以下に示します: <tscreen><verb> /dev/scd0 /cdrom iso9660 ro,user,noauto 0 0 </verb></tscreen> <!-- <sect1>How to put even more data on the CD-R? --> <sect1>CD-R にもっとたくさんのデータを詰め込むには? <p> <!-- Use <tt>bzip2</tt> instead of any other compressor like <tt>gzip</tt> or <tt>pkzip</tt>. It will save you up to 30% of disk-space for larger (>100kb) files. You can download it from --> <tt>gzip</tt> や <tt>pkzip</tt> のような圧縮プログラムでなく、 <tt>bzip2</tt> を使いましょう。これを使えば、大きい(>100kB)ファイルで 30% 程度のディスク容量を節約できるでしょう。<tt>bzip2</tt> は以下の 場所からダウンロードできます: <quote> <url url="http://www.muraroa.demon.co.uk/"><p> </quote> <!-- 下パラグラフは原文でもコメント (morimoto) --> <!-- FIXME: add this If you're storing images, such as JPEGS, many people set the quality factor of the JPEG much higher than needed. This produces larger than necessary files for only a marginally better image. By reducing the quality down to about 75% from 95%, you can gain 40 to 50% more space. The difference in image clarity will be negligible. If an image was created with a high quality value, it can be changed by using the command: djpeg infile.jpg | cjpeg -smooth 5 -quality 75 -output outfile.jpg --> <!-- Instead of writing a true audio CD, you can optionally convert your WAV audio files into MP3 audio files and store them on a ISO-9660 filesystem as regular files. Usually MPEG III give you a compression of 1:10. Of course, most CD-players are not able to read files... this is the drawback. On the other hand, why not running the music for your next party from hard disk? 18 Gbytes are enough for 3000-4000 titles. :-) --> 普通のオーディオ CD を焼く代わりに、wav 形式のオーディオファイルを mp3 形式のオーディオファイルに変換し、普通のファイル同様に ISO 9660 ファイルシステムに置く方法もあります。mp3 の圧縮率は通常 1:10 程度です。 もちろん、普通の CD プレイヤーではこのファイルを読むことはできません… これが欠点です。でも、今度のパーティーではハードディスクから 音楽をかけることにしたっていいでしょう? 18G バイト程度ディスクがあれば、3000〜4000 曲はかけられますよ :-) <!-- A software MPEG III-encoder is available from --> ソフトウェア MP3 エンコーダは以下のところから手に入ります: <quote> <url url="http://www.sulaco.org/mp3/"><p> </quote> <!-- A MPEG III-player is available from --> MP3 プレイヤーは以下の場所から入手できます: <quote> <url url="http://www.mpg123.org/"><p> </quote> <!-- For recorded speech, you may want to try to reduce its size using <tt>shorten</tt> or "GSM lossy speech compression": --> スピーチを録音するには、<tt>shorten</tt> や ``GSM lossy speech compression'' を使ってサイズを小さくするといいでしょう: <quote> <url url="ftp://svr-ftp.eng.cam.ac.uk/pub/comp.speech/"><p> <url url="http://kbs.cs.tu-berlin.de/˜jutta/toast.html"><p> </quote> <!-- <sect1>How to make bootable CD-ROMs? --> <sect1>起動可能な CD-ROM を作る方法は? <p> <!-- You must have an 1.44 MB bootable floppy-disk. Create an exact image of this floppy-disk by issuing the command --> 作成を行うには 1.44MB の起動可能なフロッピーディスクが必要です。 以下のコマンドを実行して、このフロッピーディスクの正確なイメージを 作りましょう: <tscreen><verb> dd if=/dev/fd0 of=boot.img bs=18k </verb></tscreen> <!-- Place this floppy image into the directory holding the collection of your files (or into a subdirectory of it, just as you like). Tell mkisofs about this file with the option '-b' and also use '-c'. For details read the file README.eltorito in the mkisofs-distribution. --> このフロッピーイメージを、CD に焼くファイルを置いているディレクトリ (あるいはそのサブディレクトリ。好きなようにしてかまいません) に置きます。 mkisofs に対して `-b' オプションでこのファイルを指定し、 また `-c' オプションを指定します。 詳しくは mkisofs のパッケージに入っている README.eltorito を読んでください。 <!-- An interesting application for a custom bootable CD is as a virus safe DOS- or Windows-system. It saves you the money for the hard disks (if you have a network and use samba to put the user-data on a file server). The German computer magazine c't has a article about this issue in the issue 11/99, page 206 (<url url="http://www.heise.de/">). --> 独自に作成した起動可能 CD の面白い使い道としては、ウィルスに対して安全な DOS/Windows システムがあります。(ネットワークが利用でき、 samba を使ってユーザのデータを置けるファイルサーバがあれば) ハードディスクを買うためのお金も節約できます。 ドイツのコンピュータ雑誌 c't の 1999 年 11 月 号の 206 ページ (<url url="http://www.heise.de/">) には、これに関する記事が掲載されています。 <!-- Some details about the bootable RedHat CD-ROM is available from <url url="http://members.bellatlantic.net/~smithrod/rhjol-technical.html">. --> 起動可能な RedHat CD-ROM に関する詳しい情報は <url url="http://members.bellatlantic.net/˜smithrod/rhjol-technical.html"> にあります。 <!-- <sect1>How to make CD-ROMs writable like a hard disk? --> <sect1>ハードディスクみたいに書き込みができる CD-ROM を作るには? <p> <!-- There is an <it>overlay filesystem</it> available for Linux, which is mounted over the CD-ROM and intercepts all writing operations. New and modified files are stored elsewhere, but for the user it looks like the CD-ROM is modified. For more information, see <url url="http://home.att.net/~artnaseef/ovlfs/ovlfs.html">. --> Linux では <it>オーバーレイファイルシステム (overlay filesystem)</it> が使えます。これは CD-ROM の上にマウントし、 全ての書き込み操作に割り込むというものです。 新しいファイルや修正されたファイルは別の場所に保存されますが、 ユーザには CD-ROM 上のファイルが変更されたように見えます。 詳しい情報については <url url="http://home.att.net/˜artnaseef/ovlfs/ovlfs.html"> をご覧ください。 <!-- If that is not enough for your needs: wait for the UDF-filesystem to be supported by Linux or help developing it (see <url url="http://trylinux.com/projects/udf/">. At the moment only reading of CD-media is supported due to a limitation in the CD-ROM drivers of the Linux kernel. --> これで要求が満たせなければ、Linux が UDF ファイルシステムをサポート するのを待つか、その開発に参加しましょう (<url url="http://trylinux.com/projects/udf/"> を見てください)。 Linux カーネルの CD-ROM ドライバの制限のため、 今のところは CD メディアからの読み出しだけがサポートされています。 <!-- <sect1>Is it possible to use several writers at once? --> <sect1>複数個の CD ライタを同時に使うことはできますか? <p> <!-- Yes. It is reported to work with at least 3 writers at full speed (6x) on a PC with 233 Mhz and a single SCSI bus running kernel 2.2.12. You need either a recent version of the Linux kernel (2.2.12 or higher). --> できます。少なくとも、kernel 2.2.12 が走るシングル SCSI バスで 233 MHz の PC の上で 3 つのライタがフルスピード (6x) で動いたとの報告があります。 最近のバージョンの Linux カーネル(2.2.12 以降)が必要です。 <!-- 原文でもコメント (morimoto) --> <!-- or a a kernel patch to get enough buffers in the SCSI generic driver (<url url="ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/alpha">; works up to 2.2.5). --> <!-- <sect1>What about Solaris, *BSD, AIX, HP-UX, etc.? <sect1>What about Solaris, *BSD, AIX, HP-UX, etc.? Is my variant of Unix supported? --> <sect1>Solaris, *BSD, AIX, HP-UX 等についてはどうでしょう? ぼくの使っている UNIX 系 OS はどうですか? <p> <!-- Only chapter 2 is Linux-specific. You can apply chapter 3 and 4 even if you run another family of operating systems than Linux. Please see the files README.NetBSD, README.aix, README.hpux, README.next, README.solaris, README.sunos, README.vms or README.xxxBSD from the cdrecord-distribution. --> Linux に特化した説明は第 2 節だけです。3 節と 4 節の内容は Linux 以外の オペレーティングシステムでも使えます。詳しくは cdrecord のパッケージに 入っている README.NetBSD, README.aix, README.hpux, README.next, README.solaris, README.sunos, README.vms, README.xxxBSD ファイルを見て ください。 <!--O Probably yes. Compile cdrecord for your platform and issue the command "cdrecord -scanbus". Read the README.* file for your Unix distributed with the sources of cdrecord. However, not all variants of Unix can read the RockRidge, Joliet or HFS extensions on your newly written CD-R. --> たぶん yes です。お持ちのプラットフォームで cdrecord をコンパイルし、 ``cdrecord -scanbus'' コマンドを実行してみます。 cdrecord ソースについてくる README.* ファイルのうち、 その UNIX 向けのものを読んでください。 とはいうものの、全ての UNIX 系 OS で、 新規に焼いた CD-R の RockRidge, Joliet, HFS 拡張を読めるというわけでは ありません。 <!-- <sect1>Where to store the local configuration permanently? --> <sect1>ローカルの設定をずっと保存しておく場所は? <p> <!-- You have two options. Either you use the built-in configuration file for cdrecord, or you use a shell wrapper like the one shown below. This shell script reads a configuration file, which lists the options and parameters for cdrecord line by line. The names are exactly the same as on the commandline, but without the leading dash. Comments are allowed. Example: --> 方法は 2 つあります。すなわち cdrecord の組み込み設定ファイルを使う方法と、 以下に示すようなシェルによるラッパーを使う方法です。 このシェルスクリプトは設定ファイルを読み込みます。 設定ファイルには cdrecord に対するオプションとパラメータを 一行ずつ書いておきます。オプション名はコマンドラインで指定する時と 同じですが、先頭のダッシュ(`-')がありません。 コメントを使うこともできます。例: <!-- <tscreen><verb> # be verbose v # set the speed of the writer speed=2 # the device-coordinates in the form BUS,ID,LUN dev=0,6,0 </verb></tscreen> --> <tscreen><verb> # 詳しい表示を行う v # CD ライタの速度を設定する speed=2 # SCSI 上のデバイスの位置を バス、ID, LUN の形式で指定する dev=0,6,0 </verb></tscreen> <!-- The configuration files for the wrapper belong into /etc/cdrecord/ and must be referenced on the commandline. Example: if you want to refer to the configuration /etc/cdrecord/mywriter.cfg, then you can issue the command "cdrecord.sh mywriter.cfg -audio track1...". Everything after mywrite.cfg is passed to cdrecord. --> ラッパーに対する設定ファイルは /etc/cdrecord/ に置き、コマンドラインで 指定しなければなりません。例: 設定ファイル /etc/cdrecord/mywriter.cfg を参照したければ、``cdrecord.sh mywriter.cfg -audio track1...'' という コマンドを実行します。mywrite.cfg より後の全ての指定は cdrecord に 渡されます。 <tscreen><verb> #! /bin/bash CFGDIR="/etc/cdrecord" CFG="$1" shift ARGS_LEFT="$@" if [ ! -f "$CFGDIR/$CFG" ] then echo "Configuration file $CFGDIR/$CFG not found. Exiting." exit 1 fi while read LINE do case $LINE in \#*|"") continue;; esac old_IFS="$IFS" IFS="$IFS=" set -- $LINE IFS="$old_IFS" O_NAME="$1" O_VALUE="" while shift do case $1 in "") continue;; esac O_VALUE="$1" done if [ -z "$O_VALUE" ] then O_CDRECORD="$O_CDRECORD -$O_NAME " continue fi O_CDRECORD="$O_CDRECORD $O_NAME=$O_VALUE " done < "$CFGDIR/$CFG" set -x #DEBUG exec cdrecord $O_CDRECORD $ARGS_LEFT echo "Execution of cdrecord failed." </verb></tscreen> <!-- <sect1>How can the CD-info be retrieved? --> <sect1>どうすれば CD の情報を取り出すことができますか? <p> <!-- Somewhere behind the first 32 k on the CD, a block with information about the CD is located. You can extract the information with the following shell script: --> CD の先頭から 32kB 以降のどこかの位置には、その CD に関する情報が入った ブロックが置かれます。以下のシェルスクリプトを使うと、 この情報を読み出すことができます: <tscreen><verb> #! /bin/bash RD=/dev/cdrom for i in 32768,7 32776,32 32808,32 32958,128 33086,128 33214,128 \ 33342,128 33470,32 33581,16 33598,16 33615,16 33632,16 do old_IFS="$IFS" IFS="," set -- $i IFS="$old_IFS" OFFSET=$1 LENGTH=$2 echo "*`dd if=$RD bs=1 skip=$OFFSET count=$LENGTH 2> /dev/null`#" done </verb></tscreen> <!-- <sect1>What about re-writing --> <sect1>再書き込みに関して <p> <!-- When overwriting CD-RW media, specify the parameter blank=fast to cdrecord. That's all. See the man page of cdrecord for details about this parameter. --> CD-RW メディアの上書きを行う時には、cdrecord にパラメータ blank=fast を指定してください。それだけです。パラメータに関する細かい点については、 cdrecord のオンラインマニュアルを見てください。 <!-- <sect1>How to create a multi-session CD? --> <sect1>マルチセッション CD の作り方は? <p> <!-- First of all, the image for a multi-session CD must be formatted using the ISO-9660 filesystem using RockRidge-extensions. And you must use the option -multi for cdrecord as long as you want to add further sessions. So at least for the first session, you must specify the option -multi. --> まず最初に、マルチセッション CD 用のイメージは RockRidge 拡張を使った ISO 9660 ファイルシステムでフォーマットしなければなりません。また、 新しいセッションを付け加えたければ、cdrecord に -multi オプションを指定 しなければなりません。したがって、少なくとも最初のセッションでは -multi を指定しなければなりません。 <!--O Some CD-writers have no support for CD-ROM XA mode 2 or for session-at-once (SAO), so you need to specify the switch -data for cdrecord on the command line. --> CD-ROM XA モード 2 や session-at-once (SAO) をサポートしていない CD ライタもありますので、 cdrecord のコマンドラインには -data スイッチを付ける必要があります。 <!-- The images for the second and subsequent sessions are a little bit more complicated to generate. Mkisofs must know where the free space on the CD-R begins. That information can be gathered by using the option -msinfo on cdrecord (see example below). --> 2 番目以降のセッションのためのイメージを作るのは多少面倒です。mkisofs が CD-R の空き部分がどこかを知っていなければならないからです。この情報は、 cdrecord の -msinfo オプションを使って得ることができます (以下の例を見てください): <tscreen><verb> shell> NEXT_TRACK=`cdrecord -msinfo dev=0,6,0` shell> echo $NEXT_TRACK shell> mkisofs -R -o cd_image2 -C $NEXT_TRACK -M /dev/scd5 private_collection/ \ </verb></tscreen> <!-- For more information, please read the file README.multi, which is distributed with cdrecord. --> 詳しくは cdrecord のパッケージに入っている README.multi をご覧ください。 <!--O <sect1>Should I use the SCSI adapter shipped with the writer? --> <sect1>ライタに付いてきた SCSI アダプタを使うべきでしょうか? <p> <!--O Reported via email: Most CD-writer docs say to use a separate SCSI bus if going from a CD-ROM to a CD-writer and I have seen this myself in the following scenario: --> メールでいただいたご報告です: たいがいの CD ライタの説明書には、CD-ROM から CD ライタに焼くには、 お互い別々の SCSI バスを使えと書いてあります。私自身、 こんな羽目に会いました: <!--O Adaptec 2940UW SCSI card, a 24x SCSI CD-ROM and a 4x4 SCSI CD-writer. When I got the CD-writer, it came with its own ISA SCSI card which could only handle one device. I figured I'd toss this and use my better adaptec card for all the stuff. I noticed it was quite prone to buffer under-runs when recording at the 4x speed, but as soon as I tried hooking up the ISA SCSI card, it had no problems. I know 2 other people (both using adaptec 2940 cards), who have experienced exactely the same symptoms, usually when writing from a CD-ROM to a CD-recorder. Though I've never experienced the problem when going from a hard drive to a CD-writer on the same bus. --> Adaptec 2940UW SCSI カードと 24x SCSI CD-ROM、4x4 SCSI CD ライタという 構成で、その CD ライタには専用の ISA SCSI カードが付いていました。 ひとつのデバイスしか扱えないものです。このカードは捨てて、手持ちの、 もっといい Adaptec カードに SCSI 機器全部を賄わせようと思いました。 で、4 倍速でレコーディングしているとき非常にバッファ・アンダーラン しがちなことに気づいたのですが、ISA SCSI カードをつないでみたところ、 たちどころに問題がなくなりました。他にも 2 名の方が (お二人とも Adaptec 2940 カード使用)、 主に CD-ROM から CD レコーダに書き込みをしているときに全く 同じ現象を体験したのを知っています。同じバス上にあるハードディスクから CD ライタに書くときには、絶対にこの問題は起きなかったのですが。 <!--O <sect1>How to burn over the network? --> <sect1>ネットワーク経由で焼くには? <p> <!--O Usally a file transfer with FTP is fast enough to feed a CD-recorder at quadruple (4x) speed even over a 10 Mbit ethernet. You can couple the ftp-client and cdrecord via a fifo. First create a fifo named cdimage: --> 通常、FTP によるファイル転送は、10M ビットのイーサネット上でも、4 倍速 (4x) の CD レコーダにデータを賄うのに充分な速度があります。 ftp クライアントと cdrecord を fifo を使って組み合わせることができます。 まず、cdimage という名前で fifo を作ります: <tscreen><verb> mkfifo cdimage ftp other.host.org get cdimg cdimage </verb></tscreen> <!--O Then treat cdimage like a regular file, i.e. issue the following command: --> そして、cdimage を普通のファイルのように扱います。 例えばこんな感じのコマンドです: <tscreen><verb> cdrecord dev=0,1,0 speed=2 cdimage </verb></tscreen> <!--O Your ftp-client will notice when cdrecord wants to read from the file and will start transfering data from the ftp-host. --> cdrecord がファイルからデータを読み込もうとすると、ftp クライアントは それに気づいて、ftp 先のホストからデータを転送しはじめます。 <!--O <sect1>I get a "crack" sound at the end of the each track <sect1>I hear a crack or click sound at the end of the each track. --> <sect1>各曲の最後に「カリ」とか「プチ」と音が鳴る <p> <!--O You have to use disk-at-once mode (DAO) to get rid of the cracks. --> 音割れを回避するには、disk-at-once モード (DAO) を使わないとなりません。 <!--O <sect1>How can this be set up so that a user can burn CDs instead of always being root? --> <sect1>いちいち root にならずに CD を焼けるようにするには? <p> <!--O You can add the setuid-bit to the cdrecord-executable. However, this might be a security risk. Just setting the permissions on the device files does not help as cdrecord issues privileged commands via the SCSI generic interfaces. --> cdrecord の実行ファイルに setuid ビットを立てることもできますが、 セキュリティ上のリスクになり得ます。ともあれ、デバイスファイルの パーミッションを設定するだけでは、cdrecord は、 SCSI のジェネリックインタフェースを通して 特権コマンドを発行できるようにはならないのです。 <tscreen><verb> which cdrecord chown root.root /usr/bin/cdrecord chmod 4111 /usr/bin/cdrecord </verb></tscreen> <!--O <sect1>Where do I get the "Yellow Book" and "Orange Book" standards? --> <sect1>``Yellow Book'' や ``Orange Book'' 標準はどこで手に入りますか? <p> <!--O You get the printed specifications from Philips and they are expensive. --> 印刷された仕様が Philips から入手できますが、高価です。 <!--O <sect1>I've been searching for information on burning Video-CD under Linux. --> <sect1>Video-CD を Linux で焼くための情報を探しているんですが... <p> <!--O Here you can find utilities for creation of MPEG videos and Video-CDs: <url url="http://www.mainconcept.de/"> --> <url url="http://www.mainconcept.de/"> に MPEG ビデオや Video CD の製作ユーティリティがあります。 <url url="http://www.johanni.de/munich-vision/vcd/"> <!--O Political correct people mention the Berkeley-tools and other YUV-strategies. Their usage is complicated, takes much time and harddisk-space and gives you no audio track. I recommend to use conceptually higher level applications like the ones mentioned above. --> おカタい方々は、Berkeley 系のツールとか、 ほかの YUV 処理系のほうを出してくるでしょう。 でも、使い方は込み入っているし、処理時間もずっとかかるし、 ディスクも食うし、オーディオ・トラックは付きません。 私としては、最初に挙げたような、 概念的に高レベルのアプリケーションを使うことをおすすめしておきます。 <!--O <sect1>Which is easier to set up, IDE or SCSI. --> <sect1>IDE と SCSI、どっちのほうが設定が簡単ですか? <p> <!--O SCSI CD-writers are slightly easier to set up with regard to CD-writing under Linux. And they are reported to have better error recovery. If that outweights the higher price cannot be answered generally. --> Linux で CD を焼くということに関していえば、SCSI CD ライタのほうが多少 設定が簡単です。エラー回復もこっちのほうが優れていると報告されています。 ただ、IDE より高い値段に見合うかどうかとなると、一概には答えられません。 <!--O <sect1>How can I overburn a CD using {cdrecord,cdrdao}? --> <sect1>cdrecord や cdrdao で CD を容量オーバーして焼くことはできますか? <p> <!--O Overburning a CD-R is nothing special. It is at your own risk that the data fits on the CD-ROM, but thats all. There are no 650 Mbytes-limits in the software under Linux. --> 容量オーバーで CD-R を焼くことには、何ら特別なことはありません。データ がその CD-ROM に収まるかどうかはあなたの運次第です。それだけのことです。 Linux 上のソフトウェアに、650 メガバイトの制限はありません。 <!--O <sect1>What will cdrecord do when it stops getting input from the pipe? --> <sect1>パイプからの入力が止まったとき、cdrecord はどうするのですか? <p> <!--O It will finish writing. So you can just couple your favourite backup tool with cdrecord using a pipe, like in "bru -size=640m -f - | cdrecord dev=0,1,0 speed=2 -". You have to take special care within the backup utility if the backup spans multiple CD-Rs. --> 書き込みを終了します。だから、お気に入りのバックアップツールと cdrecord をパイプで組み合わせるだけです。 ``bru -size=640m -f - | cdrecord dev=0,1,0 speed=2 -'' といったように。 バックアップが複数枚の CD-R にまたがるような場合は、 ユーティリティに特別な注意を払わないといけません。 <!--O <sect1>Is there an equivalent to ignore=hdX for the ide-scsi emulation? --> <sect1>ide-scsi エミュレーションには、ignore=hdX と同様のオプションは ありますか? <p> <!--O I know of no way, but anybody is welcome to add this feature to the Linux kernel sources. --> これ、できないんですよ。この機能を Linux カーネルのソースに追加してく れる方、誰でも大歓迎です。 <!--O <sect1>How many times can you re-use CD-RW before they become faulty? --> <sect1>CD-RW というものは、ダメになるまで何回使い回しができるものですか? <p> <!--O Good question. --> そりゃあ、いい質問ですね。以上。 <!--O <sect1>Which format to choose for a platform independant CD-ROM. --> <sect1>プラットフォームに依存しない CD-ROM を作るなら、 どのフォーマットを選ぶべき? <p> <!--O A CD-ROM to be read by all systems can only use the plain ISO 9660 format. That means stupid 8+3 filenames from old MS-DOS and without any HFS (Macintosh), Joliet (Microsoft) or RockRidge (newer Unices) extensions. There is no extension for longer filenames, which could be read by all operating systems. --> あらゆるシステムで読める CD-ROM には、素の ISO 9660 フォーマットしか 使えません。つまり、古い MS-DOS 所以のアホな 8+3 文字のファイルネーム しか使えない、HFS (Macintosh) や Joliet (Microsoft), RockRidge (最近の各種 UNIX) といった拡張機能はだめってことです。 あらゆるオペレーティングシステムで読める、 長いファイルネームのための拡張機能は、ありません。 <!--O <sect1>Is multi-session for audio tracks possible? --> <sect1>オーディオトラックにマルチセッションは使えますか? <p> <!--O Audio CD-players are only able to deal with audio tracks stored in the first session. In other words, you cannot add audio tracks using subsequent sessions. However, writing data tracks into the second session effectively hides them from audio CD-players. This way you prevent having an silent track on your mixed mode CD (audio and data mixed). --> オーディオ CD プレイヤーは最初のセッションに記録されたオーディオトラック しか扱えません。言い換えれば、続くセッションとしてオーディオトラックを 追加することはできません。しかし、データトラックを二番目のセッション として書き込むと、オーディオ CD プレーヤーからそれを巧妙に隠すことが できます。こうすれば、ミックスモード CD (オーディオとデータを混在) に 無音のトラックを作らなくて済みます。 <!--O <sect1>What hardware resources do I need? Is an old Pentium enough? --> <sect1>どんなハードウェアが必要ですか? 古い Pentium マシンで充分? <p> <!--O An answer depends on your wishes. If you need a reason to buy a new computer, here is the answer from the international association of computer manufactures: Whatever you plan to do, you need a processor with 800 Mhz. Because it won't fit into your existing motherboard, you need a new motherboard, too. The easiest solution is just to buy the typical complete offer as seen in advertisements on TV. Please ignore the rest of this section. --> どんなことをしたいのかによって回答は異なります。 新しいコンピュータを買うための理由が欲しいというのなら、 「コンピュータ製造業者国際組織(笑)」からの返答はこうなります: 「何をするにつけても 800 MHz のプロセッサが必要です。 ただそれだと既にお持ちのマザーボードには適合しないでしょうから、 新しいマザーボードもお求めになる必要があります。 一番お手軽なやり方は、テレビのコマーシャルでご覧の通りの、 全部入りおすすめセットを素直に普通にお求めいただくことです。 そして、以下の章は無視していただけますでしょうか」 <!--O Now the case if you just want a rational answer: I wrote several CD-ROMs sucessfully using a "486" with 66 Mhz. Although MS does not consider them to be PCs anymore, but recommends to run a CE version on them (seen on the CeBIT), Linux runs even fine on the predecessors of the Pentium and is even able to write CDs. You can easily find out if the power of your hardware is sufficient for writing CD-ROMs by testing it out. Just add the command line switch -dummy when executing cdrecord and the laser will be kept off. Watch the burning process. --> まともな回答を読みたいなら、こちらです: 私は 66MHz の ``486'' マシンで何枚もの CD-ROM をちゃんと焼けました。 マイクロソフトは、もはやこのクラスのマシンを PC とは見なしておらず Windows CE をすすめてきますが (CeBIT とか見ればわかります)、 Linux なら Pentium の先輩でだってちゃんと動きますし、CD だって焼けます。 実際にテストしてみれば、お持ちのハードが CD-ROM を焼くのに充分なパワーを持っているかどうか簡単にわかります。 cdrecord を実行するときに -dummy というコマンドライン・スイッチを 付けるだけです。こうすると実際の書き込みレーザーは出ません。 やってみて、成り行きを見てみてください。 <!-- <sect>Troubleshooting --> <sect>トラブルシューティング <p> <!-- Always remember, that you can still use corrupt CD-ROMs as coasters. :-) --> 忘れないでください。焼き損ねた CD-ROM には、コースターとしての使い道が 残っています :-) <!-- <sect1>It doesn't work: under Linux --> <sect1>Linux 上で動作しません <p> <!-- Please check first, that the writer works under the software it is shipped with (=under another operating system). Concretely: --> 最初に、CD ライタが製品に付属しているソフトウェア (つまり、他のオペレーティングシステム) で動作することを確認してください。具体的には以下の項目を確認します: <itemize> <!-- <item>Does the controller recognize the writer as a SCSI device? --> <item>コントローラが CD ライタを SCSI デバイスとして認識しているか? <!-- <item>Does the driver software recognize the writer? --> <item>ドライバソフトウェアが CD ライタを認識しているか? <!-- <item>Is it possible to make a CD using the accompanied software? --> <item>付属のソフトウェアで CD を作ることができるか? </itemize> <!-- If "it doesn't even work" with the accompanied software you have a hardware conflict or defective hardware. If it works and you use loadlin to boot Linux, then that is a problem with loadlin. Loadlin makes a warm-boot with most of the hardware already initialized and that can confuse the Linux kernel. --> 付属のソフトウェアを使って「それでも動かない」というのであれば、 ハードウェアのリソースの衝突かハードウェアの欠陥でしょう。これで動作して、 かつ Linux の起動に loadlin を使っているのであれば、loadlin の問題です。 loadlin はハードウェアの大部分が既に初期化された状態でウォームブートを 行うので、Linux カーネルを混乱させることがあります。 <!-- <sect1>Error-message: No read access for 'dev=0,6,0'. --> <sect1>No read access for 'dev=0,6,0' というエラーが出る <p> <!-- Under Linux, some versions of the C-library are incompatible (buggy), so that an application linked against one version will not work with another. An example for an error triggered by pre-compiled binaries is the following: --> Linux では、一部のバージョンの C ライブラリは不完全です(バグがある)。 したがって、あるバージョンの C ライブラリとリンクしたアプリケーション はライブラリのバージョンが変わると動作しないことがあります。コンパイル 済みのバイナリが起こすエラーの例を以下に示します: <tscreen><verb> [root@Blue /dev]# cdrecord -eject dev=0,6,0 cdrecord: No such file or directory. No read access for 'dev=0,6,0'. </verb></tscreen> <!--O The solution is to install a newer C-library. --> 解決方法は、新しい C ライブラリをインストールすることですな。 <!-- <sect1>It doesn't work: under DOS and friends --> <sect1>DOS とその仲間の OS で動作しません <p> <!-- Try to use Linux. Installation and configuration of SCSI drivers for DOS is the hell. Linux is too complicated? Ha! --> Linux を試してください。DOS でやる SCSI ドライバのインストールと設定は 最悪です。Linux が複雑すぎる? 冗談でしょ! <!-- <sect1>SCSI errors during the burning phase --> <sect1>書き込みの際に SCSI エラーが起こる <p> <!-- Most likely those errors are caused by --> このエラーは主に以下のような原因で起こります: <itemize> <!-- <item>missing dis-/reconnect feature on the SCSI bus --> <item>SCSI バスに切断/再接続の機能が無い <!-- <item>insufficiently cooled hardware --> <item>ハードウェアの冷却が十分でない <!-- <item>defective hardware (should be detected by 5.1.) --> <item>ハードウェアに欠陥がある(5.1 節の方法で見つけられるはずです) </itemize> <!-- Under various circumstances SCSI devices dis- and reconnect themselves (electronically) from the SCSI bus. If this feature is not available (check controller and kernel parameters) some writers run into trouble during burning or fixating the CD-R. --> さまざまな環境で、SCSI デバイスは自分自身を SCSI バスと(電気的に)切断・ 再接続します。この機能が使えなければ(SCSI コントローラとカーネルの パラメータを確認してください)、CD ライタによっては CD-R の焼き付けと 固着の際に問題が起きることがあります。 <!-- Especially the NCR 53c7,8xx SCSI driver has the feature disabled by default, so you might want to check it first: --> 特に NCR 53c7,8xx SCSI ドライバではこの機能がデフォルトで無効になって いるので、以下の項目を最初にチェックすると良いでしょう: <tscreen><verb> NCR53c7,8xx SCSI support [N/y/m/?] y always negotiate synchronous transfers [N/y/?] (NEW) n allow FAST-SCSI [10MHz] [N/y/?] (NEW) y allow DISCONNECT [N/y/?] (NEW) y </verb></tscreen> <!--O <sect1>Medium errors --> <sect1>メディア・エラー <!--O If cdrecord reports medium errors in the form of "Sense Key: ... Medium Error, Segment ...", then the medium is not empty. If you use CD-RW, then try to switch from blank=fast to the more reliable blank=all. If you use CD-R only, then make sure the CD-R has never seen a CD-writer before or try out discs from another manufacturer. --> もし cdrecord が ``Sense Key: ... Medium Error, Segment ...'' といった感じでメディア・エラーを報告してきたら、 そのメディアは空ではありません。CD-RW を使っている場合なら、 blank=fast を、より信頼できる blank=all に代えてみてください。 CD-R しか使っていない場合は、その CD-R が本当に未使用かどうかチェックする、 ないしは他のメーカーの CD-R メディアを試してみてください。 <!--O <sect1>Newly written CDs are not readable on some players. --> <sect1>新しく焼いた CD を演奏できない CD プレイヤーがある <p> <!--O Some people reported problems with playing their self-written CDs. Very old audio players or car devices can have problems with CD-Rs, although this is extremly rare. Quite frequent are problems with CD-RWs, because they don't reflect the laserlight as good as CD-Rs and factory-pressed "silver" discs. --> 自分で焼いた CD の再生に関して問題があると報告してくれた人たちがいます。 とても古いオーディオ CD プレイヤーや車載 CD プレイヤーなら CD-R の演奏 に問題が生じるものがありますが、極めて稀です。むしろ、よくありがちな問題は CD-RW に関するものです。CD-RW は、CD-R や工場生産された「銀色の」 ディスクほどにはレーザー光を反射しないのが原因です。 <!-- 原文でもコメント (morimoto) --> <!-- Steve Baker Meantime, I think the CD-writer FAQ should perhaps be amended to include the advice that for HP and Philips drives, you should try cdwrite if cdrecord misbehaves. --> <!--O <sect1>My scanner stopped working after I loaded the ide-scsi module --> <sect1>ide-scsi モジュールを読み込んだあと、スキャナが動かなくなります <p> <!--O By inserting the SCSI-hostadaptor emulation, the naming of SCSI devices changes. If your scanner was /dev/sg0 before, it might be /dev/sg1 or /dev/sg2 now. Prominent kernel developers did not think this is completely braindead and denied solutions like devfs in the past. But that is another story, the first thing you should try is to set the link /dev/scanner to point to the actual generic SCSI device. Examples: --> SCSI ホストアダプタ・エミュレーションを組み込むと、 SCSI デバイスの名前が変わります。 そのスキャナが /dev/sg0 だった場合、/dev/sg1 とか /dev/sg2 になります。 さる高名なカーネル開発者は、この仕様を完璧にイカれたダメ仕様とは考えず、 過去において devfs などの解決法を拒否しました。 それはさておき、まずすべきことは、 /dev/scanner というリンクを作って、それが実際の generic SCSI デバイスを指すようにすることです。以下に例を示します。 <!--O <tscreen><verb> cd /dev ls -l scanner # shows current setting ln -sf sg2 scanner # test the scanner ln -sf sg1 scanner # test the scanner # and so on </verb></tscreen> --> <tscreen><verb> cd /dev ls -l scanner # 現在の設定を表示 ln -sf sg2 scanner # スキャナをテスト ln -sf sg1 scanner # スキャナをテスト # とか なんとか... </verb></tscreen> <!--O Application developers should carefully think about support for this dangerous and error prone naming scheme. Please consider at least to use intermediate solutions like the SCSI coordinates used by cdrecord. --> アプリケーション開発者は、 この、危険で、エラーになりやすい名称付け規則のサポートについて 熟慮する必要があります。 少なくとも、cdrecord が使っている SCSI デバイス上の位置 (coordinates) のような、 中間的な方法を検討してみてください。 <!-- 原文でもコメント (morimoto) --> <!-- "2.2.2.1. Generic SCSI devices The devicefiles /dev/sd* and /dev/sr* for accessing SCSI harddisks and SCSI CD-ROM drives are limited to block-oriented data transfer. This makes them so fast and idealy suited for data storage. Driving the laser of a CD-writer is a more complicated task and requires more than block-oriented data transfer. To keep the sd* and sr* devices clean and fast, a new type of SCSI-devices was introduced, the so called generic SCSI-devices. As everthing can be done to SCSI-hardware through the generic devices they are not fixed to a certain purpose - therefore the name generic." Your CD-writer is used as a CD-ROM through the device scd0 and is used as a writer through the device sg0. --> <!-- <sect>Credits --> <sect>謝辞 <p> <!-- Many thanks go to the readers of this HOWTO, who contributed actively to its contents. As I don't had access to a CD-writer myself for several years, reports about real live setups and experience have always been of great value to me. --> この HOWTO 文書の内容に積極的に貢献してくれた読者の方々に深く感謝します。 筆者自身は数年の間 CD ライタを使える環境になかったので、生の設定や 経験のレポートは、筆者にとってとても貴重でした。 <descrip> <tag/Doug Alcorn <doug@lathi.net>/ <!-- helped to improve the handling of newer kernels --> 新しいカーネルについての記述を改善する手助け <tag/Kalle Andersson <kalle@sslug.dk>/ <!-- How to write audio CDs directly from MP3. --> MP3 から直接オーディオ CD を焼く方法 <tag/Alan Brown <alan@manawatu.net.nz>/ <tag/Rick Cochran <rick@msc.cornell.edu>/ <!-- hint about dis-/reconnect disabled by default in the ncr driver --> デフォルトでは無効になっている、ncr ドライバの 接続切断、再接続機能に関するヒント <tag/Robert Doolittle <bob.doolittle@sun.com>/ <!-- good arguments for dropping cdwrite from the HOWTO --> cdwrite を HOWTO からなくすための良い根拠 <tag/Markus Dickebohm <m.dickebohm@uni-koeln.de>/ <tag/Thomas Duffy <tduffy@sgi.com>/ <!-- major cleanup of syntax and spelling --> 文法と綴りの大幅な修正。 <tag/Dave Forrest <dforrest@virginia.edu>/ <!--O fixed adapter spelling problems --> adapter の綴り修正。 <tag/Jos van Geffen <jos@tnj.phys.tue.nl>/ <!-- noted the problem in 4.9. --> 4.9 節の問題についての指摘 <tag/Bernhard Gubanka <beg@ipp-garching.mpg.de>/ <!-- noticed the need of a recent version of mount to utilize the loopback device --> ループバックデバイスを使うには最近のバージョンの mount コマンドが必要 なことの指摘 <tag/Stephen Harris <sweh@mpn.com>/ <!-- contributed hint about writing audio CDs --> オーディオ CD の書き込みについてのヒント <tag/Janne Himanka <shem@oyt.oulu.fi>/ <!-- pointer to kernel patch to read Joliet CD-ROMs --> Joliet CD-ROM を読むためのカーネルパッチに関するポインタ <tag/Stephan Noy <stnoy@mi.uni-koeln.de>/ <!-- information and experience about writing audio CDs --> オーディオ CD の書き込みに関する情報と経験 <tag/Don H. Olive <don@andromeda.campbellsvil.edu>/ <!-- URL of the mkhybrid tool --> mkhybrid の URL <tag/Jesper Pedersen <jews@imada.ou.dk>/ <tag/Pierre Pfister <pp@uplift.fr>/ <!-- helped to develop the recipe on 1:1 copies. --> CD をまるごとコピーする手順を作成する手伝い <tag/Daniel A. Quist <dquist@cs.nmt.edu>/ <!-- information about IDE CD-R and newer kernel versions --> IDE CD-R と新しいバージョンのカーネルに関する情報 <tag/Martti.Rahkila@hut.fi/ <!-- Reported problem with pre-initialized writers when booting via loadlin. --> loadlin を使って起動する時に既に初期化された CD ライタが起こす問題の報告 <tag/Dale Scheetz <dwarf@polaris.net>/ <tag/Joerg Schilling <schilling@fokus.gmd.de>/ <!-- many informations about cdrecord --> cdrecord に関する多くの情報 <tag/Martin Schulze <joey@Infodrom.North.DE>/ <!-- gave information about the cdwrite-mailinglist --> cdwrite メーリングリストに関する情報 <tag/Gerald C Snyder <gcsnyd@loop.com>/ <!-- tested writing of an ext2 CD-ROM (see 4.4) --> ext2 形式の CD-ROM (4.4 節を参照)の書き込みテスト <tag/Art Stone <stone@math.ubc.ca>/ <!-- had the idea to put non-ISO-9660 filesystems on a CD --> ISO 9660 でないファイルシステムを CD に焼くというアイディア <tag/The Sheepy One <kero@escape.com>/ <!-- suggested using defective CD-ROMs as coasters for drinks --> 焼き損ねの CD-ROM を飲物用のコースターにするという提案 <tag/Erwin Zoer <ezoer@wxs.nl>/ </descrip> <!-- Futhermore, I would like to thank the following people for reporting spelling mistakes: Bartosz Maruszewski <B.Maruszewski@zsmeie.torun.pl>, Alessandro Rubini <rubini@prosa.it>, Ian Stirling <ian@opus131.com>, Brian H. Toby. --> また、綴りの間違いを指摘してくれた以下の方々に感謝します: Bartosz Maruszewski <B.Maruszewski@zsmeie.torun.pl>, Alessandro Rubini <rubini@prosa.it>, Ian Stirling <ian@opus131.com>, Brian H. Toby <!-- End of the Linux CD-Writing HOWTO. (You can stop reading here.) --> Linux CD-Writing HOWTO は以上です。(ここで読み終えてもかまいません。) <sect>日本語訳について<p> 日本語訳は Linux Japanese FAQ Project が行いました。 翻訳に関するご意見は JF プロジェクト <JF@linux.or.jp> 宛に連絡してください。 改訂履歴を以下に示します。 <descrip> <tag>v1.6j, 18 January 1997</tag> 翻訳: Yoshinori Mamoto (ymamoto@ent.med.osaka-u.ac.jp) <tag>v2.8.2j, 7 September 1999</tag> 更新: 藤原輝嘉 (fujiwara@linux.or.jp), 校正: 武井伸光 (takei@cc.kochi-u.ac.jp) <!-- 高橋聡 (hisai@din.or.jp) さんには、ネロ皇帝に関するジョークのところでアドバイスをいただきました。 --> <tag>v2.8.8j, 11 October 1999</tag> 更新: 藤原輝嘉 (fujiwara@linux.or.jp) <tag>v2.8.15j, 09 March 2000</tag> 更新: 森本 淳 (morimoto@xantia.citroen.org), 校正: 山下義之 (dica@eurus.dti.ne.jp), 武井伸光 (takei@kondara.org) <tag>v2.9.3j, 1 November 2000</tag> 更新: 森本 淳 (morimoto@xantia.citroen.org) 校正: 武井伸光 (takei@webmasters.gr.jp), 中野武雄 (nakano@apm.seikei.ac.jp) </descrip> </article> <!-- 原文でもコメント --> <!-- <sect3>cdda2wav-0.95 <p> cdda2wav reads audio data given by the cdrom drive and dumps it into a wav sound file. The sampling format can be controlled by options. <quote> <url url="ftp://ftp.gwdg.de/pub/linux/misc/cdda2wav/"> </quote> -->