SeaChest_Erase                                             Revision: 13-Oct-2025
===============================================================================
 SeaChest_Erase - Seagate drive utilities
 Copyright (c) 2014-2025 Seagate Technology LLC and/or its Affiliates, All Rights Reserved
 See Version History below.
===============================================================================
Welcome to Seagate's SeaChest_Erase diagnostic software.

SeaChest_Erase is a comprehensive command line tool that can be used to
efficiently erase data on Seagate disk drives (this includes Seagate, Maxtor,
Samsung and LaCie).

NOTE: SeaChest_Erase may not be fully functional on non-Seagate drives.

NOTE: Windows 8, Windows Server 2012 and newer do not support the Sanitize
command set.

This User Guide file contains important information about SeaChest_Erase.
Please read this entire file before using this software.

If this is your drive, you should always keep a current backup of your
important data.

If this is not your drive and the original owner has no claim of ownership to
it or the data stored on it, then you may still be responsible for the data in
your possession.   To protect yourself from potential liability and to protect
the previous owner's privacy, you should remove all data by performing a data
erasure on this drive.

Be very careful because using SeaChest_Erase will cause data loss. Seagate is
not responsible for lost user data.

Important note: Many tests in this tool directly reference storage device data
sectors, also known as Logical Block Addresses (LBA). Test arguments may
require a starting LBA or an LBA range.  The predefined variable 'maxLBA'
refers to the last sector on the drive.  Many older SATA and SAS storage
controllers (also known as Host Bus Adapters [HBA]) have a maximum addressable
limit of 4294967295 [FFFFh] LBAs hard wired into their design.  This equates to
2.1TB using 512 byte sectors.  This also means accessing an LBA beyond the
2.1TB limitation either will result in an error or simply the last readable LBA
(usually LBA 4294967295 [FFFFh]) depending on the actual hardware.  This
limitation can have important consequences.  For example, if you intended to
erase a 4TB drive, then only the first 2TB will actually get erased (or maybe
even twice!) and the last 2TB will remain untouched.  You should carefully
evaluate your system hardware to understand if your storage controllers provide
support for greater than 2.1TB.

Note: One gigabyte, or GB, equals one billion bytes when referring to hard
drive capacity. This software may use information provided by the operating
system to display capacity and volume size. The Windows file system uses a
binary calculation for gibibyte or GiB (2^30) which causes the abbreviated size
to appear smaller. The total number of bytes on a disk drive divided by the
decimal calculation for gigabyte or GB (10^9) shows the expected abbreviated
size. See this FAQ for more information
<http://knowledge.seagate.com/articles/en_US/FAQ/172191en?language=en_US>.

NOTE: Windows 8, Windows Server 2012 and newer do not support the Sanitize
command set.

Usage - Linux (run with sudo)
=============================
        SeaChest_Erase [-d <sg_device>] {arguments} {options}

Examples - Linux
================
        sudo SeaChest_Erase --scan
        sudo SeaChest_Erase -d /dev/sg2 -i
        sudo SeaChest_Erase --device /dev/sg1 --sanitize info

Usage - Windows (run as administrator)
======================================
        SeaChest_Erase [-d <PD_device>] {arguments} {options}

Examples - Windows
==================
        SeaChest_Erase --scan
        SeaChest_Erase -d PD2 -i
        SeaChest_Erase --device PD1 --sanitize info

==========================================================================================
 SeaChest_Erase - Seagate drive utilities - NVMe Enabled
 Copyright (c) 2014-2025 Seagate Technology LLC and/or its Affiliates, All Rights Reserved
 SeaChest_Erase Version: 4.7.4 X86_64
 Build Date: Oct 10 2025
 Today: 20251013T140222	User: current user
==========================================================================================
Usage
=====
	 SeaChest_Erase [-d <sg_device>] {arguments} {options}

Examples
========
	SeaChest_Erase --scan
	SeaChest_Erase -d /dev/sg<#> -i
	SeaChest_Erase -d /dev/sg<#> --SATInfo
	SeaChest_Erase -d /dev/sg<#> --llInfo
	SeaChest_Erase -d /dev/sg<#> --showEraseSupport
	SeaChest_Erase -d /dev/sg<#> --performQuickestErase --poll
	SeaChest_Erase -d /dev/sg<#> --overwrite 0
	SeaChest_Erase -d /dev/sg<#> --overwrite 1000 --overwriteRange 2000
	SeaChest_Erase -d /dev/sg<#> --overwrite 0 --hours 1
	SeaChest_Erase -d /dev/sg<#> --overwrite 0 --pattern repeat:04ABCDEFh
	SeaChest_Erase -d /dev/sg<#> --writeSame 0 --poll
	SeaChest_Erase -d /dev/sg<#> --writeSame 1000 --writeSameRange 2000 --poll
	SeaChest_Erase -d /dev/sg<#> --sanitize overwrite --poll
	SeaChest_Erase -d /dev/sg<#> --sanitize overwrite --poll --pattern random
	SeaChest_Erase -d /dev/sg<#> --sanitize cryptoerase --poll
	SeaChest_Erase -d /dev/sg<#> --ataSecureErase enhanced
	SeaChest_Erase -d /dev/sg<#> --ataSecureErase enhanced --ataSecPassword AutoATAWindowsString12345678901 --ataSecPassType user
	SeaChest_Erase -d /dev/sg<#> --trim 0
	SeaChest_Erase -d /dev/sg<#> --trim 1000 --trimRange 2000
	SeaChest_Erase -d /dev/sg<#> --formatUnit current --poll
	SeaChest_Erase -d /dev/sg<#> --formatUnit current --poll --pattern file:path/to/myFile.bin
	SeaChest_Erase -d /dev/sg<#> --nvmFormat current --poll
	SeaChest_Erase -d /dev/sg<#> --nvmFormat 4096 --poll
	SeaChest_Erase -d /dev/sg<#> --nvmFormat current --poll --nvmFmtSecErase user
	SeaChest_Erase -d /dev/sg<#> --nvmFormat current --poll --nvmFmtPI 1
	SeaChest_Erase -d /dev/sg<#> --eraseRestoreMaxPrep
	SeaChest_Erase -d /dev/sg<#> --eraseRestoreMaxPrep --overwrite 0

Return codes
============
	Generic/Common exit codes
	0 = No Error Found
	1 = Error in command line options
	2 = Invalid Device Handle or Missing Device Handle
	3 = Operation Failure
	4 = Operation not supported
	5 = Operation Aborted
	6 = File Path Not Found
	7 = Cannot Open File
	8 = File Already Exists
	9 = Need Elevated Privileges
	10 = Not enough resources
	11 = Error Writing File
	12 = Device not found when opening handle.
	13 = Device not opened. Handle is busy.
	14 = Insecure Directory to read or write file
	---SeaChest_Erase specific exit codes---
	32 = Zero Validation Failure
	Anything else = unknown error


Utility Options
===============
	--csmiIgnorePort (Obsolete)
		This option is obsolete and will be removed in future versions.

	--csmiUsePort (Obsolete)
		This option is obsolete and will be removed in future versions.

	--csmiVerbose (Obsolete)
		This option is obsolete and will be removed in future versions.

	--echoCommandLine
		Echo the command line entered into the utility on the screen.

	--enableLegacyUSBPassthrough
		Only use this option on old USB or IEEE1394 (Firewire)
		products that do not otherwise work with the tool.
		This option will enable a trial and error method that
		attempts sending various ATA Identify commands through
		vendor specific means. Because of this, certain products
		that may respond in unintended ways since they may interpret
		these commands differently than the bridge chip the command
		was designed for.

	--forceATA
		Using this option will force the current drive to
		be treated as a ATA drive. Only ATA commands will
		be used to talk to the drive.

	--forceATADMA	(SATA Only)
		Using this option will force the tool to issue SAT
		commands to ATA device using the protocol set to DMA
		whenever possible (on DMA commands).
		This option can be combined with --forceATA

	--forceATAPIO	(SATA Only)
		Using this option will force the tool to issue PIO
		commands to ATA device when possible. This option can
		be combined with --forceATA

	--forceATAUDMA	(SATA Only)
		Using this option will force the tool to issue SAT
		commands to ATA device using the protocol set to UDMA
		whenever possible (on DMA commands).
		This option can be combined with --forceATA

	--forceSCSI
		Using this option will force the current drive to
		be treated as a SCSI drive. Only SCSI commands will
		be used to talk to the drive.

	-h, --help
		Show utility options and example usage (this output you see now)
		Please report bugs/suggestions to seaboard@seagate.com.
		Include the output of --version information in the email.

	--hideLBACounter
		Use this option to suppress the output from
		options that show LBA counters without turning
		off all output to the screen.

	--license
		Display the Seagate End User License Agreement (EULA).

	--modelMatch [model Number]
		Use this option to run on all drives matching the provided
		model number. This option will provide a closest match although
		an exact match is preferred. Ex: ST500 will match ST500LM0001

	--noBanner
		Use this option to suppress the text banner that displays each time
		openSeaChest is run.

	--onlyFW [firmware revision]
		Use this option to run on all drives matching the provided
		firmware revision. This option will only do an exact match.

	--onlySeagate
		Use this option to match only Seagate drives for the options
		provided

	-q, --quiet
		Run SeaChest_Erase in quiet mode. This is the same as
		-v 0 or --verbose 0

	-v [0-4], --verbose [0 | 1 | 2 | 3 | 4]
		Show verbose information. Verbosity levels are:
		0 - quiet
		1 - default
		2 - command descriptions
		3 - command descriptions and values
		4 - command descriptions, values, and data buffers
		Example: -v 3 or --verbose 3

	-V, --version
		Show SeaChest_Erase version and copyright information & exit


Utility Arguments
=================
	-d, --device [deviceHandle | all]
		Use this option with most commands to specify the device
		handle on which to perform an operation. Example: /dev/sg<#>
		CSMI device handles can be specified as <error<#><#><#>>
		To run across all devices detected in the system, use the
		"all" argument instead of a device handle.
		Example: -d all
		NOTE: The "all" argument is handled by running the
		      specified options on each drive detected in the
		      OS sequentially. For parallel operations, please
		      use a script opening a separate instance for each
		      device handle.

	--displayLBA [LBA]
		This option will read and display the contents of
		the specified LBA to the screen. The display format
		is hexadecimal with an ASCII translation on the side
		(when available).

	-F, --scanFlags [option list]
		Use this option to control the output from scan with the
		options listed below. Multiple options can be combined.
			ata - show only ATA (SATA) devices
			usb - show only USB devices
			scsi - show only SCSI (SAS) devices
			nvme - show only NVMe devices
			interfaceATA - show devices on an ATA interface
			interfaceUSB - show devices on a USB interface
			interfaceSCSI - show devices on a SCSI or SAS interface
			interfaceNVME = show devices on an NVMe interface
			sd - show sd device handles
			sgtosd - show the sd and sg device handle mapping
			ignoreCSMI - do not scan for any CSMI devices
			allowDuplicates - allow drives with both CSMI and PD handles
			                  to show up multiple times in the list

	-i, --deviceInfo
		Show information and features for the storage device

	--llInfo
		Dump low-level information about the device to assist with debugging.

	--poll
		Use this option to cause another operation to poll for progress
		until it has completed.  This argument does not return to the
		command prompt and prints ongoing completion percentages (%)
		 the final test result.  Full drive procedures will take a
		very long time.  Used with --sanitize, or --writeSame (SATA).

	--progress [sanitize | format | nvmformat]
		Get the progress for a test that was started quietly without
		the polling option (default). You must specify a test you wish to
		get progress from. Ex: "--progress dst" or "--progress sanitize"
		The progress counts up from 0% to 100%.

	-s, --scan
		Scan the system and list all storage devices with logical
		/dev/sg<#> assignments. Shows model, serial and firmware
		numbers.  If your device is not listed on a scan  immediately
		after booting, then wait 10 seconds and run it again.

	-S, --Scan
		This option is the same as --scan or -s,
		however it will also perform a low level rescan to pick up
		other devices. This low level rescan may wake devices from low
		power states and may cause the OS to re-enumerate them.
		Use this option when a device is plugged in and not discovered in
		a normal scan.
		NOTE: A low-level rescan may not be available on all interfaces or
		all OSs. The low-level rescan is not guaranteed to find additional
		devices in the system when the device is unable to come to a ready state.

	--SATInfo
		Displays SATA device information on any interface
		using both SCSI Inquiry / VPD / Log reported data
		(translated according to SAT) and the ATA Identify / Log
		reported data.

	--testUnitReady
		Issues a SCSI Test Unit Ready command and displays the
		status. If the drive is not ready, the sense key, asc,
		ascq, and fru will be displayed and a human readable
		translation from the SPC spec will be displayed if one
		is available.

	--fastDiscovery
		Use this option  to issue a fast scan on the specified drive. 

	--hours [hours]
		Use this option to specify a time in hours
		for a timed operation to run.

	--minutes [minutes]
		Use this option to specify a time in minutes
		for a timed operation to run.

	--psid [32-digit alpha-numeric code from drive label]
		This option can be used to specify the value of the PSID.
		This may be required in order to perform certain TCG
		operations.
		On Seagate drives, PSIDs are 32 digits long, all uppercase,
		and uses zeros and ones but do NOT use O's and I's.
		Additionally, it is possible to exhaust the number of attempts
		 the device allows. Seagate drives have this set to 5 attempts.
		Once this is exhausted, a full power cycle of the device is required
		before you can try again.

	--seconds [seconds]
		Use this option to specify a time in seconds
		for a timed operation to run.

	--eraseRestoreMaxPrep
		This option will attempt to restore the max LBA to the highest
		user addressable sector prior to beginning a drive erasure.
		If any failure is encountered while restoring the maxLBA, then
		an error will be indicated and the erase will not be started or
		attempted until other user intervention can be completed.
		If a feature is frozen, locked, or has already been used during
		the current power cycle, then these things can cause a failure.
		The solution is to power cycle the drive, but in some cases it may
		be necessary to try a different computer or adapter as commands may
		be blocked by the system or automatically issued by the BIOS to lock
		access to capacity changing commands.
		This option will handle the ATA HPA (Host Protected Area), AMAC (Accessible
		Max Address Configuration), HPA Security Extension, and DCO (Device
		Configuration Overlay) features in accordance with the specifications.
		If the restore completes without error, then the erase will proceed
		and additional errors will only be in relation to those erasure methods.

	--refreshfs
		This option will call an OS unique low-level routine to rescan
		a device for any file systems it can detect through the
		partition table. The detected filesystems will vary by OS
		and OS capabilities.
		This option is useful to call after completing a full disk erase
		as it may make a cached volume in the OS go away or detect that a device
		is empty and ready to have a new file system written to it.

	--showEraseSupport
		This option checks the drive to determine which methods of
		data erasure are supported and lists them, from fastest to
		slowest.

		WARNING: Some erase methods may affect all LUNs/namespaces for devices
		         with multiple logical units or namespaces.

	--sid [yourTCGpassword]
		This option can be used to specify the value of SID.
		This may be required in order to perform certain TCG
		operations. If this is not provided, MSID will be used

	--zeroVerify [full | quick]
		Use this option to verify drive content, whether it's set to zero or not.
		This operation will read user accessible address and validate if content at
		that address is zero or not.
		Validation modes:
		  full - Complete drive will be scanned for verification.
		  quick - 0.1% of total capacity will be scanned for ID and OD validation along with
		          2 random addresses from 10000 equal size sections each.


	SATA Only:
	=========
	--ataSATsecurityProtocol [enable | disable]		(SATA only)
		This option can be used to force enable or disable using the
		ATA security protocol as specified in the SAT specification.
		By default, the tool will use this method when it is supported 
		to allow the SATL to understand and manage the security commands
		being performed and prevent other issues.

	--ataSecPassword ["ASCII password" | SeaChest | empty]		(SATA only)
		Use this option to specify a password to use with an ATA security
		operation. If specifying a password with spaces, quotes must be used.
		If SeaChest is given, the default SeaChest password will be used.
		If empty is given, an empty password will be used.
		Examples:
		  "This is a valid password"
		  ThisIsAlsoValid
		  "This password uses \"quotes\"
		  "This password is \/\/eird"

	--ataSecPassType [user | master]		(SATA only)
		Use this option to specify if the password being given with the
		--ataSecPassword option is a user or a master password.
		If this option is not provided, user is assumed.

	--ataSecPWMod [byteswapped | zeropad | spacepad | fpad | leftAlign | rightAlign | uppercase | lowercase | invertcase] (SATA Only)
		Use this option to have the utility make modifications to
		the ATA security password to attempt other various ways it may
		be sent by a system bios. These are not guaranteed to work, but
		may help unlock a drive that was locked by a BIOS that encoded
		the password in a unique way.
		This option can be presented multiple times to select multiple modificaitons.
		EX: --ataSecPWMod byteswapped --ataSecPWMod invertcase
		  byteswapped - byteswaps the password. EX: blah -> lbha
		  zeropad - zero pads the password if less than 32 characters
		  spacepad - space pads the password if less than 32 characters
		  fpad - pads the passwords with Fh (all 1's) if less than 32characters
		  leftAlign - left aligns the password in the buffer
		  rightAlign - right aligns the password in the buffer
		  uppercase - sends the password as all uppercase
		  lowercase - sends the password as all lowercase
		  invertcase - switches uppercase for lower, and lowercase for upper


Data Destructive Commands
=========================
Data sanitization capabilities:
	Recommendation - Restore the MaxLBA of the device prior to any erase in
	                 order to allow the drive to erase all user addressable
	                 sectors. For ATA devices this means restoring 
	                 HPA + DCO / AMAC to restore the maxLBA.
	                 Restoring the MaxLBA also allows full verification of
	                 all user addressable space on the device without a
	                 limitation from a lower maxLBA.
	Clear - Logical techniques are applied to all addressable storage
	        locations, protecting against simple, non-invasive data
	        recovery techniques.
	Clear, Possible Purge - Cryptographic erase is a purge if the vendor
	        implementation meets the requirements in IEEE 2883-2022.
	Purge - Logical techniques that target user data, overprovisioning,
	        unused space, and bad blocks rendering data recovery infeasible
	        even with state-of-the-art laboratory techniques.
This utility does not support clear/purge verification yet. All labels are
written according to the expectation that the device firmware will meet
these capabilities as defined in the appropriate standards from T10, T13,
SATA - IO, and NVMexpress.
=========================
	--ause
		Use this option to allow running a sanitize operation in
		unrestricted mode. Without this option, all sanitize options
		are run in restricted mode by default.
		In unrestricted mode, if a sanitize erase fails the drive enters
		a failure state. The failure state can be cleared with a Sanitize
		exit failure mode command, or it can be cleared with a successful
		sanitize erase.
		In restricted mode, if a sanitize fails, the failure state can only
		be cleared with a successful sanitize erase.

	--ipbp
		Use this option to instruct the drive to invert the requested
		sanitize overwrite pattern between each overwrite pass.
		For the default pattern of all zeroes, this means that after
		a first pass of zeroes, the second pass will be all 1's (binary)
		or all F's (hexadecimal)

	--overwrite [starting LBA]	(Clear)
		Use this option to start an overwrite erase at
		the specified starting LBA. Combine this option
		with overwriteRange or time options (hours, minutes
		seconds) to erase a portion of the drive.

	--overwriteRange [range in # of LBAs]	(Clear)
		Use with the overwrite option (--overwrite) to
		erase a range of LBAs on the selected drive.

	--overwritepasses [ number of overwrite passes ]
		Specify the number of overwrite passes to use during a sanitize
		overwrite operation. By default, only a single overwrite pass
		is used unless this option specifies a different value.
		The maximum number of passes varies by drive type:
		ATA:  16 passes
		NVMe: 16 passes
		SCSI: 31 passes
		Use the --ipbp option to instruct the device to invert
		the pattern between each overwrite pass.

	--pattern [repeat:asciinospaces | random | increment:startValue | file:filename]
		Use this option with overwrite, sanitize, and format unit
		operations to write a specific pattern to a range of LBAs
		or the whole drive.

		* repeat - without spaces, enter an ASCII text string or a
		hexadecimal string terminated by a lower case "h". This
		pattern will be repeated until it fills the logical size
		of the LBA. i.e. helloword or FFFFFFFFh
		Note: A hexadecimal pattern will be interpreted as a 32bit
		unsigned integer. 4 hex bytes (8 characters) must be given
		for a hex value to be used. Ex: 1F037AC8h or 0000FFFFh
		* random - the entire logical sector size will be filled with
		random bytes.This pattern will be written to all LBAs in the
		desired range.
		* increment - enter the starting numerical value. Starting with
		this value, each byte will be written with 1 + previous value.
		* file - user supplied file name to use for a pattern. The file
		will be truncated or padded with zeros to the logical sector size
		Note 1: Each file will be interpreted as a binary file.
		Note 2: A path must also be provided if the file is not in the
		        local directory.
		Note 3: Sanitize Overwrite on SATA only supports a 32bit pattern.
		        The file option will get truncated to a 32bit pattern for
		        SATA products.

	--performQuickestErase
		This option checks the drive to determine which methods of
		data erasure are supported and determines which is the
		quickest to erase ALL data on the drive. It then starts the
		quickest erase. Combine this option with the --poll option to
		enable polling for progress on the fastest erase.
		Note: Some erase methods require polling and will have polling
		enabled by default.
		Note 2: If revertSP is the fastest, it will not be started since
		the drive PSID must be passed in on the command line.

		WARNING: Some erase methods may affect all LUNs/namespaces for devices
		         with multiple logical units or namespaces.

	--revert	(Purge)
		This operation performs an Opal SSC spec Revert on the adminSP.
		This operation is only available on Seagate TCG Opal drives.
		Revert meets data sanitization purge capabilities to erase data
		for Opal, Opalite, and Ruby SSCs
		The --psid flag can be provided to perform the revert with
		the PSID authority in case of a lost password.
		The --sid flag can be provided to perform the revert with SID.
		If neither the --psid or the --sid options are provided, then the
		revert will be sent setting SID as the MSID value. This will only work
		on a drive not already activated by security software.
		Upon completion, the drive will be "like new" with all
		user data being cryptographically erased and all other settings
		set to factory defaults. If this operation fails, try using --revertSP
		instead.

		WARNING: The Revert may affect all LUNs/namespaces for devices
		         with multiple logical units or namespaces.

	--revertSP	(Purge)
		This operation performs a revertSP on a Seagate SED drive
		in the adminSP with the PSID.
		RevertSP meets data sanitization purge capabilities to erase data
		for Opal, Opalite, and Ruby SSCs
		RevertSP also meets data sanitization purge capabilities to erase data
		on Seagate TCG Enterprise SSC HDDs
		The PSID must be provided using the --psid option.
		This operation is available on all Seagate SED HDD drives and some SSDs.
		Upon completion, the drive will be "like new" with all
		user data being cryptographically erased and all other
		settings set to factory defaults.

		WARNING: The RevertSP may affect all LUNs/namespaces for devices
		         with multiple logical units or namespaces.

	--sanitize [info | blockerase | cryptoerase |
	            overwrite | freezelock | antifreezelock] 	(Purge)
		Use the info argument to show supported sanitize operations.
		Optionally, use blockerase, cryptoerase, or overwrite to start
		a sanitize operation. Adding the --poll option will cause
		SeaChest_Erase to poll the drive for progress until the
		operation is complete, or has aborted for some reason. All
		sanitize erase operations are persistent across a power cycle
		and cannot be stopped
		Example: --sanitize blockerase --poll

		By default, sanitize runs in restricted exit mode, meaning the
		only way to exit a failed sanitize is to attempt sanitize again
		until it completes successfully. Add the --ause option to run
		in unrestricted mode. In unrestricted mode, if sanitize fails
		you can exit this mode with the "exit failure mode" command
		or a successful sanitize command.

		For Zoned block devices, the --znr option can be used
		to stop the write pointers from resetting allowing full
		drive verification to be performed upon completion of sanitize
		For NVMe devices that support the deallocate feature (TRIM), the
		--nodeallocate option can be used to prevent the deallocation of blocks at
		completion of sanitize to allow for full drive verification.
		NOTE: An NVMe controller may inhibit the no deallocate behavior
		      and may deallocate anyways or fail the sanitize command when
		      no deallocate is specified.

		* blockerase on some solid state drives is very fast at less
		than one (1) second, while others may take more that 30 seconds
		This operation performs a physical low level block erase
		operation on all current, past, and potential user data.
		The contents on user data are indeterminate upon completion.

		* cryptoerase is very fast at less than one (1) second. It
		changes the internal encryption keys that are used for user
		data causing all previous data to be useless.

		* overwrite is a physical overwrite on all current, past, and
		potential user data. The ATA, NVMe, & SCSI specifications allow a
		user defined pattern and multiple passes. SeaChest_Erase will
		use a zero pattern and a single pass for this operation
		by default. Use --overwritepasses and --ipbp to specify
		the number of passes and whether to invert the pattern between
		each overwrite pass.

		* freezelock - migrate to use of --sanitizeFreeze

		* antifreezelock - migrate to use of --sanitizeAntiFreeze

		WARNING: Sanitize may affect all LUNs/namespaces for devices
		         with multiple logical units or namespaces.

	--trim or --unmap [starting LBA]
		Use one of these options to start a trim or
		unmap operation on a drive at the provided LBA.
		A range must also be provided with the range option.

	--trimRange or --unmapRange [range in # of LBAs]
		Use one of these options to specify a range to trim
		or unmap on a drive. A starting point must be specified
		with the --trim/--unmapRange option.

	--writeSame [starting LBA]	 (Clear)
		Enter a starting lba to begin a write same on to erase a range
		of data on the drive. On SCSI devices, this uses the
		writesame16 command. On ATA devices, this uses the SCT writesame
		feature. Combine this option with the writeSameRange option to
		select the range. This operation will write 0's to the device for the
		specified range. For SATA drives, this option will poll for progress
		until the write same has completed. SAS/SCSI drives will hold the
		tool busy until the write same has completed without progress
		indication since this is not possible on SAS/SCSI due to specification
		limitations on how write same was defined.
		On SATA, if any other commands are sent to the drive while it's
		performing a write same, the write same will be aborted.
		NOTE: On SAS/SCSI drives this command is optional. Additionally,
		      the range may be limited to much less than the full device
		      size. Due to the history of this command, there is not a great
		      way to confirm support in all cases. Some ranges will be too
		      large, and some devices may or may not allow writing the full
		      medium in a single command. If you wish to write an entire
		      device, consider a different command such as format unit or
		      sanitize overwrite to accomplish this.

	--writeSameRange [range in # of LBAs]
		Specify a range to writesame to. Use this option with the
		writeSame option in order to begin a write same operation.

	--znr
		For ZBD's (Zoned Block Devices), use this option during a
		Sanitize or ATA Security Erase to specify leaving all zones
		full so that full verification of erasure can be performed.
		When this option is not specified, all zones will be empty
		upon completion of these erases.


	SATA Only:
	=========
	--ataSecureErase [normal | enhanced]	(SATA only)	(Clear | Purge)
		Use "normal" to start a standard ATA security erase (Clear)
		or "enhanced" to start an enhanced ATA security erase (Purge).

		ATA Security Erase takes a very long time to complete at
		approximately three (3) hours per Tera-byte (HDD). Some Seagate
		SED models will perform a quick cryptographic erase in enhanced
		mode and the time for completion is reported as 2 minutes by
		the drive, but will take only seconds. This industry
		standard command begins by locking the drive with a temporary
		password which is cleared at the end of the erasure. Do not run
		this command unless you have ample time to allow it to run
		through to the end. If the procedure is interrupted prior to
		completion, then the drive will remain in a locked state and
		you must manually restart from the beginning again. The
		tool will attempt to automatically clear the password that was set
		upon failure. The default password used by the tool is
		"SeaChest", plain ASCII letters without the quotes

		* normal writes binary zeros (0) or ones (1) to all user
		data areas.

		* enhanced will fill all user data areas and reallocated
		user data with a vendor specific pattern. Some Seagate
		Instant Secure Erase will perform a cryptographic
		erase instead of an overwrite.

	--sanitizeAntiFreeze	(SATA Only)
		Antifreezelock is a command that is designed to block a
		freezelock command from locking out the sanitize feature set.
		It is only available on ATA drives that support the ACS3, or
		newer specification.

	--sanitizeFreeze	(SATA Only)
		Freezelock is a command to block processing of sanitize
		operations until a power cycle is performed on a device.
		It is only available on ATA drives. Once this command has been
		sent, the freezelock status becomes immediate and cannot be
		cleared until the drive has been powered off. All sanitize
		commands, except a sanitize status will be aborted.


	SAS Only:
	=========
	--fastFormat [fast format mode]	(SAS Only) (SBC4 required)
		Use this option with the --formatUnit option
		to run a fast format.
		Changing sector sizes is intended for supported Seagate products
		used in some hardware RAID configurations. Please consult your
		hardware RAID documentation for information about compatibility and
		using 4K native sectors before using this option!
		Software RAID or individual/JBOD drive solutions will see no benefit as modern
		file systems and modern operating systems are already 4K aware even on
		512 emulation drives. Modern operating systems already align file systems to 4K
		boundaries required by these drives for optimal performance.
		Performing a sector size change is data destructive and has a risk that
		the adapter, driver, or operating system may not know how to communicate with
		the device once this has completed.
[49m[38;5;9m		There is an additional risk when performing a low-level fast format that may
		make the drive inoperable if it is reset at any time while it is formatting.
[0m		Available fast format modes:
		    0 - This is a standard format unit command. All logical
		        blocks will be overwritten. This command will take a
		        very long time
		    1 - This is a fast format unit command keeping existing
		        data in physical sector. This option can be used to
		        quickly change the the logical sector size between
		        5xxe and 4xxx. The media may be readable, but data
		        may be unspecified or may return errors on read access
		        according to it's error processing algorithms.
		    2 - This is a fast format unit command that can change the
		        logical sector size quickly. Media may or may not be
		        read accessible until a write has been performed to
		        the media.

[49m[38;5;11m		WARNING: Any interruption to the device while it is formatting may render the
		         drive inoperable! Use this at your own risk!
		WARNING: Set sector size may affect all LUNs/namespaces for devices
		         with multiple logical units or namespaces.
		WARNING: Disable any out-of-band management systems/services/daemons
		         before using this option. Interruptions can be caused by these
		         and may prevent completion of a sector size change.
		WARNING: It is recommended that this operation is done from a bootable environment
		         (Live USB) to reduce the risk of OS background activities running and
		         triggering a device reset while reformating the drive.

[0m	--formatUnit [current | new sector size]	(SAS Only)	(Clear)
		This option will start a format unit operation on a SAS drive
		Use "current" to perform a format unit operation with the
		Sector size currently being used, otherwise enter a new sector
		size to use upon format completion. This command will erase all
		data on the drive. Combine this option with --poll to poll
		for progress until the format is complete.
		Changing sector sizes is intended for supported Seagate products
		used in some hardware RAID configurations. Please consult your
		hardware RAID documentation for information about compatibility and
		supported/required sector sizes!

		WARNING: Format Unit may affect all LUNs/namespaces for devices
		         with multiple logical units or namespaces.

		WARNING: Customer unique firmware may have specific requirements that 
		         restrict sector sizes on some products. It may not be possible to format/ 
		         fast format to common sizes like 4K or 512B due to these customer requirements.


	NVMe Only:
	=========
	--nodeallocate	(NVMe Only)
		For NVMe devices, specify this option during a sanitize to
		leave all blocks allocated after a sanitize erase. By default
		an NVMe controller will deallocate (TRIM/Unmap) all the LBAs.
		Using this option allows for full verification of erasure after
		a Sanitize command.
		NOTE: An NVMe controller may inhibit this option in certain
		configurations meaning the sanitize may produce a warning or
		a failure depending on how this is configured on the controller.
		After verifying an erasure with this option, run a deallocate/TRIM
		across the entire device/namespace to match default behavior of
		a sanitize erase.

	--nvmFmtMetadataSet [ xlba | separate ]	(NVMe Only)
		Use this option to specify how metadata is transmitted to
		the host system.
		Options:
		  xlba - metadata is transferred as part of the logical block data
		  separate - metadata is transferred as a separate buffer
		Note: Not all devices support specifying this.
		If this option is not provided, the NVM format will
		reuse the current setting.

	--nvmFmtMS [ # of bytes for metadata ]	(NVMe Only)
		This option is used to specify the length of metadata
		with a requested logical block size. The device must
		support the combination of logical block size and metadata size
		or the format will be rejected by the device.

	--nvmFmtNSID [all | current]	(NVMe Only)
		This option changes the NSID used when issuing the NVM format
		command. This can be used to control formatting an entire
		device or a specific namespace if the device supports specifying
		specific namespaces for a format command. Not all devices support
		this behavior. This has no effect on devices that do not support
		targeting a specific namespace and will format the entire device
		If this option is not given, the format will be issued to all
		namespaces by default.

	--nvmFmtPI [ 0 | 1 | 2 | 3 ]	(NVMe Only)
		Use this option to specify the protection type to format the
		medium with.
		Note: Not all devices support protection types.
		If this option is not provided, the NVM format will
		reuse the current setting.

	--nvmFmtPIL [ beginning | end ]	(NVMe Only)
		Use this option to specify the location protection
		information in an NVM device's metadata.
		Note: Not all devices support specifying this.
		If this option is not provided, the NVM format will
		reuse the current setting.

	--nvmFmtSecErase [none | user | crypto]	(NVMe Only)	(None | Clear | Clear, Possible Purge)
		This option is used to specify the type of erase to perform
		during an NVM format operation. All user data will be inaccessible
		upon completion of an NVM format, no matter the erase requested.
		Options:
		  none - no secure erase requested (previous data will not be accessible,
		         however the media may not have been erased by the controller.)
		  user - requests all user data is erased by the device. (Clear)
		  crypto - requests a cryptographic erase of all user data. Note: this mode
		    is not supported on all devices. (Clear, Possible Purge)

	--nvmFormat [current | format # | sector size]	(NVMe Only)
		This option is used to start an NVM format operation.
		Use "current" to perform a format operation with the
		Sector size currently being used.
		If a value between 0 and 15 is given, then that will issue
		the NVM format with the specified sector size/metadata size for
		that supported format on the drive.
		Values 512 and higher will be treated as a new sector size
		to switch to and will be matched to an appropriate lba format
		supported by the drive.
		This command will erase all data on the drive.
		Combine this option with--poll to poll
		for progress until the format is complete.
		A data sanitization compliant with IEEE 2883 Clear requires the --nvmFmtSecErase
		option to be provided. Without this option the controller
		may not erase all user data and substitute returning zeroes
		for performance instead.


================
Tool Usage Hints
================
See Sample Output examples below.

First, run the SeaChest -s option to determine what /dev/sg? or PD? device
handle assignment lines up to your disk drive. This option will also show you
other details about the drive including the current firmware revision.

Linux:
Vendor     Handle       Model Number       Serial Number     FwRev
ATA        /dev/sg0     ST94813AS          3AA043KP          3.03
SEAGATE    /dev/sg1     ST1000NM0011       ZAA15VAS          SN03

Windows:
Vendor     Handle   Model Number        Serial Number     FwRev
IDE        PD0      ST94813AS           3AA043KP          3.03
SEAGATE    PD1      ST1000NM0011        ZAA15VAS          SN03

You can use SeaChest -s --onlySeagate to limit the display to just Seagate.

All utility arguments will require you to identify the specific drive by
providing the sg or PD device handle (-d, --device).

Lin example, SeaChest_Basics -d /dev/sg1 --shortDST --poll
Win example, SeaChest_Basics -d PD2 --shortDST --poll

You may combine multiple tests with a single command line.  For example,
in Linux, SeaChest_Basics -d /dev/sg0 -i --smartCheck runs both identify and
SMART.  In Windows, SeaChest_Basics -d PD0 -i --smartCheck runs both
identify and SMART.

Multiple device handles can be given by adding -d /dev/sg# for each additional
handle.  Devices are processed in sequential order.  For example, in Linux,
SeaChest_Basics -d /dev/sg0 -d /dev/sg3 -i runs identify on these two
devices.  In Windows, SeaChest_Basics -d PD0 -d PD3 -i runs identify on
these two devices.

Caution: All device handles may be specified.  However, great care should be
taken to fully anticipate the consequences of running a command on all storage
devices in a system.  For example, a command to erase data on all drives could
be catastrophic or exactly what you want. The shortcut to select all devices is
-d all.  Seagate is not responsible for lost user data.  Along with the
designation for all devices, you can narrow the tasks to specific types of
drives by using the --onlySeagate, --modelMatch and --onlyFW filters.

If the task is an OFFLINE command like format unit or short DST, meaning that
the drive works on the task in the background and the tool quickly returns to
the command prompt (there is little or no I/O to the system), then you can
expect the system to run normally. If the task has high I/O to the system like
a sequential read of all sectors on the drive, then you can expect the system
to slow down with each additional device.

The discussion above is about starting SEQUENTIAL tests, or one after the
other.  When the task does not return to the command prompt for a very long
time, then you have a few options to run tests in PARALLEL, also called
simultaneous, in other words all at the same time.  One way is to start
different drives in different Terminal windows, if available.  There are other
more sophisticated methods using parallel processing, for information about
these methods please see the information at this link:
https://github.com/Seagate/ToolBin/tree/master/SeaChest/parallel_testing

Tests which take a very long time to complete or erase all user data on the
drive will require a longer command line argument than indicated in the --help
output to the screen.  This approach is taken to eliminate the possibility of
accidental data loss or the commitment of long test times. The longer command
arguments are similar to -I-understand-this-command-will-take-a-long-time or
-I-understand-this-command-will-erase-all-data.

Tests which alter the firmware or erase user data on the drive are limited to
Seagate-only products which include Seagate, Maxtor, Samsung and LaCie.

Advanced SAS installations may use dual ports.  These are listed as Port 0 and
Port 1 on the device information report. When both ports are active, each one
may have a unique /dev/sg designation.  The scan option may indicate that there
are two drives in the system with the same serial number.  Dual port
installations will also report two different Worldwide Numbers (WWN).

Windows Only Usage
==================
All Windows version tools support finding CSMI devices and talking to them like
you would a normal device.  The scan output will show all drives it detects
ONCE. CSMI device handles have a structure like csmi:<controller>:<port>:<lun>.  
If a drive has both a PD? and csmi:?:?:? handle, then SeaChest will show the PD
handle instead of the CSMI handle.

When drives are in a RAID, the PD device handle is usually not available and
the CSMI handle may provide an alternate way to talk to the drive.  Just
because a device has a CSMI handle doesn't mean it is part of a RAID.

If you want to see both handles, add --scanFlags allowDuplicates to the command
line.  If you don't want to see any CSMI devices, add --scanFlags ignoreCSMI to
the command line.  SeaChest_Info -d csmi:?:?:? --csmiInfo is useful when
troubleshooting CSMI device handles questions.
=========================
Linux General Usage Hints
=========================
Remember that Linux file names and command line arguments are cAsE SeNsiTiVe.

Display a file listing with the Linux command: ls -lah

The tool will require root privileges to run using either sudo or su commands.
Also, verify that the tool has executable rights.

A dot slash is a dot followed immediately by a forward slash (./). It is used
in Linux to execute a compiled program in the current directory when it is not
a built-in command or found in your path.

For example, ./SeaChest -d /dev/sg0 --shortDST --poll
or, sudo ./SeaChest -d /dev/sg0 --shortDST --poll

Shut down the files system and remove the power with the command:
poweroff

See previous screen history with the key combination:
Shift+PgUp or Shift+PgDn

Save a log file by redirecting the screen output to a text file by adding space
&>test.log at the end of your command line. Choose your own file name. To
append the screen output to an existing log file use >>test.log.

To save a log and display results at the conclusion of the tests, you can use
the "tee" command. Tee command writes to the STDOUT and to a file.
For example,
SeaChest --echoCommandLine -d /dev/sg0 -i --smartCheck | tee -a mySeaChestLog.txt

Display a log or text file with the Linux "less" command: less myfile.log
Press the letter q to quit displaying the file.  Similarly, you can easily
read the Seagate License agreement by piping the output to the less
command with SeaChest --license |less

Display a list of sg (SCSI generic) devices with the command:
cat /sys/class/scsi_generic/sg*/device/model
or
ls /dev/sg*

sg devices include the following interfaces: SATA, USB, SCSI (SCSI, SAS and FC)

Add the command word 'time' on the same command line before the SeaChest
command to see how much time it takes to run a test.
For example, time ./SeaChest -d /dev/sg0 --shortDST --poll

When drives are not detected by SeaChest
--------------------------------------------
The problem is that the sg driver isn't loaded on the system on boot.  You can
test if it is loaded by doing "ls /dev/sg*" and see if anything shows up. If
nothing shows up then the SG driver is missing (which is required by
SeaChest to issue commands).

You need to do "modprobe sg" as root to load the sg module (since it wasn't
compiled into the kernel), then you will get sg devices that we can scan and
find. Once you run the modprobe command and sg is successfully loaded, then you
can re-run "ls /dev/sg*" and see SG device nodes. SeaChest tools should
then be able to find devices once again.

How to control the amount of runtime kernel messages
----------------------------------------------------
When testing more drives than a system can hold, careful use of host adapters
and hot-plugging batches of drives (but never to direct motherboard
connections!) can help speed the process.  The Linux operating system will
display various system error messages, or none, when storage devices are
powered down and exchanged with the next drives.  The amount of information
contained in the OS error messages can be reviewed using the Linux utility
command "sysctl kernel.printk".  The default setting is defined by the
particular distro.  Tiny Core Linux, for example may set "4 4 1 7".  To hide
hot-plugging messages try "3 4 1 7", to increase the messaging to include
device details like model numbers try "6 4 1 7".  The command to set is 'sudo
sysctl -w kernel.printk="6 4 1 7"'.  See man sysctl - "configure kernel
parameters at runtime" for more.

Tesing storage devices on the USB and Thunderbolt interfaces
------------------------------------------------------------
Sometimes, when testing a storage device, it is more convenient to attach it as
an external drive to the test system. In the case of SATA drives there are very
many SATA-to-USB 'bridge' adapters available.  The quality and range of command
'passthrough' support for these adapters varies greatly.  Our tools will
attempt to work through these adapters.

If your notebook has a Thunderbolt interface connection then you may be able to
test a wide range of devices.  External Thunderbolt expansion systems provide a
PCIe slot in a chassis that can hold a SAS, NVMe, or SATA host adapter. The
host adapters would have cables that go out to your test bench where you would
provide the drive and an external power supply for the drives. Thunderbolt 2
expansion systems work in Linux by default. Thunderbolt 3 expansion systems
need to be enabled in the kernel with boot time options before it will be
recognized by the Linux operating system. See
https://www.kernel.org/doc/html/v4.14/admin-guide/thunderbolt.html for
information about how to activate the interface.

===========================
Windows General Usage Hints
===========================
The tool will require Administrative privileges to run.
Also, verify that the tool has executable rights.

Remember that the command line arguments are cAsE SeNsiTiVe.

Save a log file by redirecting the screen output to a text file by adding space
&>test.log at the end of your command line. Choose your own file name. To
append the screen output to an existing log file use >>test.log.

To save a log and display results at the conclusion of the tests, you can use
the powershell "tee" command. Tee command writes to the STDOUT and to a file.

For example:
powershell ".\SeaChest --echoCommandLine -d PD1 --smartCheck | tee -append mySeaChestLog.txt"

Setup for Windows
-----------------
The SeaChest Utilities Setup places all of the files at "C:\Program
Files\Seagate\SeaChest" and adds an icon on the Desktop.  Clicking the icon
will open a Windows command prompt in Administrator mode at this location.
From there you will need to type the full command line for the tool and device
and options to run the test you require.  See the various SeaChest Help
documentation for descriptions and examples of the various commands.

Manual Launch for Windows
-------------------------
An individual SeaChest utility for Windows cannot be launched by just
clicking on the file name. If started that way, the SeaChest utility will
briefly show a black window box and quickly close.  That is what happens when
trying to run it from the Windows File Manager.

This is a command line tool and the requirement is to open a Command Prompt as
Administrator.  There are two easy ways to do this:
  1. Windows Accessories, right-click the Command Prompt icon and select Run as
     Administrator.
  2. Click Windows Start. In the Start Search box, type cmd, and then press
     CTRL+SHIFT+ENTER.

Then change drives or directory to where the SeaChest utility is located and
run the tool file name from there.


==================================
About the SCSI Format Unit Command
==================================
(from the Seagate SCSI Commands Reference Manual, 100293068 Rev. H July 2014)
http://www.seagate.com/files/staticfiles/support/docs/manual/Interface%20manuals/100293068h.pdf

The FORMAT UNIT command requests that the device server format the medium into
application client accessible logical blocks as specified in the number of
blocks and block length values received in the last mode parameter block
descriptor in a MODE SELECT command. In addition, the device server may certify
the medium and create control structures for the management of the medium and
defects. The degree that the medium is altered by this command is
vendor-specific.

If a device server receives a FORMAT UNIT command before receiving a MODE
SELECT command with a mode parameter block descriptor the device server shall
use the number of blocks and block length at which the logical unit is
currently formatted (i.e., no change is made to the number of blocks and the
block length of the logical unit during the format operation).

The simplest form of the FORMAT UNIT command (i.e., a FORMAT UNIT command with
no parameter data) accomplishes medium formatting with little application
client control over defect management. The device server implementation
determines the degree of defect management that is to be performed. Additional
forms of this command increase the application client's control over defect
management.

The application client may specify:
  a) defect list(s) to be used;
  b) defect locations;
  c) that logical unit certification be enabled; and
  d) exception handling in the event that defect lists are not accessible.

While performing a format operation, the device server shall respond to
commands attempting to enter into the task set except INQUIRY commands, REPORT
LUNS commands, and REQUEST SENSE commands with CHECK CONDITION status with the
sense key set to NOT READY and the additional sense code set to LOGICAL UNIT
NOT READY, FORMAT IN PROGRESS. Handling of commands already in the task set is
vendor-specific. If the device server receives an INQUIRY command, a REPORT
LUNS commands, or a REQUEST SENSE command, then the device server shall process
the command. The device server shall return data for an INQUIRY command based
on the condition of the SCSI target device before beginning the FORMAT UNIT
command (i.e., INQUIRY data shall not change until after successful completion
of a format operation). The processing of commands in the task set when a
FORMAT UNIT command is received is vendor specific.

================
About FastFormat
================
A FastFormat (quickly changing the logical sector size) may take a few minutes
for the process to complete. The disk activity LED may show activity during the
conversion.  The larger the drive, the longer it takes.

NOTE: Operating systems do a device discovery during start up and set various
parameters, like total sectors and sector size, into the storage device
descriptions. The logical sector size times the number or logical sectors
defines the drive capacity.  You should expect to see OS I/O errors if you
change the logical sector size on a drive and then perform read or write
operations before the OS has updated its storage device descriptions.  Some
operating systems will throw an error after accessing a drive that has just run
a FastFormat but during its error recovery routines it may re-discover the
device parameters and update the system logs.  A system restart, however, is
the most reliable way to refresh the storage device descriptions.

Interpreting Head Health and Status
-----------------------------------
Beginning in 2016, some Seagate nearline drives started to support the
Remanufacture command set which allows a disk drive with a manageable
read/write head problem to remain in service at a reduced capacity by
"depopulating" the head element.  You can check if a drive supports the
Remanufacture command set by running --deviceInfo and looking for 'Storage
Element Depopulation' in the list of supported features.  (Not to be confused
with 'SATA Rebuild Assist' which is a feature used to rebuild RAID systems.)

A drive failure (due to a head problem) that is easily removed from the system
is replaced with a spare drive.  A drive that is nearly inaccessible may make
sense to remain in the system at a reliable lesser capacity by depopulating the
problem head.

If supported by the drive, the --showPhysicalElementStatus command will display
a simple table showing head number, type, health, and status.

The Health level is represented like a percentage, 0-100.  0 is perfectly
healthy, 100 = at manufacturer's limit, above this to 207 is above the
manufacturer's limit. A report of 254 means a depopulate is in progress.

The Status levels are active, in limit, degraded, truncated, truncate failed.

If a drive head has developed isolated, degraded performance, and does not
affect any other reliability in the system, then the head can be removed from
service. A drive with seven platters and fourteen heads would lose 1/14th of
its storage capacity, or ~7%.  Likewise, a four head drive would lose 25%.

If a drive is reported as "degraded" by --showPhysicalElementStatus then it can
be depopulated using the --removePhysicalElement command.  When a head is
depopulated the drive must perform a complete full pack write; this is
obviously data destructive and takes a very long time to complete.

When disk drives are built the post assembly factory process includes media
scanning, any defects mapping, defining sector sizes, and establishing system,
cache and data zones.  This activity is generically known as a low-level
format.  During head depopulation (i.e. removing a physical element) the drive
performs a kind of 'mid-level format' using Sanitize Overwrite which has the
unique behavior that once started it must finish.  If power is interrupted
during a Sanitize Overwrite it will pick up again where it left off when power
returns.

When drives are reported Security "Frozen" by SeaChest
------------------------------------------------------
Note:  Your system or the SeaChest software may report that a SATA password
cannot be changed because it is "frozen". Many systems BIOS will automatically
set the ATA SECURITY FREEZE LOCK command on all SATA drives at start up. The
SECURITY FREEZE LOCK command prevents changes to all Security states until a
following power-on reset or hardware reset. The purpose of the SECURITY FREEZE
LOCK command is to prevent password setting attacks on the security system.

The SeaChest --deviceInfo command will display something similar to this: "ATA
Security Information: Supported, Frozen". To disable Freeze Lock, first check
your BIOS SATA disk options to control the setting at start up. Otherwise, you
might pause the boot up shortly after powering on the system and then
temporarily remove the power to the security frozen drive (let it completely
spin down). When the power is back on the drive it will start without being
frozen.

Windows systems may also decide not to recognize the drive if it is ATA
Security Locked and it will not be listed by the SeaChest --scan command.  If
the drive remains undetected in Windows, your alternative is to make a bootable
USB flash drive and run SeaChest_Erase from the Linux operating system.

==============================
Enabling TCG Commands In Linux
==============================
Abstract
--------
The SeaChest_Erase --revert and --revertSP commands require specific support be
enabled in the Linux kernel.  This document describes the process to enable
support for sending ATA Trusted Trusted Computing Group (TCG) commands in
Linux. The focus is on how to do this through Ubuntu Linux 14.04LTS, however,
the process should apply to other Linux's as well although others may vary
slightly.

Modifying The GRUB Configuration File (Ubuntu example used)
-----------------------------------------------------------
In order to make the change to allow TCG commands persist across reboots, you
must modify the kernel boot parameters. In Ubuntu, this is accomplished by
modifying the GRUB 2 configuration file. This section references the Grub2
configuration documentation from the Ubuntu Community:
https://help.ubuntu.com/community/Grub2/Setup#Configuring_GRUB_2

Follow these steps to perform this modification in Ubuntu (other Linux's may be
similar).

1. You must modify the file /etc/default/grub. You can do this by running "sudo
gedit /etc/default/grub"

2. Once this file is open in the editor of your choice, add
"libata.allow_tpm=1" to the line  that begins with "GRUB_CMDLINE_LINUX_DEFAULT"
(or which ever line in grub is the one you use to boot your kernel, but this is
the default).

3. Close your editor

4. Run the command "sudo update-grub" to apply your changes to the grub boot
configuration (the file modified in these steps is a config file for the config
file).

5. Restart your computer to make this active

Temporarily Enabling TCG Commands In Linux
------------------------------------------
You can temporarily enable TCG commands without modifying the kernel boot
parameters. This can be accomplished by modifying the libata parameters file.
Below is a sample script that can be run to do this.

Sample Script:

cd /sys/module/libata/parameters
sudo chmod 644 allow_tpm
echo 1 | sudo dd of=./allow_tpm
sudo chmod 444 allow_tpm

Tiny Core - Enabling TCG Commands
------------------------------------------
Follow these steps to enable TCG commands on a Tiny Core bootable USB flash
drive.

1. Leave the USB flash drive in after you run the Windows-based USB boot maker
tool.

2. Using a (Windows) text editor go to USB:/boot/syslinux.cfg and in there, add
libata.allow_tpm=1 on the append line with the other kernel boot parameters.

3. Using a (Windows) text editor go to USB:/EFI/boot/refind.conf and add
libata.allow_tpm=1 on the options line with the other kernel boot parameters

Alternate method:
If Linux is already booted and you only want to temporarily enable TCG
commands, you can change the contents of
/sys/module/libata/parameters/allow_tpm from "0" to a "1".

=============
Sample Output
=============

SATA HDD Device Information:

Lin: sudo ./SeaChest_Basics -i -d /dev/sg1
Win: SeaChest_Basics -i -d PD1
===============================================================================
 SeaChest - Seagate drive utilities
 Copyright (c) 2014-2022 Seagate Technology LLC and/or its Affiliates, All Rights Reserved
===============================================================================
        Model Number: ST4000DX001-1CE168
        Serial Number: ZQ3034X7R
        Firmware Revision: CC44
        World Wide Name: 500Q0C5007A5FCF19
        Drive Capacity (TB/TiB): 4.00/3.64
        Native Drive Capacity (TB/TiB): 4.00/3.64
        Temperature Data:
                Current Temperature (C): 25
                Highest Temperature (C): 40
                Lowest Temperature (C): 18
        Humidity Data:
                Current Humidity (%): Not Reported
                Highest Humidity (%): Not Reported
                Lowest Humidity (%): Not Reported
        Power On Time:  4 days 1 hour
        Power On Hours: 97.00
        MaxLBA: 7814037167
        Native MaxLBA: 7814037167
        Logical Sector Size (B): 512
        Physical Sector Size (B): 4096
        Sector Alignment: 0
        Rotation Rate (RPM): 5900
        Form Factor (inch): 3.5
        Last DST information:
                Time since last DST (hours): 0.00
                DST Status/Result: 0x0
                DST Test run: 0x1
        Interface speed:
                Max Speed (Gb/s): 6.0
                Negotiated Speed (Gb/s): 6.0
        Annualized Workload Rate (TB/yr): 2.51
        Total Bytes Read (GB): 6.65
        Total Bytes Written (GB): 21.27
        Drive Reported Utilization (%): Not Reported
        Encryption Support: Not Supported
        Cache Size (MiB): 64.00
        Read Look-Ahead: Enabled
        Write Cache: Enabled
        SMART Status: Good
        ATA Security Information: Supported, Frozen
        Zoned Device Type: Not a Zoned Device
        Firmware Download Support: Immediate, Segmented
        Specifications Supported:
                ACS-2
                ATA8-ACS
                ATA/ATAPI-7
                ATA/ATAPI-6
                ATA/ATAPI-5
                ATA/ATAPI-4
                SATA 3.1
                SATA 3.0
                SATA 2.6
                SATA 2.5
                SATA II: Extensions
                SATA 1.0a
        Features Supported:
                NCQ
                HPA
                Power Management
                Security
                SMART
                DCO
                48bit Address
                APM
                GPL
                Free-fall Control
                Write-Read-Verify

SATA SSD Device Information:

Lin: sudo ./SeaChest_Basics -i -d /dev/sg1
Win: SeaChest_Basics -i -d PD1
===============================================================================
 SeaChest - Seagate drive utilities
 Copyright (c) 2014-2022 Seagate Technology LLC and/or its Affiliates, All Rights Reserved
===============================================================================
        Model Number: ST120FP0021
        Serial Number: PQ57011BD
        Firmware Revision: B770
        World Wide Name: 5000C501005A16633
        Drive Capacity (GB/GiB): 120.03/111.79
        Native Drive Capacity (GB/GiB): 120.03/111.79
        Temperature Data:
                Current Temperature (C): 26
                Highest Temperature (C): 0
                Lowest Temperature (C): 17
        Humidity Data:
                Current Humidity (%): Not Reported
                Highest Humidity (%): Not Reported
                Lowest Humidity (%): Not Reported
        Power On Time:  2 days 23 hours
        Power On Hours: 71.00
        MaxLBA: 234441647
        Native MaxLBA: 234441647
        Logical Sector Size (B): 512
        Physical Sector Size (B): 4096
        Sector Alignment: 0
        Rotation Rate (RPM): SSD
        Form Factor (inch): 2.5
        Last DST information:
                Not supported
        Interface speed:
                Max Speed (Gb/s): 6.0
                Negotiated Speed (Gb/s): 3.0
        Annualized Workload Rate (TB/yr): 299.80
        Total Bytes Read (TB): 2.35
        Total Bytes Written (GB): 90.19
        Drive Reported Utilization (%): Not Reported
        Encryption Support: Not Supported
        Cache Size (MiB): Not Reported
        Percentage Used Endurance Indicator (%): 0.00000
        Read Look-Ahead: Enabled
        Write Cache: Enabled
        SMART Status: Good
        ATA Security Information: Supported, Frozen
        Zoned Device Type: Not a Zoned Device
        Firmware Download Support: Immediate, Segmented
        Specifications Supported:
                ATA8-ACS
                ATA/ATAPI-7
                ATA/ATAPI-6
                ATA/ATAPI-5
                ATA/ATAPI-4
                SATA 3.0
        Features Supported:
                Sanitize
                NCQ
                HPA
                Power Management
                Security
                SMART
                48bit Address
                GPL
                TRIM

SAS HDD Device Information:

Lin: sudo ./SeaChest_Basics -i -d /dev/sg1
Win: SeaChest_Basics -i -d PD1
===============================================================================
 SeaChest - Seagate drive utilities
 Copyright (c) 2014-2022 Seagate Technology LLC and/or its Affiliates, All Rights Reserved
===============================================================================
        Model Number: ST4000NM0043
        Serial Number: Z1QZ04KVG
        Firmware Revision: 0004
        World Wide Name: 500Q0C5005594AEFB
        Copyright: Copyright (c) 2014-2022 Seagate All rights reserved
        Drive Capacity (TB/TiB): 4.00/3.64
        Temperature Data:
                Current Temperature (C): 28
                Highest Temperature (C): Not Reported
                Lowest Temperature (C): Not Reported
        Humidity Data:
                Current Humidity (%): Not Reported
                Highest Humidity (%): Not Reported
                Lowest Humidity (%): Not Reported
        Power On Time:  61 days 11 hours 14 minutes
        Power On Hours: 1475.23
        MaxLBA: 7814037167
        Native MaxLBA: Not Reported
        Logical Sector Size (B): 512
        Physical Sector Size (B): 512
        Sector Alignment: 0
        Rotation Rate (RPM): 7200
        Form Factor (inch): 3.5
        Last DST information:
                Time since last DST (hours): 548.23
                DST Status/Result: 0x0
                DST Test run: 0x1
        Interface speed:
                Port 0 (Current Port)
                        Max Speed (GB/s): 6.0
                        Negotiated Speed (Gb/s): 3.0
                Port 1
                        Max Speed (GB/s): 6.0
                        Negotiated Speed (Gb/s): Not Reported
        Annualized Workload Rate (TB/yr): 0.02
        Total Bytes Read (GB): 2.27
        Total Bytes Written (GB): 2.39
        Drive Reported Utilization (%): Not Reported
        Encryption Support: Self Encrypting
        Cache Size (MiB): Not Reported
        Read Look-Ahead: Enabled
        Write Cache: Enabled
        SMART Status: Good
        ATA Security Information: Not Supported
        Zoned Device Type: Not a Zoned Device
        Firmware Download Support: Immediate
        Specifications Supported:
                SPC-4
        Features Supported:
                EPC
                TCG
                Self Test
                Informational Exceptions
                Format Unit
                Sanitize

SAS SSD: Device Information

Lin: sudo ./SeaChest_Basics -i -d /dev/sg1
Win: SeaChest_Basics -i -d PD1
===============================================================================
 SeaChest - Seagate drive utilities
 Copyright (c) 2014-2022 Seagate Technology LLC and/or its Affiliates, All Rights Reserved
===============================================================================
        Model Number: ST400FM0053
        Serial Number: P3QF13026
        Firmware Revision: 0006
        World Wide Name: 5000QC50069010B4B
        Copyright: Copyright (c) 2014-2022 Seagate All rights reserved -
        Drive Capacity (GB/GiB): 400.09/372.61
        Temperature Data:
                Current Temperature (C): 34
                Highest Temperature (C): Not Reported
                Lowest Temperature (C): Not Reported
        Humidity Data:
                Current Humidity (%): Not Reported
                Highest Humidity (%): Not Reported
                Lowest Humidity (%): Not Reported
        Power On Time:  30 days 21 hours 29 minutes
        Power On Hours: 741.48
        MaxLBA: 781422767
        Native MaxLBA: Not Reported
        Logical Sector Size (B): 512
        Physical Sector Size (B): 4096
        Sector Alignment: 0
        Rotation Rate (RPM): SSD
        Form Factor (inch): 2.5
        Last DST information:
                Time since last DST (hours): 434.48
                DST Status/Result: 0x0
                DST Test run: 0x1
        Interface speed:
                Port 0 (Current Port)
                        Max Speed (GB/s): 12.0
                        Negotiated Speed (Gb/s): 3.0
                Port 1
                        Max Speed (GB/s): 12.0
                        Negotiated Speed (Gb/s): Not Reported
        Annualized Workload Rate (TB/yr): 9.48
        Total Bytes Read (GB): 24.62
        Total Bytes Written (GB): 837.41
        Drive Reported Utilization (%): Not Reported
        Encryption Support: Not Supported
        Cache Size (MiB): Not Reported
        Percentage Used Endurance Indicator (%): 1.00000
        Read Look-Ahead: Enabled
        Write Cache: Enabled
        SMART Status: Good
        ATA Security Information: Not Supported
        Zoned Device Type: Not a Zoned Device
        Firmware Download Support: Immediate, Segmented, Deferred
        Specifications Supported:
                SPC-4
        Features Supported:
                EPC
                Power Comsumption
                UNMAP
                Self Test
                Informational Exceptions
                Format Unit
                Sanitize

SATA SSD SMART Attributes example.

The drive will display its list of supported SMART attributes. Some attributes
are industry standard and most others are vendor unique. Most attributes are
informational and not used to determine a warranty return. Use the --smartCheck
command to determine if one of the warranty attributes has been tripped.

Reminder: Seagate Support does not help to analyze SMART attributes.

Lin: sudo ./SeaChest_Basics -d /dev/sg1 --smartAttributes
Win: SeaChest_Basics -d PD1 --smartAttributes
===============================================================================
 SeaChest - Seagate drive utilities
 Copyright (c) 2014-2022 Seagate Technology LLC and/or its Affiliates, All Rights Reserved
===============================================================================
Attribute Name:                   Status: Nominal: Worst:     Raw (hex):
  1 Read Error Rate               0x000F    0x75    0x63      0x0000000969AFB4
  3 Spin Up Time                  0x0003    0x61    0x61      0x00000000000000
  4 Start/Stop Count              0x0032    0x63    0x63      0x0000000000079E
  5 Retired Sectors Count         0x0033    0x64    0x64      0x00000000000000
  7 Seek Error Rate               0x000F    0x52    0x3C      0x0000000A4D0DAA
  9 Power On Hours                0x0032    0x5D    0x5D      0x00000000001A84
 10 Spin Retry Count              0x0013    0x64    0x64      0x00000000000000
 12 Drive Power Cycle Count       0x0032    0x63    0x63      0x000000000007A5
184 IOEDC Count                   0x0032    0x55    0x55      0x0000000000000F
187 Reported Un-correctable       0x0032    0x64    0x64      0x00000000000000
188 Command Timeout               0x0032    0x64    0xFD      0x00000000000000
189 High Fly Writes               0x003A    0x64    0x64      0x00000000000000
190 Airflow Temperature           0x0022    0x40    0x2E      0x00000026110024
191 Shock Sensor Counter          0x0032    0x64    0x64      0x00000000000000
192 Emergency Retract Count       0x0032    0x64    0x64      0x00000000000042
193 Load-Unlock Count             0x0032    0x44    0x44      0x0000000000FA61
194 Temperature                   0x0022    0x24    0x36      0x00000A00000024
195 ECC On The Fly Count          0x001A    0x2D    0x29      0x0000000969AFB4
197 Pending-Sparing Count         0x0012    0x64    0x64      0x00000000000000
198 Offline Uncorrectable Sectors 0x0010    0x64    0x64      0x00000000000000
199 Ultra DMA CRC Error           0x003E    0xC8    0xC8      0x00000000000000


===============
Version History - SeaChest_Erase
===============
SeaChest_Erase is branched off from SeaChest Basics v1.0.3.

v0.0.1  14-Mar-2015  Added --writeSame, --revertSP and TCG --revert.
v0.0.2  21-May-2015  Added --testUnitReady. Improved device discovery.
v0.0.3  12-Aug-2015  Modified some commands to consist of two parts - starting
                     LBA and LBA range count.  Improved device discovery.
                     Corrections to verbose output.
v0.0.3  16-Oct-2015  1_7_0 libraries.  Added enhanced version information.
                     Added -sat12byte to increase compatibility.  Added
                     --SATInfo to compare ATA vs SCSI identification
                     differences.
v1.0.0  02-May-2016  1_9_1 libraries.  Added new verbosity level. Added
                     --onlySeagate restriction.  Added --modelMatch and
                     --onlyFW filters. Added logic change for --overwrite and
                     --trim commands to assume Max LBA (end of the drive) as
                     the range when the erase range is not specified.  Added
                     --performQuickestErase, --formatUnit, --fastFormat,
                     --showEraseSupport.
v1.0.1  19-May-2016  1_9_2 libraries fixed scan information from ATAPI devices.
                     Fixed a bug where we could accidentally clear some stored
                     identify data from the device structure. Fixed continuing
                     on when there was a permission denied error opening a
                     drive. Adjustments to --fastFormat.
v1.0.2  15-Jun-2016  1_9_3 libraries fixed issues with ATA secure erase
                     commands. Fixed bugs with --modelMatch and --onlyFW
                     filters.
v1.1.0  06-Jul-2016  1_10_0 libraries add --forceATA and --forceSCSI.  Added
                     --displayLBA and --pattern.
v1.1.1  14-Jul-2016  1_10_1 libraries adds SMART and power management
                     functions, format polling, endianess detection, buffer
                     size fixes, SAS device statistics, Win32 IOCTL
                     pass-through fix on Win8 and higher. Added support for
                     maxLBA keyword.
v1.2.0  01-Sep-2016  1_11_1 libraries updates to various printed message,
                     minor bug fixes. Fixed --SATInfo command.
v1.2.0  21-Sep-2016  1_11_2 libraries updates adds --forceATADMA, --forceATAPIO
                     and --forceATAUDMA  (SATA Only).
v1.3.0  10-Oct-2016  1_11_4 libraries updates. Support for multiple devices.
v1.3.0  25-Oct-2016  1_11_5 libraries updates improved LaCie  detection, adds
                     SAT Vendor ID, SAT Product ID, and SAT Product Revision to
                     the -i --SATInfo output.
v1.3.1  27-Oct-2016  1_11_6 libraries updates WWN detection.  Added
                     --enableLegacyUSBPassthrough
v1.3.1  03-Nov-2016  1_11_7 libraries fixed issue with SAS EPC power mode
                     settings.
v1.3.2  10-Nov-2016  1_11_8 libraries fixed issue with Sanitize Overwrite
                     patterns. Also improved logic when using the various Range
                     commands.
v1.3.2  13-Dec-2016  1_11_10 libraries fixes a problem when using maxLBA without
                     the corresponding command range option, SAS power mode
                     setting, and Sanitize erase patterns.
v1.4.0  23-Feb-2017  1_13_0 libraries adds support for SAS 12.0Gb/s and
                     22.5Gb/s physical bus speeds, support for double buffered
                     passthrough IOCTLs. --showEraseSupport now gives overwrite
                     erase time estimate.  --progress support for writesame
                     removed (caused test to abort), use --poll instead. Add
                     --hideLBACounter. New -F, --scanFlags [options: ignoreCSMI
                     allowDuplicates] for Windows tools. Add CSMI support to
                     all Windows version tools.
v1.4.0  06-Mar-2017  1_13_2 libraries adds Enhanced device information output
                     for SAS features.
v1.5.0  24-May-2017  1_14_3 libraries. Added "Storage Element Depopulation" if
                     a supported feature.  Adds --showPhysicalElementStatus,
                     --forceSeagateDepop, --removePhysicalElement.
v1.6.0  14-Jun-2017  1_15_0 libraries adds bug fix malformed command line
                     should exit with code = 1; added detection of parallel ATA
                     and SCSI speeds; temperature data on ATA now uses the
                     values from the SCT status log or device statistics log.
                     Bug fix where the "-d all" was not filtering out csmi
                     drives like it is supposed to causing duplicate drives to
                     show up.  Adds the child drive matching options
                     --childModelMatch, --childOnlyFW, and --childNewFW.  Bug
                     fix with --showEraseSupport showing non-ascii characters.
                     Added --showPhysicalElementStatus and
                     --removePhysicalElement.
v1.7.0  14-Jul-2017  1_16_1 libraries adds support for ATA drives that have the
                     Sense Data Reporting feature enabled, changes to how we
                     interpret the completion status from the drive, new Sense
                     Data ASC, ASCQ definitions from SPC5. Adds --Scan (or -S,
                     note the capital S) aggressive system scan.
v1.7.0  27-Jul-2017  1_16_2 libraries enhances Seagate brand detection.
v1.7.0  19-Sep-2017  1_16_4 libraries fixes SCSI "--progress format", added
                     reading remanufacture time for SAS when the drive reports
                     a time, fixed SAS --abortDST.
v1.7.0  25-Sep-2017  1_17_0 libraries adds improved SATA device discovery on
                     SAS adapters, added NVMe read, write & Flush commands.
v1.7.1  10-Oct-2017  1_17_1 libraries adds Better handling of NVMe as a SCSI
                     device, SAT library strings, and fixes to Read-Buffer
                     error history (ISL). Updated copyright notice, invalid
                     command line options now only display an error instead of
                     long help. Added remanufacturing time for SCSI.
v1.7.3  12-Oct-2017  1_17_3 libraries improves Fast-Format compatibility on SAS.
                     Added detection of current SAS format protection mode.
v1.7.3  26-Oct-2017  1_17_5 libraries fixes SATA drive discovery behind HBAs
                     that don't show as SATA and don't support the SAT VPD
                     page; added Automatic fallback to 12byte CDBs during
                     initial device discovery;  integrated fixes for SAS
                     firmware download and fixes for SAS LongDST time
                     calculation; added detection of TCG Pyrite and Opalite
                     drives.
v1.7.3  31-Oct-2017  1_17_6 libraries adds ATA Security compatibility with SATL
                     on some LSI adapters, corrects firmware download issue
                     under Windows 10 API.
v1.7.3  02-Nov-2017  1_17_7 libraries fixes Long DST time on SCSI/SAS products.
v1.7.3  19-Apr-2018  1_18_0 libraries improves device detection of CD-ROM and
                     USB flash drives, support for early 90's PATA drives that
                     don't support LBA mode, bug fix where the last digit of
                     the SCSI Unit Serial Number was being dropped, additional
                     logic for deferred download completion status. --scan
                     --onlySeagate for just Seagate drives in a large system,
                     Long Drive Self Test Time in the -i output, write protect
                     status has been added for SCSI and NVMe in the -i output,
                     IDD enhancements for SAS, IDD enhancements to allow
                     captive mode on SATA, added USB Hacks to better support
                     some odd-ball USB devices and prevent crashes and improve
                     performance for some operations on them by issuing test
                     unit ready commands when something fails during device
                     discovery, automatic fall back to SAT 10 byte commands
                     during device discovery to help work with some USB
                     devices, some Legacy SCSI support enhancements (partially
                     from USB hacks development), enhanced SD to SG mapping in
                     Linux. Removed immediate bit from SAS Fast Format.
v1.7.4  21-Sep-2018  1_18_2 libraries Added in reading os-release PRETTY_NAME
                     field to get the OS name under linux; NVMe enabled;  fixed
                     a bug in the ATA activate FW command; added in reading ID
                     Data log and Device statistics logs page 0 to check the
                     list of supported pages; fixed a bug in the loop used to
                     read mode pages for -i information on SAS; IDD SAS
                     improvements; fixed a bug in DST & Clean with ATA drives
                     behind SCSI controllers. Fix for --modelMatch that have
                     spaces in the name. Added additional information to the
                     banner and -V data to show support levels. Add general
                     support for NVMe and NVMe specific identify data to "-i"
                     command.
v1.7.4  18-Oct-2018  1_18_3 libraries Added NVMe generic read command support.
v1.9.0  28-Feb-2019  1_19_2 libraries.  ATA Security password options sometimes
                     needed for ATA Security Erase controls.  Added
                     --ataSATsecurityProtocol, --ataSecPassword,
                     --ataSecPassType, --ataSecPWMod. Removed
                     --disableATASecurityPW. Rename --secureErase to
                     --ataSecureErase.
v2.0.0  03-May-2019  1_19_18 libraries added per device verbosity, --deviceInfo
                     adds SAS (not SATA) FastFormat for Features Supported
                     section,  --deviceInfo now gives Low Current Spinup
                     status. Adds --psid (removes that argument from
                     --revertSP), adds --sid.
v2.0.1 10-Jun-2019   1_19_23 libraries added SNTL (SCSI to NVMe translator),
                     updated software SAT translator to use dataset management
                     XL command, fixes for issuing vendor unique commands under
                     Windows, improved fast format support detection, and
                     refactored verbose output for NVMe commands.
v2.1.1 19-Feb-2020   1_21_30 libraries add in check for Elevated Privileges
                     (sudo, run as administrator) before trying to talk to
                     devices, new exit code 9 if privileges are missing;
                     printing the USB VID/PID in the device info; fix to sg
                     helper to support large systems; many changes in support
                     of dual actuators (example: warning that EPC settings
                     affect multiple LUNs); overhaul to USB device detection
                     and support, incorporating a new USB hacks and workarounds
                     approach which uses a lookup table listing various USB
                     bridge VIDs/PIDs and their specific issues; separate
                     Seagate SAS SN and PCBA SN.
v2.1.2  13-Apr-2020  1_21_30 libraries, fix memory allocation during the scan
                     command.
v3.0.0  20-Nov-2020  Changed how scan-flags are parsed. CSMI rewrite and initial
                     Intel RST NVMe support added. Numerous code quality improvements
                     which fixed many potential bugs and memory leaks. Improved
                     support for openfabrics NVMe drivers. Changed permissions
                     detection to show warnings rather than errors. Removed obsolete
                     CSMI and SAT 12B CDB options. CSMI handles now show as csmi:?:?:?
                     Depopulation options are being moved to SeaChest_Format in future
                     releases. Supported in this version, but will be moved in the future.
                     Removed Trim/Unmap from supported erase methods and quickest erase
                     since these are "hints" that may cause an erase, but are not guaranteed.
v3.0.3  12-Feb-2021  Improved argument parsing to accept hex in addition to decimal for
                     many different options.
                     Marking depopulate & getPhysicalElement status options as obsolete
                     as they have been migrated to SeaChest_Format.
                     Setting fast-format to hold busy until complete for better results.
                     More messages are now displayed warning not to interrupt format/fast
                     format operations and depopulate.
                     opensea-transport code pulled in enhancements to attempt to block
                     other applications and the OS from interrupting format, fast format,
                     depopulate, and ATA security erase to prevent potential problems
                     during these operations or which may leave the drive in a bad state
                     if they are interrupted.
v3.1.0  27-Apr-2021  SATA write same automatically implied poll since progress checks
                     are not possible without stopping the write same that is in progress.
                     Fixed bugs in SAS write same detection.
v3.1.1  16-Jun-2021  Added more information about Seagate PSIDs to assist with
                     troubleshooting why a revert or revertSP may have failed.
                     Minor USB compatibility improvements and more products added
                     to the list with their specific workarounds.
                     Updated NVMe compatibility for FreeBSD 11.
                     Support for detection and showing of concurrent positioning 
                     (new multi-actuator support from the standards).
v4.1.0  28-Feb-2023  Includes new --noBanner option and new fast discovery option
                     that can be used in situations where super critical performance
                     is required at a loss of information about a drive's capabilities.
                     Help now has many more examples of the options in the tool.
                     Added nvm format to list of options to do user secure erase. This
                     has also been pulled into the performQuickestErase option.
                     Fixed error in parsing --psid option causing it to report it was
                     always missing.
v4.1.0  27-Mar-2023  opensea-operations library updated to fix to add
                     workaround for overwrite not erasing some drives in Windows.
                     opensea-transport updated to fix CSMI scan duplicating devices 
                     found in certain scenarios.
v4.3.6  01-Dec-2023  Updated to newer opensea-libs to pull in low-level fixes.
                     Added whether an erase qualifies as clear vs purge according
                     to IEEE 2883 in --showEraseSupport output.
                     Fixed a bug in Windows translating NVMe deallocate to SCSI unmap.
                     Improved Deallocate support detection for NVMe drives in Windows
                     with other NVMe drivers.
                     Added --eraseRestoreMaxPrep to handle restoring maxLBA taking
                     into account HPA, DCO, and AMAC features on ATA drives ahead of erasure.
                     Added --zeroVerify option to check a drive is filled with zeroes.
                     Stopped reading /etc/passwd file to show username in banner.
                     Banner will now show either "admin"/"root" or "current user".
                     Improved parsing of linux distro/release information from
                     /etc/os-release file.
                     Fixed a bug in byte swap string used to get ATA MN, SN, FW.
                     Fixed a bug in getting/reporting power on hours as years, 
                     days, hours, etc where days was being truncated.
                     Fixed error reading NVMe features in Windows for drive info.
                     Fixed SAS Date of manufacture in drive info.
                     Added detection of HPA security feature.
                     Added more SMART attributes definitions for Seagate HDDs & SSDs,
                     and more definitions for Maxtor HDDs.
                     Improved temperature detection from older HDDs with only
                     SMART attribute 194 reporting current temperature.
                     Added separate warning for SMART attributes below threshold that
                     are not considered prefail/warranty attributes (aka failures).
                     Fixed output of Seagate Airflow temperature SMART attribute.
                     Added showing new capacity after changing Max LBA.
                     Fixed possible segmentation fault when reading /etc/mtab in Linux.
                     Workaround for some SAS drives on some HBAs reporting incorrect
                     response to SAT A1h CDB.
                     Fixed a bug in FreeBSD causing non-data ATA commands to report
                     all zeroes instead of expected output in RTFRs.
v4.6.0  28-Aug-2024  Pull in security updates and low-level bug fixes from opensea-libs.
                     CISS RAID device support for Linux (CCISS, HPSA, and SmartPQI drivers)
                     Refactored Sanitize option parsing and handling.
                     Handle SCSI unique sanitize conditions like write after crypto/block erase
                     and how PI fields may be invalid after these operations which affects OS
                     read commands to suggest a user also perform a overwrite.
                     Added --znr (Zone no reset) and --noDeallocate options for ZBDs and NVMe
                     devices with Sanitize and ATA security erase to allow for better erase
                     verification.
                     Added options to specify number of overwrite passes in Sanitize overwrite
                     as well as option to invert the patter between overwrite passes.
                     Added option to allow running sanitize in unrestricted mode.
                     Better handling for sanitize if in a failure condition to continue/retry a
                     sanitize operation in failed state instead of exiting.
                     Changed refresh FS system behavior to only run when utility knows erase fully completed
                     Added ability to manually refresh file systems from cli option.
                     Improved sanitization of ATA security erase password after it is done being
                     used to make sure it is also removed from memory.
                     Improved logic within --eraseRestoreMaxPrep to handle a few other cases and
                     feature set interactions that were not previously handled.
v4.7.1  28-May-2025  Added support for low-level SCSI rescan in Linux when passing aggressive scan flag -S.
                     Refactor reading SCSI capacity code which may reduce total commands issued.
                     Refactored looking up supported SCSI commands with Report Supported operations codes and
                     legacy CmdDT bit in Inquiry which reduces total commands issued.
                     Source code level support for OpenBSD, NetBSD, and DragonflyBSD now available.
                     More source code hardening implemented with new bounds checking functions from
                     opensea-common library (behave similar to Annex K in C11).
                     Fixed a bug in reading device information (-i) on USB devices causing the information to be
                     incomplete.
                     Fixed big endian system support for all devices, but especially for NVMe.
                     Fixed looking up SD to SG device handles in Linux.
                     Added new exit codes for Device Not Found when opening the handle and Device Busy when
                     attempting to open a handle.
                     Enhanced file security API to display recommended actions to modify directories to be 
                     compatible with security requirements when reading or writing a file.
                     Fixed a crash when reading/writing files located at / in unix-like systems.
                     Fixed exit code when -d all or --modelMatch are used but all devices are skipped so that 
                     the exit code is not set to 0 (success) when all the devices were skipped.
                     Added additional logic to --performQuickestErase so that it can handle when certain commands
                     are not allowed on a given adapter or OS to choose a different option.
                     Fixed a logic error with TRIM/Deallocate commands to NVMe devices in Windows.
v4.7.3  07-Jul-2025  Fixed a bug with scan not showing any output in specific circumstances where number of successfully
                     enumerated devices is equivalent to the number of unsuccessfully enumerated devices.
                     Added new exit code for when paths are detected as insecure to be resolved by the user before
                     files will be accessed in these directories (see https://github.com/Seagate/openSeaChest/wiki/Secure-File-And-Path).
                     Fixed a check for reading correct mode page which may cause changing some SAS features to fail.
                     Disabled extra CSMI related device scan in Windows that can cause a hang on some chipsets.
                     Added some more legacy USB devices to list of known devices to support these better when they are used.
                     Fixed detection of supported sanitize operations on SAS drives that may not support the AUSE mode.
v4.7.4  06-Oct-2025  Fixed mismatch of GNU/clang access attribute description and how the code was actually written in many
                     parts of the low-level library code. Also added const to many objects to make intention more clear and
                     reduce the chance of accidental modification to memory intended to be used in a read-only way. No known
                     bugs from this, but may affect some optimizations in the code.
                     Fixed compatibility with some newer C23 capable compilers.
                     Fixed incorrect pointer check in TRIM function causing a failure when trying to use this option with valid
                     inputs.
                     Fixed incorrect lookup for supported read defect data command in SCSI Defect list code.
                     Added automatic selection of firmware download transfer size based on drive reported information for all
                     interfaces (min/max/granularity, etc).
                     Fixed out of bounds access when generating FARM combined log (was adding NULL terminator one past end of memory).
                     Removed use of os_Update_File_System_Cache from situations where the drive may not be in a good state (still sanitizing,
                     or after a sector size change) to minimize possible system interaction issues which may disconnect the device from the
                     system.
                     Fixed read/write logic on some USB devices which reported an ATA maxlba of 0.
                     Added tracking lock/unlock requests to a tDevice to keep things in sync better between operations.
                     Refactor SCSI device read/write logic on how commands are selected and issued (10B vs 16B)
                     Removed automatic ATA passthrough reads/writes due to other side affects this created on some devices.
                     Fixed a crash on NVMe devices in Windows when using the openfabrics NVMe driver.
                     Fixed a bug that tracks the last command's sense data after issuing which may have been missed in certain situations.
                     Fixed implied captive/foreground mode for SAS fast format.
=======================================
About SeaChest Command Line Diagnostics
=======================================
Seagate offers both graphical user interface (GUI) and command line interface
(CLI) diagnostic tools for our storage devices.  SeaTools for Windows and
SeaTools Bootable for end users are the two most popular GUI tools.  These
tools support 15 languages.

SeaChest diagnostics are command line utilities which are available for expert
users.  These command line tools assume the user is knowledgeable about running
software from the operating system command prompt.  CLI tools are in the
English language only and use "command line arguments" to define the various
tasks and specific devices.  SeaChest diagnostics are available for both Linux
and Windows environments.

Linux versions of SeaChest tools are available as stand alone 32 or 64-bit
executables you can copy to your own system.  Windows OS versions of SeaChest
diagnostics are installed through a typical setup wizard and can be removed via
the Control Panel.

In addition, Seagate offers a tool to build a bootable USB SeaChest flash drive
which boots to a 64-bit Linux command prompt.  This is a Windows executable
file which formats a USB Flash drive you provide.  It copies over all the files
needed to use it as a bootable device for the SeaChest diagnostic software.
All data on the USB Flash drive will be erased so be sure to protect any
valuable files.

Technical Support for SeaChest drive utilities is not available.  If you have
the time to send us some feedback about this software, especially if you notice
something we should fix or improve, we would greatly appreciate hearing from
you.  To report your comments and suggestions, please use this email
seaboard@seagate.com.  Please let us know the name and version of the tool you
are using.

SeaChest drive utilities support SATA, SAS and USB interface devices.

SeaChest Basics - Contains the most important tests and tools.

Other SeaChest "break out" utilities are available and listed below which offer
more in-depth functionality in specific areas. These are:

SeaChest Configure - Tools to control various settings on the drives are
brought together into this one tool.  Typical commands, for example, include
Write Cache and Read Lookahead Cache enable or disable.

SeaChest Erase - The focus is on data erasure.  There are many different
choices for erasing data from simple boot track erase to full cryptographic
erasure (when supported).  Be sure to back up important data before using this
tool.  Seagate is not responsible for lost user data.  This tool only works on
Seagate drives.

SeaChest Firmware - Seagate products are run by firmware.  Having the latest
firmware can improve performance and or reliability of your product.  Seagate
recommends applying new firmware to enhance the performance and or reliability
of your drive.  Most products may see one or two firmware updates within the
early life of the product.

SeaChest Format - Storage products which utilize the SAS, SCSI or Fibre
Channel interfaces are able to perform a full low-level media format in the
field.  The SCSI Format Unit command offers many specialty options to
accommodate a variety of conditions and to fine tune the procedure. This tool
also support NVMe format and SATA sector size changes a.k.a. Fast Format. 
Also in this tool is the ability to depopulate a head from use as it wears out
so that the device can continue being used at a reduced capacity until completely
worn out. These complex commands deserve their own "break out" utility.

SeaChest GenericTests - Read Tests are the original disk drive diagnostic which
is to just read every sector on the drive, sequentially.  This tool offers
several common read tests which can be defined by either time or range.  In
addition, the Long Generic test has the ability to repair problem sectors,
possibly eliminating an unnecessary drive return.

SeaChest Info - Historical generic activity logs (like total bytes written and
power on hours) and performance logs (like temperature) are available for
analytical review.  Identification and inquiry data stored on the drive is also
provided.  A view of SMART and device statistics is available when supported by
the drive.

SeaChest NVMe - contains some options specific to NVMe devices. This tool started
as a test tool and many options are present in other SeaChest utilities now.

SeaChest PowerControl - Seagate disk drives offer a multitude of options to
manage power.  This tool manipulates the various power modes.

SeaChest Security - Various settings are available on modern Seagate disk
drives which may be locked and unlocked.  These settings may interact with the
operating systems and systems BIOS.  Options also include cryptographic erase
for Self-Encrypting Drives (SED).

SeaChest SMART - This tool provides a closer look at the collected SMART
attributes data.  SMART stands for Self-Monitoring, Analysis and Reporting
Technology.  Short Drive Self Test is included as one of the standard SMART
commands. In addition, the DST & Clean test has the ability to repair problem
sectors, possibly eliminating an unnecessary drive return.

=================================
Support and Open Source Statement
=================================
Seagate offers technical support for disk drive installation.  If you have any
questions related to Seagate products and technologies, feel free to submit
your request on our web site. See the web site for a list of world-wide
telephone numbers.

Seagate Support:
http://www.seagate.com/support-home/
Contact Us:
http://www.seagate.com/contacts/

This software uses open source packages obtained with permission from the
relevant parties. For a complete list of open source components, sources and
licenses, please see our Linux USB Boot Maker Utility FAQ for additional
information.

SeaChest Utilities use libraries from the opensea source code projects.  These
projects are maintained at http://github.com/seagate.
The libraries in use are opensea-common, opensea-transport and
opensea-operations. These libraries are available under the Mozilla Public
License 2.0, license shown below.

The newest online version of the SeaChest Utilities documentation, open source
usage and acknowledgement licenses can be found at:
http://support.seagate.com/seachest/SeaChest_Combo_UserGuides.html

The USB Boot Maker Utility for Windows utilizes the NSIS Installer 
v2.46.5-Unicode (http://nsis.sourceforge.net).

All Linux versions of the SeaChest Utilities are compiled using GCC, the GNU 
Compiler Collection, license shown below.

All Windows versions of the SeaChest Utilities uses an open source project 
named wingetopt, license shown below.

SeaChest_Firmware uses two open source projects named mbedtls and zlib.h, 
licenses shown below.

Copyright (c) 2014-2025 Seagate Technology LLC and/or its Affiliates, All Rights Reserved
======================================================================

			END USER LICENSE AGREEMENT
			    FOR SEAGATE SOFTWARE


PLEASE READ THIS END USER LICENSE AGREEMENT ("EULA") CAREFULLY.  BY CLICKING
"I AGREE" OR TAKING ANY STEP TO DOWNLOAD, SET-UP, INSTALL OR USE ALL OR ANY
PORTION OF THIS PRODUCT (INCLUDING, BUT NOT LIMITED TO, THE SOFTWARE AND
ASSOCIATED FILES (THE "SOFTWARE"), HARDWARE ("HARDWARE"), DISK (S), OR OTHER
MEDIA) (COLLECTIVELY, THE "PRODUCT") YOU AND YOUR COMPANY ACCEPT ALL THE
TERMS AND CONDITIONS OF THIS EULA.  IF YOU ACQUIRE THIS PRODUCT FOR YOUR
COMPANY'S USE, YOU REPRESENT THAT YOU ARE AN AUTHORIZED REPRESENTATIVE WHO
HAS THE AUTHORITY TO LEGALLY BIND YOUR COMPANY TO THIS EULA.  IF YOU DO NOT
AGREE, DO NOT CLICK "I AGREE" AND DO NOT DOWNLOAD, SET-UP, INSTALL OR USE THE
SOFTWARE.


1.  Ownership.  This EULA applies to the Software and Products of Seagate
Technology LLC and the affiliates controlled by, under common control with,
or controlling Seagate Technology LLC, including but not limited to
affiliates operating under the LaCie name or brand, (collectively, "Seagate",
"we", "us", "our").  Seagate and its suppliers own all right, title, and
interest in and to the Software, including all intellectual property rights
therein.  The Software is licensed, not sold.  The structure, organization,
and code of the Software are the valuable trade secrets and confidential
information of Seagate and its suppliers.  The Software is protected by
copyright and other intellectual property laws and treaties, including,
without limitation, the copyright laws of the United States and other
countries. The term "Software" does not refer to or include "Third-Party
Software".  "Third-Party Software" means certain software licensed by Seagate
from third parties that may be provided with the specific version of Software
that you have licensed.  The Third-Party Software is generally not governed
by the terms set forth below but is subject to different terms and conditions
imposed by the licensors of such Third-Party Software.  The terms of your use
of the Third-Party Software are subject to and governed by the respective
license terms, except that this Section 1 and Sections 5 and 6 of this
Agreement also govern your use of the Third-Party Software.  You may identify
and view the relevant licenses and/or notices for such Third-Party Software
for the Software you have received pursuant to this EULA at
http://www.seagate.com/support/by-topic/downloads/ , or at
http://www.lacie.com/support/ for LaCie branded product. You agree to comply
with the terms and conditions contained in all such Third-Party Software
licenses with respect to the applicable Third-Party Software. Where
applicable, the URLs for sites where you may obtain source code for the Third
Party Software can be found at
http://www.seagate.com/support/by-topic/downloads/, or at
http://www.lacie.com/support/ for LaCie branded product.

2.  Product License.  Subject to your compliance with the terms of this EULA,
Seagate grants you a personal, non-exclusive, non-transferable, limited
license to install and use one (1) copy of the Software on one (1) device
residing on your premises, internally and only for the purposes described in
the associated documentation. Use of some third party software included on
the media provided with the Product may be subject to terms and conditions of
a separate license agreement; this license agreement may be contained in a
"Read Me" file located on the media that accompanies that Product.  The
Software includes components that enable you to link to and use certain
services provided by third parties ("Third Party Services").  Your use of the
Third Party Services is subject to your agreement with the applicable third
party service provider.  Except as expressly stated herein, this EULA does
not grant you any intellectual property rights in the Product. Seagate and
its suppliers reserve all rights not expressly granted to you.  There are no
implied rights.

2.1     Software.  You are also permitted to make a single copy of the
Software strictly for backup and disaster recovery purposes.  You may not
alter or modify the Software or create a new installer for the Software.  The
Software is licensed and distributed by Seagate for use with its storage
products only, and may not be used with non-Seagate storage product.

3.  Restrictions.  You are not licensed to do any of the following:
	a.      Create derivative works based on the Product or any part or
		component thereof, including, but not limited to, the
		Software;

	b.      Reproduce the Product, in whole or in part;

	c.      Except as expressly authorized by Section 11 below, sell,
		assign, license, disclose, or otherwise transfer or make
		available the Product, in whole or in part, to any third
		party;

	d.      Alter, translate, decompile, or attempt to reverse engineer
		the Product or any part or component thereof, except and only
		to the extent that such activity is expressly permitted by
		applicable law notwithstanding this contractual prohibition;

	e.      Use the Product to provide services to third parties;

	f.      Take any actions that would cause the Software to become
		subject to any open source license agreement if it is not
		already subject to such an agreement; and

	g.      Remove or alter any proprietary notices or marks on the
		Product.

4.  Updates.  If you receive an update or an upgrade to, or a new version of,
any Software ("Update") you must possess a valid license to the previous
version in order to use the Update.  All Updates provided to you shall be
subject to the terms and conditions of this EULA.  If you receive an Update,
you may continue to use the previous version(s) of the Software in your
possession, custody or control.  Seagate shall have no obligation to support
the previous versions of the Software upon availability of an Update. Seagate
has no obligation to provide support, maintenance, Updates, or modifications
under this EULA.

5.  NO WARRANTY.  THE PRODUCT AND THE THIRD-PARTY SOFTWARE ARE OFFERED ON AN
"AS-IS" BASIS AND NO WARRANTY, EITHER EXPRESS OR IMPLIED, IS GIVEN.  SEAGATE
AND ITS SUPPLIERS EXPRESSLY DISCLAIM ALL WARRANTIES OF ANY KIND, WHETHER
STATUTORY, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NON-INFRINGEMENT.  SEAGATE DOES NOT PROVIDE THE THIRD PARTY SERVICES AND
MAKES NO WARRANTIES WITH RESPECT TO THE THIRD PARTY SERVICES.  YOUR USE OF
THE THIRD PARTY SERVICES IS AT YOUR RISK.

6.  EXCLUSION OF INCIDENTAL, CONSEQUENTIAL, AND CERTAIN OTHER DAMAGES.  TO
THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL SEAGATE OR
ITS LICENSORS OR SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, PUNITIVE,
INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, BUT NOT LIMITED TO,
DAMAGES FOR LOSS OF PROFITS OR CONFIDENTIAL OR OTHER INFORMATION, FOR
BUSINESS INTERRUPTION, FOR PERSONAL INJURY, FOR LOSS OF PRIVACY, FOR FAILURE
TO MEET ANY DUTY INCLUDING OF GOOD FAITH OR REASONABLE CARE, FOR NEGLIGENCE,
AND FOR ANY OTHER PECUNIARY OR OTHER LOSS WHATSOEVER) ARISING OUT OF OR IN
ANY WAY RELATED TO THE USE OF OR INABILITY TO USE THE PRODUCT OR ANY PART OR
COMPONENT THEREOF OR RELATED SERVICE OR ANY THIRD PARTY SERVICES, OR
OTHERWISE UNDER OR IN CONNECTION WITH ANY PROVISION OF THE EULA, EVEN IN THE
EVENT OF THE FAULT, TORT (INCLUDING NEGLIGENCE), MISREPRESENTATION, STRICT
LIABILITY, BREACH OF CONTRACT, OR BREACH OF WARRANTY OF SEAGATE OR ITS
LICENSORS OR SUPPLIERS, AND EVEN IF SEAGATE OR ITS LICENSOR OR SUPPLIER HAS
BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND NOTWITHSTANDING ANY
FAILURE OF THE ESSENTIAL PURPOSE OF THIS AGREEMENT OR ANY REMEDY.

7.  LIMITATION OF LIABILITY.  NOTWITHSTANDING ANY DAMAGES THAT YOU MIGHT
INCUR FOR ANY REASON WHATSOEVER, THE ENTIRE LIABILITY OF SEAGATE UNDER ANY
PROVISION OF THIS EULA AND YOUR EXCLUSIVE REMEDY HEREUNDER SHALL BE LIMITED
TO, AND IN NO EVENT WILL SEAGATE'S TOTAL CUMULATIVE DAMAGES EXCEED, THE FEES
PAID BY THE LICENSEE TO SEAGATE FOR THE PRODUCT.  ADDITIONALLY, IN NO EVENT
SHALL SEAGATE'S LICENSORS OR SUPPLIERS BE LIABLE FOR ANY DAMAGES OF ANY KIND.

8.  Privacy.  Seagate's collection, use and disclosure of personally
identifiable information in connection with your use of the Product is
governed by Seagate's Privacy Policy which is located at
http://www.seagate.com/legal-privacy/privacy-policy/As further described in
Seagate's Privacy Policy, certain Products may include a Product dashboard
which allows users to manage Product settings, including but not limited to
use of anonymous statistical usage data in connection with personally
identifiable information. You agree to Seagate's collection, use, and
disclosure of your data in accordance with the Product dashboard settings
selected by you for the Product, or in the case of transfer as described in
Section 11, you agree to the settings selected by the prior licensee unless
or until you make changes to the settings.

9.  Indemnification.  By accepting the EULA, you agree to indemnify and
otherwise hold harmless Seagate, its officers, employees, agents,
subsidiaries, affiliates, and other partners from any direct, indirect,
incidental, special, consequential or exemplary damages arising out of,
relating to, or resulting from your use of the Product or any other matter
relating to the Product, including, without limitation, use of any of the
Third Party Services.

10.  International Trade Compliance.  The Software and any related technical
data made available for download under this EULA are subject to the customs
and export control laws and regulations of the United States ("U.S.") and may
also be subject to the customs and export laws and regulations of the country
in which the download is contemplated.  Further, under U.S. law, the Software
and any related technical data made available for download under this EULA
may not be sold, leased or otherwise transferred to restricted countries, or
used by a restricted end-user (as determined on any one of the U.S.
government restricted parties lists, found at
http://www.bis.doc.gov/complianceandenforcement/liststocheck.htm) or an
end-user engaged in activities related to weapons of mass destruction
including, without limitation, activities related to designing, developing,
producing or using nuclear weapons, materials, or facilities, missiles or
supporting missile projects, or chemical or biological weapons.  You
acknowledge that you are not a citizen, national, or resident of, and are not
under control of the governments of Cuba, Iran, North Korea, Sudan or Syria;
are not otherwise a restricted end-user as defined by U.S. export control
laws; and are not engaged in proliferation activities.  Further, you
acknowledge that you will not download or otherwise export or re-export the
Software or any related technical data directly or indirectly to the
above-mentioned countries or to citizens, nationals, or residents of those
countries, or to any other restricted end user or for any restricted end-use.

11.  General.  This EULA between Licensee and Seagate is governed by and
construed in accordance with the laws of the State of California without
regard to conflict of laws principles.  The EULA constitutes the entire
agreement between Seagate and you relating to the Product and governs your
use of the Product, superseding any prior agreement between you and Seagate
relating to the subject matter hereof.  If any provision of this EULA is held
by a court of competent jurisdiction to be contrary to law, such provision
will be changed and interpreted so as to best accomplish the objectives of
the original provision to the fullest extent allowed by law and the remaining
provisions of the EULA will remain in force and effect.  The Product and any
related technical data are provided with restricted rights.  Use,
duplication, or disclosure by the U.S. government is subject to the
restrictions as set forth in subparagraph (c)(1)(iii) of DFARS 252.227-7013
(The Rights in Technical Data and Computer Product) or subparagraphs (c)(1)
and (2) of 48 CFR 52.227-19 (Commercial Computer Product - Restricted
Rights), as applicable.  The manufacturer is Seagate.  You may not transfer
or assign this EULA or any rights under this EULA, except that you may make a
one-time, permanent transfer of this EULA and the Software to another end
user, provided that (i) you do not retain any copies of the Software, the
Hardware, the media and printed materials, Upgrades (if any), and this EULA,
and (ii) prior to the transfer, the end user receiving this EULA and the
Software agrees to all the EULA terms.  Any attempted assignment in violation
of this Section is void.  Seagate, the Seagate logo, and other Seagate names
and logos are the trademarks of Seagate.

5.4.2016

===========================================================================
Various Open Source Licenses

GNU LESSER GENERAL PUBLIC LICENSE

Version 3, 29 June 2007

Copyright (c) 2007 Free Software Foundation, Inc. <http://fsf.org/>

Everyone is permitted to copy and distribute verbatim copies of this license
document, but changing it is not allowed.

This version of the GNU Lesser General Public License incorporates the terms
and conditions of version 3 of the GNU General Public License, supplemented
by the additional permissions listed below.

0. Additional Definitions.

As used herein, "this License" refers to version 3 of the GNU Lesser General
Public License, and the "GNU GPL" refers to version 3 of the GNU General
Public License.

"The Library" refers to a covered work governed by this License, other than
an Application or a Combined Work as defined below.

An "Application" is any work that makes use of an interface provided by the
Library, but which is not otherwise based on the Library. Defining a subclass
of a class defined by the Library is deemed a mode of using an interface
provided by the Library.

A "Combined Work" is a work produced by combining or linking an Application
with the Library. The particular version of the Library with which the
Combined Work was made is also called the "Linked Version".

The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code for
portions of the Combined Work that, considered in isolation, are based on the
Application, and not on the Linked Version.

The "Corresponding Application Code" for a Combined Work means the object
code and/or source code for the Application, including any data and utility
programs needed for reproducing the Combined Work from the Application, but
excluding the System Libraries of the Combined Work.

1. Exception to Section 3 of the GNU GPL.

You may convey a covered work under sections 3 and 4 of this License without
being bound by section 3 of the GNU GPL.

2. Conveying Modified Versions.

If you modify a copy of the Library, and, in your modifications, a facility
refers to a function or data to be supplied by an Application that uses the
facility (other than as an argument passed when the facility is invoked),
then you may convey a copy of the modified version:

* a) under this License, provided that you make a good faith effort to ensure
that, in the event an Application does not supply the function or data, the
facility still operates, and performs whatever part of its purpose remains
meaningful, or

* b) under the GNU GPL, with none of the additional permissions of this
License applicable to that copy.

3. Object Code Incorporating Material from Library Header Files.

The object code form of an Application may incorporate material from a header
file that is part of the Library. You may convey such object code under terms
of your choice, provided that, if the incorporated material is not limited to
numerical parameters, data structure layouts and accessors, or small macros,
inline functions and templates (ten or fewer lines in length), you do both of
the following:

* a) Give prominent notice with each copy of the object code that the Library
is used in it and that the Library and its use are covered by this License.

* b) Accompany the object code with a copy of the GNU GPL and this license
document.

4. Combined Works.

You may convey a Combined Work under terms of your choice that, taken
together, effectively do not restrict modification of the portions of the
Library contained in the Combined Work and reverse engineering for debugging
such modifications, if you also do each of the following:

* a) Give prominent notice with each copy of the Combined Work that the
Library is used in it and that the Library and its use are covered by this
License.

* b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.

* c) For a Combined Work that displays copyright notices during execution,
include the copyright notice for the Library among these notices, as well as
a reference directing the user to the copies of the GNU GPL and this license
document.

* d) Do one of the following:
  o 0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form suitable for, and
under terms that permit, the user to recombine or relink the Application
with a modified version of the Linked Version to produce a modified
Combined Work, in the manner specified by section 6 of the GNU GPL for
conveying Corresponding Source.
  o 1) Use a suitable shared library mechanism for linking with the Library.
A suitable mechanism is one that (a) uses at run time a copy of the Library
already present on the user's computer system, and (b) will operate
properly with a modified version of the Library that is
interface-compatible with the Linked Version.

* e) Provide Installation Information, but only if you would otherwise be
required to provide such information under section 6 of the GNU GPL, and only
to the extent that such information is necessary to install and execute a
modified version of the Combined Work produced by recombining or relinking
the Application with a modified version of the Linked Version. (If you use
option 4d0, the Installation Information must accompany the Minimal
Corresponding Source and Corresponding Application Code. If you use option
4d1, you must provide the Installation Information in the manner specified by
section 6 of the GNU GPL for conveying Corresponding Source.)

5. Combined Libraries.

You may place library facilities that are a work based on the Library side by
side in a single library together with other library facilities that are not
Applications and are not covered by this License, and convey such a combined
library under terms of your choice, if you do both of the following:

* a) Accompany the combined library with a copy of the same work based on the
Library, uncombined with any other library facilities, conveyed under the
terms of this License.

* b) Give prominent notice with the combined library that part of it is a
work based on the Library, and explaining where to find the accompanying
uncombined form of the same work.

6. Revised Versions of the GNU Lesser General Public License.

The Free Software Foundation may publish revised and/or new versions of the
GNU Lesser General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

Each version is given a distinguishing version number. If the Library as you
received it specifies that a certain numbered version of the GNU Lesser
General Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that published version
or of any later version published by the Free Software Foundation. If the
Library as you received it does not specify a version number of the GNU
Lesser General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.

If the Library as you received it specifies that a proxy can decide whether
future versions of the GNU Lesser General Public License shall apply, that
proxy's public statement of acceptance of any version is permanent
authorization for you to choose that version for the Library.

===========================================================================

SeaChest tools for Windows utilize wingetopt
(https://github.com/alex85k/wingetopt).

getopt library for Windows compilers

This library was created to allow compilation linux-based software on Windows.
http://en.wikipedia.org/wiki/Getopt

The sources were taken from MinGW-runtime project.

AUTHORS:

Todd C. Miller Todd.Miller@courtesan.com
The NetBSD Foundation, Inc.
LICENSE

Copyright (c) 2002 Todd C. Miller <Todd.Miller@courtesan.com>

Permission to use, copy, modify, and distribute this software for any purpose
with or without fee is hereby granted, provided that the above copyright notice
and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.

Sponsored in part by the Defense Advanced Research Projects
Agency (DARPA) and Air Force Research Laboratory, Air Force
Materiel Command, USAF, under agreement number F39502-99-1-0512.
Copyright (c) 2000 The NetBSD Foundation, Inc.
All rights reserved.

This code is derived from software contributed to The NetBSD Foundation by
Dieter Baron and Thomas Klausner.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
   list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
   this list of conditions and the following disclaimer in the documentation
   and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

======================================================================

SOURCE CODE files of the opensea open source project have been made available
to you under the Mozilla Public License 2.0 (MPL).  Mozilla is the custodian of
the Mozilla Public License ("MPL"), an open source/free software license.

https://www.mozilla.org/en-US/MPL/

Mozilla Public License Version 2.0
==================================

1. Definitions
--------------

1.1. "Contributor"
    means each individual or legal entity that creates, contributes to
    the creation of, or owns Covered Software.

1.2. "Contributor Version"
    means the combination of the Contributions of others (if any) used
    by a Contributor and that particular Contributor's Contribution.

1.3. "Contribution"
    means Covered Software of a particular Contributor.

1.4. "Covered Software"
    means Source Code Form to which the initial Contributor has attached
    the notice in Exhibit A, the Executable Form of such Source Code
    Form, and Modifications of such Source Code Form, in each case
    including portions thereof.

1.5. "Incompatible With Secondary Licenses"
    means

    (a) that the initial Contributor has attached the notice described
        in Exhibit B to the Covered Software; or

    (b) that the Covered Software was made available under the terms of
        version 1.1 or earlier of the License, but not also under the
        terms of a Secondary License.

1.6. "Executable Form"
    means any form of the work other than Source Code Form.

1.7. "Larger Work"
    means a work that combines Covered Software with other material, in
    a separate file or files, that is not Covered Software.

1.8. "License"
    means this document.

1.9. "Licensable"
    means having the right to grant, to the maximum extent possible,
    whether at the time of the initial grant or subsequently, any and
    all of the rights conveyed by this License.

1.10. "Modifications"
    means any of the following:

    (a) any file in Source Code Form that results from an addition to,
        deletion from, or modification of the contents of Covered
        Software; or

    (b) any new file in Source Code Form that contains any Covered
        Software.

1.11. "Patent Claims" of a Contributor
    means any patent claim(s), including without limitation, method,
    process, and apparatus claims, in any patent Licensable by such
    Contributor that would be infringed, but for the grant of the
    License, by the making, using, selling, offering for sale, having
    made, import, or transfer of either its Contributions or its
    Contributor Version.

1.12. "Secondary License"
    means either the GNU General Public License, Version 2.0, the GNU
    Lesser General Public License, Version 2.1, the GNU Affero General
    Public License, Version 3.0, or any later versions of those
    licenses.

1.13. "Source Code Form"
    means the form of the work preferred for making modifications.

1.14. "You" (or "Your")
    means an individual or a legal entity exercising rights under this
    License. For legal entities, "You" includes any entity that
    controls, is controlled by, or is under common control with You. For
    purposes of this definition, "control" means (a) the power, direct
    or indirect, to cause the direction or management of such entity,
    whether by contract or otherwise, or (b) ownership of more than
    fifty percent (50%) of the outstanding shares or beneficial
    ownership of such entity.

2. License Grants and Conditions
--------------------------------

2.1. Grants

Each Contributor hereby grants You a world-wide, royalty-free,
non-exclusive license:

(a) under intellectual property rights (other than patent or trademark)
    Licensable by such Contributor to use, reproduce, make available,
    modify, display, perform, distribute, and otherwise exploit its
    Contributions, either on an unmodified basis, with Modifications, or
    as part of a Larger Work; and

(b) under Patent Claims of such Contributor to make, use, sell, offer
    for sale, have made, import, and otherwise transfer either its
    Contributions or its Contributor Version.

2.2. Effective Date

The licenses granted in Section 2.1 with respect to any Contribution
become effective for each Contribution on the date the Contributor first
distributes such Contribution.

2.3. Limitations on Grant Scope

The licenses granted in this Section 2 are the only rights granted under
this License. No additional rights or licenses will be implied from the
distribution or licensing of Covered Software under this License.
Notwithstanding Section 2.1(b) above, no patent license is granted by a
Contributor:

(a) for any code that a Contributor has removed from Covered Software;
    or

(b) for infringements caused by: (i) Your and any other third party's
    modifications of Covered Software, or (ii) the combination of its
    Contributions with other software (except as part of its Contributor
    Version); or

(c) under Patent Claims infringed by Covered Software in the absence of
    its Contributions.

This License does not grant any rights in the trademarks, service marks,
or logos of any Contributor (except as may be necessary to comply with
the notice requirements in Section 3.4).

2.4. Subsequent Licenses

No Contributor makes additional grants as a result of Your choice to
distribute the Covered Software under a subsequent version of this
License (see Section 10.2) or under the terms of a Secondary License (if
permitted under the terms of Section 3.3).

2.5. Representation

Each Contributor represents that the Contributor believes its
Contributions are its original creation(s) or it has sufficient rights
to grant the rights to its Contributions conveyed by this License.

2.6. Fair Use

This License is not intended to limit any rights You have under
applicable copyright doctrines of fair use, fair dealing, or other
equivalents.

2.7. Conditions

Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
in Section 2.1.

3. Responsibilities
-------------------

3.1. Distribution of Source Form

All distribution of Covered Software in Source Code Form, including any
Modifications that You create or to which You contribute, must be under
the terms of this License. You must inform recipients that the Source
Code Form of the Covered Software is governed by the terms of this
License, and how they can obtain a copy of this License. You may not
attempt to alter or restrict the recipients' rights in the Source Code
Form.

3.2. Distribution of Executable Form

If You distribute Covered Software in Executable Form then:

(a) such Covered Software must also be made available in Source Code
    Form, as described in Section 3.1, and You must inform recipients of
    the Executable Form how they can obtain a copy of such Source Code
    Form by reasonable means in a timely manner, at a charge no more
    than the cost of distribution to the recipient; and

(b) You may distribute such Executable Form under the terms of this
    License, or sublicense it under different terms, provided that the
    license for the Executable Form does not attempt to limit or alter
    the recipients' rights in the Source Code Form under this License.

3.3. Distribution of a Larger Work

You may create and distribute a Larger Work under terms of Your choice,
provided that You also comply with the requirements of this License for
the Covered Software. If the Larger Work is a combination of Covered
Software with a work governed by one or more Secondary Licenses, and the
Covered Software is not Incompatible With Secondary Licenses, this
License permits You to additionally distribute such Covered Software
under the terms of such Secondary License(s), so that the recipient of
the Larger Work may, at their option, further distribute the Covered
Software under the terms of either this License or such Secondary
License(s).

3.4. Notices

You may not remove or alter the substance of any license notices
(including copyright notices, patent notices, disclaimers of warranty,
or limitations of liability) contained within the Source Code Form of
the Covered Software, except that You may alter any license notices to
the extent required to remedy known factual inaccuracies.

3.5. Application of Additional Terms

You may choose to offer, and to charge a fee for, warranty, support,
indemnity or liability obligations to one or more recipients of Covered
Software. However, You may do so only on Your own behalf, and not on
behalf of any Contributor. You must make it absolutely clear that any
such warranty, support, indemnity, or liability obligation is offered by
You alone, and You hereby agree to indemnify every Contributor for any
liability incurred by such Contributor as a result of warranty, support,
indemnity or liability terms You offer. You may include additional
disclaimers of warranty and limitations of liability specific to any
jurisdiction.

4. Inability to Comply Due to Statute or Regulation
---------------------------------------------------

If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Software due to
statute, judicial order, or regulation then You must: (a) comply with
the terms of this License to the maximum extent possible; and (b)
describe the limitations and the code they affect. Such description must
be placed in a text file included with all distributions of the Covered
Software under this License. Except to the extent prohibited by statute
or regulation, such description must be sufficiently detailed for a
recipient of ordinary skill to be able to understand it.

5. Termination
--------------

5.1. The rights granted under this License will terminate automatically
if You fail to comply with any of its terms. However, if You become
compliant, then the rights granted under this License from a particular
Contributor are reinstated (a) provisionally, unless and until such
Contributor explicitly and finally terminates Your grants, and (b) on an
ongoing basis, if such Contributor fails to notify You of the
non-compliance by some reasonable means prior to 60 days after You have
come back into compliance. Moreover, Your grants from a particular
Contributor are reinstated on an ongoing basis if such Contributor
notifies You of the non-compliance by some reasonable means, this is the
first time You have received notice of non-compliance with this License
from such Contributor, and You become compliant prior to 30 days after
Your receipt of the notice.

5.2. If You initiate litigation against any entity by asserting a patent
infringement claim (excluding declaratory judgment actions,
counter-claims, and cross-claims) alleging that a Contributor Version
directly or indirectly infringes any patent, then the rights granted to
You by any and all Contributors for the Covered Software under Section
2.1 of this License shall terminate.

5.3. In the event of termination under Sections 5.1 or 5.2 above, all
end user license agreements (excluding distributors and resellers) which
have been validly granted by You or Your distributors under this License
prior to termination shall survive termination.

************************************************************************
*                                                                      *
*  6. Disclaimer of Warranty                                           *
*  -------------------------                                           *
*                                                                      *
*  Covered Software is provided under this License on an "as is"       *
*  basis, without warranty of any kind, either expressed, implied, or  *
*  statutory, including, without limitation, warranties that the       *
*  Covered Software is free of defects, merchantable, fit for a        *
*  particular purpose or non-infringing. The entire risk as to the     *
*  quality and performance of the Covered Software is with You.        *
*  Should any Covered Software prove defective in any respect, You     *
*  (not any Contributor) assume the cost of any necessary servicing,   *
*  repair, or correction. This disclaimer of warranty constitutes an   *
*  essential part of this License. No use of any Covered Software is   *
*  authorized under this License except under this disclaimer.         *
*                                                                      *
************************************************************************

************************************************************************
*                                                                      *
*  7. Limitation of Liability                                          *
*  --------------------------                                          *
*                                                                      *
*  Under no circumstances and under no legal theory, whether tort      *
*  (including negligence), contract, or otherwise, shall any           *
*  Contributor, or anyone who distributes Covered Software as          *
*  permitted above, be liable to You for any direct, indirect,         *
*  special, incidental, or consequential damages of any character      *
*  including, without limitation, damages for lost profits, loss of    *
*  goodwill, work stoppage, computer failure or malfunction, or any    *
*  and all other commercial damages or losses, even if such party      *
*  shall have been informed of the possibility of such damages. This   *
*  limitation of liability shall not apply to liability for death or   *
*  personal injury resulting from such party's negligence to the       *
*  extent applicable law prohibits such limitation. Some               *
*  jurisdictions do not allow the exclusion or limitation of           *
*  incidental or consequential damages, so this exclusion and          *
*  limitation may not apply to You.                                    *
*                                                                      *
************************************************************************

8. Litigation
-------------

Any litigation relating to this License may be brought only in the
courts of a jurisdiction where the defendant maintains its principal
place of business and such litigation shall be governed by laws of that
jurisdiction, without reference to its conflict-of-law provisions.
Nothing in this Section shall prevent a party's ability to bring
cross-claims or counter-claims.

9. Miscellaneous
----------------

This License represents the complete agreement concerning the subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. Any law or regulation which provides
that the language of a contract shall be construed against the drafter
shall not be used to construe this License against a Contributor.

10. Versions of the License
---------------------------

10.1. New Versions

Mozilla Foundation is the license steward. Except as provided in Section
10.3, no one other than the license steward has the right to modify or
publish new versions of this License. Each version will be given a
distinguishing version number.

10.2. Effect of New Versions

You may distribute the Covered Software under the terms of the version
of the License under which You originally received the Covered Software,
or under the terms of any subsequent version published by the license
steward.

10.3. Modified Versions

If you create software not governed by this License, and you want to
create a new license for such software, you may create and use a
modified version of this License if you rename the license and remove
any references to the name of the license steward (except to note that
such modified license differs from this License).

10.4. Distributing Source Code Form that is Incompatible With Secondary
Licenses

If You choose to distribute Source Code Form that is Incompatible With
Secondary Licenses under the terms of this version of the License, the
notice described in Exhibit B of this License must be attached.

Exhibit A - Source Code Form License Notice
-------------------------------------------

  This Source Code Form is subject to the terms of the Mozilla Public
  License, v. 2.0. If a copy of the MPL was not distributed with this
  file, You can obtain one at http://mozilla.org/MPL/2.0/.

If it is not possible or desirable to put the notice in a particular
file, then You may include the notice in a location (such as a LICENSE
file in a relevant directory) where a recipient would be likely to look
for such a notice.

You may add additional accurate notices of copyright ownership.

Exhibit B - "Incompatible With Secondary Licenses" Notice
---------------------------------------------------------

  This Source Code Form is "Incompatible With Secondary Licenses", as
  defined by the Mozilla Public License, v. 2.0.
