TRACK=`cdrecord -msinfo dev=$CDRW`
$ cdrecord dev=/dev/sg0 -toc Cdrecord 1.10 (i686-pc-linux-gnu) Copyright (C) 1995-2001 Jorg Schilling scsidev: '/dev/sg0' devname: '/dev/sg0' scsibus: -2 target: -2 lun: -2 Linux sg driver version: 3.1.24 Using libscg version 'schily-0.5' Device type : Removable CD-ROM Version : 0 Response Format: 2 Capabilities : Vendor_info : 'SONY ' Identifikation : 'CD-RW CRX175A1 ' Revision : '5YS2' Device seems to be: Generic mmc CD-RW. Using generic SCSI-3/mmc CD-R driver (mmc_cdr). Driver flags : SWABAUDIO first: 1 last 5 track: 1 lba: 0 ( 0) 00:02:00 adr: 1 control: 4 mode: 2 track: 2 lba: 13002 ( 52008) 02:55:27 adr: 1 control: 4 mode: 2 track: 3 lba: 57094 ( 228376) 12:43:19 adr: 1 control: 4 mode: 2 track: 4 lba: 92838 ( 371352) 20:39:63 adr: 1 control: 4 mode: 2 track: 5 lba: 129142 ( 516568) 28:43:67 adr: 1 control: 4 mode: 2 track:lout lba: 134354 ( 537416) 29:53:29 adr: 1 control: 4 mode: -1
$ cdrecord -msinfo dev=/dev/sg0 129142,141254
— 141254 - 134354 = 6900
This 6900 is the overhead for CD multi-session. To be precise, it is the overhead for CD-RW multi-session, CD is 11400.
$ mkisofs -r -N -L -d -D -J -f -o $ISOF -graft-points briefcase$TODAY/=. Warning: creating filesystem that does not conform to ISO-9660. 99.54% done, estimate finish Sat Dec 28 00:56:33 2002 Total translation table size: 0 Total rockridge attributes bytes: 1307 Total directory bytes: 2048 Path table size(bytes): 26 Max brk space used 7544 5024 extents written (9 Mb)
$ mkisofs -v -v -r -J -f -o $ISOF -C $TRACK -M /dev/scd0 . mkisofs 1.14 (i686-pc-linux-gnu) Rock Ridge signatures found Scanning . 141282 3924 141284 566 /histories 141285 668 /histories/applications [...] Cache hit for /zips/. Cache hit for /zips/.. Total extents scheduled to be written = 5114 99.07% done, estimate finish Sat Dec 28 01:03:58 2002 Total translation table size: 0 Total rockridge attributes bytes: 24332 Total directory bytes: 102400 Path table size(bytes): 664 Max brk space used 20000 146368 extents written (285 Mb)
$ cdrecord -multi dev=0,0,0 -eject -v speed=8 $ISOF Cdrecord 1.10 (i686-pc-linux-gnu) Copyright (C) 1995-2001 Jorg Schilling TOC Type: 3 = CD-ROM XA mode 2 scsidev: '0,0,0' scsibus: 0 target: 0 lun: 0
Track 01: data 10 MB Total size: 11 MB (01:08.42) = 5132 sectors Lout start: 11 MB (01:10/32) = 5132 sectors Current Secsize: 2048
ATIP start of lead in: -11940 (97:22/60) ATIP start of lead out: 335975 (74:41/50) speed low: 0 speed high: 4
Blocks total: 335975 Blocks current: 194721 Blocks remaining: 189589 Starting to write CD/DVD at speed 4 in write mode for multi session.
Starting new track at sector: 141254 Track 06: 10 of 10 MB written (fifo 100%). Track 06: Total bytes read/written: 10506240/10506240 (5130 sectors).
ATIP start of lead out = 335975 = Blocks total. Blocks current = 194721 = 335975-141254 (Blocks total - last_sess_start) Blocks remaining = 189589 = 335975-146386 (Blocks total - next_sess_start)
$ cdrecord dev=/dev/sg0 -toc
track: 1 lba: 0 ( 0) 00:02:00 adr: 1 control: 4 mode: 2 track: 2 lba: 13002 ( 52008) 02:55:27 adr: 1 control: 4 mode: 2 track: 3 lba: 57094 ( 228376) 12:43:19 adr: 1 control: 4 mode: 2 track: 4 lba: 92838 ( 371352) 20:39:63 adr: 1 control: 4 mode: 2 track: 5 lba: 129142 ( 516568) 28:43:67 adr: 1 control: 4 mode: 2 track: 6 lba: 141254 ( 565016) 31:25:29 adr: 1 control: 4 mode: 2 track:lout lba: 146386 ( 585544) 32:33:61 adr: 1 control: 4 mode: -1
"Track 06: … 10 MB written … Total bytes read/written: 10506240/10506240 (5130 sectors)"
— 5130 * 2048 = 10506240
— 146386 - 141254 = 5132
141254 & 146386 are the session begining & end.
$ cdrecord -msinfo dev=/dev/sg0 141254,153286
— 153286 - 146386 = 6900
Again, the multi-session overhead is 6900.
% mkisofs -r -N -L -d -D -J -f -o $ISOF -graft-points briefcase$TODAY/=. Warning: creating filesystem that does not conform to ISO-9660. Total translation table size: 0 Total rockridge attributes bytes: 659 Total directory bytes: 2048 Path table size(bytes): 26 Max brk space used 7544 3248 extents written (6 Mb) % mkisofs -v -v -r -J -f -o $ISOF -C $TRACK -M /dev/scd0 . Total extents scheduled to be written = 3354 Total translation table size: 0 Total rockridge attributes bytes: 23674 Total directory bytes: 102400 Path table size(bytes): 664 Max brk space used 1f000 144608 extents written (282 Mb) % cdrecord -multi dev=0,0,0 -eject -v speed=8 $ISOF Track 01: data 6 MB Total size: 7 MB (00:44.74) = 3356 sectors Lout start: 7 MB (00:46/56) = 3356 sectors Blocks total: 335975 Blocks current: 182689 Blocks remaining: 179333 Track 07: 6 of 6 MB written (fifo 100%). Track 07: Total bytes read/written: 6868992/6868992 (3354 sectors). track: 1 lba: 0 ( 0) 00:02:00 adr: 1 control: 4 mode: 2 track: 2 lba: 13002 ( 52008) 02:55:27 adr: 1 control: 4 mode: 2 track: 3 lba: 57094 ( 228376) 12:43:19 adr: 1 control: 4 mode: 2 track: 4 lba: 92838 ( 371352) 20:39:63 adr: 1 control: 4 mode: 2 track: 5 lba: 129142 ( 516568) 28:43:67 adr: 1 control: 4 mode: 2 track: 6 lba: 141254 ( 565016) 31:25:29 adr: 1 control: 4 mode: 2 track: 7 lba: 153286 ( 613144) 34:05:61 adr: 1 control: 4 mode: 2 track:lout lba: 156642 ( 626568) 34:50:42 adr: 1 control: 4 mode: -1
-- 3354 * 2048 = 6868992 -- 156642 - 153286 = 3356
$ cdrecord -msinfo dev=/dev/sg0 153286,163542
-- 163542 - 156642 = 6900
$ mkisofs -r -N -L -d -D -J -f -o $ISOF -C $TRACK -M /dev/scd0 -graft-points briefcase$TODAY/=. Warning: creating filesystem that does not conform to ISO-9660. Rock Ridge signatures found Using BRIEF000 for /briefcase (briefcase2002-12-28) 98.86% done, estimate finish Sat Dec 28 01:34:58 2002 Total translation table size: 0 Total rockridge attributes bytes: 25213 Total directory bytes: 106496 Path table size(bytes): 696 Max brk space used 20000 166912 extents written (326 Mb) % cdrecord -multi dev=0,0,0 -eject -v speed=8 $ISOF Track 01: data 6 MB Total size: 7 MB (00:44.96) = 3372 sectors Lout start: 7 MB (00:46/72) = 3372 sectors Blocks total: 335975 Blocks current: 172433 Blocks remaining: 169061