This document is introduction for supermount patch which treats removable media very easily.
Now, this patch is the best way to treat removable media, and is suitable for users who have few UNIX knowledge (like school?).
Currently, supermount is provided as kernel patch. Download it from Official page Linux removable media support and apply it to you kernel.
Thereupon, a new config item named Supermount removable media support has appeared in Filesystems. Mark it as built-in or module and compile kernel.
If you could finish updating kernel, try using supermount.
Test FD for First. Execute following command with the root authority.
# mount -t supermount -o dev=/dev/fd0,fs=vfat floppy /mnt
If you encounter no errors, supermount should works. Then, insert FD, return normal user and exec following command;
$ ls /mnt
You would get a file list. Then change FD and execute ls again. If you get a correct file list of new FD, supermount works well.
If it works, test other commands(e.g. df). You can get information of subfs mounted actually by checking /proc/fs/supermount/subf.
When you finish the test, umount /mnt. Modify /etc/fstab to use supermount by default.
Add following entry to /etc/fstab. If similar entries with "noauto,user" already exist, modify them.
floppy /floppy supermount fs=vfat,dev=/dev/fd0,--,codepage=437,iocharset=iso8859-1 0 0 cdrom /cdrom supermount fs=iso9660,dev=/dev/cdrom,--,ro,iocharset=iso8859-1 0 0
If you have replaced entry that already exists, you may specify subfs option after --. The sample above shows some options to convert the file name. You can omit them, if not needed.
become the root and type the following command for new /etc/fstab you modified.
# mount -a
And, check the mount list as follows;
floppy on /floppy type supermount (rw,fs=vfat,dev=/dev/fd0,--,codepage=437,iocharset=iso8859-1) cdrom on /cdrom type supermount (ro,fs=iso9660,dev=/dev/cdrom,--,iocharset=iso8859-1)
If you get a result like the sample above, supermount works. Now, you can treat media through a specified direcotry.
Currently, supermount works with IDE CD-ROM Drive and normal FDD. (Probably with SCSI CD-ROM, but I have not tested yet.)
Unfortunately, this dose not work with USB CF/MMC reader. Kernel can't detect media change, obsolete cache will remain after media is ejected.