1 Smartmontools installation instructions
2 =======================================
4 $Id: INSTALL 4880 2018-12-29 20:27:01Z chrfranke $
6 Please also see the smartmontools home page:
7 https://www.smartmontools.org/
11 [1] System requirements
12 [2] Installing from SVN
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
24 [14] Detailed description of ./configure options
26 [1] System requirements
27 =======================
29 Note: Some of this info is outdated as it refers to very old OS
34 Any Linux distribution will support smartmontools if it has a
35 kernel version greater than or equal to 2.2.14. So any recent
36 Linux distribution should support smartmontools.
40 For FreeBSD support, a 5-current kernel that includes ATAng is
41 required in order to support ATA drives. Even current versions of
42 ATAng will not support 100% operation, as the SMART status can not
43 be reliably retrieved. There is patch pending approval of the
44 ATAng driver maintainer that will address this issue.
48 The SCSI code has been tested on a variety of Solaris 8 or later
49 systems. ATA/IDE code only works on SPARC platform. All tested
50 kernels worked correctly.
54 The code was tested on a 1.6ZG (i.e., 1.6-current) system. It should
55 also function under 1.6.1 and later releases.
59 The code was tested on Cygwin 2.11.* x86 and x86_64. It should also
60 work on other recent releases.
62 Both Cygwin and Windows versions of smartmontools share the same code
63 to access the raw devices. The information in the "Windows" section
64 below also applies to the Cygwin version.
68 The code was tested on Windows XP SP3, 2003, Vista, Windows 7, 8, 8.1
69 and Windows 10 up to 1809. Support von Windows 9x/ME and NT4 was
70 removed after smartmontools 5.43.
72 ATA or SATA devices are supported if the device driver implements
73 the SMART IOCTLs or IOCTL_IDE_PASS_THROUGH or IOCTL_ATA_PASS_THROUGH.
74 Only the latter provides full pass-through support which is needed
75 for all smartmontools features.
77 SATA devices behind a Intel RST driver are accessed through CSMI.
79 SCSI and USB devices are accessed through SPTI. Special driver support
82 NVMe devices are supported with the Windows 10 NVMe driver or with
83 vendor specific drivers supporting NVME_PASS_THROUGH.
87 The code was tested on MacOS 10.3.4. It should work from 10.3
88 forwards. It doesn't support 10.2.
90 Only basic SMART commands are supported for ATA devices.
92 It's important to know that on 10.3.x, some things don't work
93 due to bugs in the libraries used, you cannot run
94 a short test or switch SMART support off on a drive; if you try,
95 you will just run an extended test or switch SMART support on. So
96 don't panic when your "short" test seems to be taking hours.
98 It's also not possible at present to control when the offline
99 routine runs. If your drive doesn't have it running automatically by
100 default, you can't run it at all.
102 SCSI devices are not currently supported.
104 The OS X SAT SMART Driver provides access to SMART data for SAT capable
105 USB and Firewire devices:
106 https://github.com/kasbert/OS-X-SAT-SMART-Driver
107 https://github.com/RJVB/OS-X-SAT-SMART-Driver
108 This does not require any smartctl -d TYPE option and should work also
109 with older smartmontools releases.
113 The code was tested on eComStation 1.1, but it should work on all versions
115 Innotek LibC 0.5 runtime is required.
116 Only ATA disks are supported.
118 [2] Installing from SVN
119 =======================
121 Get the sources from the SVN repository:
122 svn co https://svn.code.sf.net/p/smartmontools/code/trunk/smartmontools smartmontools
127 and continue with step [3] below, skipping the "unpack the tarball" step.
129 The autogen.sh command is ONLY required when installing from
130 SVN. You need GNU Autoconf (version 2.60 or greater), GNU Automake
131 (version 1.10 or greater) and their dependencies installed in order
134 [3] Installing from the source tarball
135 ======================================
137 If you are NOT installing from SVN, then unpack the tarball:
138 tar xvf smartmontools-VERSION.tar.gz
143 make install (you may need to be root to do this)
145 As shown (with no options to ./configure) this defaults to the
146 following set of installation directories and other settings:
149 --exec-prefix='${prefix}'
150 --sbindir='${exec_prefix}/sbin'
151 --sysconfdir='${prefix}/etc'
152 --localstatedir='${prefix}/var'
153 --datarootdir='${prefix}/share'
154 --datadir='${datarootdir}'
155 --mandir='${datarootdir}/man'
156 --docdir='${datarootdir}/doc/smartmontools'
158 --disable-scsi-cdb-check
160 --without-initscriptdir
161 --with-exampledir='${docdir}/examplescripts'
162 --with-drivedbdir='${datadir}/smartmontools'
163 --with-update-smart-drivedb
165 --with-smartdscriptdir='${sysconfdir}'
166 --with-smartdplugindir='${smartdscriptdir}/smartd_warning.d'
167 --with-scriptpath='/usr/local/bin:/bin:/usr/bin'
169 --without-attributelog
170 --with-os-deps='os_linux.o dev_areca.o' (platform specific)
172 --with-libcap-ng=auto
173 --with-libsystemd=auto
174 --with-systemdsystemunitdir=auto
175 --with-systemdenvfile=auto
176 --with-nvme-devicescan (Linux, Windows: yes; Others: no)
177 --without-solaris-sparc-ata (Solaris SPARC only)
178 --with-signal-func=sigaction
179 --with-working-snprintf
180 --with-mingw-aslr=auto (Windows only)
181 --with-cxx11-option=auto
182 --without-cxx11-regex
184 These will usually not overwrite existing "distribution" installations on
185 Linux Systems since the FHS reserves this area for use by the system
188 For different installation locations or distributions, simply add
189 arguments to ./configure as shown in [4] below.
191 The first output line of smartctl and smartd provides information
192 about release number, last SVN checkin date and revision, platform,
193 and package. The latter defaults to "(local build)" and can be
194 changed by the variable BUILD_INFO, for example:
195 make BUILD_INFO='"(Debian 5.39-2)"'
197 [4] Guidelines for different Linux distributions
198 ================================================
200 Note: Please send corrections/additions to:
201 smartmontools-support@listi.jpberlin.de
204 ./configure --sbindir=/usr/sbin \
206 --mandir=/usr/share/man \
207 --docdir=/usr/share/doc/smartmontools \
208 --with-initscriptdir=/etc/rc.d/init.d
211 If you don't want to overwrite any "distribution" package, use:
215 ./configure --sbindir=/usr/sbin \
217 --mandir=/usr/share/man \
218 --docdir=/usr/share/doc/smartmontools \
219 --with-initscriptdir=/etc/rc.d
222 removepkg smartmontools smartsuite (only root can do this)
225 The init script works on Slackware. You just have to add an entry like
226 the following in /etc/rc.d/rc.M or /etc/rc.d/rc.local:
228 if [ -x /etc/rc.d/smartd ]; then
229 . /etc/rc.d/smartd start
233 chmod 644 /etc/rc.d/smartd
235 For a list of options:
239 ./configure --sbindir=/usr/sbin \
241 --mandir=/usr/share/man \
242 --docdir=/usr/share/doc/packages/smartmontools-VERSION \
243 --with-initscriptdir=/etc/init.d \
245 [5] Guidelines for FreeBSD
246 ==========================
247 To match the way it will installed when it becomes available as a PORT, use
250 ./configure --prefix=/usr/local \
251 --docdir=/usr/local/share/doc/smartmontools-VERSION \
252 --with-initscriptdir=/usr/local/etc/rc.d/ \
255 NOTE: --enable-sample will cause the smartd.conf and smartd RC files to
256 be installed with the string '.sample' append to the name, so you will end
257 up with the following:
258 /usr/local/etc/smartd.conf.sample
259 /usr/local/etc/rc.d/smartd.sample
262 [6] Guidelines for Darwin
263 =========================
265 ./configure --with-initscriptdir=/Library/StartupItems
267 If you'd like to build the i386 version on a powerpc machine, you can
270 CXX='g++ -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386' \
271 ./configure --host=i386-apple-darwin \
272 --with-initscriptdir=/Library/StartupItems
274 [7] Guidelines for NetBSD
275 =========================
277 ./configure --prefix=/usr/pkg \
278 --docdir=/usr/pkg/share/doc/smartmontools
280 [8] Guidelines for Solaris
281 ==========================
283 smartmontools has been partially but not completely ported to
284 Solaris. It includes complete SCSI support but no ATA or NVMe
285 support. It can be compiled with either CC (Sun's C++ compiler)
293 To compile with Sun CC:
295 env CC=cc CXX=CC ./configure [args]
298 The correct arguments [args] to configure are:
299 --sbindir=/usr/sbin \
301 --mandir=/usr/share/man \
302 --docdir=/usr/share/doc/smartmontools-VERSION \
303 --with-initscriptdir=/etc/init.d
305 [9] Guidelines for Cygwin
306 =========================
308 ./configure --prefix=/usr \
310 --with-initscriptdir=/etc/rc.d/init.d
312 [10] Guidelines for Windows
313 ===========================
315 To compile statically linked Windows release with MinGW gcc on MSYS, use:
320 Instead of using "make install", copy the .exe files into
321 some directory in the PATH.
323 Cross-compile statically linked 32-bit and 64-bit versions with MinGW-w64:
325 ./configure --build=$(./config.guess) \
326 --host=i686-w64-mingw32
328 ./configure --build=$(./config.guess) \
329 --host=x86_64-w64-mingw32
331 Tested on Cygwin, Debian, Fedora and Ubuntu.
334 To create the Windows installer, use:
338 This builds the distribution directory and packs it into the
339 self-extracting install program
341 ./smartmontools-VERSION.win32-setup.exe
343 The installer is build using the command "makensis" from the NSIS
344 package (https://nsis.sourceforge.net/).
346 To create a combined 32-/64-bit installer, use this in 32-bit build
347 directory if 64-build directory is at ../build64:
349 make builddir_win64=../build64 installer_win32
351 To both create and run the (interactive) installer, use:
355 Additional make targets are distdir-win32 to build the directory
356 only and cleandist-win32 for cleanup.
358 The binary distribution includes all documentation files converted
359 to DOS text file format and *.html and *.pdf preformatted man pages.
361 To prepare os_win32/vc14 directory for MS Visual Studio C++ 2015 builds,
362 use the following on MSYS or Cygwin:
364 mkdir vctmp && cd vctmp
365 ../configure [... any MinGW option set from above ...]
368 The MSVC project files (os_win32/vc14/*) are included in SVN (but not
369 in source tarball). The target config-vc14 from a Makefile configured
370 for MinGW creates os_win32/vc14/{config.h,smart*.rc,svnversion.h}.
371 The configure script must be run outside of the source directory to
372 avoid inclusion of the original config.h.
373 Additional MSVC related make targets are clean-vc14, distclean-vc14
374 and maintainer-clean-vc14.
377 [11] Guidelines for OS/2, eComStation
378 =====================================
380 To compile the OS/2 code, please run
386 [12] Guidelines for OpenBSD
387 ===========================
389 To match the way it will installed when it becomes available as a PORT, use
392 ./configure --prefix=/usr/local \
394 --docdir=/usr/local/share/doc/smartmontools-VERSION \
397 NOTE: --enable-sample will cause the smartd.conf and smartd RC files to
398 be installed with the string '.sample' append to the name, so you will end
399 up with the following:
400 /etc/smartd.conf.sample
405 To compile from another directory, you can replace the step
406 ./configure [options]
410 ../configure [options]
412 Man pages contents is platform-specific by default. Info specific to other
413 platforms may be not visible. To generate man pages with full contents use:
417 To install to another destination (used mainly by package maintainers,
418 or to examine the package contents without risk of modifying any
419 system files) you can replace the step:
422 make DESTDIR=/home/myself/smartmontools-package install
424 Use a full path. Paths like ./smartmontools-package may not work.
426 After installing smartmontools, you can read the man pages, and try
433 sudo /usr/sbin/smartctl -x /dev/sda
435 Source and binary packages for Windows are available at
436 https://sourceforge.net/projects/smartmontools/files/
438 Refer to https://www.smartmontools.org/wiki/Download for any additional
439 download and installation instructions.
441 The following files are installed if ./configure has no options:
443 /usr/local/sbin/smartctl [Executable command-line utility]
444 /usr/local/sbin/smartd [Executable daemon]
445 /usr/local/sbin/update-smart-drivedb [Drive database update script]
446 /usr/local/etc/smartd.conf [Configuration file for smartd daemon]
447 /usr/local/etc/smartd_warning.sh [Warning script for smartd daemon]
448 /usr/local/share/man/man5/smartd.conf.5 [Manual page]
449 /usr/local/share/man/man8/smartctl.8 [Manual page]
450 /usr/local/share/man/man8/smartd.8 [Manual page]
451 /usr/local/share/man/man8/update-smart-drivedb.8 [Manual page]
452 /usr/local/share/doc/smartmontools/AUTHORS [Information about the authors and developers]
453 /usr/local/share/doc/smartmontools/ChangeLog [A log of changes. Also see SVN]
454 /usr/local/share/doc/smartmontools/COPYING [GNU General Public License Version 2]
455 /usr/local/share/doc/smartmontools/INSTALL [Installation instructions: what you're reading!]
456 /usr/local/share/doc/smartmontools/NEWS [Significant enhancements and fixes]
457 /usr/local/share/doc/smartmontools/README [Overview]
458 /usr/local/share/doc/smartmontools/TODO [No longer maintained]
459 /usr/local/share/doc/smartmontools/smartd.conf [Example configuration file for smartd]
460 /usr/local/share/doc/smartmontools/examplescripts/ [Executable scripts for -M exec of smartd.conf (4 files)]
461 /usr/local/share/smartmontools/drivedb.h [Drive database]
463 Due to checks done by '--with-systemdsystemunitdir=auto', the following file may also be installed:
465 /usr/local/lib/systemd/system/smartd.service [Systemd service file for smartd]
467 If /usr/local/etc/smartd.conf exists and differs from the
468 default then the default configuration file is installed as
469 /usr/local/etc/smartd.conf.sample instead.
477 may be used to build .html, .pdf and .txt preformatted man pages.
478 These are used by the dist-win32 make target to build the Windows
480 The commands also work on other operating system configurations
481 if suitable versions of man, man2html and groff are installed.
482 On systems without man2html, the following command should work
483 if groff is available:
485 make MAN2HTML='groff -man -Thtml' htmlman
488 [14] Detailed description of arguments to configure command
489 ===========================================================
493 a description of available configure options is printed
494 [with defaults in square brackets]. See also section [3] above.
497 The following old configure options are no longer supported:
499 Old option Replacement
500 --with-docdir=DIR --docdir=DIR (autoconf >= 2.60)
501 --enable-drivedb [no option needed]
502 --disable-drivedb --without-drivedbdir
503 --enable-savestates --with-savestates[=yes]
504 --disable-savestates [no option needed]
505 --enable-attrbutelog --with-attributelog[=yes]
506 --disable-savestates [no option needed]
507 --with-initscriptdir[=yes] --with-initscriptdir=DIR
508 --with-initscriptdir=auto --with-initscriptdir=DIR
512 If you set --prefix=/home/joe and none of the other four
513 variables then the different directories that are used would be:
514 --sbindir /home/joe/sbin
515 --docdir /home/joe/share/doc/smartmontools
516 --mandir /home/joe/share/man
517 --sysconfdir /home/joe/etc
518 --with-exampledir /home/joe/share/doc/smartmontools/examplescripts
519 --with-drivedbdir /home/joe/share/smartmontools
520 --with-initscriptdir [disabled]
521 --with-systemdsystemunitdir [see below]
523 If systemd is present (and pkg-config reports /lib/systemd/system
524 as the systemdsystemunitdir):
526 --with-systemdsystemunitdir /home/joe/lib/systemd/system
530 --with-systemdsystemunitdir [disabled]
533 Additional information about using configure can be found here:
534 https://www.gnu.org/software/autoconf/manual/autoconf.html#Running-configure-Scripts