Recently, I recall seeing some postings regarding supermount failing after
upgrading the kernel to the 2.4.x series. I posted here, as did others, a few
months ago regarding that; basically, there is code in
/etc/rc.d/mandrake-everytime which disables the supermount keywords in
/etc/fstab when the 2.4 kernel boots and which is coded in such a way that it
doesn't get reenabled if you reboot on the standard 2.217 mdk kernel.
Once I had installed the 2.4 kernel and supermount got broken (I don't know
of a patch for the 2.4 kernel to enable supermount, btw, as there is for the
2.2 series kernel) I was never able to get it to work again without a
reinstall from the iso CD.s
For those in the same boat as I am, I have some good news! Tonight I started
playing with autofs, and so far it seems to fit the bill just fine.
Autofs is another way of automatically mounting filesystems, and seems to
work not only for removable media on your local computer, but also for
networked shares (eg via NFS) if you have them. The autofs mini-howto is
pretty good.
You need to compile autofs support in when you build your kernel. As a test,
I created a /mount directory (mkdir /mount) to automounted drives, and tried
it out with the DVD drive.
I created /etc/auto.master, which is the control file that tells autofs, when
started up, how to find the file systems it will handle. Mine now looks like
the following:
# $Id: auto.master,v 1.2 1997/10/06 21:52:03 hpa Exp $
# Sample auto.master file
# Format of this file:
# mountpoint map options
# For details of the format look at autofs(8).
#/misc /etc/auto.misc --timeout=60
#/net /etc/auto.net --timeout=60
/mount /etc/auto.mount --timeout=60
All the commented lines were already there from the mdk install; I just
commented out the /misc and /net lines which I didn't want to use, and added
the /mount line. Details inthe man pages, but basically all the autofs
filesystems will be mounted as subdirs of /mount, and the file
/etc/auto.mount controls what autofs can mount in there. The --timeout=60
specifies that the all filesystems controlled via /etc/auto.mount will be
unmounted if inactive for 60 seconds. You can have multiple lines, each
pointingn to its own control file. Each line launches a new instance of
autofs, and can have a different timeout, so you could have shorted timeouts
for, say, floppies, and longer timeouts for network file systems so they
don't keep mounting and unmounting on you.
In /etc/auto.mount I put:
# autofs control file for the /mount mount point
# format: mount directory options actual place to mount
dvd -fstype=iso9660,ro,nosuid,nodev,exec,user :/dev/cdrom
This causes the local device /dev/cdrom to automount at /mount/dvd (remember
that auto.master specified this file to control mount points under /mount);
that device is of course my dvd drive.
I then rebooted (I could have killed autofs and restarted it, but I wanted to
be SURE... - and when I popped a DVD into the drive and cd'd to /mount/dvd,
there was a brief pause and then...there I was!
So far, so good, and all seems to work just fine. I will now experiment with
adding my floppy drive, CDRW, etc...I am hopeful that I can also add smb
shares to automagically mount as needed....
Neal