I've been thinking about something like this, too. For making mount as
automatic as possible, we need two things:
- determine what file system is on a special device
- determine if and where to mount it
For the first part, I see two options: A file system recognizing library,
and a mount probing option. The library would be a great thing for
installation programs: Look around what devices have what file systems,
not only based on the partition type, but by actually looking at the volume.
The same thing can be done in kernel space. Most drivers probe before
mounting, anyways, so we could have an option: Just probe
(mount -t hpfs -o probe /dev/hda7 /unused). There are several error codes
for that call: probing not supported, wrong file system, device error,
permission denied.
Once we know what file system to use, we need to know whether and where
to mount it. 'Whether' can be done in /etc/fstab
/dev/[hs][a-d][1-9] /dsk/$1 ext2,ntfs,vfat defaults 0 0
You could give a list of devices to probe and a list of file systems accepted.
Automatically finding the right place is more tricky. Some file systems
support the notion of 'last mount point' (e.g. ufs), which could be used.
Martin