Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Create single-volume multi session CD-Rs UNIX
To create multi-session CD-Rs which appear as single volumes in the Finder, you'll need a third-party UNIX tool along with some of the existing OS X tools.

First, download and install cdrtools. This will make your life much easier. This package includes 'mkisofs' (to make ISO images) and 'cdrecord' (for easy burning of various types of images). The 'hdiutil' in OSX works fine for single sessions, but I haven't been able to do multi-session with it. It is handy, though, for converting various image types.

Second, familiarize yourself with the following osx tools: hdid, disktool, and hdiutil.

Read the rest of the article for the steps required to create a single-volume multi-session CD-R...

Background - these steps won't work if OS X is currently "handling" the cd device. You must "detach" the device from the OS X system, but do so in a way so as not to eject the disk. This isn't difficult for the first session, since OS X allows you to dismiss the dialog that comes up when you insert a disc with no readable volumes. But for subsequent burns, there will be a readable volume on the disc, so no dialog is displayed. This is what 'disktool' is for. The various CD burning utilities on the net were written for Linux, pure BSD, or other systems with /dev entries for the CD-ROM (or Lun numbers for SCSI drives, etc). These won't help you for OSX. You must use the IOKit device name instead. This info was hard for me to find (if you're interested, ioreg -l will print out the registry for the IOKit entries on your computer).

If you have a standard CD-R, you will likely use "IOCompactDiscServices" as the device name. If you are using the combo drive, you will likely use "IODVDServices." If you have a true SCSI chain, you should find out your LUN numbers (if this applies to you, you'll probably know what this means - otherwise, try the net) and just follow the many helps on the net.

Steps
  1. Go to the directory containing the files or directories you wish to burn:
    cd ~
  2. Create the first ISO image with Joliet and Rockridge extensions using 'mkisofs' (for long file names - necessary for multi, I think):
    mkisofs -J -R -o image1.iso Pictures/*.JPG
  3. Burn the first image with 'cdrecord' (device name reflects that I have combo drive in iBook):
    cdrecord -v -multi -data dev=IODVDServices image1.iso
  4. Use 'cdrecord' to find out where the remaining free space begins after this burn session:
    cdrecord -msinfo dev=IODVDServices
    This will return '0,123456' or something. This is the info you need.

  5. Create the second (or subsequent) ISO image as before but specifying device and beginning track data in step four:
    mkisofs -J -R -o image2.iso -M IODVDServices -C 0,123456
    (use the actual number from step 4)

  6. Burn the second (or subsequent) iso image as before:
    cdrecord -v -multi -data dev=IODVDServices image2.iso
That's it! At various times after first image is burned, you'll need to disassociate the device with OSX without ejecting it so the tools can work with it. To do so, use 'disktool' as follows:
disktool -u disk1 0
The above assumes your CD-R is disk1. Use 'df' to identify the CD.

To eject a disc at any time, you can use hdiutil eject disc1, replacing 'disc1' with the appropriate disc number from the 'df' command.

P.S. mkisofs will also make hybrid discs readable on both pcs and macs (ISO9660 and HFS). Look at the help for mkisofs for the syntax. Unfortunately, I don't think you can make multi-session discs in this format.

[Editor's note: I have not tried this process myself.]
    •    
  • Currently 2.40 / 5
  You rated: 2 / 5 (5 votes cast)
 
[70,469 views]  

Create single-volume multi session CD-Rs | 33 comments | Create New Account
Click here to return to the 'Create single-volume multi session CD-Rs' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
How do you compile it?
Authored by: gvitale on May 20, '02 10:57:59AM

What is the trik to install the cdrtools? They do compile fine, but then running "make install" gives:
make: `install' is up to date
when actually notting has been installed.
I'm I doing something wrong?



[ Reply to This | # ]
How do you compile it?
Authored by: gvitale on May 20, '02 11:04:53AM

Nevermind: use sudo fink install cdrtools to install with FINK.



[ Reply to This | # ]
How do you compile it?
Authored by: prosper on May 20, '02 12:58:34PM

Reading package info...
Information about 427 packages read in 3 seconds.
Failed: no package found for specification 'cdrtools'!

Even after a fink update or update-all....

Where's the problem ?



[ Reply to This | # ]
How do you compile it?
Authored by: gvitale on May 21, '02 05:38:09AM

Probably it's in the unstable tree



[ Reply to This | # ]
How do you compile it?
Authored by: judgemental on May 21, '02 06:15:29PM

just type "make"

You'll get a bunch of file not founds, but it's ok.

The only crappy thing is, after mine was done compiling, you couldn't do make install, it leaves all the complied binaries under the build directories.

i.e.: cdrecord is under cdrtools-1.xx/cdrecord/OBJ/powerpc-darwin-cc
mkisofs is under cdrtools-1.xx/mkisofs/OBS/powerpc-darwin-cc

and so on.

If you have an iso you want to burn to cd, do somthing like this:

cd to the directory that cdrecord is in, or copy it to somewhere in your path

./cdrecord speed=8 -eject -v dev=IOCompactDiscServices file.iso

Of course, speed can be replaced with whatever speed your cdr is. Also if you have a DVD drive that writes, use IODVDServices in the dev option.



[ Reply to This | # ]
DVD question
Authored by: VEGx on May 21, '02 06:40:44PM
A silly question, maybe.

Can you write DVD format even if you don't have the DVD writer?

What I mean is, could you, say, burn a disk image with a small home video so that the DVD Player would think it is a DVD disk? So that you would not have to do all the "Select Video_TS folder..." every time? Or anything? Something? Anyone?

[ Reply to This | # ]

How do you compile it - Explanation and Solution
Authored by: quo on Aug 06, '02 08:13:34AM
Like many source code distributions, cdrecord comes with a file INSTALL describing how to compile and install the sources. Unfortunately Apple went with HFS+ as preferred File System, effectively crippling MacOS X as to not distinguish upper and lower case in filenames.


What is happening?

The first default rule for make is to look if the target (install, in this case), already exists. Because of this you could have a file called project.c, and compile it by typing make project. As long as project.c is newer than the file project, make would call the C compiler with the default arguments to recompile your just-edited file.

When called with make install, the make command will first look for a file called install, and, because of HFS+, find any capitalisation of that as well.
(iNsTaLL, install, INSTALL, ... all match install)
If any such file exists, make assumes there is nothing left to do. If there were no such file, make would next look for a rule (in the makefile) called 'install' and do what is written there.


Solution

Make and many other generic Unix programs rely on the file system being able to distinguish between upper and lower case. Weird things may happen if they are tricked to accept one file for another.

My recommendation would be to use a separate partition/volume with an UFS Filesystem for compiling at least. For myself I have abandoned HFS+ entirely and installed MacOS X on a UFS-only partition (two to be honest). This may not be supported by Apple. So far one application (Cisco Aironet Drivers distributed using InstallerVise) has broken on me because of that and refused to install.


If this one installation of cdrecord is all you want, just rename the file called INSTALL to something else, for example readme.install and proceed by running make install.


P.S.
Cdrecord and the other tools from Jörg Schilling published at the fokus ftp server are some of the best written and most portable pieces of software I have seen. Compilation is painless and out-of-the box, and most tools have been ported to MacOS X by the author himself. For backup or comparing file trees his tar implementation, star is my long time favourite.


Hope this helps
/Quo


[ Reply to This | # ]

How do you compile it - Explanation and Solution
Authored by: extra88 on Sep 22, '02 03:38:42PM

If you only need UFS for compiling, do what I did, create a UFS image with Disk Copy. The image will be read/write but before you can put anything in it, you have go into Get Info and change the file permissions (by default the mounted image is owned by system and group "wheel" has only read access). When you're done compiling you can delete the contents of the image file and unmount it so it's clean for the next time (make sure to Empty Trash before unmounting).

Unfortunately this program still didn't install correctly because it tried to make user "bin" the owner of everything and that's not a valid user name (unless you created the user, "bin," yourself). Fortunately this is defined in ./DEFAULTS/Defaults.darwin (there's a Defaults.mac-os10 but it doesn't use it). Change DEFINSUSR to root and DEFINSGRP to wheel. You can also change INS_BASE to /usr so the programs will be put in your existing folders. The one thing that still won't be in the default folder are the man files which will go in /usr/man/ but should be in /usr/share/man/.

Do sudo cp -R /usr/man/* /usr/share/man to copy them there then "sudo rm -rf /usr/man/" to get rid of the folder make created (careful! use tab-completion to make sure you're specifying the correct directory).



[ Reply to This | # ]
What if you don't have a Mac burner?
Authored by: eagle on May 20, '02 12:59:38PM

\0\05{\0\0\0\0\0\0\0\0t...if you have a burner on your Mac. I don't, but I _do_ have access to a burner on a Solaris box. I'm interested in burning multisession Mac CDs on that Solaris box.

Any chance you know of a way to do that? I _am_ able to create multi-session Mac CDs that can be seen as multi-session on classic Mac OS (on my SE/30 running 7.5.3) but NOT on my Cube running 10.1.4.



[ Reply to This | # ]
What if you don't have a Mac burner?
Authored by: eagle on May 20, '02 01:01:12PM

That was supposed to start with "This is great...if you have a burner on your Mac." There must be a problem with the site today. :(



[ Reply to This | # ]
How to use your Solaris burner
Authored by: quo on Aug 06, '02 08:36:18AM
Now this one is easy. Get the cdrecord distribution and compile it on your Solaris box. You may need to get a C compiler first. (Apple definitively outscored Sun by delivering a compiler, or, rather, a complete set of excellent and well-documented Developer Tools!) From sunfreeware.com you can get either a precompiled gcc package or, if you prefer, a precompiled cdrecord package for Solaris. Cdrecord and the other tools are developed on Solaris, so everything you'll find on the fokus ftp server will compile and run - including the generic scsi driver.

/Quo

[ Reply to This | # ]

Why compile?
Authored by: paulio on May 20, '02 05:03:47PM
I prefer to install Fink. It's a lot easier. Once it's installed you can go to the Terminal and type:
fink install cdrtools


[ Reply to This | # ]
Why compile?
Authored by: prosper on May 20, '02 05:17:07PM
Try this
Authored by: zs on May 20, '02 07:28:09PM
No fink option please!!
Authored by: VEGx on May 20, '02 11:28:09PM

I can't install fink since I have already installed gimp. And I think it said in the fink install readme that I can't install it now...



[ Reply to This | # ]
No fink option please!!
Authored by: gvitale on May 21, '02 05:51:16AM

If you have a decent Internet connection, you better uninstall all X11/UNIX related stuff and get FINK installed; from there you can get whatever X11/UNIX stuff you like, including Xfree and the GIMP, with the option/advantage to get your installations "enclosed" within a single folder and automaticly updated over the time.



[ Reply to This | # ]
I refuse to uninstall my unix stuff
Authored by: VEGx on May 21, '02 06:12:03AM

No, I don't want to erase all my unix stuff.
I want my computer as it is.

All I want is a source code that can be compiled.



[ Reply to This | # ]
Alternative: CD Session Burner
Authored by: Felix on May 21, '02 03:05:24PM

Another option is to use CD Session Burner (available on VersionTracker). I use it to make multiple burns of my "documents" folder until the CD-R is full. Works perfectly. Took me a time or two to figure out that you can't insert the CD-R into the SuperDrive tray and close it until the program calls for it. If the CD is already in the tray and closed, the script won't work properly.



[ Reply to This | # ]
Alternative: CD Session Burner
Authored by: VEGx on May 21, '02 04:36:36PM

It doesn't exactly do the same thing, does it? The application you suggest doesn't make ISO CDs.



[ Reply to This | # ]
HFS?
Authored by: DavidRavenMoon on May 21, '02 04:34:01PM

Does this make HFS CDs, or only ISO 9660? I know Toast makes single volume/multi session ISO 9660 disks, but not HFS, which always end up as multi-volume.

[ Reply to This | # ]

HFS?
Authored by: quo on Aug 06, '02 09:15:04AM
There is no tool for making HFS images included in the cdrecord/cdrtools distribution. If you use the MacOS X supplied tools (hdiutil et al or, if you need a front end: dmg maker by pliris or dmg tool) to generate the HFS image though, you can burn it with cdrecord without problem. This is actually what I am doing, (Image generated on Wallstreet, burned with cdrecord on Solaris box since none of my SCSI burners seem supported by MacOS X (major gripe).
If you need a how-to, read the description how to make a bootable CD image by Sarah and Mike Bombich. Also, searching MacOS X Hints for hdiutil provides some excellent results.
/Quo

[ Reply to This | # ]
cdrtools - single/multiple volume multi-session?
Authored by: Anonymous on Aug 04, '02 10:28:23AM

I am going to try out cdrtools to see if it works for me. However, perhaps you can help me answer a question before I churn out coasters: Are the multi-session CDs cdrtools' "cdrecord" command generate single-volume or multi-volume ones? While I can live w/ multi-volume ones, ideally I would prefer single-volume. Thanks!



[ Reply to This | # ]
cdrtools Not Working
Authored by: Anonymous on Aug 04, '02 06:31:45PM

I downloaded and compiled the source code w/o using fink. I then created an image using "mkisofs" with no problems. However, when I tried to burn a CD using "cdrecord", I ran into problems. First it complained that it was unable to set priority using setpriority(), and warned about buffer underrun. So I repeated the command to execute "cdrecord", but this time w/ sudo. It then complained

cdrecord: No local SCSI transport implementation for this architecture.

I repeated the command several more times trying different names for the device other than "IOCompactDiscServices", but to no avail. Has anyone run across something like this?



[ Reply to This | # ]
cdrtools Not Working
Authored by: jecwobble on Aug 14, '02 01:47:05PM
I had the same experience last night. It's taken me quite some effort to get the source compiled and working, and I really would like to get this to work. I tried "IODVDServices" because that's what I found for IOKit using ioreg -l. I have a SuperDrive, though, not a ComboDrive as the author mentions. I'm at a loss!

[ Reply to This | # ]
Needs a generic SCSI driver?
Authored by: jecwobble on Aug 19, '02 03:55:38PM
I found this README.macosX on the creator's site. It's different than the one that unpacked with my download. It says:
Apple did remove the generic SCSI transport driver for unknown reasons! Cdrtools compile, but as there is no SCSI transport, you may only write CD's connected to other systems using the REMOTE SCSI protocol.
Could this be the problem?

[ Reply to This | # ]
Needs a generic SCSI driver?
Authored by: bluehz on Aug 19, '02 10:19:49PM

Anyone know how to identify an external CD burner? I mean its got to show up in that list when you ioreg -l. I'm not saying it will work with cdrecord - but hey - ifg I could at least identify it in the list - I would have a fighting chance. cdrecord works great with my internal Plextor - I just like the option.



[ Reply to This | # ]
Needs a generic SCSI driver?
Authored by: machiavel on Aug 20, '02 05:35:50AM

Your burner will show up in ioreg -l, but unless it's a SCSI device (i.e., it can't be a USB or Firewire burner), you won't be able to use cdrecord (unless you write your own driver). Your burner will probably show up in ioreg under its name. Paste the ioreg -l output to textedit and run a search with your burners name. My Que USB burner shows up as "Que! Drive USB@2100000 <class IOUSBDevice>"



[ Reply to This | # ]
Needs a generic SCSI driver?
Authored by: bluehz on Aug 20, '02 09:15:07AM
This tidbit from the cdrecord site makes me think there might be a glimmer of hope:
ATAPI-SCSI emulation is the native method of supporting ATAPI devices. Just imagine that IDE is one of many SCSI transport mechanisms. This are some SCSI transports: - Parallel SCSI (what most people call SCSI) - SCSI over fiber optics - SCSI over IEEE 1394 (Fire Wire) - SCSI over USB - SCSI over IDE (ATAPI) As you now see, the use of the naming convention "ATAPI-SCSI emulation" is a little bit misleading. It should rather be called: "IDE-SCSI host adapter emulation"
Full text here My external FW is also a QPS and is controlled by Native OS X drivers - works beautifully - never had a day of problems from it.

[ Reply to This | # ]
Needs a generic SCSI driver?
Authored by: machiavel on Aug 20, '02 05:48:53AM

I doubt that lack of "generic SCSI transport" is the problem, because cdrecord works on my fp imac (with CD-RW) without any problems, and it obviously worked on the machine of the author of this hint. Perhaps cdrecord, for some reason, doesn't work with the superdrive.



[ Reply to This | # ]
'Fixed' in 10.2
Authored by: Vargol on Sep 12, '02 04:19:45PM

Multi-session under Jags is hidden but there. In the 'burn' dialogue
there's a drop down button, which reveals some options, one of which
is to allow further burns on the CD.

Dave



[ Reply to This | # ]
'Fixed' in 10.2
Authored by: murali1080 on Nov 22, '04 03:11:46AM

Its not single-volume multi-session burning. Its multi-volume multi-session burning that is inbuilt in Mac OS X including 10.3 Panther and below.



[ Reply to This | # ]
Create single-volume multi session CD-Rs
Authored by: murali1080 on Nov 22, '04 03:06:42AM

UNIX GUI Software - http://www.xcdroast.org/xcdr098/xcdrosX.html
Instructions on usage - http://newbiedoc.sourceforge.net/tutorials/xcdroast/multisession.html.en



[ Reply to This | # ]
Create single-volume multi session CD-Rs
Authored by: trx on Jun 14, '06 07:45:20AM
Actually there is a nice utility for this that even checks and compares the content already on the disk! Universal binary even...

http://freeridecoding.net/burnagain


[ Reply to This | # ]