summaryrefslogtreecommitdiffstats
path: root/upstream/debian-unstable/man1/fdmount.1
blob: eeae73927bc38a6613c9b5af6e6c3387310bbce9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
.TH fdmount 1 "27Jan21" fdutils-5.6
.SH Name
fdmount - Floppy disk mount utility
'\" t
.de TQ
.br
.ns
.TP \\$1
..

.tr \(is'
.tr \(if`
.tr \(pd"

.SH Note
This manpage has been automatically generated from fdutils's texinfo
documentation.  However, this process is only approximative, and some
items, such as cross-references, footnotes and indices are lost in this
translation process.  Indeed, these items have no appropriate
representation in the manpage format.  Moreover, only the items specific
to each command have been translated, and the general information about
fdutils has been dropped in the manpage version.  Thus I strongly advise
you to use the original texinfo doc.
.TP
* \ \ 
To generate a printable copy from the texinfo doc, run the following
commands:
 
.nf
.ft 3
.in +0.3i
    ./configure; make dvi; dvips fdutils.dvi
.fi
.in -0.3i
.ft R
 
\&\fR
.TP
* \ \ 
To generate a HTML copy,  run:
 
.nf
.ft 3
.in +0.3i
    ./configure; make html
.fi
.in -0.3i
.ft R
 
\&\fRA pre-made HTML can be found at:
\&\fR\&\f(CW\(ifhttp://www.tux.org/pub/knaff/fdutils\(is\fR
.TP
* \ \ 
To generate an info copy (browsable using emacs' info mode), run:
 
.nf
.ft 3
.in +0.3i
    ./configure; make info
.fi
.in -0.3i
.ft R
 
\&\fR
.PP
The texinfo doc looks most pretty when printed or as HTML.  Indeed, in
the info version certain examples are difficult to read due to the
quoting conventions used in info.
.SH Description
.PP
 
.nf
.ft 3
.in +0.3i
\&\fR\&\f(CWfdmount [\fR\&\f(CW\-l] [\fR\&\f(CW\-\-list] [\fR\&\f(CW\-d] [\fR\&\f(CW\-\-daemon] [\fR\&\f(CW\-\-detach]
[\fR\&\f(CW\-i \fIinterval\fR\&\f(CW] [\fR\&\f(CW\-\-interval \fIinterval\fR\&\f(CW] [\fR\&\f(CW\-o \fImount-options\fR\&\f(CW]
[\fR\&\f(CW\-r] [\fR\&\f(CW\-readonly] [\fR\&\f(CW\-s] [\fR\&\f(CW\-\-sync] [\fR\&\f(CW\-\-nosync] [\fR\&\f(CW\-\-nodev]
[\fR\&\f(CW\-\-nosuid] [\fR\&\f(CW\-\-noexec] [\fR\&\f(CW\-f] [\fR\&\f(CW\-\-force] [\fR\&\f(CW\-h] [\fR\&\f(CW\-\-help]
[\fIdrivename\fR\&\f(CW] [\fImountpoint\fR\&\f(CW]
\&\&
\&\fR\&\f(CWfdumount [\fR\&\f(CW\-f] [\fR\&\f(CW\-\-force] [\fIdrivename\fR\&\f(CW]
\&\&
\&\fR\&\f(CWfdlist
\&\&
\&\fR\&\f(CWfdmountd [\fR\&\f(CW\-i \fIinterval\fR\&\f(CW] [\fR\&\f(CW\-\-interval \fIinterval\fR\&\f(CW] [\fR\&\f(CW\-r]
[\fR\&\f(CW\-readonly] [\fR\&\f(CW\-s] [\fR\&\f(CW\-\-sync] [\fR\&\f(CW\-\-nosync] [\fR\&\f(CW\-\-nodev]
[\fR\&\f(CW\-\-nosuid] [\fR\&\f(CW\-\-noexec] [\fR\&\f(CW\-\-help] [\fIdrivename\fR\&\f(CW] [\fImountpoint\fR\&\f(CW]]
\&\&
.fi
.in -0.3i
.ft R
 
\&\fR
.PP
The \fR\&\f(CWfdmount\fR 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.
.PP
Currently, fdmount supports the filesystems \fR\&\f(CWminix\fR, \fR\&\f(CWext\fR,
\&\fR\&\f(CWext2\fR, \fR\&\f(CWxia\fR, and \fR\&\f(CWmsdos\fR, and includes special support
for disks formatted by the \fR\&\f(CW2M\fR utility for MS-DOS.
.PP
It also checks whether the disk is write protected, in which case 
it is mounted read-only.
.PP
The symbolic \fIdrivename\fR is (currently) one of \fR\&\f(CW\(iffd[0-7]\(is\fR,
corresponding to the special device files \fR\&\f(CW\(if/dev/fd[0-7]\(is\fR. If
\&\fIdrivename\fR is not specified, \fR\&\f(CW\(iffd0\(is\fR is assumed.
.PP
The disk is mounted on the directory \fImountpoint\fR, if specified, or
on \fR\&\f(CW\(if/fd[0-7]\(is\fR.  In either case, the mount point must be an
existing, writable directory.
.PP
\&\fBDue to a bug in the floppy driver (?), the polling interval (\-i
flag) must be longer than the spindown offset. Thus you need to do (for
example) floppycontrol \-\-spindown 99 before starting fdmountd in daemon
mode\fR
.PP
.SH Options
.IP
.TP
\&\fR\&\f(CW\-l\ \fI\-\-list\fR\&\f(CW\fR\ 
List all known drives with their symbolic name, type, and mount
status. 
.TP
\&\fR\&\f(CW\-d\ \fI\-\-daemon\fR\&\f(CW\fR\ 
Run in daemon mode (see below).
.TP
\&\fR\&\f(CW\-\-detach\fR\ 
Runs daemon in background, and detaches it from its tty. Messages
produced after the fork are logged to syslog.
.TP
\&\fR\&\f(CW\-p\ \fIfile\fR\&\f(CW\fR\ 
.TQ
\&\fR\&\f(CW\-\-pidfile\ \fIfile\fR\&\f(CW\fR
.IP
Dumps the process id of the daemon to
\&\fIfile\fR. This makes killing the daemon easier:
\&\fR\&\f(CWkill \-9 `cat \fIfile\fR\&\f(CW`\fR
.TP
\&\fR\&\f(CW\-i\ \fIinterval\fR\&\f(CW\fR\ 
.TQ
\&\fR\&\f(CW\-\-interval\ \fIinterval\fR\&\f(CW\fR
Set the polling interval for daemon mode. The unit for \fIinterval\fR is
0.1 seconds, the default value is 10 (i.e. 1 second).
.TP
\&\fR\&\f(CW\-o\ \fIoptions\fR\&\f(CW\fR\ 
.TQ
\&\fR\&\f(CW\-\-options\ \fIoptions\fR\&\f(CW\fR
Sets filesystem-specific options. So far, these are only available for
DOS and Ext2 disks. The following DOS options are supported:
\&\fR\&\f(CWcheck\fR, \fR\&\f(CWconv\fR, \fR\&\f(CWdotsOK\fR, \fR\&\f(CWdebug\fR, \fR\&\f(CWfat\fR,
\&\fR\&\f(CWquiet\fR, \fR\&\f(CWblocksize\fR.  The following Ext2 options are
supported: \fR\&\f(CWcheck\fR, \fR\&\f(CWerrors\fR, \fR\&\f(CWgrpid\fR, \fR\&\f(CWbsdgroups\fR,
\&\fR\&\f(CWnogrpid\fR, \fR\&\f(CWsysvgroups\fR, \fR\&\f(CWbsddf\fR, \fR\&\f(CWminixdf\fR,
\&\fR\&\f(CWresgid\fR, \fR\&\f(CWdebug\fR, \fR\&\f(CWnocheck\fR.  When running as a daemon,
options not applying to the disk that is inserted (because of its
filesystem type) are not passed to mount.
.TP
\&\fR\&\f(CW\-r\ \fI\-\-readonly\fR\&\f(CW\fR\ 
Mount the disk read-only. This is automatically assumed if the
disk is write protected.
.TP
\&\fR\&\f(CW\-s\ \fI\-\-sync\fR\&\f(CW\fR\ 
Mount with the \fR\&\f(CWSYNC\fR option.
.TP
\&\fR\&\f(CW\-\-nosync\fR\ 
Mounts without the \fR\&\f(CWSYNC\fR option, even when running as daemon.
.TP
\&\fR\&\f(CW\-\-nodev\fR\ 
Mount with the \fR\&\f(CWNODEV\fR option. Ignored for \fR\&\f(CWmsdos\fR
filesystems, otherwise always set for non-root users.
.TP
\&\fR\&\f(CW\-\-nosuid\fR\ 
Mount with the \fR\&\f(CWNOSUID\fR option. Ignored for \fR\&\f(CWmsdos\fR
filesystems, otherwise always set for non-root users.
.TP
\&\fR\&\f(CW\-\-noexec\fR\ 
Mount with the \fR\&\f(CWNOEXEC\fR option.
.TP
\&\fR\&\f(CW\-f\ \fI\-\-force\fR\&\f(CW\fR\ 
Attempt a mount or unmount operation even \fR\&\f(CW\(if/etc/mtab\(is\fR says that
the drive is already mounted, or not mounted, respectively.
This option is useful if \fR\&\f(CW\(if/etc/mtab\(is\fR got out of sync with the
actual state for some reason.
.TP
\&\fR\&\f(CW\-h\ \fI\-\-help\fR\&\f(CW\fR\ 
Show short parameter description
.PP
.SH Security
.PP
When mounting on the default mount point, the mount points' 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. Default mount points are called \fR\&\f(CW/fd0\fR, \fR\&\f(CW/fd1\fR,
\&\&... , \fR\&\f(CW/fd7\fR.
.PP
The user running fdmount must have read access to the floppy device for
read only mounts, and read/write access for read/write mounts.
.PP
Fdmount can be run suid root, allowing users to mount floppy
disks. The following restrictions are placed upon non-root
users:
.TP
* \ \ 
If a mountpoint is specified explicitly, it must be owned by the user.
.TP
* \ \ 
A user may only unmount a disk if the mount point is owned by the user,
or if it the disk has been mounted by the same user.
.TP
* \ \ 
Non-msdos disks are automatically mounted with the \fR\&\f(CWnodev\fR and
\&\fR\&\f(CWnosuid\fR flags set.
.PP
However, \fBdo not rely on fdmount being secure at the moment\fR.
.PP
.SH Daemon\ mode
.PP
In daemon mode, the specified drive is periodically checked and if a
disk is inserted, it is automatically mounted.
.PP
When the disk is removed, it is automatically unmounted.  However, it is
recommended to unmount the disk manually \fIbefore\fR removing it. In
order to limit corruption, disks are mounted with the SYNC option when
running in daemon mode, unless the \fR\&\f(CW\-\-nosync\fR flag is given.
.PP
Note that this mode has some potential drawbacks:
.TP
* \ \ 
Some floppy drives have to move the drive head physically in order to
reset the disk change signal. It is strongly recommended not to use
daemon mode with these drives.  See section floppycontrol, for details.
.TP
* \ \ 
If a disk does not contain a filesystem (e.g. a tar archive),
the mount attempt may slow down initial access.
.TP
* \ \ 
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.
.PP
.SH Diagnostics
.IP
.TP
\&\fR\&\f(CWerror\ opening\ device\ \fIname\fR\&\f(CW\fR\ 
.TP
\&\fR\&\f(CWerror\ reading\ boot/super\ block\fR\ 
fdmount failed to read the first 1K of the disk. The disk might be
damaged, unformatted, or it may have a format which is unsupported by the
FDC or the Linux kernel.
.TP
\&\fR\&\f(CWunknown\ filesystem\ type\fR\ 
No magic number of any of the supported filesystems (see above) 
could be identified.
.TP
\&\fR\&\f(CWsorry,\ can\(fmt\ figure\ out\ format\ (\fIfs\fR\&\f(CW\ filesystem)\fR\ 
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.
.TP
\&\fR\&\f(CWfailed\ to\ mount\ \fIfs>\ <size\fR\&\f(CWK-disk\fR\ 
The actual \fR\&\f(CWmount\fR system call failed.
.TP
\&\fR\&\f(CWfailed\ to\ unmount\fR\ 
The actual \fR\&\f(CWunmount\fR system call failed.
.TP
\&\fR\&\f(CWcannot\ create\ lock\ file\ /etc/mtab~\fR\ 
If \fR\&\f(CW\(if/etc/mtab~\(is\fR exists, you should probably delete it. Otherwise,
check permissions.
.TP
\&\fR\&\f(CWCan\(fmt\ access\ \fImountpoint\fR\&\f(CW\fR\ 
Most probably, the default or specified mount point does not exist.
Use mkdir.
.TP
\&\fR\&\f(CW\fImountpoint\fR\&\f(CW\ is\ not\ a\ directory\fR\ 
The mountpoint is not a directory.
.TP
\&\fR\&\f(CWnot\ owner\ of\ \fImountpoint\fR\&\f(CW\fR\ 
Non-root users must own the directory specified as mount point.
(This does not apply for the default mount points, /fd[0-3].)
.TP
\&\fR\&\f(CWNo\ write\ permission\ to\ \fImountpoint\fR\&\f(CW\fR\ 
Non-root users must have write permission on the mount point
directory.
.TP
\&\fR\&\f(CWNot\ owner\ of\ mounted\ directory:\ UID=\fIuid\fR\&\f(CW\fR\ 
Non-root users cannot unmount if the mount point is owned
(i.e. the disk was mounted) by another user.
.TP
\&\fR\&\f(CWinvalid\ drive\ name\fR\ 
Valid drive names are \fR\&\f(CW\(iffd0\(is\fR, \fR\&\f(CW\(iffd1\(is\fR, etc.
.TP
\&\fR\&\f(CWdrive\ \fIname\fR\&\f(CW\ does\ not\ exist\fR\ 
The drive does not exist physically, is unknown to the Linux kernel, or
is an unknown type.
.TP
\&\fR\&\f(CWDrive\ \fIname\fR\&\f(CW\ is\ mounted\ already\fR\ 
Trying to mount a drive which appears to be mounted already.  Use the
\&\fR\&\f(CW\-\-force\fR option if you think this is wrong.
.TP
\&\fR\&\f(CWDrive\ \fIname\fR\&\f(CW\ is\ not\ mounted\fR\ 
Trying to unmount a drive which does not appear to be mounted.  Use the
\&\fR\&\f(CW\-\-force\fR option if you think this is wrong.
.TP
\&\fR\&\f(CWioctl(...)\ failed\fR\ 
If this occurs with the \fR\&\f(CWFDGETDRVTYP\fR or \fR\&\f(CWFDGETDRVSTAT\fR,
ioctl's you should probably update your Linux kernel.
.TP
\&\fR\&\f(CWmounted\ \fIfs\fR\&\f(CW\ \fIsize\fR\&\f(CW-disk\ (\fIoptions\fR\&\f(CW)\fR\ 
Success message.
.PP
.SH Bugs
.TP
* \ \ 
Fdmount should be more flexible about drive names and default
mount points (currently hard coded).
.TP
* \ \ 
Probably not very secure yet (when running suid root).
Untested with ext and xia filesystems.
.TP
* \ \ 
Can't specify filesystem type and disk layout explicitly.
.TP
* \ \ 
In daemon mode, the drive light stays on all the time.
.TP
* \ \ 
Some newer filesystem types, such as vfat are not yet supported.
.IP
.SH See Also
Fdutils' texinfo doc