Debian testingのnetinst CDをjigdoして焼く

いわゆる一つの備忘録.

再利用できるイメージがあればマウント

同じ作業をもう何度かやってるんだが,Jigdoは前回のイメージ作成時から変わってないパッケージを再利用してくれるので,イメージをマウントして読めるようにしてやる:

# mount -r /media/esata/images/debian/amd64-testing/debian-testing-amd64-netinst.iso /mnt/iso0

確認:

$ cd /mnt/img0
$ ls
README.html          README.mirrors.txt  boot/  debian@  doc/       install/    pics/
README.mirrors.html  README.txt          css/   dists/   firmware/  md5sum.txt  pool/

よかろう.

必要ファイル2個をJigdoに落とさせ,即座に開始

$ cd /tmp
$ mkcd amd64-testing
$ http_proxy='http://este/' jigdo-lite 'http://cdimage.debian.org/cdimage/daily-builds/daily/arch-latest/amd64/jigdo-cd/debian-testing-amd64-netinst.jigdo'

http_proxy は好みでcaching proxyであるDeleGate (at este, WinXP) にキャッシュさせてるだけなので無くても動く.
後はJigdo内での問答:

-----------------------------------------------------------------
Images offered by `http://cdimage.debian.org/cdimage/daily-builds/daily/arch-latest/amd64/jigdo-cd/debian-testing-amd64-netinst.jigdo':
  1: 'Debian GNU/Linux testing "Wheezy" - Official Snapshot amd64 NETINST Binary-1 20110821-09:20 (20110821)' (debian-testing-amd64-netinst.iso)

Further information about `debian-testing-amd64-netinst.iso':
Generated on Sun, 21 Aug 2011 09:21:24 +0000

-----------------------------------------------------------------
If you already have a previous version of the CD you are
downloading, jigdo can re-use files on the old CD that are also
present in the new image, and you do not need to download them
again. Mount the old CD ROM and enter the path it is mounted under
(e.g. `/mnt/cdrom').
Alternatively, just press enter if you want to start downloading
the remaining files.

You can also enter a single digit from the list below to
select the respective entry for scanning:
  1:
  2: jjjjjjjjjjjj
  3: /mnt/iso1
  4: /mnt/iso0
Files to scan: 4

この「4」ってとこだけタイプした.やはり以前打ち込んだ内容が ~/.jigto-lite に記録されているので選ぶだけ.しかし選択肢にゴミが混じってるな... 今度きれいにしよう.

Found 0 of the 328 files required by the template
Copied input files to temporary file `debian-testing-amd64-netinst.iso.tmp' - repeat command and supply more files to continue

うは,一つも再利用されなかった... 前回のISOイメージは4月頭だったから,一つ残らず更新されちゃったのかな.まぁそんなこともあるだろう...

-----------------------------------------------------------------
If you already have a previous version of the CD you are
downloading, jigdo can re-use files on the old CD that are also
present in the new image, and you do not need to download them
again. Mount the old CD ROM and enter the path it is mounted under
(e.g. `/mnt/cdrom').
Alternatively, just press enter if you want to start downloading
the remaining files.

You can also enter a single digit from the list below to
select the respective entry for scanning:
  1:
  2: jjjjjjjjjjjj
  3: /mnt/iso1
  4: /mnt/iso0
Files to scan:

-----------------------------------------------------------------
The jigdo file refers to files stored on Debian mirrors. Please
choose a Debian mirror as follows: Either enter a complete URL
pointing to a mirror (in the form
`ftp://ftp.debian.org/debian/'), or enter any regular expression
for searching through the list of mirrors: Try a two-letter
country code such as `de', or a country name like `United
States', or a server name like `sunsite'.
Debian mirror [http://ftp.jp.debian.org/debian/]:

ここも初回は日本ミラーのURL http://ftp.jp.debian.org/debian/ を打ち込むんだけど,やっぱり前に打ち込んだ内容が ~/.jigdo-lite から読み込まれてデフォルト値になってるので楽ができる.単にEnterでダウンロードが開始される:

-----------------------------------------------------------------
Merging parts from `file:' URIs, if any...
Found 0 of the 328 files required by the template
Copied input files to temporary file `debian-testing-amd64-netinst.iso.tmp' - repeat command and supply more files to continue
--2011-08-22 00:18:42--  http://ftp.jp.debian.org/debian/pool/main/libs/libsigsegv/libsigsegv2_2.9-4_amd64.deb
este (este) をDNSに問いあわせています... 192.168.1.4
este (este)|192.168.1.4|:80 に接続しています... 接続しました。
Proxy による接続要求を送信しました、応答を待っています... 200 OK
長さ: 28948 (28K) [application/x-debian-package]
`debian-testing-amd64-netinst.iso.tmpdir/ftp.jp.debian.org/debian/pool/main/libs/libsigsegv/libsigsegv2_2.9-4_amd64.deb' に保存中

100%[=========================================================================================>] 28,948      --.-K/s 時間 0.01s

2011-08-22 00:18:43 (2.31 MB/s) - `debian-testing-amd64-netinst.iso.tmpdir/ftp.jp.debian.org/debian/pool/main/libs/libsigsegv/libsigsegv2_2.9-4_amd64.deb' へ保存完了 [28948/28948]

以下略.

収穫

しばらく待つと,

終了しました --2011-08-22 00:26:03--
ダウンロード完了: 8 ファイル、755K バイトを 0.4s で取得 (1.72 MB/s)
Found 8 of the 8 files required by the template
Successfully created `debian-testing-amd64-netinst.iso'

-----------------------------------------------------------------
Finished!
The fact that you got this far is a strong indication that `debian-testing-amd64-netinst.iso'
was generated correctly. I will perform an additional, final check,
which you can interrupt safely with Ctrl-C if you do not want to wait.

OK: Checksums match, image is good!

お疲れさまでした.まぁ前回のはもう要らんだろ...

$ rm -rf /media/esata/images/debian/amd64-testing
$ cd ..
$ mv amd64-testing /media/esata/images/debian

Wodimで焼く

DVD(マルチ)ドライブBuffalo, DVSM-PN58U2V-BKをUSBで挿す:

$ dmesg|tail -30
(略)
[318638.034846] ISO 9660 Extensions: Microsoft Joliet Level 3
[318638.045440] ISO 9660 Extensions: RRIP_1991A
[318867.484762] ISO 9660 Extensions: Microsoft Joliet Level 3
[318867.485148] ISO 9660 Extensions: RRIP_1991A
[319300.128390] ISO 9660 Extensions: Microsoft Joliet Level 3
[319300.128588] ISO 9660 Extensions: RRIP_1991A
[321294.292074] usb 1-8: new high speed USB device number 6 using ehci_hcd
[321294.425444] usb 1-8: New USB device found, idVendor=0411, idProduct=0165
[321294.425453] usb 1-8: New USB device strings: Mfr=10, Product=11, SerialNumber=3
[321294.425460] usb 1-8: Product: BUFFALO Optical Drive
[321294.425465] usb 1-8: Manufacturer: BUFFALO
[321294.425470] usb 1-8: SerialNumber: 000000002913
[321294.562959] Initializing USB Mass Storage driver...
[321294.563412] scsi2 : usb-storage 1-8:1.0
[321294.563880] usbcore: registered new interface driver usb-storage
[321294.563889] USB Mass Storage support registered.
[321295.575838] scsi 2:0:0:0: CD-ROM            HL-DT-ST DVDRAM GT40N     BA00 PQ: 0 ANSI: 0
[321295.709260] scsi 2:0:0:0: Attached scsi generic sg2 type 5
[321295.812151] sr0: scsi3-mmc drive: 24x/24x writer dvd-ram cd/rw xa/form2 cdda tray
[321295.812161] cdrom: Uniform CD-ROM driver Revision: 3.20
[321295.812631] sr 2:0:0:0: Attached scsi CD-ROM sr0

いつも通り正しく認識された.後はUbuntu情報サイトに載ってたWodimの説明にただ従う:

$ wodim -scanbus
scsibus2:
        2,0,0   200) 'HL-DT-ST' 'DVDRAM GT40N    ' 'BA00' Removable CD-ROM
        2,1,0   201) *
        2,2,0   202) *
        2,3,0   203) *
        2,4,0   204) *
        2,5,0   205) *
        2,6,0   206) *
        2,7,0   207) *
$ wodim --devices
wodim: Overview of accessible drives (1 found) :
-------------------------------------------------------------------------
 0  dev='/dev/sg2'      rwrw-- : 'HL-DT-ST' 'DVDRAM GT40N'
-------------------------------------------------------------------------
$ cd /media/esata/images/debian/ia64-testing-20110822
$ wodim -v -eject -multi speed=48 dev=/dev/scd0 debian-testing-ia64-netinst.iso
ia64-netinst.iso
wodim: No write mode specified.
wodim: Assuming -tao mode.
wodim: Future versions of wodim may have different drive dependent defaults.
TOC Type: 3 = CD-ROM XA mode 2
wodim: Operation not permitted. Warning: Cannot raise RLIMIT_MEMLOCK limits.
scsidev: '/dev/scd0'
devname: '/dev/scd0'
scsibus: -2 target: -2 lun: -2
Linux sg driver version: 3.5.27
Wodim version: 1.1.11
SCSI buffer size: 64512
Device type    : Removable CD-ROM
Version        : 0
Response Format: 2
Capabilities   :
Vendor_info    : 'HL-DT-ST'
Identification : 'DVDRAM GT40N    '
Revision       : 'BA00'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Current: 0x0009 (CD-R)
Profile: 0x0012 (DVD-RAM)
Profile: 0x002B (DVD+R/DL)
Profile: 0x001B (DVD+R)
Profile: 0x001A (DVD+RW)
Profile: 0x0016 (DVD-R/DL layer jump recording)
Profile: 0x0015 (DVD-R/DL sequential recording)
Profile: 0x0014 (DVD-RW sequential recording)
Profile: 0x0013 (DVD-RW restricted overwrite)
Profile: 0x0011 (DVD-R sequential recording)
Profile: 0x0010 (DVD-ROM)
Profile: 0x000A (CD-RW)
Profile: 0x0009 (CD-R) (current)
Profile: 0x0008 (CD-ROM)
Profile: 0x0002 (Removable disk)
Using generic SCSI-3/mmc   CD-R/CD-RW driver (mmc_cdr).
Driver flags   : MMC-3 SWABAUDIO BURNFREE
Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R
Drive buf size : 327680 = 320 KB
Beginning DMA speed test. Set CDR_NODMATEST environment variable if device
communication breaks or freezes immediately after that.
FIFO size      : 12582912 = 12288 KB
Track 01: data   267 MB
Total size:      306 MB (30:24.85) = 136864 sectors
Lout start:      307 MB (30:26/64) = 136864 sectors
Current Secsize: 2048
ATIP info from disk:
  Indicated writing power: 5
  Is not unrestricted
  Is not erasable
  Disk sub type: Medium Type A, high Beta category (A+) (3)
  ATIP start of lead in:  -11634 (97:26/66)
  ATIP start of lead out: 359846 (79:59/71)
Disk type:    Short strategy type (Phthalocyanine or similar)
Manuf. index: 3
Manufacturer: CMC Magnetics Corporation
Blocks total: 359846 Blocks current: 359846 Blocks remaining: 222982
Speed set to 4234 KB/s
Starting to write CD/DVD at speed  24.0 in real TAO mode for multi session.
Last chance to quit, starting real write in    0 seconds. Operation starts.
Waiting for reader process to fill input buffer ... input buffer ready.
Performing OPC...
Starting new track at sector: 0
Track 01:   62 of  267 MB written (fifo 100%) [buf  71%]  13.1x.

これでしばらく待つ.なお焼いたのは上でJigdoしたISOイメージと異なるが,細かいことは気にしないように...

Track 01:  267 of  267 MB written (fifo 100%) [buf  70%]  18.3x.
Track 01: Total bytes read/written: 280293376/280293376 (136862 sectors).
Writing  time:  141.107s
Average write speed  12.9x.
Min drive buffer fill was 68%
Fixating...
Fixating time:   22.709s
wodim: fifo had 4415 puts and 4415 gets.
wodim: fifo was 0 times empty and 4141 times full, min fill was 98%.

48倍 (speed=48) って速過ぎる気がするが(実測で13倍),今までとりあえずこれでしくじったことは無い.終わると -eject を付けた効果で焼かれたCD-R (DVD-R) がドライブから出てくる.ちなみに焼くのとは関係なくドライブ開けたいときにも wodim -eject と使えば役に立つ.