Smartmontools installation instructions
=======================================
-$Id: INSTALL,v 1.68 2006/09/27 21:42:03 chrfranke Exp $
+$Id: INSTALL 2967 2009-10-23 21:45:56Z chrfranke $
Please also see the smartmontools home page:
http://smartmontools.sourceforge.net/
Table of contents:
[1] System requirements
-[2] Installing from CVS
+[2] Installing from SVN
[3] Installing from source tarball
[4] Guidelines for different Linux distributions
[5] Guidelines for FreeBSD
E) Cygwin
- The code was tested on Cygwin 1.5.7, 1.5.11 and 1.5.18. It should also
+ The code was tested on Cygwin 1.5.25-15 and 1.7.0-62. It should also
work on other recent releases.
Release 1.5.15 or later is recommended for Cygwin smartd. Older versions
F) Windows
- The code was tested on Windows 98SE, NT4(SP5,SP6), 2000(SP4) and
- XP(no SP,SP1a,SP2). It should also work on Windows 95(OSR2), 98,
- ME and 2003.
+ The code was tested on Windows 98SE, ME, NT4(SP5,SP6), 2000(SP4),
+ XP(up to SP3), 2003 and Vista.
+
+ -- Windows 9x/ME
On 9x/ME, only standard (legacy) IDE/ATA devices 0-3 are supported.
The driver SMARTVSD.VXD must be present in WINDOWS\SYSTEM\IOSUBSYS
installation of some versions of Windows is the WINDOWS\SYSTEM folder.
In this case, move SMARTVSD.VXD to WINDOWS\SYSTEM\IOSUBSYS and reboot
(http://support.microsoft.com/kb/265854/en-us).
- SMARTVSD.VXD may also be missing in a new installation
- (http://support.microsoft.com/kb/199886/en-us).
SMARTVSD.VXD relies on the standard IDE port driver ESDI_506.PDR.
If the system uses a vendor specific driver, access of SMART data
- is not possible on 9x/ME. This is the case if e.g. the optional
- "IDE miniport driver" is installed on a system with VIA chipset.
+ is not possible.
Some ATA controllers (e.g. Promise) provided a custom SMARTVSD.VXD
for their Win9x/ME driver. To access SMART data from both the legacy
all occurrences of the string "SMARTVSD" with "SMARTVSE". Then reinstall
the original Windows SMARTVSD.VXD.
- On NT4/2000/XP/2003, ATA or SATA devices are supported if the device
- driver implements the SMART IOCTL.
+ To access SCSI and USB devices, an installed ASPI interface (WNASPI32.DLL)
+ is required. The code was tested with Adaptec Windows ASPI drivers 4.71.2.
+ (http://www.adaptec.com/en-US/support/_eol/scsi_sw/ASPI-4.70/)
+ Links to other ASPI drivers can be found at http://www.nu2.nu/aspi/.
+
+ -- Windows NT4/2000/XP/2003/Vista
- The IDE/ATA read log command (smartctl -l, --log, -a, --all) is
- not supported by the SMART IOCTL of NT4/2000/XP. Undocumented
- and possibly buggy system calls are used for this purpose,
- see WARNINGS file for details.
+ ATA or SATA devices are supported if the device driver implements
+ the SMART IOCTLs or IOCTL_IDE_PASS_THROUGH or IOCTL_ATA_PASS_THROUGH.
+ The ATA SMART READ LOG command (smartctl -l, --log, -a, --all) is not
+ supported if only the SMART IOCTLs are implemented.
- SCSI devices are supported on all versions of Windows. An installed
- ASPI interface (WNASPI32.DLL) is required to access SCSI devices.
- The code was tested with Adaptec Windows ASPI drivers 4.71.2.
- (http://www.adaptec.com/en-US/support/scsi_soft/ASPI/ASPI-4.70/)
- Links to other ASPI drivers can be found at http://www.nu2.nu/aspi/.
+ SCSI and USB devices are accessed through SPTI. Special driver support
+ is not required.
- 3ware 9000 RAID controllers are supported using new features added
- to the 3ware 9000 Windows driver. These features are not implemented
- in the latest 'Released' driver (9.3.0.6) available at the time of
- this writing. But an 'in Engineering Phase' driver v3.00.02.061 or
- later can be used to access SMART functionality of each individual
- drive. Older drivers provide SMART access only to the first drive
- (port) of each unit. The commands READ LOG and ABORT SELFTEST are
- still unsupported due to the limitations of SMART IOCTL (see above).
+ 3ware 9000 RAID controllers are supported using features available
+ in the Windows driver release 9.4.0 (3wareDrv.sys 3.0.2.70) or later.
+ Older drivers provide SMART access to the first physical drive (port)
+ of each logical drive (unit). If driver support is not available
+ (7000/8000 series, 9000 on XP 64), smartctl can be used to parse SMART
+ data output from CLI or 3DM.
G) MacOS/Darwin
Innotek LibC 0.5 runtime is required.
Currently only ATA disks are supported, SCSI support will be added.
-
-[2] Installing from CVS
+[2] Installing from SVN
=======================
- Get the sources from the CVS repository:
- cvs -d :pserver:anonymous@smartmontools.cvs.sourceforge.net:/cvsroot/smartmontools login
- cvs -d :pserver:anonymous@smartmontools.cvs.sourceforge.net:/cvsroot/smartmontools co sm5
- (when prompted for a password, just press Enter)
+
+ Get the sources from the SVN repository:
+ svn co https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk/smartmontools smartmontools
Then type:
./autogen.sh
and continue with step [3] below, skipping the "unpack the tarball" step.
- Further details of using CVS can be found at the URL above.
-
The autogen.sh command is ONLY required when installing from
- CVS. You need GNU Autoconf (version 2.50 or greater), GNU Automake
- (version 1.6 or greater) and their dependencies installed in order
+ SVN. You need GNU Autoconf (version 2.50 or greater), GNU Automake
+ (version 1.7 or greater) and their dependencies installed in order
to run it. You can get these here:
http://www.gnu.org/directory/GNU/autoconf.html
http://www.gnu.org/directory/GNU/automake.html
[3] Installing from the source tarball
======================================
- If you are NOT installing from CVS, then unpack the tarball:
+ If you are NOT installing from SVN, then unpack the tarball:
tar zxvf smartmontools-5.VERSION.tar.gz
Then:
./configure, or else do:
make CFLAGS='your options'
+ The first output line of smartctl and smartd provides information
+ about release number, last SVN checkin date and revison, platform,
+ and package. The latter defaults to "(local build)" and can be
+ changed by the variable BUILD_INFO, for example:
+ make BUILD_INFO='"(Debian 5.39-2)"'
+
[4] Guidelines for different Linux distributions
================================================
--with-docdir=/usr/local/share/doc/smartmontools-VERSION \
--enable-sample
- Also, it is important that you use GNU make (gmake from /usr/ports/devel/gmake)
- to build smartmontools, as the default FreeBSD make doesn't know how to build
- the man pages.
-
NOTE: --enable-sample will cause the smartd.conf and smartd RC files to
be installed with the string '.sample' append to the name, so you will end
up with the following:
If you'd like to build the i386 version on a powerpc machine, you can
use
- CC='gcc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386' \
+ CXX='g++ -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386' \
./configure --host=i386-apple-darwin \
--with-initscriptdir=/Library/StartupItems
smartmontools has been partially but not completely ported to
Solaris. It includes complete SCSI support but no ATA or 3ware
- support. It can be compiled with either cc or gcc. To compile
- with gcc:
+ support. It can be compiled with either CC (Sun's C++ compiler)
+ or GNU g++.
+
+ To compile with g++:
./configure [args]
make
- To compile with Sun cc:
+ To compile with Sun CC:
- setenv CC cc [csh syntax], or
- CC=cc [sh syntax]
- ./configure [args]
+ env CC=cc CXX=CC ./configure [args]
make
The correct arguments [args] to configure are:
file type ("binmode" mount option) set. The "autogen.sh" script prints a
warning if DOS type is selected.
+ If installing from SVN, you may check out all files either with CR/LF
+ or LF line endings. Starting with release 3.1-7, Cygwin's bash does no
+ longer accept scripts with CR/LF by default. To run the initial script
+ ./autogen.sh checked out with CR/LF on a "binmode" mount, type:
+
+ bash -O igncr ./autogen.sh
+
+ instead. This is not necessary for the generated ./configure script.
+
[10] Guidelines for Windows
-==========================
+===========================
-To compile the Windows release with MinGW, use the following on Cygwin:
+To compile the Windows release with MinGW gcc on MSYS, use:
- ./configure --build=mingw32
+ ./configure
make
Instead of using "make install", copy the .exe files into
some directory in the PATH.
+To compile with MinGW gcc 3.x on Cygwin, use:
+
+ ./configure --build=i686-pc-mingw32
+
+ The above does not work if gcc 4.x is installed and selected as
+ default by /usr/sbin/alternatives. If the configure command aborts
+ with error message '... does not support -mno-cygwin', select
+ gcc 3.x by:
+
+ CC=gcc-3 CXX=g++-3 ./configure --build=i686-pc-mingw32
+
+ Alternatively, a MinGW-targeted cross-compiler can be used if available:
+
+ ./configure --build=i686-pc-cygwin --host=i686-pc-mingw32
+
+
To build the Windows binary distribution, use:
make dist-win32
The installer is build using the command "makensis" from the NSIS
package. See http://nsis.sourceforge.net/ for documentation and
- download location. The install script was tested with NSIS 2.17.
+ download location.
To both create and run the (interactive) installer, use:
or a native Win32 release of Info-ZIP, http://www.info-zip.org) are
necessary but may be not installed by Cygwin's default settings.
- It is also possible to compile smartmontools with MSVC 6.0.
- The project files (smartmontools_vc6.dsw, smart{ctl,d}_vc6.dsp) are
- included in CVS (but not in source tarball). The config_vc6.h is no
- longer maintained in CVS. The command:
+To prepare os_win32 directory for MSVC8, use the following on Cygwin:
+
+ mkdir vctmp && cd vctmp
+ ../configure --build=mingw32
+ make config-vc8
- make config-vc6
+ The MSVC8 project files (os_win32/smartmontools_vc8.sln,
+ os_win32/smart{ctl,d}_vc8.vcproj) are included in SVN (but not in
+ source tarball). The target config-vc8 from a Makefile configured
+ for MinGW creates os_win32/{config,svnversion}_vc8.h from
+ ./{config,svnversion}.h. The configure skript must be run outside
+ of the source directory to avoid inclusion of the original config.h.
- builds config_vc6.h from MinGW's config.h. Unlike MinGW, MSVC 6.0
- can also be used to build the syslog message file tool syslogevt.exe.
- See smartd man page for usage information about this tool.
+ Unlike MinGW, MSVC can also be used to build the syslog message file
+ tool syslogevt.exe. See smartd man page for usage information about
+ this tool.
[11] Guidelines for OS/2, eComStation
/usr/local/share/man/man8/smartctl.8 [Manual page]
/usr/local/share/man/man8/smartd.8 [Manual page]
/usr/local/share/doc/smartmontools-5.X/AUTHORS [Information about the authors and developers]
-/usr/local/share/doc/smartmontools-5.X/CHANGELOG [A log of changes. Also see CVS]
+/usr/local/share/doc/smartmontools-5.X/CHANGELOG [A log of changes. Also see SVN]
/usr/local/share/doc/smartmontools-5.X/COPYING [GNU General Public License Version 2]
/usr/local/share/doc/smartmontools-5.X/INSTALL [Installation instructions: what you're reading!]
/usr/local/share/doc/smartmontools-5.X/NEWS [Significant bugs discovered in old versions]
make MAN2HTML='groff -man -Thtml' htmlman
+Some of the source files are prepared for the documentation
+generator Doxygen (http://www.doxygen.org/). If Doxygen is installed,
+the command:
+
+doxygen
+
+creates HTML documentation in doc/html and LaTeX documentation
+in doc/latex. If TeX is installed, the following command creates
+a documentation file doc/latex/refman.pdf:
+
+( cd doc/latex && make pdf )
+
+
[14] Detailed description of arguments to configure command
===========================================================
Contents of smartd executable;
Contents of smartd/smartd.conf man pages;
Directory for rc.d/init.d/smartd init script
---with-initscriptdir ${sysconfdir}/init.d/rc.d Location of init scripts
---with-docdir ${prefix}/share/doc/smartmontools-5.X Location of the documentation
---enable-sample --disable-sample Adds the string '.sample' to the names of the smartd.conf file and the smartd RC file
+--with-initscriptdir ${sysconfdir}/init.d/rc.d Location of init scripts
+--with-docdir ${prefix}/share/doc/smartmontools-5.X Location of the documentation
+--enable-sample --disable-sample Adds the string '.sample' to the names of the smartd.conf file and the smartd RC file
+--with-os-deps os_<guessed>.o OS dependent module(s)
+--with-selinux <not set> Enables SELinux support. If smartmontools has to create the /dev/tw[ae] device
+ nodes for 3ware/AMCC controllers, this option ensures that the nodes are created
+ with correct SELinux file contexts.
+--enable-drivedb --disable-drivedb Enables default drive database file '${drivedbdir}/drivedb.h'
+--with-drivedbdir ${prefix}/share/smartmontools Directory for 'drivedb.h' (implies --enable-drivedb)
+--enable-savestates --disable-savestates Enables default smartd state files '${savestates}MODEL-SERIAL.ata.state'
+--with-savestates ${prefix}/var/lib/smartmontools/smartd. Prefix for smartd state files (implies --enable-savestates)
+--enable-attributelog --disable-attributelog Enables default smartd attribute log files
+--with-attributelog ${prefix}/var/lib/smartmontools/attrlog. Prefix for smartd attribute log files (implies --enable-attributelog)
Here's an example:
If you set --prefix=/home/joe and none of the other four