Debian Codegraph @

upstream/debian-unstable/man1/fdmount.1

raw
1 .TH fdmount 1 "27Jan21" fdutils-5.6
2 .SH Name
3 fdmount - Floppy disk mount utility
4 '\" t
5 .de TQ
6 .br
7 .ns
8 .TP \\$1
9 ..
10
11 .tr \(is'
12 .tr \(if`
13 .tr \(pd"
14
15 .SH Note
16 This manpage has been automatically generated from fdutils's texinfo
17 documentation. However, this process is only approximative, and some
18 items, such as cross-references, footnotes and indices are lost in this
19 translation process. Indeed, these items have no appropriate
20 representation in the manpage format. Moreover, only the items specific
21 to each command have been translated, and the general information about
22 fdutils has been dropped in the manpage version. Thus I strongly advise
23 you to use the original texinfo doc.
24 .TP
25 * \ \
26 To generate a printable copy from the texinfo doc, run the following
27 commands:
28
29 .nf
30 .ft 3
31 .in +0.3i
32 ./configure; make dvi; dvips fdutils.dvi
33 .fi
34 .in -0.3i
35 .ft R
36
37 \&\fR
38 .TP
39 * \ \
40 To generate a HTML copy, run:
41
42 .nf
43 .ft 3
44 .in +0.3i
45 ./configure; make html
46 .fi
47 .in -0.3i
48 .ft R
49
50 \&\fRA pre-made HTML can be found at:
51 \&\fR\&\f(CW\(ifhttp://www.tux.org/pub/knaff/fdutils\(is\fR
52 .TP
53 * \ \
54 To generate an info copy (browsable using emacs' info mode), run:
55
56 .nf
57 .ft 3
58 .in +0.3i
59 ./configure; make info
60 .fi
61 .in -0.3i
62 .ft R
63
64 \&\fR
65 .PP
66 The texinfo doc looks most pretty when printed or as HTML. Indeed, in
67 the info version certain examples are difficult to read due to the
68 quoting conventions used in info.
69 .SH Description
70 .PP
71
72 .nf
73 .ft 3
74 .in +0.3i
75 \&\fR\&\f(CWfdmount [\fR\&\f(CW\-l] [\fR\&\f(CW\-\-list] [\fR\&\f(CW\-d] [\fR\&\f(CW\-\-daemon] [\fR\&\f(CW\-\-detach]
76 [\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]
77 [\fR\&\f(CW\-r] [\fR\&\f(CW\-readonly] [\fR\&\f(CW\-s] [\fR\&\f(CW\-\-sync] [\fR\&\f(CW\-\-nosync] [\fR\&\f(CW\-\-nodev]
78 [\fR\&\f(CW\-\-nosuid] [\fR\&\f(CW\-\-noexec] [\fR\&\f(CW\-f] [\fR\&\f(CW\-\-force] [\fR\&\f(CW\-h] [\fR\&\f(CW\-\-help]
79 [\fIdrivename\fR\&\f(CW] [\fImountpoint\fR\&\f(CW]
80 \&\&
81 \&\fR\&\f(CWfdumount [\fR\&\f(CW\-f] [\fR\&\f(CW\-\-force] [\fIdrivename\fR\&\f(CW]
82 \&\&
83 \&\fR\&\f(CWfdlist
84 \&\&
85 \&\fR\&\f(CWfdmountd [\fR\&\f(CW\-i \fIinterval\fR\&\f(CW] [\fR\&\f(CW\-\-interval \fIinterval\fR\&\f(CW] [\fR\&\f(CW\-r]
86 [\fR\&\f(CW\-readonly] [\fR\&\f(CW\-s] [\fR\&\f(CW\-\-sync] [\fR\&\f(CW\-\-nosync] [\fR\&\f(CW\-\-nodev]
87 [\fR\&\f(CW\-\-nosuid] [\fR\&\f(CW\-\-noexec] [\fR\&\f(CW\-\-help] [\fIdrivename\fR\&\f(CW] [\fImountpoint\fR\&\f(CW]]
88 \&\&
89 .fi
90 .in -0.3i
91 .ft R
92
93 \&\fR
94 .PP
95 The \fR\&\f(CWfdmount\fR program mounts a floppy disk in the specified
96 drive. It tries to figure out the exact format and filesystem type of
97 the disk from data in the disk's boot sector or super block and the
98 auto-detected track layout.
99 .PP
100 Currently, fdmount supports the filesystems \fR\&\f(CWminix\fR, \fR\&\f(CWext\fR,
101 \&\fR\&\f(CWext2\fR, \fR\&\f(CWxia\fR, and \fR\&\f(CWmsdos\fR, and includes special support
102 for disks formatted by the \fR\&\f(CW2M\fR utility for MS-DOS.
103 .PP
104 It also checks whether the disk is write protected, in which case
105 it is mounted read-only.
106 .PP
107 The symbolic \fIdrivename\fR is (currently) one of \fR\&\f(CW\(iffd[0-7]\(is\fR,
108 corresponding to the special device files \fR\&\f(CW\(if/dev/fd[0-7]\(is\fR. If
109 \&\fIdrivename\fR is not specified, \fR\&\f(CW\(iffd0\(is\fR is assumed.
110 .PP
111 The disk is mounted on the directory \fImountpoint\fR, if specified, or
112 on \fR\&\f(CW\(if/fd[0-7]\(is\fR. In either case, the mount point must be an
113 existing, writable directory.
114 .PP
115 \&\fBDue to a bug in the floppy driver (?), the polling interval (\-i
116 flag) must be longer than the spindown offset. Thus you need to do (for
117 example) floppycontrol \-\-spindown 99 before starting fdmountd in daemon
118 mode\fR
119 .PP
120 .SH Options
121 .IP
122 .TP
123 \&\fR\&\f(CW\-l\ \fI\-\-list\fR\&\f(CW\fR\
124 List all known drives with their symbolic name, type, and mount
125 status.
126 .TP
127 \&\fR\&\f(CW\-d\ \fI\-\-daemon\fR\&\f(CW\fR\
128 Run in daemon mode (see below).
129 .TP
130 \&\fR\&\f(CW\-\-detach\fR\
131 Runs daemon in background, and detaches it from its tty. Messages
132 produced after the fork are logged to syslog.
133 .TP
134 \&\fR\&\f(CW\-p\ \fIfile\fR\&\f(CW\fR\
135 .TQ
136 \&\fR\&\f(CW\-\-pidfile\ \fIfile\fR\&\f(CW\fR
137 .IP
138 Dumps the process id of the daemon to
139 \&\fIfile\fR. This makes killing the daemon easier:
140 \&\fR\&\f(CWkill \-9 `cat \fIfile\fR\&\f(CW`\fR
141 .TP
142 \&\fR\&\f(CW\-i\ \fIinterval\fR\&\f(CW\fR\
143 .TQ
144 \&\fR\&\f(CW\-\-interval\ \fIinterval\fR\&\f(CW\fR
145 Set the polling interval for daemon mode. The unit for \fIinterval\fR is
146 0.1 seconds, the default value is 10 (i.e. 1 second).
147 .TP
148 \&\fR\&\f(CW\-o\ \fIoptions\fR\&\f(CW\fR\
149 .TQ
150 \&\fR\&\f(CW\-\-options\ \fIoptions\fR\&\f(CW\fR
151 Sets filesystem-specific options. So far, these are only available for
152 DOS and Ext2 disks. The following DOS options are supported:
153 \&\fR\&\f(CWcheck\fR, \fR\&\f(CWconv\fR, \fR\&\f(CWdotsOK\fR, \fR\&\f(CWdebug\fR, \fR\&\f(CWfat\fR,
154 \&\fR\&\f(CWquiet\fR, \fR\&\f(CWblocksize\fR. The following Ext2 options are
155 supported: \fR\&\f(CWcheck\fR, \fR\&\f(CWerrors\fR, \fR\&\f(CWgrpid\fR, \fR\&\f(CWbsdgroups\fR,
156 \&\fR\&\f(CWnogrpid\fR, \fR\&\f(CWsysvgroups\fR, \fR\&\f(CWbsddf\fR, \fR\&\f(CWminixdf\fR,
157 \&\fR\&\f(CWresgid\fR, \fR\&\f(CWdebug\fR, \fR\&\f(CWnocheck\fR. When running as a daemon,
158 options not applying to the disk that is inserted (because of its
159 filesystem type) are not passed to mount.
160 .TP
161 \&\fR\&\f(CW\-r\ \fI\-\-readonly\fR\&\f(CW\fR\
162 Mount the disk read-only. This is automatically assumed if the
163 disk is write protected.
164 .TP
165 \&\fR\&\f(CW\-s\ \fI\-\-sync\fR\&\f(CW\fR\
166 Mount with the \fR\&\f(CWSYNC\fR option.
167 .TP
168 \&\fR\&\f(CW\-\-nosync\fR\
169 Mounts without the \fR\&\f(CWSYNC\fR option, even when running as daemon.
170 .TP
171 \&\fR\&\f(CW\-\-nodev\fR\
172 Mount with the \fR\&\f(CWNODEV\fR option. Ignored for \fR\&\f(CWmsdos\fR
173 filesystems, otherwise always set for non-root users.
174 .TP
175 \&\fR\&\f(CW\-\-nosuid\fR\
176 Mount with the \fR\&\f(CWNOSUID\fR option. Ignored for \fR\&\f(CWmsdos\fR
177 filesystems, otherwise always set for non-root users.
178 .TP
179 \&\fR\&\f(CW\-\-noexec\fR\
180 Mount with the \fR\&\f(CWNOEXEC\fR option.
181 .TP
182 \&\fR\&\f(CW\-f\ \fI\-\-force\fR\&\f(CW\fR\
183 Attempt a mount or unmount operation even \fR\&\f(CW\(if/etc/mtab\(is\fR says that
184 the drive is already mounted, or not mounted, respectively.
185 This option is useful if \fR\&\f(CW\(if/etc/mtab\(is\fR got out of sync with the
186 actual state for some reason.
187 .TP
188 \&\fR\&\f(CW\-h\ \fI\-\-help\fR\&\f(CW\fR\
189 Show short parameter description
190 .PP
191 .SH Security
192 .PP
193 When mounting on the default mount point, the mount points' owner is set
194 to the current user, and the access flags according to the user's umask.
195 For a specified mountpoint, owner and permissions are left
196 unchanged. Default mount points are called \fR\&\f(CW/fd0\fR, \fR\&\f(CW/fd1\fR,
197 \&\&... , \fR\&\f(CW/fd7\fR.
198 .PP
199 The user running fdmount must have read access to the floppy device for
200 read only mounts, and read/write access for read/write mounts.
201 .PP
202 Fdmount can be run suid root, allowing users to mount floppy
203 disks. The following restrictions are placed upon non-root
204 users:
205 .TP
206 * \ \
207 If a mountpoint is specified explicitly, it must be owned by the user.
208 .TP
209 * \ \
210 A user may only unmount a disk if the mount point is owned by the user,
211 or if it the disk has been mounted by the same user.
212 .TP
213 * \ \
214 Non-msdos disks are automatically mounted with the \fR\&\f(CWnodev\fR and
215 \&\fR\&\f(CWnosuid\fR flags set.
216 .PP
217 However, \fBdo not rely on fdmount being secure at the moment\fR.
218 .PP
219 .SH Daemon\ mode
220 .PP
221 In daemon mode, the specified drive is periodically checked and if a
222 disk is inserted, it is automatically mounted.
223 .PP
224 When the disk is removed, it is automatically unmounted. However, it is
225 recommended to unmount the disk manually \fIbefore\fR removing it. In
226 order to limit corruption, disks are mounted with the SYNC option when
227 running in daemon mode, unless the \fR\&\f(CW\-\-nosync\fR flag is given.
228 .PP
229 Note that this mode has some potential drawbacks:
230 .TP
231 * \ \
232 Some floppy drives have to move the drive head physically in order to
233 reset the disk change signal. It is strongly recommended not to use
234 daemon mode with these drives. See section floppycontrol, for details.
235 .TP
236 * \ \
237 If a disk does not contain a filesystem (e.g. a tar archive),
238 the mount attempt may slow down initial access.
239 .TP
240 * \ \
241 As fdmount cannot identify the user trying to use the disk drive,
242 there is no way to protect privacy. Disks are always mounted with
243 public access permissions set.
244 .PP
245 .SH Diagnostics
246 .IP
247 .TP
248 \&\fR\&\f(CWerror\ opening\ device\ \fIname\fR\&\f(CW\fR\
249 .TP
250 \&\fR\&\f(CWerror\ reading\ boot/super\ block\fR\
251 fdmount failed to read the first 1K of the disk. The disk might be
252 damaged, unformatted, or it may have a format which is unsupported by the
253 FDC or the Linux kernel.
254 .TP
255 \&\fR\&\f(CWunknown\ filesystem\ type\fR\
256 No magic number of any of the supported filesystems (see above)
257 could be identified.
258 .TP
259 \&\fR\&\f(CWsorry,\ can\(fmt\ figure\ out\ format\ (\fIfs\fR\&\f(CW\ filesystem)\fR\
260 The size of the filesystem on the disk is incompatible with
261 the track layout detected by the kernel and an integer number of
262 tracks. This may occur if the filesystem uses only part of the
263 disk, or the track layout was detected incorrectly by the kernel.
264 .TP
265 \&\fR\&\f(CWfailed\ to\ mount\ \fIfs>\ <size\fR\&\f(CWK-disk\fR\
266 The actual \fR\&\f(CWmount\fR system call failed.
267 .TP
268 \&\fR\&\f(CWfailed\ to\ unmount\fR\
269 The actual \fR\&\f(CWunmount\fR system call failed.
270 .TP
271 \&\fR\&\f(CWcannot\ create\ lock\ file\ /etc/mtab~\fR\
272 If \fR\&\f(CW\(if/etc/mtab~\(is\fR exists, you should probably delete it. Otherwise,
273 check permissions.
274 .TP
275 \&\fR\&\f(CWCan\(fmt\ access\ \fImountpoint\fR\&\f(CW\fR\
276 Most probably, the default or specified mount point does not exist.
277 Use mkdir.
278 .TP
279 \&\fR\&\f(CW\fImountpoint\fR\&\f(CW\ is\ not\ a\ directory\fR\
280 The mountpoint is not a directory.
281 .TP
282 \&\fR\&\f(CWnot\ owner\ of\ \fImountpoint\fR\&\f(CW\fR\
283 Non-root users must own the directory specified as mount point.
284 (This does not apply for the default mount points, /fd[0-3].)
285 .TP
286 \&\fR\&\f(CWNo\ write\ permission\ to\ \fImountpoint\fR\&\f(CW\fR\
287 Non-root users must have write permission on the mount point
288 directory.
289 .TP
290 \&\fR\&\f(CWNot\ owner\ of\ mounted\ directory:\ UID=\fIuid\fR\&\f(CW\fR\
291 Non-root users cannot unmount if the mount point is owned
292 (i.e. the disk was mounted) by another user.
293 .TP
294 \&\fR\&\f(CWinvalid\ drive\ name\fR\
295 Valid drive names are \fR\&\f(CW\(iffd0\(is\fR, \fR\&\f(CW\(iffd1\(is\fR, etc.
296 .TP
297 \&\fR\&\f(CWdrive\ \fIname\fR\&\f(CW\ does\ not\ exist\fR\
298 The drive does not exist physically, is unknown to the Linux kernel, or
299 is an unknown type.
300 .TP
301 \&\fR\&\f(CWDrive\ \fIname\fR\&\f(CW\ is\ mounted\ already\fR\
302 Trying to mount a drive which appears to be mounted already. Use the
303 \&\fR\&\f(CW\-\-force\fR option if you think this is wrong.
304 .TP
305 \&\fR\&\f(CWDrive\ \fIname\fR\&\f(CW\ is\ not\ mounted\fR\
306 Trying to unmount a drive which does not appear to be mounted. Use the
307 \&\fR\&\f(CW\-\-force\fR option if you think this is wrong.
308 .TP
309 \&\fR\&\f(CWioctl(...)\ failed\fR\
310 If this occurs with the \fR\&\f(CWFDGETDRVTYP\fR or \fR\&\f(CWFDGETDRVSTAT\fR,
311 ioctl's you should probably update your Linux kernel.
312 .TP
313 \&\fR\&\f(CWmounted\ \fIfs\fR\&\f(CW\ \fIsize\fR\&\f(CW-disk\ (\fIoptions\fR\&\f(CW)\fR\
314 Success message.
315 .PP
316 .SH Bugs
317 .TP
318 * \ \
319 Fdmount should be more flexible about drive names and default
320 mount points (currently hard coded).
321 .TP
322 * \ \
323 Probably not very secure yet (when running suid root).
324 Untested with ext and xia filesystems.
325 .TP
326 * \ \
327 Can't specify filesystem type and disk layout explicitly.
328 .TP
329 * \ \
330 In daemon mode, the drive light stays on all the time.
331 .TP
332 * \ \
333 Some newer filesystem types, such as vfat are not yet supported.
334 .IP
335 .SH See Also
336 Fdutils' texinfo doc