|Version 72 (modified by chrfranke, 3 years ago)|
Smartmontools Download and Installation
Table of Contents
- Install precompiled package
- Install from the source tarball
- Install latest unreleased code from SVN repository
- Update the drive database
- Run smartmontools from Live-system
After installation or booting from a Live-CD, you can read smartmontools man pages and try out the commands:
man smartd.conf man smartctl man smartd # Only root can do this /usr/sbin/smartctl -s on -o on -S on /dev/hda /usr/sbin/smartctl -a /dev/hda
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 Windows package provides preformatted man pages in *.html and *.txt format.
Install precompiled package
Precompiled packages are available for many distributions. The following table provides links to info and/or download locations:
Platform Distribution Release smartmontools gsmartcontrol Linux Arch Linux 5.40-1 0.8.5-1 Calculate 5.40 - CentOS 5.5 5.38-2 0.8.5-9 Debian sid (unstable) 5.39.1+svn3124-1 0.8.5-2 squeeze (testing) 5.39.1+svn3124-1 0.8.5-2 lenny backports 5.39.1+svn3060-1~bpo50+1 0.8.5 lenny (stable) 5.38-2+lenny1 - Fedora F-14 5.40-1 - F-13 5.40-1 0.8.5-9 F-12 5.39.1-1 0.8.5-9 F-11 5.38-18 0.8.5-9 Frugalware 1.4pre 5.40-1 0.8.5-2 1.3 5.39.1-1 0.8.5-2 Gentoo 5.40 0.8.5 Mandriva 2010.1 5.39.1-1 0.8.5-1 openSUSE Factory 5.40-3.1 - 11.3 5.39.1-3.1 0.8.5-9 11.2 22.214.171.12490808 0.8.5-9 Openwall current 5.40 - Slackware 13.1 5.39.1-1 0.8.5 Slax 5.38 0.8.4 Ubuntu natty (11.04) 5.39.1+svn3124-1 0.8.5-2 maverick (10.10) 5.39.1+svn3077-1ubuntu1 0.8.5-2 lucid (10.04LTS) 5.38-3ubuntu3 0.8.5-2 karmic (9.10) 5.38-3ubuntu2 0.8.4-2 Zenwalk 5.39.1 0.8.5 *BSD FreeBSD 5.40 0.8.5_2 NetBSD 5.40 - OpenBSD 4.8 5.39.1 - Mac OS X Fink 5.38-1, daemon-5.38-1 0.8.5-1002 MacPorts 5.40 - Solaris OpenSolaris - - Windows Cygwin 5.40-1 - (native) 5.40-1 0.8.5-4
Debian Linux - Install the Debian package
All versions of the smartmontools package in .deb format are available at the Debian package search page. You can then install the package using:
# you need to be root to do this: dpkg -i smartmontools_5.39-1_i386.deb
Red Hat Enterprise Linux, CentOS and Fedora Linux distributions
The smartmontools package is part of the official repositories and can be installed using the yum command:
# you need to be root to do this: yum install smartmontools
Other distributions providing RPM packages
Download the latest binary RPM file (smartmontools*.rpm) for your distribution. Don't get the SRPM file (*.src.rpm).
Install it using RPM.
# you need to be root to do this: rpm -ivh smartmontools_5.39-1_i386.deb
If you want to remove the package (rpm -e smartmontools) and your system does not have chkconfig installed, you may need to use:
rpm -e --noscripts smartmontools
Windows - Install the Windows package
The default install type "Full" creates start menu shortcuts including an uninstaller, and adds the install directory to the PATH variable. Select install type "Extract files only" to disable these extra components. If the UBCD4Win-builder is installed, the extra option "UBCD4Win plugin" can be used to add smartmontools to UBCD4Win.
Virus scanners occasionally produce false positive virus reports for NSIS-installers, see the NSIS False Positives page. If this is the case for the smartmontools installer, please send a report to the smartmontools-support mailing list.
Starting with smartmontools release 5.37, the Windows package is no longer provided as a ZIP archive (*.win32.zip). If the self extracting installer cannot be used for some reason, the files may also be unpacked by a recent version of 7-Zip.
Install from the source tarball
Download the latest source tarball from here.
Uncompress the tarball:
tar zxvf smartmontools-5.40.tar.gz
The previous step created a directory called smartmontools-5.40 containing the code. Go to that directory, build, and install:
cd smartmontools-5.40 ./configure make # you need to be root to do this: make install
These optional arguments of ./configure are fully explained in the 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 MinGW or the MinGW-w64 compiler. Build environments may be Cygwin or 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 INSTALL file for details.
Install latest unreleased code from SVN repository
We moved from CVS to a Subversion (SVN) repository. The new address for our repository is https://smartmontools.svn.sourceforge.net/svnroot/smartmontools. Two repository browsers are available: ViewVC and Trac.
For those, who don't already have a Subversion client installed, here is a list of SVN Packages and a 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 https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/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 # you need to be root to do this: make install
See notes under 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 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 https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/tags/RELEASE_5_38/sm5 smartmontools
Note that the directory with the smartmontools sourcefiles is named sm5 in releases <= 5.39.
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:
This does not work on Windows. Download the file drivedb.h from SVN trunk instead and copy it into the directory where the exe files are installed.
Smartmontools releases 5.39 and 5.39.1 also support drive database update if the build was configured with --enable-drivedb. The drivedb.h file from the SVN trunk is not compatible with these releases. A compatible version of drivedb.h is maintained on branch RELEASE_5_39_DRIVEDB. Download this version of drivedb.h from here and copy it into the configured directory (typically /usr/share/smartmontools or /usr/local/share/smartmontools).
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.
List of bootable CDs
Live System Release Date Size OS kernel smartmontools Comment CAINE Live CD 2.0 2010-09-14 713MB Linux 2.6.32 5.38 Clonezilla Live 1.2.6-35 2010-10-20 127MB Linux 2.6.32 5.40 2010-07-12 r3124 Finnix 101.0 2010-12-25 134MB Linux 2.6.36 5.40 2010-07-12 r3124 FreeNAS 0.7.2.5462 2010-10-18 131MB FreeBSD 7.3-p3 5.40 Gentoo Live DVD 10.1 2009-10-10 2717MB Linux 2.6.30 5.38 GParted Live 0.7.1-5 2011-01-07 120MB Linux 2.6.32 5.40 2010-07-12 r3124 grml 2010.12 2010-12-31 720MB Linux 2.6.33 5.40 2010-07-12 r3124 also included in grml-medium and -small INSERT 1.3.9b 2007-02-27 62MB Linux 126.96.36.199 5.36 Knoppix 6.4.3 2010-12-21 733MB Linux 188.8.131.52 5.40 2010-07-12 r3124 included in CD and DVD NST (Network Security Toolkit) 2.13.0 2010-10-06 1448MB Linux 184.108.40.206 5.39.1 Openwall Live CD 3.0 2010-12-14 701MB Linux 2.6.18 5.40 Parted Magic 5.9 2011-01-12 156MB Linux 220.127.116.11 5.39.1 also contains GSmartControl PrRescue 0.11 2011-01-17 223MB Linux 2.6.37 5.39.1 RIP (Recovery Is Possible) 11.3 2010-12-03 132MB Linux 18.104.22.168 5.40 2010-08-25 r???? S.M.A.R.T. Linux 0.4 2004-10-16 1.5MB Linux 2.4.26 5.33 bootable floppy StressLinux 0.6.105 2010-11-27 223MB Linux 2.6.34 5.40 STUX 2.0 2008-09-09 731MB Linux 22.214.171.124 5.38 SystemRescueCd 2.0.0 2011-01-01 293MB Linux 2.6.35 5.40 Ubuntu Rescue Remix 10-10 2010-10-19 200MB Linux 2.6.35 5.40 2010-03-16 r3077 UBCD (Ultimate Boot CD) 5.0.1 2010-05-24 307MB Linux 126.96.36.199 5.39.1 contains Parted Magic, see also the FAQ UBCD4Win 3.50 2009-04-21 -- -- a plugin can be created by the smartmontools windows installer
Please let us know if there are others, and we will add them to this list.
Fedora Live CD is no longer included in the list because recent releases no longer contain smartmontools.
All content in this wiki is published under GNU GPL.