LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   mkisofs (https://www.linuxquestions.org/questions/linux-software-2/mkisofs-114046/)

Pedroski 11-09-2003 06:54 AM

mkisofs
 
Trying to copy to a CD, I have successfully copied the first session.
But I don't understand the usage of the second session.


~~~~~~~~~~~~~FIRST SESSION~~~~~~~~~~~~~~~~~~~~~~~~~~~~

'mkisofs -r -o sesion1 data-to-write'

'cdrecord -v speed=2 dev=0,0,0 -eject -multi -data cd-image-1'
'cdrecord -v speed=2 dev=0,0,0 -eject -multi -audio cd-image-1'


CHECK THE SESSION BLOCKS AND STUFF .. YOULL NEED THIS

'cdrecord -msinfo dev=0,0,0'

~~~~~~~~~~~~~SECOND SESSION~~~~~~~~~~~~~~~~~~~~~~~~~~~

NOTE : YOU SHOULD PUT THE DATA IN AN EMPTY DIRECTORY TO
MAKE SECOND SESSION ADD THE DIRECTORY YOU WANT TO / OF CD

'mkisofs -r -o session2 -C xx,yy /dev/scd0 dir-for-image2'

'cdrecord -v speed=2 dev=2,0 -eject -multi cd-image-2'

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
What is the -C xx,yy?
I run cdrecord with dev=0,0,0
I mount the writer on /mnt/cdrom1
If I mount the image there, I see it ok.
Say my dev is 0,0,0, the image 2 file is called ISO, how do I get it on the CD?
I tried writing the same as the first file, got no errors, but after reinserting the CD, all I had on it was the first file, nothing else.
Any tips?

idaho 11-09-2003 12:59 PM

from the mkisofs man page:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-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.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You might also want to look at the CD-writing how to:
http://www.tldp.org/HOWTO/CD-Writing-HOWTO.html

Here is what it says about multi-session writing:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4.18 How to create a multi-session CD?


First of all, the image for a multi-session CD must be formatted using the ISO-9660 filesystem using RockRidge-extensions. And you must use the option -multi for cdrecord as long as you want to add further sessions. So at least for the first session, you must specify the option -multi.


Some CD-writers have no support for CD-ROM XA mode 2 or for session-at-once (SAO), so you need to specify the switch -data for cdrecord on the command line.


The images for the second and subsequent sessions are a little bit more complicated to generate. Mkisofs must know where the free space on the CD-R begins. That information can be gathered by using the option -msinfo on cdrecord (see example below).


shell> NEXT_TRACK=`cdrecord -msinfo dev=0,6,0`
shell> echo $NEXT_TRACK
shell> mkisofs -R -o cd_image2 -C $NEXT_TRACK -M /dev/scd5
private_collection/ \



For more information, please read the file README.multi, which is distributed with cdrecord.


All times are GMT -5. The time now is 02:14 AM.