FDMOUNT(1)

NAME
fdmount - Floppy disk mount utility

SYNOPSIS
fdmount [-l] [--list] [-d] [--daemon] [-i interval ] [--interval interval ] [-r] [--readonly] [-s] [--sync] [--nodev] [--nosuid] [--noexec] [-f] [--force] [-h] [--help] [drivename [mountpoint] ] fdumount [-f] [--force] [drivename] fdlist fdmountd [-i interval ] [--interval interval ] [-r] [--readonly] [-s] [--sync] [--nodev] [--nosuid] [--noexec] [drivename [mountpoint] ]

DESCRIPTION
The fdmount program mounts a floppy disk in the specified drive. It tries to figure out the exact format and filesystem type of the disk from data in the disk's boot sector or super block and the auto-detected track layout. Currently, fdmount supports the filesystems minix, ext, ext2, xia, and msdos, and includes special support for disks formatted by the ms-dos 2M utility. It also checks whether the disk is write protected, in which case it is mounted read-only. The symbolic drivename is (currently) one of fd[0-3], corresponding to the special device files /dev/fd[0-3]. If drivename is not specified, fd0 is assumed. The disk is mounted on the directory mountpoint, if specified, or on /fd[0-3]. In either case, the mount point must be an existing, writeable directory.

OPTIONS

-l --list
    List all known drives with their symbolic name, type, and mount status.

-d --daemon
    Run in daemon mode (see below).

-i --interval interval
    Set the polling interval for daemon mode. Unit is 0.1 sec, default is 10 (1 sec).

-r --readonly
    Mount the disk read-only. This is automatically assumed if the disk is write protected.

-s --sync
    Mount with the SYNC option.

--nodev
    Mount with the NODEV option. Ignored for msdos filesystems, otherwise always set for non-root users.

--nosuid
    Mount with the NOSUID option. Ignored for msdos filesystems, otherwise always set for non-root users.

--noexec
    Mount with the NOEXEC option.

-f --force
    Attempt a mount or unmount operation even /etc/mtab says that the drive is already mounted, or not mounted, respecively. This option is useful if /etc/mtab got out of sync with the actual state for some reason.

-h --help
    Show short parameter description

SECURITY
When mounting on the default mount point, the mount point's owner is set to the current user, and the access flags according to the user's umask. For a specified mountpoint, owner and permissions are left unchanged. The user running fdmount must have read access to the floppy device for readonly mounts, and read/write access for read/write mounts. Fdmount can be run suid root, allowing users to mount floppy disks. The following restrictions are placed upon non-root users: If a mountpoint is specified explicitly, it must be owned by the user. When unmounting, the mount point must be owned by the user, whether default or not (i.e. must have been mounted by the same user). non-msdos disks are automatically mounted with the nodev and nosuid flags set. However, Do not rely on fdmount being secure at the moment.

DAEMON MODE
In daemon mode, the specified drive is periodically checked and if a disk is inserted, it is automatically mounted. When the disk is removed, it is automatically unmounted. However, it is recommended to unmount the disk manually before removing it. In any case, if automatic unmounting is used, disks should be mounted with the --sync flag. Note that this mode has some potential drawbacks: Some floppy drives have to move the drive head physically in order to reset the diskchange signal. It is strongly recommended not to use daemon mode with these drives. Refer to the floppycontrol(1) documentation for details. It is not possible to specify special options, like --readonly, to modify the mount process. If a disk does not contain a filesystem (e.g. a tar archive), the mount attempt may slow down initial access. As fdmount cannot identify the user trying to use the disk drive, there is no way to protect privacy. Disks are always mounted with public access permissions set.

DIAGNOSTICS

error opening device <name>

error reading boot/super block
    fdmount failed to read the first 1K of the disk. The disk might be damaged, unformatted, or have a format unsupported by the FDC/Linux kernel.

unknown filesystem type
    No magic number of any of the supported filesystems (see above) could be identified.

sorry, can't figure out format (<fs> filesystem)
    The size of the filesystem on the disk is incompatible with the track layout detected by the kernel and an integer number of tracks. This may occur if the filesystem uses only part of the disk, or the track layout was detected incorrectly by the kernel.

failed to mount <fs> <size>K-disk
    The actual mount(2) system call failed.

failed to unmount
    The actual unmount(2) system call failed.

cannot create lock file /etc/mtab~
    If /etc/mtab~ exists, you should probably delete it. Otherwise, check permissions.

Can't access <mountpoint>
    Most probably, the default or specified mount point does not exist. Use mkdir.

<mountpoint> is not a directory

not owner of <mountpoint>
    Non-root users must own the directory specified as mount point. (This does not apply for the default mount points, /fd[0-3].)

No write permission to <mountpoint>
    Non-root users must have write permission on the mount point directory.

Not owner of mounted directory: UID=<uid>
    Non-root users cannot unmount if the mount point is owned (i.e. the disk was mounted) by another user.

invalid drive name
    Valid drive names are fd0, fd1, fd2, fd3

drive <name> does not exist
    The drive does not exist physically, is unknown to the Linux kernel, or is an unknown type.

Drive <name> is mounted already
    Trying to mount a drive which appears to be mounted already. Use the --force option if you think this is wrong.

Drive <name> is not mounted
    Trying to unmount a drive which does not appear to be mounted. Use the --force option if you think this is wrong.

ioctl(...) failed
    If this occurs with FDGETDRVTYP or FDGETDRVSTAT, you should probably update your Linux kernel.

mounted <fs> <size>K-disk (<options>)
    Success message.

BUGS
chown() fails for non-msdos filesystems mounted read-only, so the mount point may have the wrong owner. Particularly, this means that the user may be unable to unmount the disk! Fdmount should be more flexible about drive names and default mount points (currently hardcoded). Probably not very secure yet (when running suid root). Untested with ext and xia filesystems. Can't specify filesystem type and disk layout explicitly. Can't specify nonstandard mount options. In daemon mode, the drive light stays on all the time.

FILES
/dev/fd[0-3] - Floppy devices /etc/mtab - Mounted filesystems table

AUTHOR
Rainer Zimmermann, zimmerm@mathematik.uni-marburg.de

SEE ALSO
mount(1), mmount(1), superformat(1), floppycontrol(1), setfdprm(1)