The FreeBSD Diary
Providing practical examples since 1998If you buy from Amazon USA, please support us by using this link.
cdrecord - writing multiple sessions 31 December 2000
A CD will hold about 650 MB of data. This doesn't mean you need to
queue your data until you get enough to burn a CD. You can burn multiple sessions.
Each session must use the -multi flag. This is from man cdrecord:
-multi Allow multi session CD's to be made. This flag needs to be present on all sessions of a multi session disk, except you want to create a session that will be the last session on the media. The fixation will be done in a way that allows the CD- Recorder to append additional sessions later.
But it's not as straight forward as that. There's a trick. And I made two coasters before I found out what the trick is. I found the solution at: http://mlug.missouri.edu/~rjudd/projects/cdburning.html which is titled "Notes on CD burning". It appears to be Linux-specific (in so much as my website is FreeBSD-specific) but it does contain the clues which allowed me to stop making coasters. At that page, you'll want to click on Advanced Topics and scroll down until you see Multisession CDs. This is there I found the solution.
The tricky part is the creation of the ISO images subsequent to the first ISO image. You can create the first ISO in the regular way. But with all other ISO images, you need to find out where the free space on the CD starts. You use this information when creating the new ISO.
The sharp eyed amongst you may notice that the device used in this article differs from that used in the cdrecord - writing your own CDs article. That's not magic. And it's not a mistake. When I wrote the first article, I had two SCSI cards in the box. I've since returned one to it's owner and put the CDRW on the same card as the two SCSI drives.
|NOTE: In this article, I specify the speed which should be used to write to the CD.
You should adjust that value to suit your CD drive.
Here are the steps I used:
If you forget which device is your cdwrite, look in
|This example will show how I first burned some FreshPorts
backups and then a cvs repository. I have snipped some bits from the output.
Create the first ISO:
Burn the first ISO:
Have a quick look at the drive contents:
Find out the where the free space starts:
Create the second ISO using the free space information from the previous step:
Burn the second ISO:
Have a look at the contents now: