Supermount Alternative: Autofs


I wasted alot of time getting Supermount to work in Mandrake 8.1, I did get it to work eventually but in the process I came along a very good alternative to Supermount. With Autofs you don't have to use one of the default Mandrake kernels or patch and recompile a standard kernel to get Supermount functionality.

Autofs performance is the same as a working Supermount setup. Just insert a CD or floppy and you can start accessing the drive. Music CD's also work fine, they're automatically detected as a music cd and as such won't get mounted, they're available for playing with your favorite CD player. All of the following must be done as root:
 
 

Installation:

1) Disable "supermount" by running supermount -i disable

2) Install the Autofs package (I installed autofs-4.0.0-0.14mdk).

3) Configure Autofs. Change the /etc/auto.master file that is installed with the package to look like this:

/misc  /etc/auto.misc  --timeout 10

The first entry is not the mount point, it's where the set of mount points found in the second entry are going to be. The third option says that the mounted filesystems can try to unmount themselves 10 seconds after use and they can't be unmounted if being used.

4) Edit the /etc/auto.misc file.

The auto.misc is a "map file" where you can specify multiple devices to be mounted. I have entries for my Floppy, CD and CDRW drives, my auto.misc looks like this:

floppy -fstype=vfat,exec,noauto,nodev,nosuid,rw,perm=646,user :/dev/fd0
cdrom  -fstype=iso9660,ro,user,exec,nodev,nosuid :/dev/cdrom
cdrom2  -fstype=iso9660,ro,user,exec,nodev,nosuid :/dev/scd0

5) Create the /misc directory:

mkdir /misc ; chmod 775 /misc

6) Next, restart the autofs daemon with:

/etc/init.d/autofs stop ; /etc/init.d/autofs start

7) If using KDE, you can create some icons on your desktop to access your Floppy and Cdrom drives, just right click on the desktop and select "Create New", then select "Link To Application...", under the "Execute" tab enter "kfmclient openURL /misc/cdrom" in the command box, then from the "General" tab name it CDROM and select an icon representing a cdrom.


Happy mounting!