Captive release update: 1.1.6.1
[www.jankratochvil.net.git] / project / captive / man / captive-cmdline.pod.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <title>captive-cmdline - Command-line client for B&lt;captive&gt; NTFS disk access</title>
5 </head>
6
7 <body style="background-color: white">
8
9 <p><a name="__index__"></a></p>
10 <!-- INDEX BEGIN -->
11
12 <ul>
13         <li><a href="#name">NAME</a></li>
14         <li><a href="#synopsis">SYNOPSIS</a></li>
15         <li><a href="#description">DESCRIPTION</a></li>
16         <li><a href="#options">OPTIONS</a></li>
17         <li><a href="#see_also">SEE ALSO</a></li>
18         <li><a href="#author">AUTHOR</a></li>
19 </ul>
20 <!-- INDEX END -->
21
22 <hr />
23 <p>
24 </p>
25 <h1><a name="name">NAME</a></h1>
26 <p>captive-cmdline - Command-line client for <strong>captive</strong>(7) NTFS disk access</p>
27 <p>
28 </p>
29 <hr />
30 <h1><a name="synopsis">SYNOPSIS</a></h1>
31 <p>
32 </p>
33 <hr />
34 <h1><a name="description">DESCRIPTION</a></h1>
35 <p>Simple <strong>ftp</strong>(1)-like client to access disks by Microsoft Windows drivers.
36 Use if <strong>mount.captive</strong>(8) not available; also useful during debugging.</p>
37 <p>
38 </p>
39 <hr />
40 <h1><a name="options">OPTIONS</a></h1>
41 <p>All programs using <strong>captive</strong>(7) library share the common set of configuration
42 options:</p>
43 <dl>
44 <dt><strong><a name="item__2d_2dfilesystem_3dpathname"><strong>--filesystem</strong>=<strong>pathname</strong></a></strong></dt>
45
46 <dd>
47 <p>Pathname to <strong>.sys</strong> or <strong>.so</strong> filesystem module file. You will use exactly
48 once this option. Possible choices are
49 <strong>/usr/local/var/lib/captive/ntfs.sys</strong>
50 etc.</p>
51 </dd>
52 <dt><strong><a name="item__2d_2dload_2dmodule_3dpathname"><strong>--load-module</strong>=<strong>pathname</strong></a></strong></dt>
53
54 <dd>
55 <p>Pathname to any W32 module to load w/o initialization. Multiple modules can be
56 loaded although in common case you will use just
57 <strong>/usr/local/var/lib/captive/ntoskrnl.exe</strong>
58 here.</p>
59 </dd>
60 <dt><strong><a name="item__2d_2dmodid_2dpath_3dpathname"><strong>--modid-path</strong>=<strong>pathname</strong></a></strong></dt>
61
62 <dd>
63 <p>Pathname to the <strong>.captivemodid.xml</strong> database of existing W32 module
64 identifications. The default used one is:
65 <strong>/usr/local/etc/w32-mod-id.captivemodid.xml</strong>
66 You must have this database update for any W32 binary module you are using.
67 If you miss such database you may also try to use <strong>--load-untested</strong> below.</p>
68 </dd>
69 <dt><strong><a name="item__2d_2dload_2duntested"><strong>--load-untested</strong></a></strong></dt>
70
71 <dd>
72 <p>Load tthe W32 modules despite they may not match the current <strong>--modid-path</strong>
73 identifications database. If you use this option Captive may fail very easily
74 as such module was never tested before the release and may need some
75 compatibility updates. Still no data should be corrupted even if using this
76 <strong>--load-untested</strong> option.</p>
77 </dd>
78 <dt><strong><a name="item__2d_2dro"><strong>--ro</strong></a></strong></dt>
79
80 <dd>
81 <p>Read/write mode: Any write access will be forbidden. You should set this mode
82 for <strong>cdfs.sys</strong> (<em>CD-ROM</em> filesystem). This option is mutually exclusive with
83 <strong>--blind</strong> and <strong>--rw</strong>.</p>
84 </dd>
85 <dt><strong><a name="item__2d_2dblind"><strong>--blind</strong></a></strong></dt>
86
87 <dd>
88 <p>Read/write mode: All writes are just simulated in memory (default). Microsoft
89 Windows filesystem driver will see no difference between <strong>--blind</strong> and <strong>--rw</strong>
90 although the UNIX image file/device will be open read/only as for <strong>--ro</strong>.
91 All the changes get 'written' as long as <strong>captive</strong>(7) program runs - all the
92 changes will be lost afterwards. This mode is the most suitable for debugging.
93 This option is mutually exclusive with <strong>--ro</strong> and <strong>--rw</strong>.</p>
94 </dd>
95 <dt><strong><a name="item__2d_2drw"><strong>--rw</strong></a></strong></dt>
96
97 <dd>
98 <p>Read/write mode: Write directly to the image file/device. Standard read/write
99 disk mode. You should use <strong>--sandbox-server</strong> option in this case to have the
100 disk protected against Microsoft Windows filesystem driver crashes. Modified
101 disk image blocks are in <strong>--sandbox-server</strong> <strong>--rw</strong> mode buffered in the
102 memory and they get reflected to the disk only after successful completion
103 of all filesystem operations including filesystem unmount.
104 This option is mutually exclusive with <strong>--ro</strong> and <strong>--blind</strong>.</p>
105 </dd>
106 <dt><strong><a name="item__2d_2dcdrom"><strong>--cdrom</strong></a></strong></dt>
107
108 <dd>
109 <p>Media type: CD-ROM. You must set this media type for <strong>cdfs.sys</strong>.
110 Virtual Microsoft Windows block device driver used by Captive maps to
111 <strong>\Device\CdRom0</strong>. This option is mutually exclusive with <strong>--disk</strong>.</p>
112 </dd>
113 <dt><strong><a name="item__2d_2ddisk"><strong>--disk</strong></a></strong></dt>
114
115 <dd>
116 <p>Media type: Disk (default). You must set this media type for all the Microsoft
117 Windows filesystem drivers except <strong>cdfs.sys</strong>. Virtual Microsoft Windows block
118 device driver used by Captive maps to <strong>\Device\CaptiveHarddisk0</strong>.
119 This option is mutually exclusive with <strong>--cdrom</strong>.</p>
120 </dd>
121 <dt><strong><a name="item__2d_2ddebug_2dmessages"><strong>--debug-messages</strong></a></strong></dt>
122
123 <dd>
124 <p>Turn on debugging messages. Be prepared for substation debug output.
125 Use of <strong>--syslog</strong> feature is not recommended in this case.</p>
126 </dd>
127 <dt><strong><a name="item__2d_2dsandbox_2dserver_3dpathname"><strong>--sandbox-server</strong>=<strong>pathname</strong></a></strong></dt>
128
129 <dd>
130 <p>Pathname to
131 <strong>/usr/local/sbin/captive-sandbox-server</strong>
132 program, turns on sandboxing.
133 You should always use this option in conjunction with <strong>--rw</strong>, see it for
134 details. Although this program is <em>setuid root</em> and it drops it privileges
135 to <strong>captive</strong> user. Your system gets protected by
136 <strong>chroot</strong>(2), <strong>setuid</strong>(2), <strong>setgid</strong>(2) and <strong>setrlimit</strong>(2) UNIX security
137 features against malicious Microsoft Windows drivers. You should never use this
138 option during debugging.</p>
139 </dd>
140 <dd>
141 <p>This option is turned on automatically during the mount operation by
142 <strong>mount.captive-ntfs</strong>(8).
143 Option needs to be used by hand for the <strong>captive-cmdline</strong>(2) client.</p>
144 </dd>
145 <dt><strong><a name="item__2d_2dsandbox_2dserver_2dior_3dior"><strong>--sandbox-server-ior</strong>=<strong>IOR</strong></a></strong></dt>
146
147 <dd>
148 <p>Specify <em>CORBA IOR</em> of
149 <strong>/usr/local/sbin/captive-sandbox-server</strong>
150 program, turns on
151 sandboxing. Specified <em>CORBA IOR</em> should be the string starting by ``<strong>IOR:</strong>''
152 text. This option is useful only for debugging. No sandbox restarting is
153 possible in this case.</p>
154 </dd>
155 <dt><strong><a name="item__2d_2dno_2dsandbox"><strong>--no-sandbox</strong></a></strong></dt>
156
157 <dd>
158 <p>Turn off sandboxing feature (default). No
159 <strong>/usr/local/sbin/captive-sandbox-server</strong>
160 is run. Microsoft Windows filesystem driver is run in native UNIX environment
161 without any <em>CORBA</em> separation. This option is recommended only for debugging.
162 It is dangerous to use <strong>--rw</strong> together, see its description for the details.</p>
163 </dd>
164 <dt><strong><a name="item__2d_2dbug_2dpathname_3dpathname"><strong>--bug-pathname</strong>=<strong>pathname</strong></a></strong></dt>
165
166 <dd>
167 <p>Pathname to <strong>strftime</strong>(3) for <strong>.captivebug.xml.gz</strong> bugreports. Every crash of
168 sandbox child gets bugreported to the specified file. You should attempt to
169 minimize the number of operations from the mount operation till the expected
170 crash to minimize the snapshot file size. <strong>--sandbox-server</strong> option is
171 required for <strong>--bug-pathname</strong>.</p>
172 </dd>
173 <dd>
174 <p><strong>!!! Be aware '.captivebug.xml.gz' will contain data from your disk drive !!!</strong></p>
175 </dd>
176 <dt><strong><a name="item__2d_2dsyslog"><strong>--syslog</strong></a></strong></dt>
177
178 <dd>
179 <p>Messages sent to <strong>syslog</strong>(3) instead of <em>stderr</em>. This option gets handy
180 for <strong>mount</strong>(8) operation as the messages would be lost otherway.
181 Watch our for possible ``<strong>Filesystem crash broke dirty object</strong>'' messages where
182 some written filesystem data got lost in the case of Microsoft Windows
183 filesystem driver crash.</p>
184 </dd>
185 <dt><strong><a name="item__2d_2dsyslog_2dfacility_3dfacility"><strong>--syslog-facility</strong>=<strong>facility</strong></a></strong></dt>
186
187 <dd>
188 <p><strong>openlog</strong>(3) facility for <strong>--syslog</strong>. See <strong>facility</strong> section of
189 <strong>openlog</strong>(3) man page for details. Lowercased values such as <strong>daemon</strong> or
190 <strong>user</strong> are supported.</p>
191 </dd>
192 </dl>
193 <p>
194 </p>
195 <hr />
196 <h1><a name="see_also">SEE ALSO</a></h1>
197 <p><strong>captive</strong>(7), <strong>mount.captive</strong>(8)</p>
198 <p>
199 </p>
200 <hr />
201 <h1><a name="author">AUTHOR</a></h1>
202 <p><table cellspacing="0" cellpadding="0"><tr><td>Jan Kratochvil &lt;<strong><a href="mailto:project-captive@jankratochvil.net">project-captive@jankratochvil.net</a></strong>&gt;,
203 <tr><td><td><em><a href="http://www.jankratochvil.net/">http://www.jankratochvil.net/</a></em></table></p>
204
205 </body>
206
207 </html>