A state file is created by running the installer without installing the software. As you proceed through the pages of the installer, your answers are captured and a state file is generated. When you complete the installation, the state file is available in the location that you specified. You can generate the state file by running either the graphical interface installer or the text-based interface installer. The -no option is used so no software is installed.
To create a state file using the graphical interface:
./installer -no -saveState statefile_path
To create a state file using the text-based interface:
./installer -no -nodisplay -saveState statefile_path