How to create a multisession cd

The first thing to do is to erase the rewriteble cd:

cdrecord -blank=all speed=2

For the first time create an ISO in this way:

mkisofs -r -R -J -l -L -o file_name_or_directory.iso /path/directoryorfile/to/burn

cdrecord -multi -tao -pad -data -v speed=4 dev=2,0 file_name_or_directory.iso

For the second time onwards to create an ISO do like so:

mkisofs -r -R -J -l -L -o file_name_or_directory.iso -C xx,xx -M 2,0 -v /path/new/directoryorfile/to/burn

xx,xx are two number that you can get from the command:

cdrecord -msinfo

instead of 2,0 you should get your exact numbers with the following command:

cdrecord --scanbus

After you have created the ISO you have to burn it on cd:

cdrecord -multi -tao -pad -data -v speed=4 dev=2,0 file_name_or_directory.iso