< Day Day Up > |
11.8.1 ProblemYou want to add data files to a disc over time, rather than all at once. cdrecord closes and fixates discs, so that no additional files can be added. How do you get around this? 11.8.2 SolutionThis is a two-step process. Both cdrecord and mkisofs have special options for creating multisession discs. The first time you write files to a CD, create an .iso in the usual manner, then use the -multi switch in cdrecord: $ cdrecord -v -eject dev=0,1,0 -multi first-image.iso Then create additional .iso images using the -C and -M options: $ mkisofs -o second-image.iso -J -r -V Session2 -C `cdrecord dev=0,1,0 -msinfo` \ -M 0,1,0 /path-to-new-files Then write the new .iso to disc, using the -multi option again: $ cdrecord -v -eject dev=0,1,0 -multi second-image.iso Do this as many times as you like. When you get to the last session, omit the -multi option. It's important to close and fixate the disc, or it won't be readable in most drives. Another way to close and fixate the disc, without recording an additional session, is with the fix option: $ cdrecord -v -fix -eject dev=0,1,0 11.8.3 DiscussionCDs are written in sessions. Each session covers a number of disc sectors. On a single-session disc, there is a lead-in, a single TOC, the data, and a lead-out, which finalizes the disc and prevents further recording on the disc. mkisofs links multiple sessions together on a multisession disc. To do this, it needs to know the starting and ending sector numbers of each session. Let's take it a piece at a time: $ mkisofs -o second-image.iso -J -r -C `cdrecord dev=0,1,0 -msinfo` \ -M 0,1,0 /path-to-new-files
$ cdrecord dev=0,1,0 -msinfo 12968,20172
11.8.4 See Also
|
< Day Day Up > |