Data CDs and DVDs almost always use the ISO 9660 filesystem (so called after the international standard that defines it). These images are therefore usually referred to as ISO images. You could also create CD or DVD images, CDs, and DVDs using standard Linux filesystems (ext2, for example), but these will not be useful for exchanging data with users of other operating systems.
r ■ rj It is not essential to use the ISO 9660 filesystem when you create images to burn to
K-'j ^ .■¿•CV-.wCD. You can create a suitably sized EXT2 loopback filesystem and simply copy the files you want to it and then burn a CD from it. (If you use k3b, it will detect that the image is not an ISO image, but you can force it to burn the image by pretending that it is.) But you won't be able to read (easily) the resulting CD on a non-Linux system. You may also have to mount it manually on Linux (with a command such as mount /dev/hdc /mnt) because current versions of SUSE will expect an ISO 9660 filesystem.
A quick way to save or back up a moderate amount of data is to create an ISO image containing that data and burn it to a CD or DVD.
Depending on which version of SUSE you are using, the tool for creating ISO images is either mkisofs or genisoimage. The reason for the change is a dispute about licensing between much of the Linux community and the original author of these tools.
The man pages for mkisofs and genisoimage are fairly bewildering to say the least because there is a very large number of options. But for most purposes, the recipe we discuss will probably do exactly what you want. Here we shall use genisoimage for our example.
Suppose you have a directory work under your home directory. You want to create a CD containing this directory's contents, and you know that the total amount of data is not too big to fit on a CD.
[email protected]:~> genisoimage -J -r -o work.iso work/
This makes a filesystem of type ISO 9660 and copies the contents of the directory work into it. This is very similar to the way that you created a filesystem image earlier in the chapter and then mounted it and wrote to it. The difference is that the genisoimage tool both creates the special ISO 9660 filesystem and writes the data to it in one action.
The options - J and -r here indicate that the ISO will have Joliet and Rock Ridge extensions (this should mean that the resulting CD should work fine on Windows, Mac OS, and Linux systems). The -o indicates the name of the output file.
You should now be able to mount work.iso and check that it has been correctly created: [email protected] : ~ # mount work.iso /mint -o loop
Was this article helpful?