Submount Publisher's description
from Eugene Weiss
Submount is a removable media handling system for Linux.
Submount is a system for automatically mounting and unmounting removable media drives like cdroms and floppy disk drives. It works with the Linux 2.6 kernel series.
A backport to the 2.4 kernel series is available now as well. Once installed, it allows removable media drives to be accessed as if they were permanently mounted.
Submount is composed of two part: a kernel module called "subfs" and a user program titled "submountd". Both must be properly installed for submount to work. The software is contained in the two directories underneath the submount directory. To build and install the software, read the files titled "INSTALL" in both directories. A few binary packages are now available.
For many distributions, there are packages for 2 different kernels available. This usually means one is for the original distribution kernel, and the second for a kernel released with recent security updates included. Check the package name and the version of the kernel installed on your system carefully to make sure that they match.
For Redhat, Fedora, and Mandrake, Choose the RPM that matches your kernel package. For Debian, download the subfs-modules package that matches your kernel-image deb, download the submountd package, and install both. The .tgz packages for Slackware 9.1 were built for the basic ide kernels, but also work for the scsi.s kernels, and hopefully for others. If you want a package for a different stock kernel from these distributions (such as smp) email me directly.
SuSE 9 contains version 0.2 of submount, with the kernel modules included in the kernel packages, and the userspace portion in a separate "submount" package. The package is included with the professional version, but not with the personal edition, so if you have the latter, get the package from SuSE's ftp site. There's no integration with yast, however, so you'll still have to edit your /etc/fstab file by hand.
SuSE 9.1 will use submount to handle removable media by default.
System Requirements:??? The 2.6.x version of submount has been tested with kernels up to 2.6.3 as of this writing. It has also been successfully tested against 2.6.3-mm3.
??? The 2.4.x version has been tested with 2.4.20 through 2.4.24, but should work with recent 2.4.x kernels.
Once the software is installed, and the kernel module is loaded, you can mount a submount filesystem. To mount a drive under subfs, use the usual syntax, except put "subfs" in the filesystem type field, and add the option "fs=" in the options list.
mount -t subfs /dev/scd0 /mnt/cdrom -o fs=iso9660,ro
or for fstab
/dev/scd0 /mnt/cdrom subfs fs=iso9660,ro
I've copied the function to find the filesystem type by reading the superblock from the standard mount program, so fs=auto will work. It can, however, cause a noticeable pause, particularly on floppies, so there is another method for using multiple filesystems. If a keyword is used in the fs= option, submountd will attempt to mount filesystems from a list.
Currently there are two options: fs=floppyfss attempts vfat and ext2, and fs=cdfss tries iso9660 and udf. Submountd will strip the options codepage, iocharset and umask from filesystems that don't take them, so these can be included in list mounts, or auto-detected mounts.
These fstab lines should work:
/dev/scd0 /mnt/cdrom subfs fs=cdfss,ro,iocharset=iso8859-1,umask=0 0 0
/dev/fd0 /mnt/floppy subfs fs=floppyfss,iocharset=iso8859-1,sync,umask=0 0 0
Another option is to use a colon separated list of filesystems:
/dev/scd0 /mnt/cdrom subfs fs=udf:iso9660,ro,iocharset=iso8859-1,umask=0 0 0
Once this is done, just access the mountpoint directory as usual.
Note: The option iocharset should only be used for kernels which require it. If the installation program of your distribution used it, you should as well. Otherwise, you should not.
If you try submount, please let me know if it worked for you.
As of version 0.6 a second client program has been included for the purpose of allowing
Program Release Status: Minor Update
Program Install Support: Install and Uninstall