Click to See Complete Forum and Search --> : Multisession CD


asarch
04-21-2005, 09:44 PM
How can I add a new session to a CD?

I make the first session:

[#] mkisofs -o cdimage.iso

[#] cdrecord -multi -no-close -data cdimage.iso

Then, how can I add the next session?

Do I need read the first session to add it to the next session?

[#] readcd -o cdimage01.iso

[#] mkisofs -o cdimage02.iso

[#] cdrecord -multi -no-close -data cdimage01.iso cdimage02.iso

From this place (http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi?coll=linux&db=man&fname=/usr/share/catman/man8/mkisofs.8.html&srch=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 ses-
sion. 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.

DrChuck
04-22-2005, 07:32 AM
There is a lot of detail on multi-session cd-roms in this reference (http://linux.sgms-centre.com/howto/cdwriting/08.php) .
When making a second or subsequent filesystem, the only extra command line parameter you have to supply to mkisofs is -C prev_start,this_start, where prev_start is the number of the sector where the previous session starts, and this_start is the number of the sector where this session will start.
These figures aren't pulled out of a hat along with a white rabbit and a few doves. cdrecord used with the "-msinfo" option will give you this information. For example, assuming your CD writer is device 0,0 (see "Locating your (re)writer"), make sure the partially written media is in the drive:

# cdrecord dev=0,0 -msinfo
0,105248

This means that the previous session started at sector 0 (i.e. it was the first) and that this session will start at sector 105248.

You can now use this information in the mkisofs command line:

$ mkisofs -J -r -V Session2 -C 0,105248 -o output.iso /path/to/back/up/
drChuck

asarch
04-22-2005, 11:08 AM
I burned a CD with Nero for XP but I didn't close the CD. Then I added a new session and also I didn't close the CD but when I mount the CD in GNU/Linux I only see the last session but not the first one, nevertheless if I try to add a new session to the CD, Nero shows me the first and the last sessions but I can't access to them (it only shows me the space that they are consuming).

How can I recover the first session?