1
1
Smartmontools installation instructions
2
2
=======================================
4
$Id: INSTALL,v 1.73 2007/04/27 08:50:00 geoffk1 Exp $
4
$Id: INSTALL 3074 2010-03-05 23:00:30Z chrfranke $
6
6
Please also see the smartmontools home page:
7
7
http://smartmontools.sourceforge.net/
105
The code was tested on Cygwin 1.5.7, 1.5.11 and 1.5.18-22. It should
106
also work on other recent releases.
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.
108
108
Release 1.5.15 or later is recommended for Cygwin smartd. Older versions
109
109
do not provide syslogd support.
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.
117
The code was tested on Windows 98SE, ME, NT4(SP5,SP6), 2000(SP4),
118
XP(up to SP3), 2003 and Vista.
121
122
On 9x/ME, only standard (legacy) IDE/ATA devices 0-3 are supported.
122
123
The driver SMARTVSD.VXD must be present in WINDOWS\SYSTEM\IOSUBSYS
124
125
installation of some versions of Windows is the WINDOWS\SYSTEM folder.
125
126
In this case, move SMARTVSD.VXD to WINDOWS\SYSTEM\IOSUBSYS and reboot
126
127
(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).
130
129
SMARTVSD.VXD relies on the standard IDE port driver ESDI_506.PDR.
131
130
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.
135
133
Some ATA controllers (e.g. Promise) provided a custom SMARTVSD.VXD
136
134
for their Win9x/ME driver. To access SMART data from both the legacy
139
137
all occurrences of the string "SMARTVSD" with "SMARTVSE". Then reinstall
140
138
the original Windows SMARTVSD.VXD.
142
On NT4/2000/XP/2003, ATA or SATA devices are supported if the device
143
driver implements the SMART IOCTL.
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.
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.
153
(http://www.adaptec.com/en-US/support/scsi_soft/ASPI/ASPI-4.70/)
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/)
154
143
Links to other ASPI drivers can be found at http://www.nu2.nu/aspi/.
156
3ware 9000 RAID controllers are supported using new features available
145
-- Windows NT4/2000/XP/2003/Vista
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.
152
SCSI and USB devices are accessed through SPTI. Special driver support
155
3ware 9000 RAID controllers are supported using features available
157
156
in the Windows driver release 9.4.0 (3wareDrv.sys 3.0.2.70) or later.
158
157
Older drivers provide SMART access to the first physical drive (port)
159
158
of each logical drive (unit). If driver support is not available
209
208
Innotek LibC 0.5 runtime is required.
210
209
Currently only ATA disks are supported, SCSI support will be added.
213
[2] Installing from CVS
211
[2] Installing from SVN
214
212
=======================
215
Get the sources from the CVS repository:
216
cvs -d :pserver:anonymous@smartmontools.cvs.sourceforge.net:/cvsroot/smartmontools login
217
cvs -d :pserver:anonymous@smartmontools.cvs.sourceforge.net:/cvsroot/smartmontools co sm5
218
(when prompted for a password, just press Enter)
214
Get the sources from the SVN repository:
215
svn co https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk/smartmontools smartmontools
222
219
and continue with step [3] below, skipping the "unpack the tarball" step.
224
Further details of using CVS can be found at the URL above.
226
221
The autogen.sh command is ONLY required when installing from
227
CVS. You need GNU Autoconf (version 2.50 or greater), GNU Automake
228
(version 1.6 or greater) and their dependencies installed in order
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
229
224
to run it. You can get these here:
230
225
http://www.gnu.org/directory/GNU/autoconf.html
231
226
http://www.gnu.org/directory/GNU/automake.html
233
228
[3] Installing from the source tarball
234
229
======================================
236
If you are NOT installing from CVS, then unpack the tarball:
231
If you are NOT installing from SVN, then unpack the tarball:
237
232
tar zxvf smartmontools-5.VERSION.tar.gz
247
242
--sbindir=/usr/local/sbin
248
243
--sysconfdir=/usr/local/etc
249
244
--mandir=/usr/local/share/man
250
--with-docdir=/usr/local/share/doc/smartmontools-VERSION
245
--with-docdir=/usr/local/share/doc/smartmontools
251
246
--with-initscriptdir=/usr/local/etc/rc.d/init.d
263
258
./configure, or else do:
264
259
make CFLAGS='your options'
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
267
[4] Guidelines for different Linux distributions
267
268
================================================
332
333
--with-docdir=/usr/local/share/doc/smartmontools-VERSION \
335
Also, it is important that you use GNU make (gmake from /usr/ports/devel/gmake)
336
to build smartmontools, as the default FreeBSD make doesn't know how to build
339
336
NOTE: --enable-sample will cause the smartd.conf and smartd RC files to
340
337
be installed with the string '.sample' append to the name, so you will end
341
338
up with the following:
369
366
smartmontools has been partially but not completely ported to
370
367
Solaris. It includes complete SCSI support but no ATA or 3ware
371
support. It can be compiled with either cc or gcc. To compile
368
support. It can be compiled with either CC (Sun's C++ compiler)
374
373
./configure [args]
377
To compile with Sun cc:
376
To compile with Sun CC:
379
setenv CC cc [csh syntax], or
378
env CC=cc CXX=CC ./configure [args]
384
381
The correct arguments [args] to configure are:
418
415
--sysconfdir=/etc \
419
416
--mandir=/usr/share/man \
420
417
--with-initscriptdir=/etc/rc.d/init.d \
421
--with-docdir=/usr/share/doc/smartmontools-VERSION
418
--with-docdir=/usr/share/doc/smartmontools
423
420
Using DOS text file type as default for the working directories ("textmode"
424
421
mount option) is not recommended. Building the binaries and man pages using
426
423
file type ("binmode" mount option) set. The "autogen.sh" script prints a
427
424
warning if DOS type is selected.
429
If installing from CVS, you may check out all files either with CR/LF
426
If installing from SVN, you may check out all files either with CR/LF
430
427
or LF line endings. Starting with release 3.1-7, Cygwin's bash does no
431
428
longer accept scripts with CR/LF by default. To run the initial script
432
429
./autogen.sh checked out with CR/LF on a "binmode" mount, type:
436
433
instead. This is not necessary for the generated ./configure script.
438
435
[10] Guidelines for Windows
439
==========================
441
To compile the Windows release with MinGW, use the following on Cygwin:
443
./configure --build=mingw32
436
===========================
438
To compile the Windows release with MinGW gcc on MSYS, use:
446
443
Instead of using "make install", copy the .exe files into
447
444
some directory in the PATH.
446
To compile on Cygwin with MinGW gcc 3.x (option '-mno-cygwin'):
448
./configure --build=i686-pc-mingw32 \
452
To cross-compile on Debian Linux with gcc-mingw32:
454
./configure --build=$(./config.guess) \
455
--host=i686-pc-mingw32 \
456
CC=i586-mingw32msvc-gcc \
457
CXX=i586-mingw32msvc-g++
459
To compile statically linked 64-bit version with MinGW-w64:
461
./configure --build=$(./config.guess) \
462
--host=x86_64-w64-mingw32 \
465
Tested on Cygwin and Linux with MinGW-w64 from
466
http://mingw-w64.sourceforge.net/.
467
WARNING: 64-bit version is still EXPERIMENTAL.
449
470
To build the Windows binary distribution, use:
470
491
The installer is build using the command "makensis" from the NSIS
471
492
package. See http://nsis.sourceforge.net/ for documentation and
472
download location. The install script was tested with NSIS 2.17.
495
It is also possible to (cross-)build the installer on Linux.
496
This was successfully tested on Debian with package "nsis".
474
498
To both create and run the (interactive) installer, use:
484
508
or a native Win32 release of Info-ZIP, http://www.info-zip.org) are
485
509
necessary but may be not installed by Cygwin's default settings.
487
It is also possible to compile smartmontools with MSVC 6.0.
488
The project files (smartmontools_vc6.dsw, smart{ctl,d}_vc6.dsp) are
489
included in CVS (but not in source tarball). The config_vc6.h is no
490
longer maintained in CVS. The command:
494
builds config_vc6.h from MinGW's config.h. Unlike MinGW, MSVC 6.0
495
can also be used to build the syslog message file tool syslogevt.exe.
496
See smartd man page for usage information about this tool.
511
To prepare os_win32 directory for MSVC8, use the following on Cygwin:
513
mkdir vctmp && cd vctmp
514
../configure --build=mingw32
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.
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
499
529
[11] Guidelines for OS/2, eComStation
581
611
/usr/local/share/man/man8/smartctl.8 [Manual page]
582
612
/usr/local/share/man/man8/smartd.8 [Manual page]
583
613
/usr/local/share/doc/smartmontools-5.X/AUTHORS [Information about the authors and developers]
584
/usr/local/share/doc/smartmontools-5.X/CHANGELOG [A log of changes. Also see CVS]
614
/usr/local/share/doc/smartmontools-5.X/CHANGELOG [A log of changes. Also see SVN]
585
615
/usr/local/share/doc/smartmontools-5.X/COPYING [GNU General Public License Version 2]
586
616
/usr/local/share/doc/smartmontools-5.X/INSTALL [Installation instructions: what you're reading!]
587
617
/usr/local/share/doc/smartmontools-5.X/NEWS [Significant bugs discovered in old versions]
607
637
make MAN2HTML='groff -man -Thtml' htmlman
640
Some of the source files are prepared for the documentation
641
generator Doxygen (http://www.doxygen.org/). If Doxygen is installed,
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:
650
( cd doc/latex && make pdf )
610
653
[14] Detailed description of arguments to configure command
611
654
===========================================================
623
666
--prefix /usr/local Please see below
624
667
--sbindir ${prefix}/sbin Directory for smartd/smartctl executables;
625
668
Contents of smartd/smartctl man pages
669
--docdir ${prefix}/share/doc/smartmontools Location of the documentation
670
(autoconf >= 2.60 only, see also --with-docdir below)
626
671
--mandir ${prefix}/share/man Directory for smartctl/smartd/smartd.conf man pages
627
672
--sysconfdir ${prefix}/etc Directory for smartd.conf;
628
673
Contents of smartd executable;
629
674
Contents of smartd/smartd.conf man pages;
630
675
Directory for rc.d/init.d/smartd init script
631
--with-initscriptdir ${sysconfdir}/init.d/rc.d Location of init scripts
632
--with-docdir ${prefix}/share/doc/smartmontools-5.X Location of the documentation
633
--enable-sample --disable-sample Adds the string '.sample' to the names of the smartd.conf file and the smartd RC file
676
--with-initscriptdir ${sysconfdir}/init.d/rc.d Location of init scripts
677
--with-docdir ${prefix}/share/doc/smartmontools Location of the documentation
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.
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.
685
--enable-drivedb --disable-drivedb Enables default drive database file '${drivedbdir}/drivedb.h'
686
--with-drivedbdir ${prefix}/share/smartmontools Directory for 'drivedb.h' (implies --enable-drivedb)
687
--enable-savestates --disable-savestates Enables default smartd state files '${savestates}MODEL-SERIAL.ata.state'
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)
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.
635
698
Here's an example:
636
699
If you set --prefix=/home/joe and none of the other four
639
702
--mandir /home/joe/share/man
640
703
--sysconfdir /home/joe/etc
641
704
--with-initscriptdir /home/joe/etc/init.d/rc.d
642
--with-docdir /home/joe/doc/smartmontools-5.X
705
--with-docdir /home/joe/doc/smartmontools
644
707
This is useful for test installs in a harmless subdirectory somewhere.