Skip to contentSkip to conversation

cdrom and multisession

DISCUSSION Luca Ferrari 4 participants 6 messages Aug 23, 2004 – Aug 27, 2004

lore
Share & tools
lore
#0 lore raw

Hi,
I'm writing a program for simple backups on cdroms, and it's supposed to use command-line tools (cdrecord). I've burned a cd with -multi flag and two sessions, but mounting the cd (on the same drive) shows me only the first burn. How can I see the second burn?

Thanks,
Luca

Signature · 2 lines
Luca Ferrari,
[email protected]
#1 lore raw
Quoted 5 lines · On Monday 23 August 2004 15:15 Luca Ferrari's cat walking on the keyboard wrote:

Hi,
I'm writing a program for simple backups on cdroms, and it's supposed to use command-line tools (cdrecord). I've burned a cd with -multi flag and two sessions, but mounting the cd (on the same drive) shows me only the first burn. How can I see the second burn?

Ok, it was simple after all! A command line like the following:
mount -t iso9660 -o session=3 /dev/cdrecorder /media/cdrecorder/ works correctly showing the third written data. Nevertheless I don't find this a smart approach, and I'd like to know if there's another way to add data to a cdrom making it possible to easily read it with a single mount. Otherwise, how can I iterate automatically on all the session of a cd to search for a specific file?

Thanks,
Luca

Signature · 2 lines
Luca Ferrari,
[email protected]
#2 lore raw
Quoted 9 lines · Luca Ferrari
Quoted 5 lines · On Monday 23 August 2004 15:15 Luca Ferrari's cat walking on the keyboard wrote:

Hi,
I'm writing a program for simple backups on cdroms, and it's supposed to use command-line tools (cdrecord). I've burned a cd with -multi flag and two sessions, but mounting the cd (on the same drive) shows me only the first burn. How can I see the second burn?

Quoted 5 lines

Ok, it was simple after all! A command line like the following:
mount -t iso9660 -o session=3 /dev/cdrecorder /media/cdrecorder/ works correctly showing the third written data. Nevertheless I don't find this a smart approach, and I'd like to know if there's another way to add data to a cdrom making it possible to easily read it with a single mount.

Use a rewritable aproach?

Quoted 2 lines

Otherwise, how can I iterate automatically on all the session of a cd to search for a specific file?

How can you write a program if you don't know how to use a loop to iterate through a set or increment an integer to a maximum value?

First you'll need to know the number of sessions on your CD, or make your program guess with an 'or die' (or equiv) if mounting fails.

Not really quite sure what you are trying to ask us here. Are we doing your homework again?

--
Scott

#3 lore raw

On Tuesday 24 August 2004 18:11 Scott Taylor's cat walking on the keyboard wrote:

Hi Scott,
I'm not asking you to do my homework, just a suggestion.

Quoted 3 lines

Use a rewritable aproach?

I believe this will imply to dump the original content, add the new and rewrite it all. If so, I don't like it, otherwise please explain what you're thinking about.

Quoted 8 lines
Quoted 2 lines

Otherwise, how can I iterate automatically on all the session of a cd to search for a specific file?

How can you write a program if you don't know how to use a loop to iterate through a set or increment an integer to a maximum value?

Who said that? Do you think I'm not able to iterate other a set of values? Did you understand that from my e-mail address?

Quoted 3 lines

First you'll need to know the number of sessions on your CD, or make your program guess with an 'or die' (or equiv) if mounting fails.

That's what I was thinking. Imagine I've got a cd in the driver, and I don't know how many sessions are there in the cd, but I know that the cd contains, in one of the session, a file I want to read. What I was asking here is if there is a way to know how many session are present, thus to easily iterate without making my program to try mounting the cd and stopping at the first fail, to reach the file I'm looking for. I'd like to do this in bash.

Quoted 1 line

Not really quite sure what you are trying to ask us here.

If you don't know the answer, please don't post.

Luca

Signature · 6 lines
Luca Ferrari,
[email protected]
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#4 lore raw
Quoted 4 lines · Luca Ferrari
Quoted 1 line · On Tuesday 24 August 2004 18:11 Scott Taylor's cat walking on the keyboard…

Use a rewritable aproach?

I believe this will imply to dump the original content, add the new and rewrite it all. If so, I don't like it, otherwise please explain what you're thinking about.

I think that he meant to use CDRW rather than CDR (about 5 times the cost per disc) They may get around the proglem of sessions being closed.

that having been said, have you carefully read the --multi flag on cdrecored man page??

Quoted 1 line

If you don't know the answer, please don't post.

If you don't want guesses, start paying consultancy fees.

Signature · 4 lines
Stephen Samuel +1(604)876-0426                [email protected]
		   http://www.bcgreen.com/~samuel/
   Powerful committed communication. Transformation touching
     the jewel within each person and bringing it to light.
#5 lore raw

Re: cdrom and multisession add2cd script

In reply to Luca Ferrari

Try USING this wonderful script add2cd

just doing add2cd folderincd=folderinharddrive
burns automagycally a start or multisession CD

http://www.compunauta.com/forums/linux/grabarcds/img/add2cd

Or So easy: try this
is at spanish but command line is universal

root@gus:/tmp/ >mkisofs -J -L -l -r -gui -M 0,0,0 -C cdrecord dev=0,0,0 -msinfo /tmp/cosasparaagregar/ | cdrecord dev=0,0,0 speed=32 -v -force driveropts=burnfree fs=16000000 -data -multi -eject -

http://www.compunauta.com/forums/linux/grabarcds/multisesion.html

Another examples

http://www.compunauta.com/forums/linux/grabarcds/

Quoted 8 lines · Luca Ferrari

Hi,
I'm writing a program for simple backups on cdroms, and it's supposed to use command-line tools (cdrecord). I've burned a cd with -multi flag and two sessions, but mounting the cd (on the same drive) shows me only the first burn. How can I see the second burn?

Thanks,
Luca

-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html