Jump to content

mkisofs/cdrecord question


Guest itmpm
 Share

Recommended Posts

Hi. I finally got my CD-RW drive and my CD-ROM drive set up correctly (those of you elephantine types with longish memories may recall my earlier queries on the hardware forum). I have for the time being given up on the GUI burning programs, getting back to basics with mkisofs and cdrecord. I have figured out how to elegantly copy an audio CD by typing in one command with the help of a bash script, but I haven't yet mastered the art of writing multiple session data CD's. Here's my bash script:

 

#! /bin/bash

 

#create temporary iso image eh

sudo mkisofs -R -o iso.tmp `pwd`

 

#Now, burn that sucker

sudo cdrecord -multi -v fs=6m speed=2 dev=0,2,0 iso.tmp

 

rm -f iso.tmp

 

It will burn the first session, but doesn't seem to do anything on subsequent ones.

 

I am using:

 

mkisofs 1.15a32 (i586-mandrake-linux-gnu)

cdrecord 1.11a32 (i586-mandrake-linux-gnu)

 

Any ideas why it wouldn't burn more than one session?

 

MTIA,

 

Matt

Link to comment
Share on other sites

For subsequent sessions you'll need to call mkisofs (I'm using the same parameters you did) with the CD inserted, as follows:

 

mkisofs -R -o iso.tmp -C $(cdrecord -msinfo dev=0,2,0) -M /dev/scd0 $(pwd)

 

then write the CD as always.

 

man cdrecord

[...]

    -msinfo

              Retrieve multi session info in a form suitable for mkisofs-1.10 or later.

 

              This option makes only sense with a CD that contains at least one closed session  and is appendable (not finally closed yet).  Some drives create error messages if you try to get the multi session info for a disk that is not suitable for this operation.

[...]

 

man mkisofs

[...]

    -C last_sess_start,next_sess_start

              This option is needed when mkisofs is used to create a CDextra or the image of a second  session or a higher level session for a multi session disk.  The option -C takes a pair of two numbers separated by a comma. The first number is the sector number  of the  first  sector  in  the last session of the disk that should be appended to.  The  second number is the starting sector number of the new session.  The expected pair of numbers may be retrieved by calling cdrecord -msinfo ...  If the -C option is used in              conjunction with the -M option, mkisofs  will  create  a  filesystem  image  that  is              intended  to  be  a  continuation  of the previous session.  If the -C option is used without the -M option, mkisofs will create a filesystem image that is intended to  be              used  for  a second session on a CDextra. This is a multi session CD that holds audio              data in the first session and a ISO9660 filesystem in the second session.

[...]

 

HTH

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...