{{{ #!div style="border: 1pt solid; float:right; padding:10px; background-color: #E6E6FA; margin-left:30px;" '''Menu'''[[BR]] [[BR]] [wiki:Download Download Instructions][[BR]] [wiki:TocDoc Documentation][[BR]] [wiki:Help][[BR]] [wiki:TocSupport Device Support][[BR]] [wiki:TocDeveloper Developers Area][[BR]] [wiki:Links] }}} = Smartmontools Download and Installation = [[PageOutline(2-3,Table of Contents, inline)]] ---- Smartmontools 6.2 was released 2013-07-26, see [http://sourceforge.net/p/smartmontools/code/3841/tree/tags/RELEASE_6_2/smartmontools/NEWS NEWS], [http://sourceforge.net/p/smartmontools/code/3841/tree/tags/RELEASE_6_2/smartmontools/ChangeLog ChangeLog] and [http://sourceforge.net/query?milestone=Release+6.2 tickets] for details. ---- After installation or booting from a [wiki:LiveCDs Live-CD], you can read smartmontools man pages and try out the commands: {{{ man smartd.conf man smartctl man smartd sudo /usr/sbin/smartctl -s on -o on -S on /dev/sda sudo /usr/sbin/smartctl -x /dev/sda }}} Note that the default location for the manual pages are {{{/usr/share/man/man5}}} and {{{/usr/share/man/man8}}}. If '{{{man}}}' doesn't find them, then you may need to add {{{/usr/share/man}}} to your {{{MANPATH}}} environment variable. The [#InstalltheWindowspackage Windows package] provides preformatted man pages in {{{*.html}}} and {{{*.txt}}} format. ---- == Install precompiled package == Precompiled packages are available for many distributions, see the [wiki:Packages] page. ---- === Install the Windows package === Download and run the latest smartmontools [http://nsis.sourceforge.net/Main_Page NSIS]-installer ({{{*.win32-setup.exe}}}) from [http://sourceforge.net/projects/smartmontools/files/ here]. More recent Windows test releases build from SVN snapshots are available [http://smartmontools-win32.dyndns.org/smartmontools/ here]. The default install type "Full" creates start menu shortcuts including an uninstaller, and adds the install directory to the PATH variable. The install type "Extract files only" is useful to unpack a "portable" version without affecting the Windows registry. The files can also be unpacked by [http://www.7-zip.org/ 7-Zip] which is also available for [http://packages.debian.org/stable/p7zip-full Linux]. The 32-bit version of smartmontools usually works also on 64-bit versions of Windows. Starting with smartmontools 5.43, the installer also provides 64-bit executables. These may be useful if the 32-bit subsystem is not available (e.g. 64-bit Windows Recovery CD). Virus scanners occasionally produce false positive virus reports for NSIS-installers, see the [http://nsis.sourceforge.net/NSIS_False_Positives NSIS False Positives page]. If this is the case for the smartmontools installer, please send a report to the [mailto:smartmontools-support@lists.sourceforge.net smartmontools-support mailing list]. To use the smartd warning mail feature, download and install the [http://www.blat.net/ Blat] mail utility. See the [http://wpkg.org/Smartmontools WPKG-Wiki] for info about automated deployment of smartmontools and Blat. Alternatively you could use the [http://www.netpower.fr/smartmontools Smartmontools for Windows Package] by Ozy de Jong. This package provides user friendly support for smartd configuration and unattended setup. ---- == Install from the source tarball == Download the latest source tarball from [http://sourceforge.net/projects/smartmontools/files/ here]. Uncompress the tarball: {{{ tar zxvf smartmontools-6.1.tar.gz }}} The previous step created a directory called {{{smartmontools-6.1}}} containing the code. Go to that directory, build, and install: {{{ cd smartmontools-6.1 ./configure make sudo make install }}} These optional arguments of {{{./configure}}} are fully explained in the [source:/trunk/smartmontools/INSTALL INSTALL] file. The most important one is {{{--prefix}}} to change the default installation directories. If you don't pass any arguments to {{{./configure}}} all files will reside under {{{/usr/local}}} to not interfere with files from your distribution. To compile from another directory (avoids overwriting virgin files from the smartmontools package) replace {{{./configure [options]}}} by: {{{ mkdir objdir cd objdir ../configure [options] }}} To install to another destination (useful for testing and to avoid overwriting an existing smartmontools installation) replace {{{make install}}} by: {{{ make DESTDIR=/home/myself/smartmontools-test install }}} Use a full path: {{{~/smartmontools-test}}} would work but {{{./smartmontools-test}}} won't. The smartmontools binaries for Windows can also be build from the source tarball (or from SVN) using the [http://www.mingw.org/ MinGW] or the [http://mingw-w64.sourceforge.net/ MinGW-w64] compiler. Build environments may be [http://cygwin.com Cygwin] or [http://www.mingw.org/wiki/MSYS MSYS], cross-compilation under Linux is also supported. Extra {{{./configure}}} arguments {{{--host=...}}} and {{{--build=...}}} may be required. The {{{make install}}} command does not work for Windows. See [source:/trunk/smartmontools/INSTALL INSTALL] file for details. ---- == Install latest unreleased code from SVN repository == '''Sourceforge moved our repository to a new location: [http://svn.code.sf.net/p/smartmontools/code/]. Commits to this repository are not visible in this Trac. Use the [http://sourceforge.net/p/smartmontools/code/HEAD/tree/ new code browser] instead.''' You can also download the source tree via the code browser link [http://sourceforge.net/p/smartmontools/code/HEAD/tarball?path=/trunk/smartmontools Download Snapshot]. The old repository at [https://smartmontools.svn.sourceforge.net/svnroot/smartmontools] is now set to read-only. For those, who don't already have a Subversion client installed, here is a [http://subversion.apache.org/packages.html list of SVN Packages] and a [http://en.wikipedia.org/wiki/Comparison_of_Subversion_clients comparison of SVN clients] for different operating systems and in all colors and flavours. (Stand-alone clients, Desktop-integrated clients, IDE plug-in clients, ..) All you need to do to get the latest development code is (but note that the development code may be unstable, and that the documentation and code may be inconsistent): {{{ svn co http://svn.code.sf.net/p/smartmontools/code/trunk/smartmontools smartmontools }}} This will create a subdirectory called {{{smartmontools/}}} containing the code. Go to that directory, build, and install: {{{ cd smartmontools ./autogen.sh ./configure make sudo make install }}} See notes under [#Installfromthesourcetarball Install from source tarball] for different options to {{{./configure}}} and other useful remarks. To update your sources from trunk (development version): {{{ cd smartmontools svn update }}} One of the really cool things about version control systems is that you can get ''any'' version of the code you want, from the first release up the the most current development version. And it's trivial, because each release is __tagged__ with a name. Look at the [http://sourceforge.net/p/smartmontools/code/HEAD/tree/tags/ tags in our SVN repository] to see what the different names are. E.g. run the following command to fetch the RELEASE_5_38 release: {{{ svn co http://svn.code.sf.net/p/smartmontools/code/tags/RELEASE_5_38/sm5 smartmontools }}} Note that the directory with the smartmontools sourcefiles is named '''{{{sm5}}}''' in releases <= 5.38. The rest of the build procedure is the same like described above. ---- == Update the drive database == Starting with smartmontools 5.40 the drive database file {{{drivedb.h}}} can be updated separately with the following command: {{{ sudo /usr/sbin/update-smart-drivedb }}} This command uses [http://curl.haxx.se/ curl], [http://www.gnu.org/software/wget/ wget] or [http://lynx.isc.org/ lynx] for download. A proxy server can be specified by the environment variable {{{http_proxy}}} (lower case only), see the man pages of the above commands. The Windows package provides {{{update-smart-drivedb.exe}}}. It reads the proxy configuration from IE registry key. Alternatively the file {{{drivedb.h}}} could be downloaded from [http://sourceforge.net/p/smartmontools/code/HEAD/tree/trunk/smartmontools/drivedb.h?format=raw SVN trunk]. ---- == Run smartmontools from Live-system == If you have a system that is showing signs of disk trouble (for example, it's unbootable and the console is full of disk error messages) it can be handy to have a version of smartmontools that can be run off of a bootable medium to examine the disk's SMART data and run self-tests. This is also useful if you want to run Captive Self-Tests (the '''{{{-C}}}''' option of {{{smartctl}}} ) on disks that can not easily be unmounted, such as those hosting the Operating System files. Or you can use this to run {{{smartctl}}} on computers that don't use Linux as the day-to-day operating system. Please see the list of [wiki:LiveCDs Live CDs/DVDs containing smartmontools]. ---- '''License'''[[BR]] All content in this wiki is published under [http://www.gnu.org/licenses/gpl-2.0.html#SEC1 GNU GPL]. {{{ #!html }}}