Menu

#44 A smarter mount command for MSYS

Accepted
closed
MSYS (6)
2008-08-27
2007-10-23
No

Most users, coming from a *nix background, expect to be able to manipulate the kernel mount table using the `mount' and `umount' commands, at least in the basic form:

$ mount <device-path-name> <mount-point>

$ umount <mount-point>

Currently, MSYS provides no `umount' command at all, and its `mount' command can do no more than list the mount table--it fails, if specified with any arguments.

The attached shell archive provides a prototype implementation for `mount' and `umount' commands, which will deliver a more *nix like behaviour. It requires no modification to the existing core MSYS implementation, beyond:--

1) Existing `mount.exe' command renamed as `msysmnt.exe';

2) Two new shell scripts, (provided), to deliver the extended mount table manipulation features, while preserving existing behaviour when `mount' is invoked without arguments, (because the `mount' script invokes `msysmnt.exe' in this case).

This implementation differs from traditional *nix implementations, in the following respects:--

1) The `mount' command may be invoked in zero, one or two argument forms, but accepts no arguments to specify mount options.

2) MSYS usage of `/etc/fstab', in place of the traditional `/etc/mnttab' or `/etc/mtab', is retained.

3) The single argument form of the `mount' command uses `/etc/fstab.conf', for the purpose traditionally fulfilled by `/etc/fstab' in respect of this form of the command.

4) The `umount' command requires exactly one argument, and supports no options.

5) The `umount' command does not check for "busy" mount points--it simply and unconditionally removes any mount point record from `/etc/fstab' if it matches the specified argument.

The attached shell archive may be installed directly into the MSYS /bin directory, simply by executing:

gzip -cd mount.shar.gz | sh

If preferred, it may be installed into a `sandbox/bin' directory, by executing:

gzip -cd mount.shar.gz | prefix=/path/to/sandbox sh

Discussion

  • Keith Marshall

    Keith Marshall - 2007-10-23

    Installable shell archive

     
  • Cesar Strauss

    Cesar Strauss - 2008-08-27

    Logged In: YES
    user_id=1369729
    Originator: NO

    Hi Keith,

    > The attached shell archive provides a prototype implementation
    > for `mount' and `umount' commands, which will deliver a more *nix
    > like behaviour

    These scripts are very useful indeed. I included them in the latest MSYS release.

    Thanks,
    Cesar

     
  • Cesar Strauss

    Cesar Strauss - 2008-08-27
    • milestone: 307068 --> Accepted
    • status: open --> closed