How to burn long filenames to CD

The problem

I usually use Nero Burning ROM that came with my DVD writer to archive my files. However, I ran into the problem of some files having names longer than 64 characters. As a result of this, Nero would offer to rename the files for me, either mangling the extension or truncating parts of the filename. This was unacceptable as I wanted the full name of each file.

Using mkisofs to image the ISO

The solution I used was to create an image file using mkisofs, and then use Nero to burn that image.

Choosing which files to burn

The easiest way for me was to move all the files I wanted to archive into an arbitrary directory. For simplicity refer to this directory as /burn/. Inside this directory make sure the structure is just like the image you want to appear on your CD or DVD.

Make sure you check the maximum capacity of your target media, and make sure the directory you created doesn't contain too many files. You can check the space taken by using the du -shm command.

Create your image using mkisofs

I used the following command to create my iso file.

mkisofs -rock -joliet -joliet-long -o /tmp/blarg.iso -split-output -graft-points -V mp3_001 /=/burn/

-rock is for rock ridge extensions, so when we mount this on linux long filenames will appear.

-joliet -joliet-long is for joliet extension, so when we mount this on windows long filenames will appear. I have only tested the appearance of long filenames on Windows XP.

/tmp/blarg.iso tells mkisofs to create an iso file with this name.

-split-output. You may not need this, but when authoring DVDs, I ran into the maximum filesize restriction on the local filesystem. This will split the image into 1G parts.

-V mp3_001 specifies that the label for the image is mp3_001.

-graft-points is used for specifying that we want to place directories at certain places on the image.

/=/burn/ is the pathspec and is in the form A=B. This is a very simple example, that says we will put all files and directories in /burn/ onto the root directory of the image.

Transfer the image to the windows machine

If the image was split into pieces, you may have to join them together. You can use the copy to do this. See the help by entering help copy.

L:\tmp>copy blarg.iso_* /B blarg.iso
blarg.iso_00
blarg.iso_01
blarg.iso_02
blarg.iso_03
blarg.iso_04
        1 file(s) copied.

L:\tmp>

This can take a long time to complete, especially if you have a slow computer or hard drive.

Test and Burn

You can mount this image using Daemon Tools to test that image looks correct, otherwise just open up Nero and burn the image!

Published: Tuesday, 30 March 2004