1gnome-mount(1) General Commands Manual gnome-mount(1)
2
3
4
6 gnome-mount - Mount drives and volumes using HAL and read settings from
7 the GNOME desktop configuration system gconf.
8
10 gnome-mount [-?|--help] [-v] [-n] [-t] [-b] [-d /dev/file | -h
11 /org/fd/Hal/udi | -p nickname] [--unmount | --eject | --write-settings
12 | --erase-settings | --show-settings] [--mount-point where-to-mount]
13 [--mount-options opt1,opt2=foo,opt3] [--extra-mount-options
14 opt4,opt5=bar] [--fstype fstype-to-use]
15
16
18 This program is used to mount and unmount file systems for GNOME desk‐
19 top users. It can also be used to eject discs from CD drives and other
20 devices that needs to be ejected. For example, iPod's needs this to
21 make the "Do not disconnect" message go away.
22
23 Normally, this program is invoked by software in the GNOME stack
24 (specifically gnome-vfs-daemon and gnome-volume-manager ). End users
25 should never have to deal with gnome-mount directly on the command
26 line, nor should they have to read this manual page.
27
28 Mounting a file system into the root file system involves a certain
29 degree of configuration and as such is subject to whatever preferences
30 an user might have. gnome-mount allows the user to control the mount
31 point location, the mount options and what file system to use for
32 mounting a file system. The settings are read from the gconf database
33 (which is per-user) and can also be overridden on the command line
34 using the appropriate parameters. See below.
35
36
38 The target (e.g. the partition or file system to mount, unmount or
39 eject) can be specified using the HAL UDI (Unique Device Identifier),
40 e.g. /org/freedesktop/Hal/devices/volume_uuid_E18B_10EC , the name of
41 the special device file, e.g. /dev/sda1 or a pseudonym. The latter is
42 a textual string used to locate the target and it makes gnome-mount
43 search for the target by comparing the given textual string to the
44 mount points and file system labels.
45
46
48 Settings (e.g. mount point, mount options, file system type) are read
49 in the order below. Note that each option is treated individually; for
50 example it is valid for a drive to only specify the mount point setting
51 and not the mount options. Also note that the even if the drive speci‐
52 fies mount options, these can be overridden on a per-volume basis.
53
54
55 FILE SYSTEM DEFAULTS
56 First, default mount options are read from /system/stor‐
57 age/defaults/FS_TYPE/ for the probed file system type of the
58 volume. The option uid=, is treated specially by gnome-mount and
59 will be replaced by uid=UID_OF_USER to cope with the fact that
60 the uid is a function of the user calling it.
61
62
63 PER DRIVE
64 Second, the gconf tree at /system/storage/drives/UDI_OF_DRIVE/
65 is consulted for options that depend on what drive the volume
66 belongs to. For example, this is useful for configuring that
67 volumes inserted into a given drive is always mounted at the
68 same location. For example, this can be used to emulate
69 /etc/fstab behaviour by where CD media is always mounted at e.g.
70 /media/cdrom
71
72
73 PER VOLUME
74 Third, the gconf tree at /system/storage/drives/UDI_OF_VOLUME/
75 is consulted for options that are specific to a particular piece
76 of media and as such depends on either the file system label
77 (e.g. EOS_DIGITAL ) or the file system UUID (e.g. E18B_10EC )
78 or both.
79
80
81 COMMANDLINE OPTIONS
82 Users can pass --mount-point , --mount-options or --fstype on
83 the commandline to override settings.
84
85
86 EXTRA COMMANDLINE OPTIONS
87 Finally, if mount options are passed via --extra-mount-options
88 these are not replacing the mount options, they are simply
89 added. This is useful for doing e.g.
90
91 gnome-mount --extra-mount-options remount,exec -d /dev/sda1
92
93 to remount a volumes such that programs can be run from the
94 media. This is useful for e.g. gnome-volume-manager if it dis‐
95 covers an autorun file on the media.
96
97
99 gnome-mount supports passworded media through the org.freedesk‐
100 top.Hal.Device.Volume.Crypto interface supported by HAL and this
101 includes volumes formatted in a way that adheres to the LUKS (Linux
102 Unified Key Setup) specification. In addition, gnome-mount uses gnome-
103 keyring to retrieve and store the pass phrase. If no key can be
104 retrieved, gnome-mount will prompt the user for one. In addition, if
105 the keyring is locked, the user may be prompted to unlock it via stan‐
106 dard gnome-keyring mechanisms.
107
108
110 gnome-mount is intended for unprivileged users and HAL ultimately con‐
111 trols if the calling user is allowed to mount, unmount or eject volumes
112 as well as what mount options are valid. As such, requests may be
113 denied. See the (human readable) exception returned from HAL for
114 details if a request fails.
115
116 Note that HAL has a notion of what mount options are valid for a given
117 volume. They are listed in the HAL property volume.mount.valid_options
118 on the device object representing the volume to mount. Consult lshal(1)
119 for details. Also note that HAL by default appends the options nosuid
120 and nodev to prevent privilege escalation.
121
122 In addition to using HAL as the mechanism for mounting file systems,
123 the /etc/fstab file is also consulted as HAL will refuse to mount any
124 file system listed in this file as it would violate system policy. If
125 this is the case, gnome-mount will invoke mount(1) as the calling user
126 rather than invoking the Mount method on the org.freedesk‐
127 top.Hal.Device.Volume interface on the device object representing the
128 volume / drive. This means that settings (mount point, mount options,
129 file system type) read by gnome-mount are not passed along as these are
130 already specified in the /etc/fstab file and there are no mechanism to
131 override them. When parsing the /etc/fstab file, gnome-mount (and also
132 HAL for that matter) resolves symbolic links and also respects the
133 LABEL= and UUID= notations. For example, if this line is in /etc/fstab
134
135 LABEL=MyVolume /mnt/myvolume auto user,defaults 0 0
136
137 then gnome-mount mounts the file system with the label MyVolume via
138 mount(1) and /etc/fstab rather than using the HAL mechanisms.
139
140
142 Options available for the gnome-mount command:
143
144
145 -v, --verbose
146 Verbose operation, shows debug messages.
147
148
149 -n, --no-ui
150 Don't show any dialogs the user needs to dismiss. If X11 is
151 available, gnome-mount may pop up transient notification bubbles
152 e.g. suggesting the user to remount a volume with different
153 options to streamline access to file systems with ownership
154 attributes. This is the option that storage policy daemons such
155 as gnome-volume-manager should invoke gnome-mount in. File man‐
156 agers, however, such as Nautilus , should never use this option
157 as the user should get e.g. an error dialog if he tries to
158 access a volume with a missing, unsupported or unknown file sys‐
159 tem.
160
161
162 -b, --block
163 Allow gnome-mount to block even if an error occured. By default,
164 gnome-mount will daemonize so it can return control to the
165 invoking application as soon as possible (e.g. when an operation
166 either fails or succeeds ) while still showing an error dialog
167 to the end user. Useful when debugging.
168
169
170 -u, --unmount
171 Use this for unmounting rather than mounting. If gnome-mount is
172 invoked as gnome-umount (a symlink to gnome-mount ) then this
173 option is automatically selected.
174
175
176 -e, --eject
177 Use this for ejecting rather than mounting. If gnome-mount is
178 invoked as gnome-eject (a symlink to gnome-mount ) then this
179 option is automatically selected.
180
181
182
183 -d, --device
184 Specify target volume by the special device file.
185
186
187 -h, --hal-udi
188 Specify target volume by HAL UDI (Unique Device Identifier).
189
190
191 -p, --pseudonym
192 Specify target volume by pseudonym. See above for how this
193 works.
194
195
196 -t, --text
197 Never use X11 dialogs or notification bubbles even if an X11
198 server is available. Also prohibits the use of gnome-keyring to
199 retrieve pass phrases for passworded media because this might
200 require unlocking the keyring which happens through an X11 dia‐
201 log out of process. Useful for command line operation.
202
203
204 -m, --mount-point
205 Specify mount point to use; don't include /media as this is
206 automatically appened by the mechanism used to mount, e.g. the
207 HAL methods.
208
209
210 -o, --mount-options
211 Specify mount options. Separate by comma.
212
213
214 -f, --fstype
215 Specify file system type. This is useful for using e.g. the
216 msdos file system instead of the vfat file system.
217
218
219 --write-settings
220 Instead of mounting a drive, specify what options to store in
221 the gconf database. Can be used on both drives and volumes. Be
222 careful using this with the --device option as optical drives
223 (among others) use the same special device file for both the
224 drive and the volume. One trick is to ensure the optical drive
225 has no media when configuring it via this option. Another pos‐
226 sibility is to use the HAL UDI instead.
227
228
229 --display-settings
230 Display settings for a drive or volume.
231
232
233 --erase-settings
234 Erase settings for a drive or volume.
235
236
238 gnome-mount will return zero if the request succeeded or non-zero if it
239 failed. Note that gnome-mount is specifically designed to run in a
240 graphical user environment and as such all error reporting (and resolu‐
241 tion) is through X11 dialogs. For example, if HAL reports that a volume
242 could not be mounted because of a missing file system driver, gnome-
243 mount might, one day, launch a tool to ask the user if he wants to
244 download and install the driver. In a similar way, all error dialogs
245 are presented via X11 dialogs to the user as well.
246
247
249 We want to make sure that the discs inserted into an optical drive are
250 always mounted at /media/cdrecorder instead of using the default which
251 is using the label specified in the iso9660 or udf file system header.
252 Assuming that the drive is empty and the special device file for the
253 drive is /dev/hdc the following command will work
254
255 gnome-mount --write-settings
256 --device /dev/hdc
257 --mount-point cdrecorder
258
259 This can be inspected via the --display-settings option and the set‐
260 tings can also be erased via the --erase-settings option. Also note
261 that gconf-editor(1) can be used for tasks like these.
262
263
265 HAL polls most storage devices for media insertion / removal and main‐
266 tains the list of devices exported. However, some hardware cannot be
267 polled for media changes without making noise or for other reasons. PC
268 floppy drives, Zip drives connected through an IDE interface and broken
269 optical drives falls into this category.
270
271 For such hardware HAL only exports the drive and rather than exporting
272 volume as childs of the drive, the org.freedesktop.Hal.Device.Volume
273 interface is exported on the drive itself. gnome-mount supports this
274 but it means that it is impossible to know ahead of time what file sys‐
275 tem is on the media in the problematic drive, so in this case gnome-
276 mount passes auto as the file system type and passes the mount options
277 uid=UID_OF_USER as most media in such devices are formatted with either
278 the vfat , udf or iso9660 file systems.
279
280 This also means that per-volume settings are not possible; one can only
281 specify settings per-drive.
282
283
285 gnome-mount was written by David Zeuthen <david@fubar.dk>.
286
287
289 fstab(5), mount(8), umount(8), eject(1), cryptsetup(8), gconftool-2(1),
290 gconf-editor(1), lshal(1)
291
292 http://www.gnome.org/projects/gconf/
293
294 http://en.wikipedia.org/wiki/GNOME_Keyring
295
296 http://freedesktop.org/Software/hal
297
298 http://luks.endorphin.org
299
300
301
302
303
304 gnome-mount(1)