Title: CDfs v0.4
CDfs is a file system for Linux systems that `exports' all tracks and boot images on a CD as normal files. These files can then be mounted (e.g. for ISO and boot images), copied, played (audio and VideoCD tracks)... The primary goal for developing this file system was to `unlock' information in old ISO images. For instance, if you have a multisession CD with two ISO images that both contain the file 'a', you only see the file 'a' in the second session if you use the iso9660 file system: [root@k6 /root]# mount -t iso9660 -o ro /dev/cdrom /mnt/cdrom [root@k6 /root]# ls -l /mnt/cdrom
If you mount the CD with the cdfs file system, you get the two sessions as files: [root@k6 /root]# mount -t cdfs -o ro /dev/cdrom /mnt/cdfs [root@k6 /root]# ls -l /mnt/cdfs
These files can then be mounted loop back: [root@k6 /root]# mount -t iso9660 -o loop /cdfs/sessions_1-1.iso /mnt/loop1 [root@k6 /root]# mount -t iso9660 -o loop /cdfs/sessions_1-2.iso /mnt/loop2 and the file a can be accessed in both sessions [root@k6 /root]# ls -l /mnt/loop1
[root@k6 /root]# ls -l /mnt/loop2
The file system also allows you to access data on faulty multi session
disks, e.g. disk with multiple single sessions instead of a multi session
(for instance created with mkisofs without the proper -C
parameters).
Red Book (audio), Yellow Book Mode 1 (data) , Green/White Book Mode 2 / XA Form 1 and Green/White Book Mode 2 / XA Form 2 (data) tracks are exported. Other types will be added in the future. Data tracks are checked for ISO, HFS and boot images. If none of these are found, the data track is exported as `unknown`. This version only exports the first HFS and boot image (anybody seen a CD with more than 1 HFS or boot image?). The file system can be downloaded from here, compiled using make and installed using insmod cdfs.o. See the file INSTALL for more information. Mount a CD with something like mount -t cdfs -o ro /dev/cdrom /mnt/cdfs Check /proc/cdfs for information about the tracks. The exported
files can be found under /mnt/cdfs and will have one of these
names:
[root@k6 /root]# mount -t cdfs -o ro /dev/cdrom /mnt/cdfs [root@k6 /root]# ls -l /mnt/cdfs
The first file contains the first session, the second file contains sessions 1 & 2, the 3 contains sessions 1, 2 & 3 and the last file contains all the sessions. You can mount all the files/sessions at the same time: [root@k6 /root]# mount -o loop /cdfs/sessions_1-1.iso
/mnt/loop1
[root@k6 /root]# mount -t cdfs -o ro,single
/dev/cdrom /mnt/cdfs
[root@k6 /root]# mount -t cdfs -o ro /dev/cdrom /mnt/cdfs [root@k6 /root]# ls -l /mnt/cdfs
[root@k6 /root]# file /mnt/cdfs/boot.image
[root@k6 /root]# mount -t vfat -o loop /mnt/cdfs/boot.image /mnt/loop1 [root@k6 /root]# head /mnt/loop1/autoexec.bat
IF "%config%"=="NOCD" GOTO QUIT
[root@k6 /root]# mount -t cdfs -o ro /dev/cdrom /mnt/cdfs [root@k6 /root]# ls -al /mnt/cdfs
[root@k6 /root]# mount -t iso9660 -o loop,ro /mnt/cdfs/sessions_1-1.iso /mnt/loop1 [root@k6 /root]# mount -t hfs -o loop,ro /mnt/cdfs/apple.hfs /mnt/loop2 [root@k6 /root]# ls -a /mnt/loop1
[root@k6 /root]# ls -a /mnt/loop2
[root@k6 /root]# mount -t cdfs -o ro /dev/cdrom /mnt/cdfs [root@k6 /]# ls -l /mnt/cdfs
[root@k6 /]# sox /mnt/cdfs/track-1.wav -t ossdsp /dev/dsp Note that audio tracks are `exported' by cdfs because they are on the
CD. However, cdfs will make no attempt to correct reading errors while
reading from scratched disks, to solve misalignment, frame jitter, loss
of streaming, etc. You should use cdparanoia
or cdda2wav if
you encounter these problems.
Michiel Ronsse 10/24/99
|