]>
Commit | Line | Data |
---|---|---|
832b75ed GG |
1 | Smartmontools installation instructions |
2 | ======================================= | |
3 | ||
7f0798ef | 4 | $Id: INSTALL 3074 2010-03-05 23:00:30Z chrfranke $ |
832b75ed GG |
5 | |
6 | Please also see the smartmontools home page: | |
7 | http://smartmontools.sourceforge.net/ | |
8 | ||
9 | Table of contents: | |
10 | ||
11 | [1] System requirements | |
2127e193 | 12 | [2] Installing from SVN |
832b75ed GG |
13 | [3] Installing from source tarball |
14 | [4] Guidelines for different Linux distributions | |
15 | [5] Guidelines for FreeBSD | |
16 | [6] Guidelines for Darwin | |
17 | [7] Guidelines for NetBSD | |
18 | [8] Guidelines for Solaris | |
19 | [9] Guidelines for Cygwin | |
20 | [10] Guidelines for Windows | |
21 | [11] Guidelines for OS/2, eComStation | |
22 | [12] Guidelines for OpenBSD | |
23 | [13] Comments | |
24 | [14] Detailed description of ./configure options | |
25 | ||
26 | [1] System requirements | |
27 | ======================= | |
28 | ||
29 | A) Linux | |
30 | ||
31 | Any Linux distribution will support smartmontools if it has a | |
32 | kernel version greater than or equal to 2.2.14. So any recent | |
33 | Linux distribution should support smartmontools. | |
34 | ||
35 | There are two parts of smartmontools that may require a patched or | |
36 | nonstandard kernel: | |
37 | ||
38 | (1) To get the ATA RETURN SMART STATUS command, the kernel needs | |
39 | to support the HDIO_DRIVE_TASK ioctl(). | |
40 | ||
41 | (2) To run Selective Self-tests, the kernel needs to support the | |
42 | HDIO_DRIVE_TASKFILE ioctl(). | |
43 | ||
44 | If your kernel does not support one or both of these ioctls, then | |
45 | smartmontools will "mostly" work. The things that don't work will | |
46 | give you harmless warning messages. | |
47 | ||
48 | Although "not officially supported" by the developers, smartmontools | |
49 | has also been successfully build and run on a legacy Linux system | |
50 | with kernel 2.0.33 and libc.so.5. On such systems, the restrictions | |
51 | above apply. | |
52 | ||
53 | For item (1) above, any 2.4 or 2.6 series kernel will provide | |
54 | HDIO_DRIVE_TASK support. Some 2.2.20 and later kernels also | |
55 | provide this support IF they're properly patched and | |
56 | configured. [Andre Hedrick's IDE patches may be found at | |
57 | http://www.funet.fi/pub/linux/kernel/people/hedrick/ide-2.2.20/ or | |
58 | are available from your local kernel.org mirror. They are not | |
59 | updated for 2.2.21 or later, and may contain a few bugs.]. | |
60 | If the configuration option CONFIG_IDE_TASK_IOCTL | |
61 | exists in your 2.2.X kernel source code tree, then your 2.2.X | |
62 | kernel will probably support this ioctl. [Note that this kernel | |
63 | configuration option does NOT need to be enabled. Its presence | |
64 | merely indicates that the required HDIO_DRIVE_TASK ioctl() is | |
65 | supported.] | |
66 | ||
67 | For item (2) above, your kernel must be configured with the kernel | |
68 | configuration option CONFIG_IDE_TASKFILE_IO enabled. This | |
69 | configuration option is present in all 2.4 and 2.6 series | |
70 | kernels. Some 2.2.20 and later kernels also provide this support | |
71 | IF they're properly patched and configured as described above. | |
72 | ||
73 | Please see FAQ section of the URL above for additional details. | |
74 | ||
75 | If you are using 3ware controllers, for full functionality you | |
76 | must either use version 1.02.00.037 or greater of the 3w-xxxx | |
77 | driver, or patch earlier 3ware 3w-xxxx drivers. See | |
78 | http://smartmontools.sourceforge.net/3w-xxxx.txt | |
79 | for the patch. The version 1.02.00.037 3w-xxxx.c driver was | |
80 | incorporated into kernel 2.4.23-bk2 on 3 December 2003 and into | |
81 | kernel 2.6.0-test5-bk11 on 23 September 2003. | |
82 | ||
83 | B) FreeBSD | |
84 | ||
85 | For FreeBSD support, a 5-current kernel that includes ATAng is | |
86 | required in order to support ATA drives. Even current versions of | |
87 | ATAng will not support 100% operation, as the SMART status can not | |
88 | be reliably retrieved. There is patch pending approval of the | |
89 | ATAng driver maintainer that will address this issue. | |
90 | ||
91 | C) Solaris | |
92 | ||
93 | The SCSI code has been tested on a variety of Solaris 8 and 9 | |
94 | systems. ATA/IDE code only works on SPARC platform. All tested | |
95 | kernels worked correctly. | |
96 | ||
97 | D) NetBSD/OpenBSD | |
98 | ||
99 | The code was tested on a 1.6ZG (i.e., 1.6-current) system. It should | |
100 | also function under 1.6.1 and later releases (unverified). Currently | |
101 | it doesn't support ATA devices on 3ware RAID controllers. | |
102 | ||
103 | E) Cygwin | |
104 | ||
bed94269 GI |
105 | The code was tested on Cygwin 1.5.25-15 and 1.7.0-62. It should also |
106 | work on other recent releases. | |
832b75ed GG |
107 | |
108 | Release 1.5.15 or later is recommended for Cygwin smartd. Older versions | |
109 | do not provide syslogd support. | |
110 | ||
111 | Both Cygwin and Windows versions of smartmontools share the same code | |
112 | to access the IDE/ATA or SCSI devices. The information in the "Windows" | |
113 | section below also applies to the Cygwin version. | |
114 | ||
115 | F) Windows | |
116 | ||
bed94269 GI |
117 | The code was tested on Windows 98SE, ME, NT4(SP5,SP6), 2000(SP4), |
118 | XP(up to SP3), 2003 and Vista. | |
119 | ||
120 | -- Windows 9x/ME | |
832b75ed GG |
121 | |
122 | On 9x/ME, only standard (legacy) IDE/ATA devices 0-3 are supported. | |
123 | The driver SMARTVSD.VXD must be present in WINDOWS\SYSTEM\IOSUBSYS | |
124 | to get loaded at Windows startup. The default location in a new | |
125 | installation of some versions of Windows is the WINDOWS\SYSTEM folder. | |
126 | In this case, move SMARTVSD.VXD to WINDOWS\SYSTEM\IOSUBSYS and reboot | |
4d59bff9 | 127 | (http://support.microsoft.com/kb/265854/en-us). |
832b75ed GG |
128 | |
129 | SMARTVSD.VXD relies on the standard IDE port driver ESDI_506.PDR. | |
130 | If the system uses a vendor specific driver, access of SMART data | |
bed94269 | 131 | is not possible. |
832b75ed | 132 | |
4d59bff9 GG |
133 | Some ATA controllers (e.g. Promise) provided a custom SMARTVSD.VXD |
134 | for their Win9x/ME driver. To access SMART data from both the legacy | |
135 | (/dev/h[a-d]) and this additional (/dev/hd[e-h]) controller, rename | |
136 | this file to SMARTVSE.VXD. Open the file with a hex editor and replace | |
137 | all occurrences of the string "SMARTVSD" with "SMARTVSE". Then reinstall | |
138 | the original Windows SMARTVSD.VXD. | |
139 | ||
bed94269 GI |
140 | To access SCSI and USB devices, an installed ASPI interface (WNASPI32.DLL) |
141 | is required. The code was tested with Adaptec Windows ASPI drivers 4.71.2. | |
142 | (http://www.adaptec.com/en-US/support/_eol/scsi_sw/ASPI-4.70/) | |
143 | Links to other ASPI drivers can be found at http://www.nu2.nu/aspi/. | |
144 | ||
145 | -- Windows NT4/2000/XP/2003/Vista | |
832b75ed | 146 | |
bed94269 GI |
147 | ATA or SATA devices are supported if the device driver implements |
148 | the SMART IOCTLs or IOCTL_IDE_PASS_THROUGH or IOCTL_ATA_PASS_THROUGH. | |
149 | The ATA SMART READ LOG command (smartctl -l, --log, -a, --all) is not | |
150 | supported if only the SMART IOCTLs are implemented. | |
832b75ed | 151 | |
bed94269 GI |
152 | SCSI and USB devices are accessed through SPTI. Special driver support |
153 | is not required. | |
4d59bff9 | 154 | |
bed94269 | 155 | 3ware 9000 RAID controllers are supported using features available |
ba59cff1 GG |
156 | in the Windows driver release 9.4.0 (3wareDrv.sys 3.0.2.70) or later. |
157 | Older drivers provide SMART access to the first physical drive (port) | |
9ebc753d GG |
158 | of each logical drive (unit). If driver support is not available |
159 | (7000/8000 series, 9000 on XP 64), smartctl can be used to parse SMART | |
160 | data output from CLI or 3DM. | |
832b75ed GG |
161 | |
162 | G) MacOS/Darwin | |
163 | ||
164 | The code was tested on MacOS 10.3.4. It should work from 10.3 | |
165 | forwards. It doesn't support 10.2. | |
166 | ||
4d59bff9 GG |
167 | It's important to know that on 10.3.x, some things don't work |
168 | (see WARNINGS): due to bugs in the libraries used, you cannot run | |
169 | a short test or switch SMART support off on a drive; if you try, | |
170 | you will just run an extended test or switch SMART support on. So | |
171 | don't panic when your "short" test seems to be taking hours. | |
832b75ed GG |
172 | |
173 | It's also not possible at present to control when the offline | |
174 | routine runs. If your drive doesn't have it running automatically by | |
175 | default, you can't run it at all. | |
176 | ||
177 | SCSI devices are not currently supported. Detecting the power | |
178 | status of a drive is also not currently supported. | |
179 | ||
180 | To summarize this, from another point of view, the things that | |
181 | are not supported fall into two categories: | |
182 | ||
183 | * Can't be implemented easily without more kernel-level support, | |
184 | so far as I know: | |
185 | - running immediate offline, conveyance, or selective tests | |
186 | - running any test in captive mode | |
187 | - aborting tests | |
188 | - switching automatic offline testing on or off | |
189 | - support for SCSI | |
190 | - checking the power mode [-n Directive of smartd] (this is not | |
191 | completely impossible, but not by using a documented API) | |
192 | ||
4d59bff9 | 193 | * Work on 10.4 and later, but not on 10.3: |
832b75ed GG |
194 | - switching off SMART (switching *on* works fine) |
195 | - switching off auto-save (but why would you want to?) | |
196 | - running the short test (that leaves you with only the extended test) | |
197 | ||
832b75ed GG |
198 | However, some things do work well. For ATA devices, all the |
199 | informational output is available, unless you want something that only | |
4d59bff9 GG |
200 | an offline test updates. On many newer Mac OS systems, the |
201 | hard drive comes with the offline test switched on by default, so | |
202 | even that works. | |
832b75ed GG |
203 | |
204 | H) OS/2, eComStation | |
205 | ||
206 | The code was tested on eComStation 1.1, but it should work on all versions | |
207 | of OS/2. | |
208 | Innotek LibC 0.5 runtime is required. | |
209 | Currently only ATA disks are supported, SCSI support will be added. | |
210 | ||
2127e193 | 211 | [2] Installing from SVN |
832b75ed | 212 | ======================= |
2127e193 GI |
213 | |
214 | Get the sources from the SVN repository: | |
215 | svn co https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk/smartmontools smartmontools | |
832b75ed GG |
216 | |
217 | Then type: | |
218 | ./autogen.sh | |
219 | and continue with step [3] below, skipping the "unpack the tarball" step. | |
220 | ||
832b75ed | 221 | The autogen.sh command is ONLY required when installing from |
2127e193 GI |
222 | SVN. You need GNU Autoconf (version 2.50 or greater), GNU Automake |
223 | (version 1.7 or greater) and their dependencies installed in order | |
832b75ed GG |
224 | to run it. You can get these here: |
225 | http://www.gnu.org/directory/GNU/autoconf.html | |
226 | http://www.gnu.org/directory/GNU/automake.html | |
227 | ||
228 | [3] Installing from the source tarball | |
229 | ====================================== | |
230 | ||
2127e193 | 231 | If you are NOT installing from SVN, then unpack the tarball: |
832b75ed GG |
232 | tar zxvf smartmontools-5.VERSION.tar.gz |
233 | ||
234 | Then: | |
235 | ./configure | |
236 | make | |
237 | make install (you may need to be root to do this) | |
238 | ||
239 | As shown (with no options to ./configure) this defaults to the | |
240 | following set of installation directories: | |
241 | --prefix=/usr/local | |
242 | --sbindir=/usr/local/sbin | |
243 | --sysconfdir=/usr/local/etc | |
244 | --mandir=/usr/local/share/man | |
a23d5117 | 245 | --with-docdir=/usr/local/share/doc/smartmontools |
832b75ed GG |
246 | --with-initscriptdir=/usr/local/etc/rc.d/init.d |
247 | --disable-sample | |
248 | ||
249 | These will usually not overwrite existing "distribution" installations on | |
250 | Linux Systems since the FHS reserves this area for use by the system | |
251 | administrator. | |
252 | ||
253 | For different installation locations or distributions, simply add | |
254 | arguments to ./configure as shown in [4] below. | |
255 | ||
256 | If you wish to alter the default C compiler flags, set an | |
257 | environment variable CFLAGS='your options' before doing | |
258 | ./configure, or else do: | |
259 | make CFLAGS='your options' | |
260 | ||
2127e193 GI |
261 | The first output line of smartctl and smartd provides information |
262 | about release number, last SVN checkin date and revison, platform, | |
263 | and package. The latter defaults to "(local build)" and can be | |
264 | changed by the variable BUILD_INFO, for example: | |
265 | make BUILD_INFO='"(Debian 5.39-2)"' | |
266 | ||
832b75ed GG |
267 | [4] Guidelines for different Linux distributions |
268 | ================================================ | |
269 | ||
270 | Note: Please send corrections/additions to: | |
271 | smartmontools-support@lists.sourceforge.net | |
272 | ||
273 | Debian: | |
274 | If you don't want to overwrite any distribution package, use: | |
275 | ./configure | |
276 | ||
277 | Filesystem Hierarchy Standard (FHS, http://www.pathname.com/fhs/): | |
278 | ./configure --sbindir=/usr/local/sbin \ | |
279 | --sysconfdir=/usr/local/etc \ | |
280 | --mandir=/usr/local/man \ | |
281 | --with-initscriptdir=/usr/local/etc/rc.d/init.d \ | |
282 | --with-docdir=/usr/local/share/doc/smartmontools-VERSION | |
283 | ||
284 | Red Hat: | |
285 | ./configure --sbindir=/usr/sbin \ | |
286 | --sysconfdir=/etc \ | |
287 | --mandir=/usr/share/man \ | |
288 | --with-initscriptdir=/etc/rc.d/init.d \ | |
289 | --with-docdir=/usr/share/doc/smartmontools-VERSION | |
290 | ||
291 | Slackware: | |
292 | If you don't want to overwrite any "distribution" package, use: | |
293 | ./configure | |
294 | ||
295 | Otherwise use: | |
296 | ./configure --sbindir=/usr/sbin \ | |
297 | --sysconfdir=/etc \ | |
298 | --mandir=/usr/share/man \ | |
299 | --with-initscriptdir=/etc/rc.d \ | |
300 | --with-docdir=/usr/share/doc/smartmontools-VERSION | |
301 | ||
302 | And | |
303 | removepkg smartmontools smartsuite (only root can do this) | |
304 | before make install | |
305 | ||
306 | The init script works on Slackware. You just have to add an entry like | |
307 | the following in /etc/rc.d/rc.M or /etc/rc.d/rc.local: | |
308 | ||
309 | if [ -x /etc/rc.d/smartd ]; then | |
310 | . /etc/rc.d/smartd start | |
311 | fi | |
312 | ||
313 | To disable it: | |
314 | chmod 644 /etc/rc.d/smartd | |
315 | ||
316 | For a list of options: | |
317 | /etc/rc.d/smartd | |
318 | ||
319 | SuSE: | |
320 | ./configure --sbindir=/usr/sbin \ | |
321 | --sysconfdir=/etc \ | |
322 | --mandir=/usr/share/man \ | |
323 | --with-initscriptdir=/etc/init.d \ | |
324 | --with-docdir=/usr/share/doc/packages/smartmontools-VERSION | |
325 | ||
326 | [5] Guidelines for FreeBSD | |
327 | ========================== | |
328 | To match the way it will installed when it becomes available as a PORT, use | |
329 | the following: | |
330 | ||
331 | ./configure --prefix=/usr/local \ | |
332 | --with-initscriptdir=/usr/local/etc/rc.d/ \ | |
333 | --with-docdir=/usr/local/share/doc/smartmontools-VERSION \ | |
334 | --enable-sample | |
335 | ||
832b75ed GG |
336 | NOTE: --enable-sample will cause the smartd.conf and smartd RC files to |
337 | be installed with the string '.sample' append to the name, so you will end | |
338 | up with the following: | |
339 | /usr/local/etc/smartd.conf.sample | |
340 | /usr/local/etc/rc.d/smartd.sample | |
341 | ||
342 | ||
343 | [6] Guidelines for Darwin | |
344 | ========================= | |
345 | ./configure --with-initscriptdir=/Library/StartupItems | |
346 | ||
4d59bff9 GG |
347 | If you'd like to build the i386 version on a powerpc machine, you can |
348 | use | |
349 | ||
a37e7145 | 350 | CXX='g++ -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386' \ |
4d59bff9 GG |
351 | ./configure --host=i386-apple-darwin \ |
352 | --with-initscriptdir=/Library/StartupItems | |
832b75ed GG |
353 | |
354 | [7] Guidelines for NetBSD/OpenBSD | |
355 | ================================= | |
356 | ./configure --prefix=/usr/pkg \ | |
357 | --with-docdir=/usr/pkg/share/doc/smartmontools | |
358 | ||
359 | On OpenBSD, it is important that you use GNU make (gmake from | |
360 | /usr/ports/devel/gmake) to build smartmontools, as the BSD make doesn't | |
361 | know how to make the manpages. | |
362 | ||
363 | [8] Guidelines for Solaris | |
364 | ========================== | |
365 | ||
366 | smartmontools has been partially but not completely ported to | |
367 | Solaris. It includes complete SCSI support but no ATA or 3ware | |
2127e193 GI |
368 | support. It can be compiled with either CC (Sun's C++ compiler) |
369 | or GNU g++. | |
370 | ||
371 | To compile with g++: | |
832b75ed GG |
372 | |
373 | ./configure [args] | |
374 | make | |
375 | ||
2127e193 | 376 | To compile with Sun CC: |
832b75ed | 377 | |
2127e193 | 378 | env CC=cc CXX=CC ./configure [args] |
832b75ed GG |
379 | make |
380 | ||
381 | The correct arguments [args] to configure are: | |
382 | --sbindir=/usr/sbin \ | |
383 | --sysconfdir=/etc \ | |
384 | --mandir=/usr/share/man \ | |
385 | --with-docdir=/usr/share/doc/smartmontools-VERSION \ | |
386 | --with-initscriptdir=/etc/init.d | |
387 | ||
388 | To start the script automatically on bootup, create hardlinks that | |
389 | indicate when to start/stop in: | |
390 | /etc/rc[S0123].d/ | |
391 | pointing to /etc/init.d/smartd. Create: | |
392 | K<knum>smartd in rcS.d, rc0.d, rc1.d, rc2.d | |
393 | S<snum>smartd in rc3.d | |
394 | where <knum> is related to <snum> such that the higher snum is the | |
395 | lower knum must be. | |
396 | ||
397 | On usual configuration, '95' would be suitable for <snum> and '05' | |
398 | for <knum> respectively. If you choose these value, you can | |
399 | create hardlinks by: | |
400 | ||
401 | cd /etc | |
402 | sh -c 'for n in S 0 1 2; do ln init.d/smartd rc$n.d/K05smartd; done' | |
403 | sh -c 'for n in 3 ; do ln init.d/smartd rc$n.d/S95smartd; done' | |
404 | ||
405 | [9] Guidelines for Cygwin | |
406 | ========================= | |
407 | ||
408 | Same as Red Hat: | |
409 | ./configure --prefix=/usr \ | |
410 | --sysconfdir=/etc \ | |
411 | --mandir='${prefix}/share/man' | |
412 | ||
413 | OR EQUIVALENTLY | |
414 | ./configure --sbindir=/usr/sbin \ | |
415 | --sysconfdir=/etc \ | |
416 | --mandir=/usr/share/man \ | |
417 | --with-initscriptdir=/etc/rc.d/init.d \ | |
a23d5117 | 418 | --with-docdir=/usr/share/doc/smartmontools |
832b75ed GG |
419 | |
420 | Using DOS text file type as default for the working directories ("textmode" | |
421 | mount option) is not recommended. Building the binaries and man pages using | |
422 | "make" is possible, but "make dist" and related targets work only with UNIX | |
423 | file type ("binmode" mount option) set. The "autogen.sh" script prints a | |
424 | warning if DOS type is selected. | |
425 | ||
2127e193 | 426 | If installing from SVN, you may check out all files either with CR/LF |
ba59cff1 GG |
427 | or LF line endings. Starting with release 3.1-7, Cygwin's bash does no |
428 | longer accept scripts with CR/LF by default. To run the initial script | |
429 | ./autogen.sh checked out with CR/LF on a "binmode" mount, type: | |
430 | ||
431 | bash -O igncr ./autogen.sh | |
432 | ||
433 | instead. This is not necessary for the generated ./configure script. | |
434 | ||
832b75ed | 435 | [10] Guidelines for Windows |
eb07ddf2 | 436 | =========================== |
832b75ed | 437 | |
eb07ddf2 | 438 | To compile the Windows release with MinGW gcc on MSYS, use: |
832b75ed | 439 | |
eb07ddf2 | 440 | ./configure |
832b75ed GG |
441 | make |
442 | ||
443 | Instead of using "make install", copy the .exe files into | |
444 | some directory in the PATH. | |
445 | ||
7f0798ef | 446 | To compile on Cygwin with MinGW gcc 3.x (option '-mno-cygwin'): |
eb07ddf2 | 447 | |
7f0798ef GI |
448 | ./configure --build=i686-pc-mingw32 \ |
449 | CC=gcc-3 \ | |
450 | CXX=g++-3 | |
eb07ddf2 | 451 | |
7f0798ef | 452 | To cross-compile on Debian Linux with gcc-mingw32: |
eb07ddf2 | 453 | |
7f0798ef GI |
454 | ./configure --build=$(./config.guess) \ |
455 | --host=i686-pc-mingw32 \ | |
456 | CC=i586-mingw32msvc-gcc \ | |
457 | CXX=i586-mingw32msvc-g++ | |
eb07ddf2 | 458 | |
7f0798ef | 459 | To compile statically linked 64-bit version with MinGW-w64: |
eb07ddf2 | 460 | |
7f0798ef GI |
461 | ./configure --build=$(./config.guess) \ |
462 | --host=x86_64-w64-mingw32 \ | |
463 | LDFLAGS=-static | |
464 | ||
465 | Tested on Cygwin and Linux with MinGW-w64 from | |
466 | http://mingw-w64.sourceforge.net/. | |
467 | WARNING: 64-bit version is still EXPERIMENTAL. | |
eb07ddf2 GI |
468 | |
469 | ||
832b75ed GG |
470 | To build the Windows binary distribution, use: |
471 | ||
472 | make dist-win32 | |
4d59bff9 | 473 | |
832b75ed GG |
474 | This builds the distribution in directory |
475 | ||
476 | ./smartmontools-VERSION.win32/ | |
477 | ||
478 | and packs it into | |
479 | ||
480 | ./smartmontools-VERSION.win32.zip | |
481 | ||
4d59bff9 GG |
482 | To create a Windows installer, use: |
483 | ||
484 | make installer-win32 | |
485 | ||
486 | This builds the distribution directory and packs it into the | |
487 | self-extracting install program | |
488 | ||
489 | ./smartmontools-VERSION.win32-setup.exe | |
490 | ||
491 | The installer is build using the command "makensis" from the NSIS | |
492 | package. See http://nsis.sourceforge.net/ for documentation and | |
2127e193 | 493 | download location. |
4d59bff9 | 494 | |
7f0798ef GI |
495 | It is also possible to (cross-)build the installer on Linux. |
496 | This was successfully tested on Debian with package "nsis". | |
497 | ||
4d59bff9 GG |
498 | To both create and run the (interactive) installer, use: |
499 | ||
500 | make install-win32 | |
501 | ||
832b75ed GG |
502 | Additional make targets are distdir-win32 to build the directory |
503 | only and cleandist-win32 for cleanup. | |
504 | ||
505 | The binary distribution includes all documentation files converted | |
506 | to DOS text file format and *.html and *.txt preformatted man pages. | |
507 | The tools unix2dos.exe (package cygutils) and zip.exe (package zip | |
508 | or a native Win32 release of Info-ZIP, http://www.info-zip.org) are | |
509 | necessary but may be not installed by Cygwin's default settings. | |
510 | ||
2127e193 GI |
511 | To prepare os_win32 directory for MSVC8, use the following on Cygwin: |
512 | ||
513 | mkdir vctmp && cd vctmp | |
514 | ../configure --build=mingw32 | |
515 | make config-vc8 | |
832b75ed | 516 | |
2127e193 GI |
517 | The MSVC8 project files (os_win32/smartmontools_vc8.sln, |
518 | os_win32/smart{ctl,d}_vc8.vcproj) are included in SVN (but not in | |
519 | source tarball). The target config-vc8 from a Makefile configured | |
520 | for MinGW creates os_win32/{config,svnversion}_vc8.h from | |
521 | ./{config,svnversion}.h. The configure skript must be run outside | |
522 | of the source directory to avoid inclusion of the original config.h. | |
832b75ed | 523 | |
2127e193 GI |
524 | Unlike MinGW, MSVC can also be used to build the syslog message file |
525 | tool syslogevt.exe. See smartd man page for usage information about | |
526 | this tool. | |
832b75ed GG |
527 | |
528 | ||
529 | [11] Guidelines for OS/2, eComStation | |
530 | ===================================== | |
531 | ||
532 | To compile the OS/2 code, please run | |
533 | ||
534 | ./os_os2/configure.os2 | |
535 | make | |
536 | make install | |
537 | ||
538 | [12] Guidelines for OpenBSD | |
539 | ========================== | |
540 | To match the way it will installed when it becomes available as a PORT, use | |
541 | the following: | |
542 | ||
543 | ./configure --prefix=/usr/local \ | |
544 | --sysconfdir=/etc | |
545 | --with-initscriptdir=/usr/local/share/doc/smartmontools-VERSION \ | |
546 | --with-docdir=/usr/local/share/doc/smartmontools-VERSION \ | |
547 | --enable-sample | |
548 | ||
549 | It is important that you use GNU make (gmake from /usr/ports/devel/gmake) | |
550 | to build smartmontools, as the default OpenBSD make doesn't know how to build | |
551 | the man pages. | |
552 | ||
553 | NOTE1: --with-initscriptdir installs a SystemV startup script. It really | |
554 | should be --without-initscriptdir, but the Makefile code is incorrect and | |
555 | trys to install the initscript (smartd) to /no. So, an interim fix it to | |
556 | set the initscript dir to the doc dir. | |
557 | ||
558 | NOTE2: --enable-sample will cause the smartd.conf and smartd RC files to | |
559 | be installed with the string '.sample' append to the name, so you will end | |
560 | up with the following: | |
561 | /usr/local/etc/smartd.conf.sample | |
562 | /usr/local/etc/rc.d/smartd.sample | |
563 | ||
564 | [13] Comments | |
565 | ============ | |
566 | ||
567 | To compile from another directory, you can replace the step | |
568 | ./configure [options] | |
569 | by the following: | |
570 | mkdir objdir | |
571 | cd objdir | |
572 | ../configure [options] | |
573 | ||
574 | To install to another destination (used mainly by package maintainers, | |
575 | or to examine the package contents without risk of modifying any | |
576 | system files) you can replace the step: | |
577 | make install | |
578 | with: | |
579 | make DESTDIR=/home/myself/smartmontools-package install | |
580 | ||
581 | Use a full path. Paths like ~/smartmontools-package may not work. | |
582 | ||
583 | After installing smartmontools, you can read the man pages, and try | |
584 | out the commands: | |
585 | ||
586 | man smartd.conf | |
587 | man smartctl | |
588 | man smartd | |
589 | ||
590 | /usr/sbin/smartctl -s on -o on -S on /dev/hda (only root can do this) | |
591 | /usr/sbin/smartctl -a /dev/hda (only root can do this) | |
592 | ||
593 | Note that the default location for the manual pages are | |
594 | /usr/share/man/man5 and /usr/share/man/man8. If "man" doesn't find | |
595 | them, you may need to add /usr/share/man to your MANPATH environment | |
596 | variable. | |
597 | ||
598 | Source and binary RPM packages are available at | |
599 | http://sourceforge.net/project/showfiles.php?group_id=64297 | |
600 | ||
601 | Refer to http://smartmontools.sourceforge.net/index.html#howtodownload | |
602 | for any additional download and installation instructions. | |
603 | ||
604 | The following files are installed if ./configure has no options: | |
605 | ||
606 | /usr/local/sbin/smartd [Executable daemon] | |
607 | /usr/local/sbin/smartctl [Executable command-line utility] | |
608 | /usr/local/etc/smartd.conf [Configuration file for smartd daemon] | |
609 | /usr/local/etc/rc.d/init.d/smartd [Init/Startup script for smartd] | |
610 | /usr/local/share/man/man5/smartd.conf.5 [Manual page] | |
611 | /usr/local/share/man/man8/smartctl.8 [Manual page] | |
612 | /usr/local/share/man/man8/smartd.8 [Manual page] | |
613 | /usr/local/share/doc/smartmontools-5.X/AUTHORS [Information about the authors and developers] | |
2127e193 | 614 | /usr/local/share/doc/smartmontools-5.X/CHANGELOG [A log of changes. Also see SVN] |
832b75ed GG |
615 | /usr/local/share/doc/smartmontools-5.X/COPYING [GNU General Public License Version 2] |
616 | /usr/local/share/doc/smartmontools-5.X/INSTALL [Installation instructions: what you're reading!] | |
617 | /usr/local/share/doc/smartmontools-5.X/NEWS [Significant bugs discovered in old versions] | |
618 | /usr/local/share/doc/smartmontools-5.X/README [Overview] | |
619 | /usr/local/share/doc/smartmontools-5.X/TODO [Things that need to be done/fixed] | |
620 | /usr/local/share/doc/smartmontools-5.X/WARNINGS [Systems where lockups or other serious problems were reported] | |
621 | /usr/local/share/doc/smartmontools-5.X/smartd.conf [Example configuration file for smartd] | |
622 | /usr/local/share/doc/smartmontools-5.X/examplescripts [Executable scripts for -M exec of smartd.conf (4 files)] | |
623 | ||
624 | The commands: | |
625 | ||
626 | make htmlman | |
627 | make txtman | |
628 | ||
629 | may be used to build .html and .txt preformatted man pages. | |
630 | These are used by the dist-win32 make target to build the Windows | |
631 | distribution. | |
632 | The commands also work on other operating system configurations | |
633 | if suitable versions of man2html, groff and grotty are installed. | |
634 | On systems without man2html, the following command should work | |
635 | if groff is available: | |
636 | ||
637 | make MAN2HTML='groff -man -Thtml' htmlman | |
638 | ||
639 | ||
2127e193 GI |
640 | Some of the source files are prepared for the documentation |
641 | generator Doxygen (http://www.doxygen.org/). If Doxygen is installed, | |
642 | the command: | |
643 | ||
644 | doxygen | |
645 | ||
646 | creates HTML documentation in doc/html and LaTeX documentation | |
647 | in doc/latex. If TeX is installed, the following command creates | |
648 | a documentation file doc/latex/refman.pdf: | |
649 | ||
650 | ( cd doc/latex && make pdf ) | |
651 | ||
652 | ||
832b75ed GG |
653 | [14] Detailed description of arguments to configure command |
654 | =========================================================== | |
655 | ||
656 | When you type: | |
657 | ./configure [options] | |
658 | there are six particularly important variables that affect where the | |
659 | smartmontools software is installed. The variables are listed here, | |
660 | with their default values in square brackets, and the quantities that | |
661 | they affect described following that. This is a very wide table: please read | |
662 | it in a wide window. | |
663 | ||
664 | OPTIONS DEFAULT AFFECTS | |
665 | ------- ------- ------- | |
666 | --prefix /usr/local Please see below | |
667 | --sbindir ${prefix}/sbin Directory for smartd/smartctl executables; | |
668 | Contents of smartd/smartctl man pages | |
a23d5117 GI |
669 | --docdir ${prefix}/share/doc/smartmontools Location of the documentation |
670 | (autoconf >= 2.60 only, see also --with-docdir below) | |
832b75ed GG |
671 | --mandir ${prefix}/share/man Directory for smartctl/smartd/smartd.conf man pages |
672 | --sysconfdir ${prefix}/etc Directory for smartd.conf; | |
673 | Contents of smartd executable; | |
674 | Contents of smartd/smartd.conf man pages; | |
675 | Directory for rc.d/init.d/smartd init script | |
2127e193 | 676 | --with-initscriptdir ${sysconfdir}/init.d/rc.d Location of init scripts |
a23d5117 | 677 | --with-docdir ${prefix}/share/doc/smartmontools Location of the documentation |
2127e193 GI |
678 | --enable-sample --disable-sample Adds the string '.sample' to the names of the smartd.conf file and the smartd RC file |
679 | --with-os-deps os_<guessed>.o OS dependent module(s) | |
680 | --with-selinux <not set> Enables SELinux support. If smartmontools has to create the /dev/tw[ae] device | |
681 | nodes for 3ware/AMCC controllers, this option ensures that the nodes are created | |
682 | with correct SELinux file contexts. | |
a23d5117 GI |
683 | --with-libcap-ng --with-libcap-ng=auto Enables/disables libcap-ng support. If enabled and libcap-ng is |
684 | available, option --capabilities is added to smartd. | |
2127e193 | 685 | --enable-drivedb --disable-drivedb Enables default drive database file '${drivedbdir}/drivedb.h' |
bed94269 | 686 | --with-drivedbdir ${prefix}/share/smartmontools Directory for 'drivedb.h' (implies --enable-drivedb) |
2127e193 | 687 | --enable-savestates --disable-savestates Enables default smartd state files '${savestates}MODEL-SERIAL.ata.state' |
bed94269 GI |
688 | --with-savestates ${prefix}/var/lib/smartmontools/smartd. Prefix for smartd state files (implies --enable-savestates) |
689 | --enable-attributelog --disable-attributelog Enables default smartd attribute log files | |
690 | --with-attributelog ${prefix}/var/lib/smartmontools/attrlog. Prefix for smartd attribute log files (implies --enable-attributelog) | |
832b75ed | 691 | |
a23d5117 GI |
692 | Please note that in previous versions of smartmontools (<= 5.39) the |
693 | default for --with-docdir was | |
694 | ${prefix}/share/doc/smartmontools-VERSION | |
695 | This was changed to make it consistent with the default of the | |
696 | new --docdir option added in autoconf 2.60. | |
697 | ||
832b75ed GG |
698 | Here's an example: |
699 | If you set --prefix=/home/joe and none of the other four | |
700 | variables then the different directories that are used would be: | |
701 | --sbindir /home/joe/sbin | |
702 | --mandir /home/joe/share/man | |
703 | --sysconfdir /home/joe/etc | |
704 | --with-initscriptdir /home/joe/etc/init.d/rc.d | |
a23d5117 | 705 | --with-docdir /home/joe/doc/smartmontools |
832b75ed GG |
706 | |
707 | This is useful for test installs in a harmless subdirectory somewhere. | |
708 | ||
709 | Here are the four possible cases for the four variables above: | |
710 | ||
711 | Case 1: | |
712 | --prefix not set | |
713 | --variable not set | |
714 | ===> VARIABLE gets default value above | |
715 | ||
716 | Case 2: | |
717 | --prefix set | |
718 | --variable not set | |
719 | ===> VARIABLE gets PREFIX/ prepended to default value above | |
720 | ||
721 | Case 3: | |
722 | --prefix not set | |
723 | --variable set | |
724 | ===> VARIABLE gets value that is set | |
725 | ||
726 | Case 4: | |
727 | --prefix is set | |
728 | --variable is set | |
729 | ===> PREFIX is IGNORED, VARIABLE gets value that is set | |
730 | ||
731 | ||
732 | Here are the differences with and without --enable-sample, assuming | |
733 | no other options specified (see above for details) | |
734 | ||
735 | Case 1: | |
736 | --enable-sample provided | |
737 | ==> Files installed are: | |
738 | /usr/local/etc/smartd.conf.sample | |
739 | /usr/local/etc/rc.d/init.d/smartd.sample | |
740 | ||
741 | Case 2: | |
742 | --disable-sample provided or parameter left out | |
743 | ==> Files installed are: | |
744 | /usr/local/etc/smartd.conf | |
745 | /usr/local/etc/rc.d/init.d/smartd | |
746 | ||
747 | Additional information about using configure can be found here: | |
748 | http://www.gnu.org/software/autoconf/manual/autoconf-2.57/html_mono/autoconf.html#SEC139 |