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