This is a quick overview of how to create a default BIOS settings template that can be pushed to all Optiplex, Latitude, and Precision rebuilds. Also, it’s possible to try progressively better RAID settings in order to leave systems at the maximum potential that their BIOS offers.
Creating the CCTK Package
Please see the instructions in my previous post SCCM 2012 – Architecture Agnostic Dell CCTK WinPE Bios Package for creating the basic CCTK package. We will use this as the base, and then add a few files to it.
Creating a Template File
Here’s the template file we use. Save this as ‘Dell-CustomSettings.cctk’ in your cctk package directory. Here’s the full command-line reference: Dell CCTK Documentation.
[cctk]
chasintrusion=silentenable
bootorder=legacytype,+embnic,+hdd,+floppy,+usbdev,+cdrom
cpucore=all
cpuxdsupport=enable
embnic1=on
cstatesctrl=enable
energystarlogo=enable
fanctrlovrd=disable
integratedaudio=enable
limitcpuidvalue=off
logicproc=enable
fastboot=minimal
serial1=com1
multicpucore=enable
lptmode=disable
serrdmimsg=on
pcislots=enable
postf12key=enable
smarterrors=enable
standbystate=s3
tpm=on
tpmactivation=activate
trustexecution=on
usbctl=enable
usbportsfront=enable
usbreardual=on
usbrearquad=on
virtualization=enable
vtfordirectio=on
usbemu=enable
turbomode=enable
esataports=enable
multidisplay=enable
speedstep=automatic
Creating a CCTK Response Parse Script
This script will take the DOS errorlevel returned by CCTK, and echo out the respective human-readable error message. This message will show up in your smsts.log and on the site server’s status message logs. It’s very helpful for diagnosing bios task sequence errors.
Save the file as ‘show-cctkerrors.vbs’
'Show-Errors.vbs
'johnpuskar@gmail.com
'windowsmasher.wordpress.com
'This script maps dos %errorlevel% into a human readable error from the dell CCTK utilities, and write it to the screen.
Dim arrMessages(254)
arrMessages(0) = "Success."
arrMessages(1) = "Attempt to read write-only parameter '%s'."
arrMessages(2) = "Password cannot exceed 16 characters."
arrMessages(3) = "A BMC was either not detected or is not supported."
arrMessages(4) = "This username is already in use. Enter a unique username."
arrMessages(5) = "Access mode not supported."
arrMessages(6) = "Cannot return number of requested data bytes."
arrMessages(7) = "User ID 1 cannot be assigned a username."
arrMessages(8) = "Cannot execute duplicated request."
arrMessages(9) = "There was an error clearing the SEL."
arrMessages(10) = "Clear SEL cannot be accompanied with any other option."
arrMessages(11) = "racreset cannot be accompanied with any other option."
arrMessages(12) = "Cannot execute command. Command, or request parameter(s), not supported in present state."
arrMessages(13) = "Command not supported on given channel."
arrMessages(14) = "The community string may only contain printable ASCII characters."
arrMessages(15) = "Destination unavailable. Cannot deliver request to selected destination."
arrMessages(16) = "Cannot execute command. Insufficient privilege level."
arrMessages(17) = "Command illegal for specified sensor or record type."
arrMessages(18) = "Invalid commstring value."
arrMessages(19) = "Hardware subsystem error. Invalid data field in Request."
arrMessages(20) = "Invalid destination IP address."
arrMessages(21) = "The GUID is invalid."
arrMessages(22) = "Invalid gateway."
arrMessages(23) = "Invalid hostname."
arrMessages(24) = "Invalid IP address."
arrMessages(25) = "Invalid DNS IP address."
arrMessages(26) = "Invalid sub net mask."
arrMessages(27) = "Invalid value for PEF. PEF value should be between 1 and 16."
arrMessages(28) = "Reservation Canceled or Invalid Reservation ID."
arrMessages(29) = "Invalid Time to live value."
arrMessages(30) = "Invalid VLANID value."
arrMessages(31) = "Invalid Command. Used to indicate an unrecognized or unsupported command."
arrMessages(32) = "Command invalid for given LUN."
arrMessages(33) = "Load defaults cannot be accompanied with any other option."
arrMessages(34) = "There was an error loading the defaults."
arrMessages(35) = "Node Busy. Command could not be processed because command processing resources are temporarily unavailable."
arrMessages(36) = "Out of space. Command could not be completed because of a lack of storage space required to execute the given command operation."
arrMessages(37) = "This parameter is not supported."
arrMessages(38) = "Parameter out of range. One or more parameters in the data field of the Request are out of range."
arrMessages(39) = "The password may only contain printable ASCII characters."
arrMessages(40) = "Password test failed."
arrMessages(41) = "Requested data length invalid."
arrMessages(42) = "Requested data field length limit exceeded."
arrMessages(43) = "Requested Sensor, data, or record not present."
arrMessages(44) = "Request data truncated."
arrMessages(45) = "Command response could not be provided."
arrMessages(46) = "Command response could not be provided. BMC initialization or initialization agent in progress."
arrMessages(47) = "Command response could not be provided. Device in firmware update mode."
arrMessages(48) = "Command response could not be provided. SDR Repository in update mode."
arrMessages(49) = "Cannot execute command, SEL erase in progress."
arrMessages(50) = "Attempt to set the 'set in progress' value when not in the 'set in complete' state."
arrMessages(51) = "The SOL character 'accumulate interval' is invalid."
arrMessages(52) = "The SOL character 'send threshold' is invalid."
arrMessages(53) = "The SOL 'retry interval' is invalid."
arrMessages(54) = "Command completed successfully."
arrMessages(55) = "Timeout while processing command. Response unavailable."
arrMessages(56) = "Unspecified error."
arrMessages(57) = "The password may only contain printable ASCII characters."
arrMessages(58) = "Username cannot exceed 16 characters."
arrMessages(59) = "Invalid VLANID value. Enter in 'dddd' format."
arrMessages(60) = "Attempt to write read-only parameter '%s'."
arrMessages(61) = "BMC is busy."
arrMessages(62) = "Response data did not return successfully."
arrMessages(63) = "BMC time out error."
arrMessages(64) = "Invalid Configuration Option."
arrMessages(65) = "Cannot execute command.Parameter is illegal because command sub-function has been disabled or is unavailable."
arrMessages(66) = "Option '%s' requires an argument."
arrMessages(67) = "The asset tag for this system is not available."
arrMessages(68) = "The asset tag cannot be more than 10 characters long."
arrMessages(69) = "The required BIOS interfaces cannot be found on this system."
arrMessages(70) = "The BIOS version information is not available."
arrMessages(71) = "There is not enough free system memory to complete the BIOS update."
arrMessages(72) = "The BIOS update file version is a different version class (A00, X00) than the current system BIOS. Use the --force option to use this BIOS image."
arrMessages(73) = "The BIOS update file version is older than the current system bios. Use the --force option to use this BIOS image."
arrMessages(74) = "The BIOS update file version is identical to the current system bios. Use the --force option to use this BIOS image."
arrMessages(75) = "The sequence list must be a comma-separated numerical list of valid unique boot device numbers (ex: 2, 1, 3)."
arrMessages(76) = "The sequence list must be a comma-separated list of valid unique device names (ex: nic.emb.1, hdd.emb.1) or a comma-separated numerical list of valid unique boot device numbers (ex: 2, 1, 3)."
arrMessages(77) = "There was an error setting the sequence."
arrMessages(78) = "The list is not formatted correctly. See the help for more details."
arrMessages(79) = "The size of returned buffer is larger than the size of allocated buffer."
arrMessages(80) = "There was a problem getting the state byte."
arrMessages(81) = "The state byte is not available on this system."
arrMessages(82) = "There was a problem setting the state byte."
arrMessages(83) = "The state byte must be a value between 0 and 255 decimal."
arrMessages(84) = "The CPU information is not available."
arrMessages(85) = "The dependent option '%s' required for this subcommand is missing in the command line."
arrMessages(86) = "Duplicate sub command '%s' has been entered."
arrMessages(87) = "The script file does contain not a valid DTK environment script signature. (%s)"
arrMessages(88) = "The format of the environment variable is incorrect."
arrMessages(89) = "The --envar/-s option can only be used for a single option."
arrMessages(90) = "The --envar/-s option can only be used for report operations."
arrMessages(91) = "The individual sub commands should be specified for the -s option."
arrMessages(92) = "Getting external serial connector settings failed."
arrMessages(93) = "Setting external serial connector settings failed."
arrMessages(94) = "There was an error opening the file %s."
arrMessages(95) = "File '%s' does not have write permission."
arrMessages(96) = "The file contains invalid option '%s'."
arrMessages(97) = "The replication information does not match for this system."
arrMessages(98) = "There can only be one section in the input file."
arrMessages(99) = "Bad ini file, the section (%s) cannot be found."
arrMessages(100) = "The format of the bios image file is incorrect."
arrMessages(101) = "Report operations and set operations must be separate."
arrMessages(102) = "Help is not available for the option '%s'."
arrMessages(103) = "The -x (--hex) option can only be used with -b or -r."
arrMessages(104) = "Input file '%s' not found."
arrMessages(105) = "Input file '%s' cannot be read."
arrMessages(106) = "Invalid argument for option '%s'."
arrMessages(107) = "Function table lookup error."
arrMessages(108) = "The machine ID was not found in the file '%s'."
arrMessages(109) = "The system memory information is not available."
arrMessages(110) = "Mode can only be used with the --pci option."
arrMessages(111) = "The device name or index must be present in the boot order."
arrMessages(112) = "The output file '%s' could not be opened. Please make sure the path exists and the media is not write protected."
arrMessages(113) = "Could not write to output file, disk may be full."
arrMessages(114) = "The current password must be supplied with a new password using --valsyspwd."
arrMessages(115) = "The current password must be supplied with a new password using --valsetuppwd."
arrMessages(116) = "The current password can only be supplied when setting a new password."
arrMessages(117) = "Actions are not allowed for this filter. Only alerts are allowed."
arrMessages(118) = "There was an error getting the option '%s'."
arrMessages(119) = "The option '%s' is not available or cannot be configured through software."
arrMessages(120) = "There was an error setting the option '%s'."
arrMessages(121) = "The -n (--namefile) option can only be used with --pci."
arrMessages(122) = "The password may only contain alphanumeric characters."
arrMessages(123) = "The BIOS passwords have been disabled via jumper."
arrMessages(124) = "The password length must be between 1 and 32."
arrMessages(125) = "This password is locked and can only be unlocked by the admin user."
arrMessages(126) = "There was an error setting the password."
arrMessages(127) = "The LCD string length must be between 1 and %s."
arrMessages(128) = "The LCD string may only contain alphanumeric characters."
arrMessages(129) = "There was an error setting the LCD string."
arrMessages(130) = "The second channel can only be set if the RAID controller is set to RAID."
arrMessages(131) = "The set operation, '%s', requires sub commands."
arrMessages(132) = "The service tag for this system is not available."
arrMessages(133) = "The system ID value is not available."
arrMessages(134) = "The system information string is not available."
arrMessages(135) = "A system error has occured."
arrMessages(136) = "Usage error."
arrMessages(137) = "The uuid information is not present on this system."
arrMessages(138) = "The manufacturing/first-power-on date information is not present on this system."
arrMessages(139) = "Version cannot be accompanied with any other option."
arrMessages(140) = "The self-identify blinker timer should be set to 0..255 second(s)."
arrMessages(141) = "Encrypt key is too long. 142. Encrypt key is invalid, accepted characters are 0 to 9 or A to F."
arrMessages(142) = "Undefined"
arrMessages(143) = "Parameter has been temporarily disabled due to a dependancy on other settings."
arrMessages(144) = "The old password supplied is incorrect. The new password will not be set. Please try again."
arrMessages(145) = "Cannot stat /etc/omreg.cfg file. Please ensure /etc/omreg.cfg file is present and is valid for your environment. You can copy this file from the DTK iso."
arrMessages(146) = "Getting nicselection settings failed."
arrMessages(147) = "HAPI Driver Load Error."
arrMessages(148) = "Filter action power reduction is only supported for the system power warn/fail filters."
arrMessages(149) = "TPM Clear settings requires setup password."
arrMessages(150) = "There is currently no TPM Clear request pending."
arrMessages(151) = "Password is not required for retrieving the TPM options."
arrMessages(152) = "Setup password is required for setting the TPM options."
arrMessages(153) = "Invalid Password override."
arrMessages(154) = "Invalid TPM set option."
arrMessages(155) = "There was an error setting the TPM option."
arrMessages(156) = "There is no setup password installed on this system."
arrMessages(157) = "The setup password supplied is incorrect. Please try again."
arrMessages(158) = "Profile should be custom for setting cpupowermode, memorypowermode and fanmode."
arrMessages(159) = "There was an error setting the Power Option."
arrMessages(160) = "The power cap value entered is out of range. Please try again."
arrMessages(161) = "The power cap value entered must be between 0 to 100 if unit is percent."
arrMessages(162) = "Invalid IPv6 address. The IPv6 address cannot be link-local or multicast."
arrMessages(163) = "Invalid IPv6 address. The IPv6 address specified has incorrect address format."
arrMessages(164) = "Invalid IPv6 address. The gateway address specified has incorrect address format."
arrMessages(165) = "Invalid IPv6 address. The Primary DNS server address specified has incorrect address format."
arrMessages(166) = "Invalid IPv6 address. The Secondary DNS server address specified has incorrect address format."
arrMessages(167) = "Invalid IPv6 address. The gateway address specified is invalid."
arrMessages(168) = "Invalid configuration. Attempting to apply IPv6 configuration on a non supported platform."
arrMessages(169) = "Invalid IPv6 configuration. Attempt to set DNS server address manually while DNS address source is set to auto."
arrMessages(170) = "Invalid IPv6 configuration. Attempt to set IPv6 address manually while IPv6 address source is set to auto."
arrMessages(171) = "Invalid IPv6 configuration. Attempting to apply IPv6 configuration without loading IPv6 stack."
arrMessages(172) = "Invalid IPv4 configuration. Attempting to apply IPv4 configuration with IPv4 disabled."
arrMessages(173) = "Invalid IPv6 configuration. Ipv6 address cannot be specified without specifying prefix-length."
arrMessages(174) = "Invalid IPv6 configuration. dnssrcv6 cannot be set to auto when ipsrcv6 is set to manual."
arrMessages(175) = "Error while executing IPMI Set command."
arrMessages(176) = "Error while executing IPMI Get command."
arrMessages(177) = "Error during Trap Alert."
arrMessages(178) = "Unspecified error."
arrMessages(179) = "Unsupported device. Re-try with supported device"
arrMessages(180) = "Setup password is required. Re-try providing setup/admin password"
arrMessages(181) = "System password is required. Re-try providing system password"
arrMessages(182) = "The password supplied is incorrect. Please try again."
arrMessages(183) = "Password verification failed."
arrMessages(184) = "User input password does not fit system requirement."
arrMessages(185) = "Password not installed in the system."
arrMessages(186) = "password status is disabled."
arrMessages(187) = "Error in Validation."
arrMessages(188) = "Error in Setting the Value."
arrMessages(189) = "SMI call (10-0) only supports password no more than %d characters."
arrMessages(190) = "This is not a Dell machine. CCTK supports only Dell machines."
arrMessages(191) = "Setup Password is required to change the setting. Use --valsetuppwd to provide password."
arrMessages(192) = "System Password is required to change the setting. Use --valsyspwd to provide password."
arrMessages(193) = "Password is not Installed. so use only --setuppwd"
arrMessages(194) = "Password is not Installed. so use only --syspwd"
arrMessages(195) = "The system password supplied is incorrect. Please try again."
arrMessages(196) = "The Sequence list must be a comma-separated list of valid unique device names (ex: hdd,cdrom)."
arrMessages(197) = "The system revision information is not available for this system."
arrMessages(198) = "The completion code information is not available for this system."
arrMessages(199) = "The BIOS characteristics information is not available for this system."
arrMessages(200) = "The password should not contain special characters."
arrMessages(201) = "Please use 64-bit version of this application."
arrMessages(202) = "%s cannot be modified when TPM is OFF."
arrMessages(203) = "System password cannot be set when pwdlock option is in locked state (pwdlock=lock)."
arrMessages(204) = "adddevice option not supported by this machine's BIOS"
arrMessages(205) = "usb device already present in this machine."
arrMessages(206) = "Unable to get information from BIOS."
arrMessages(207) = "%s - Error : Unable to store BIOS information."
arrMessages(208) = "Duplicate entry found in the input list : %s , Operation Aborted."
arrMessages(209) = "Typo found in the input list : %s , Operation Aborted."
arrMessages(210) = "Asset tag can have only printable ASCII characters."
arrMessages(211) = "Multiple inputs will not be accepted."
arrMessages(212) = "Invalid Hex format."
arrMessages(213) = "Hex value range should be 0x0 to 0xffff."
arrMessages(214) = "%s - Only positive numeric values are acceptable."
arrMessages(215) = "%s - Length cannot exceed two characters."
arrMessages(216) = "Range for autoon hour value should be 0 to 23(24 hour format)."
arrMessages(217) = "Range for autoon minute value should be 0 to 59."
arrMessages(218) = "This Option Not supported on UEFI Bios."
arrMessages(219) = "Unable to Set Bootorder."
arrMessages(220) = "Invalid Arguments. Unable to Set Bootorder."
arrMessages(221) = "%s should not combine with other suboptions."
arrMessages(222) = "The property ownership tag for this system is not available."
arrMessages(223) = "The property ownership tag cannot be more than 80 characters for non portable machines."
arrMessages(224) = "The property ownership tag is limited to 48 characters for portable systems."
arrMessages(225) = "Property ownership tag can have only printable ASCII characters."
arrMessages(226) = "Error in Setting the Value. Note: In some machines, If System password is set, you can't set Setup password."
arrMessages(227) = "'admin/root' privileges required to execute this application."
arrMessages(228) = "The option related BIOS information is not available in this machine."
arrMessages(229) = "Improper Output from Bios. Please try again."
arrMessages(230) = "Error in Bootorder."
arrMessages(231) = "The manufacturing/first-power-on date information is not present on this system."
arrMessages(232) = "Not Applicable."
arrMessages(233) = "Uefi bootlisttype is not supported in this Machine."
arrMessages(234) = "Improper Output from Bios. Please try again."
arrMessages(235) = "Error in Bootorder."
arrMessages(236) = "Unable to get information specific to machine."
arrMessages(237) = "The input file is invalid."
arrMessages(238) = "No Status Present."
arrMessages(239) = "File Do not have configurable Options."
arrMessages(240) = "Please provide the days to enable."
arrMessages(241) = "Password is not Installed. Please try again without providing --val%s"
arrMessages(242) = "Please provide the old password to set the new password using --valownerpwd."
arrMessages(243) = "The owner password is incorrect. Please try again."
arrMessages(244) = "Error in setting the value. Note : Setup or system password might be set on the system. Clear the password(s) and try again."
arrMessages(245) = "Owner password is not supported in file operations."
arrMessages(246) = "Password operation is not supported on the system."
arrMessages(247) = "The owner of the system has enabled the Owner Access feature. To set the Bios configuration, create setup or system password."
arrMessages(248) = "Either the system hardware or the BIOS version does not support the option. To resolve the BIOS version issue, upgrade the BIOS to the latest version."
arrMessages(249) = "Unable to get password information."
Dim cctkError, msg, bArgOK
bArgOK = vbFalse
On Error Resume Next
cctkError = CInt(Wscript.Arguments(0))
If WScript.Arguments.Count = 1 Then
If cctkError <> "" Then
bArgOK = vbTrue
End If
End If
If bArgOK = True Then
msg = "CCTK Returned message: """ & arrMessages(cctkError) & """"
Wscript.Echo msg
Wscript.Quit(cctkError)
Else
Wscript.Echo "The script input was invalid."
Wscript.Quit(1)
End If
Creating a CCTK Script
This script will enable and activate the TPM if possible, set the SATA level to it’s highest supported setting, then import the template file. Save it as CCTK-Default.cmd.
@ECHO OFF
REM Parse Arguments
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
SET ARGV=.%*
CALL :PARSE_ARGV
IF ERRORLEVEL 1 (
ECHO Cannot parse arguments
ENDLOCAL
EXIT /B 1
)
REM ---START MAIN LOOP---
ECHO == Seting BIOS Settings ==
REM Determine Arch
IF "%PROCESSOR_ARCHITECTURE%" == "AMD64" GOTO :X64
GOTO X86
:X64
COPY /Y Dell-CustomSettings.cctk .\x64 >NUL
SET CCTKPath="x64"
GOTO RunCCTK
:X86
COPY /Y Dell-CustomSettings.cctk .\x86 >NUL
SET CCTKPath="x86"
GOTO RunCCTK
:RunCCTK
ECHO --Enabling TPM
%CCTKPath%\cctk.exe --tpm=on !ARG1! !ARG2!
cscript.exe //nologo Show-CCTKErrors.vbs %errorlevel%
IF errorlevel 157 GOTO END
ECHO --Activating TPM
%CCTKPath%\cctk.exe --tpmactivation=activate !ARG1! !ARG2!
cscript.exe //nologo Show-CCTKErrors.vbs %errorlevel%
ECHO --Attempting to set ATA sata mode
%CCTKPath%\cctk.exe --embsataraid=ata !ARG1! !ARG2!
cscript.exe //nologo Show-CCTKErrors.vbs %errorlevel%
ECHO --Attempting to set AHCI sata mode
%CCTKPath%\cctk.exe --embsataraid=ahci !ARG1! !ARG2!
cscript.exe //nologo Show-CCTKErrors.vbs %errorlevel%
ECHO --Attempting to set RAID ON sata mode
%CCTKPath%\cctk.exe --embsataraid=raid !ARG1! !ARG2!
cscript.exe //nologo Show-CCTKErrors.vbs %errorlevel%
ECHO --Enabling other features
%CCTKPath%\cctk.exe -i Dell-CustomSettings.cctk !ARG1! !ARG2!
cscript.exe //nologo Show-CCTKErrors.vbs %errorlevel%
GOTO END
REM ---END MAIN LOOP---
:PARSE_ARGV
REM ref: http://skypher.com/index.php/2010/08/17/batch-command-line-arguments/
SET PARSE_ARGV_ARG=[]
SET PARSE_ARGV_END=FALSE
SET PARSE_ARGV_INSIDE_QUOTES=FALSE
SET /A ARGC = 0
SET /A PARSE_ARGV_INDEX=1
:PARSE_ARGV_LOOP
CALL :PARSE_ARGV_CHAR !PARSE_ARGV_INDEX! "%%ARGV:~!PARSE_ARGV_INDEX!,1%%"
IF ERRORLEVEL 1 (
EXIT /B 1
)
IF !PARSE_ARGV_END! == TRUE (
EXIT /B 0
)
SET /A PARSE_ARGV_INDEX=!PARSE_ARGV_INDEX! + 1
GOTO :PARSE_ARGV_LOOP
:PARSE_ARGV_CHAR
IF ^%~2 == ^" (
SET PARSE_ARGV_END=FALSE
SET PARSE_ARGV_ARG=.%PARSE_ARGV_ARG:~1,-1%%~2.
IF !PARSE_ARGV_INSIDE_QUOTES! == TRUE (
SET PARSE_ARGV_INSIDE_QUOTES=FALSE
) ELSE (
SET PARSE_ARGV_INSIDE_QUOTES=TRUE
)
EXIT /B 0
)
IF %2 == "" (
IF !PARSE_ARGV_INSIDE_QUOTES! == TRUE (
EXIT /B 1
)
SET PARSE_ARGV_END=TRUE
) ELSE IF NOT "%~2!PARSE_ARGV_INSIDE_QUOTES!" == " FALSE" (
SET PARSE_ARGV_ARG=[%PARSE_ARGV_ARG:~1,-1%%~2]
EXIT /B 0
)
IF NOT !PARSE_ARGV_INDEX! == 1 (
SET /A ARGC = !ARGC! + 1
SET ARG!ARGC!=%PARSE_ARGV_ARG:~1,-1%
IF ^%PARSE_ARGV_ARG:~1,1% == ^" (
SET ARG!ARGC!_=%PARSE_ARGV_ARG:~2,-2%
SET ARG!ARGC!Q=%PARSE_ARGV_ARG:~1,-1%
) ELSE (
SET ARG!ARGC!_=%PARSE_ARGV_ARG:~1,-1%
SET ARG!ARGC!Q="%PARSE_ARGV_ARG:~1,-1%"
)
SET PARSE_ARGV_ARG=[]
SET PARSE_ARGV_INSIDE_QUOTES=FALSE
)
EXIT /B 0
:END
ENDLOCAL
EXIT /B %errorlevel%
Save these files in your dell-cctk package, then create a ‘run command-line’ task sequence action linked to the package. The command should be ‘CCTK-Generic.cmd’. Good luck!