Introduction - will it change my life?
Magic(!) Mounter (mmounter) tries to bring to Linux/UNIX a more user-friendly
behaviour regarding the automatic mounting/unmounting of volumes (disks,
partitions, CD-ROMs, floppies, ZIPs...).
It's approach is completely user-space based so you won't need to patch your
kernel (like you would have to to use other solutions like supermount). It
should also be fairly portable (even if HP-UX support is broken right now).
Getting Magic(!) Mounter - I want it now !
-
Using RPM
Download the source archive then type
rpm -ta mmounter-version.tar.gz
rpm -i /usr/src/redhat/RPMS/i386/mmounter-version-1.i386.rpm
(replace
redhat by RPM on Mandrake systems)
-
From source
Download the source archive then type
cd mmounter-version
make
make install (as root)
Installation - what should I do with this bunch of bytes?
By default, the installation (either by RPM or manual) creates a startup
file named /etc/rc.d/init.d/mmounter.rc. The RPM automatically
activates it but if you installed manually, you should activate it by typing
(as root)
/sbin/chkconfig --add mmounter.rc
/sbin/chkconfig mmounter.rc on
/etc/rc.d/init.d/mmounter.rc start
Configuration - does it make coffee ?
The config is stored in /etc/mmounter.conf
the format of this file is similar to the .INI files used
by Windows:
[section]
key=value
key=value
each "section" here is a device or a special device.
known options for normal devices:
-
fs
comma-separated and ordered list of expected filesystems (read: the
FSes we probe for)
-
type
this parameter is informative only. It may be used with the mountpoint
directive
-
eject
if present, indicates the full path of the program to be used to eject
the device (/usr/bin/eject for example); will be called with one
parameter: the device name
-
options
the options to pass to mount when mounting this device
-
options.filesystem
the options to pass to mount when mounting this filesystem on this
device
-
userdisk
if 'yes', indicates the device can be un-mounted by a non-root
user
-
delay
the polling delay for this device
-
mountbase
the directory where mmounter will create the mountpoint for this device
-
mountpoint
the template to use to create the mountpoint. Use the following escape
sequences:
\v: volume name
\d: device name (without the /dev/ prefix)
\t: device type (value of the type config variable)
\f: filesystem (ext3/ext2/vfat/hfs/is9660...)
default=\v (\f)
-
mount
full path to the mount program (most probably /usr/bin/mount)
-
umount
full path to the umount program (most probably /usr/bin/umount)
special devices
-
[*]
this pseudo-device contains the default values for all the options
used by other devices
-
[</path/to/file]
this pseudo-device forces mmounter to read /path/to/file
and interpret it as /proc/partitions to autodetect the partitions
present on the system. Note that the only allowed option in such a section
is delay to specify the poll interval for the partitions file
Example configuration
[/dev/cdrom]
fs=hfs,iso9660
type=CD-ROM
eject=/usr/bin/eject
options=ro
userdisk=yes
delay=5
[/dev/zip]
fs=ext3,ext2,hfs
type=ZIP
eject=/usr/bin/eject
options=exec,nosuid,nodev
userdisk=yes
delay=5
[</proc/partitions]
[*]
fs=ext3,ext2,vfat,hfs,iso9660
mountbase=/Local
mount=/bin/mount
options.vfat=exec,nosuid,nodev
options.hfs=exec,nosuid,nodev
options.iso9660=exec,nosuid,nodev
type=Hard disk
userdisk=no
delay=15
Usage
The users can un-mount the volumes tagged as 'userdisk' by typing
mmumount /path/to/mountpoint
or
mmumount /path/to/device
The volume will then be unmounted and ejected (if configured so).
Lyonel Vincent