texhex / BiosSledgehammer

Automated BIOS, ME, TPM firmware update and BIOS settings for HP devices
Apache License 2.0
128 stars 17 forks source link

Can't update BIOS settings since BIOS manual upgrade #96

Open GregoryMachin opened 4 years ago

GregoryMachin commented 4 years ago

Hi,

I'm having an issue with an Elite X2 1012 G2 Tablet.

The Bios was manually upgraded, and then the machine was rebuilt and failed during the build on the BiosSledgeHammer step.

Initially I thought is was because HP had removed some settings, and I commented them out one after the other, then I dumped the BIOS setting and found the majority of the settings where still there.

The error is: 20 - Invalid setting name.

I then confirmed the syntax between the Settings dump and the settings I set and these where correct.

I have updated to the latest BiosSledgeHammer script. and the BCU as recommended for the script.

Here is the related error:

** BIOS Settings *** Reading settings from [C:\temp\BiosSledgehammer-master\Models\HP Elite X2 1012 G2\BIOS-Settings.txt]... Not found, looking for shared file [Shared-BIOS-Settings.txt] in same directory... Shared file found VERBOSE: Reading hashtable from C:\temp\BiosSledgehammer-master\Models\HP Elite X2 1012 G2\Shared-BIOS-Settings.txt Using settings from [C:\temp\BiosSledgehammer-master\Shared\HP Elite X2 1012 G2\BIOS-Settings.txt] VERBOSE: Reading hashtable from C:\temp\BiosSledgehammer-master\Shared\HP Elite X2 1012 G2\BIOS-Settings.txt Using password file [C:\Users\adwmaching\AppData\Local\Temp\biospassword.bin] Update BIOS setting [Thunderbolt Security Level] to [PCIe and DisplayPort - No Security]... VERBOSE: VERBOSE: Using password file C:\Users\adwmaching\AppData\Local\Temp\biospassword.bin VERBOSE: ATT: C:\Users\adwmaching\AppData\Local\Temp\BiosConfigUtility64.exe /setvalue:Thunderbolt Security Level,PCIe and DisplayPort - No Security /cpwdfile:C:\Users\user1\AppData\Local\Temp\biospassword.bin VERBOSE: === BCU Result =============================== VERBOSE:

<SETTING changeStatus="warning" name="Thunderbolt Security Level" returnCode="20">
    <OLDVALUE><![CDATA[]]></OLDVALUE>
    <VALUE><![CDATA[PCIe and DisplayPort - No Security]]></VALUE>
</SETTING>
<ERROR msg="An operation failed" />
<ERROR msg="BCU return value" real="20" translated="20" />

VERBOSE: ============================================== VERBOSE: Message: An operation failed VERBOSE: Change status: warning VERBOSE: Return code: 20 VERBOSE: Return code text: Invalid setting name

WARNING: Update BIOS setting failed with status [warning]: An operation failed WARNING: Return code [20]: Invalid setting name PS>TerminatingError(): "Changing BIOS Setting [Thunderbolt Security Level] to [PCIe and DisplayPort - No Security] failed!"

TerminatingError(): "Changing BIOS Setting [Thunderbolt Security Level] to [PCIe and DisplayPort - No Security] failed!" TerminatingError(): "Changing BIOS Setting [Thunderbolt Security Level] to [PCIe and DisplayPort - No Security] failed!" C:\temp\BiosSledgehammer-master\BiosSledgehammer.ps1 : Changing BIOS Setting [Thunderbolt Security Level] to [PCIe and DisplayPort - No Security] failed! At C:\temp\BiosSledgehammer-master\BiosSledgehammer.ps1:1024 char:13

  • throw "Changing BIOS Setting [$name] to [$value] failed!"
  • 
    at Set-BiosValuesByDictionary, C:\temp\BiosSledgehammer-master\BiosSledgehammer.ps1: line 1024
    at Update-BiosSettingsEx, C:\temp\BiosSledgehammer-master\BiosSledgehammer.ps1: line 1519
    at Update-BiosSettings, C:\temp\BiosSledgehammer-master\BiosSledgehammer.ps1: line 1420
    at <ScriptBlock>, C:\temp\BiosSledgehammer-master\BiosSledgehammer.ps1: line 3083
  • CategoryInfo : OperationStopped: (:) [Write-Error], WriteErrorException
  • FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,BiosSledgehammer.ps1 C:\temp\BiosSledgehammer-master\BiosSledgehammer.ps1 : Changing BIOS Setting [Thunderbolt Security Level] to [PCIe and DisplayPort - No Security] failed! At C:\temp\BiosSledgehammer-master\BiosSledgehammer.ps1:1024 char:13
  • throw "Changing BIOS Setting [$name] to [$value] failed!"
  • 
    at Set-BiosValuesByDictionary, C:\temp\BiosSledgehammer-master\BiosSledgehammer.ps1: line 1024
    at Update-BiosSettingsEx, C:\temp\BiosSledgehammer-master\BiosSledgehammer.ps1: line 1519
    at Update-BiosSettings, C:\temp\BiosSledgehammer-master\BiosSledgehammer.ps1: line 1420
    at <ScriptBlock>, C:\temp\BiosSledgehammer-master\BiosSledgehammer.ps1: line 3083
  • CategoryInfo : OperationStopped: (:) [Write-Error], WriteErrorException
  • FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,BiosSledgehammer.ps1

BIOS Sledgehammer finished, return code 666. Thank you, please come again! Waiting 30 seconds...


Windows PowerShell transcript end End time: 20200610144826


I added a line to check the syntax :

VERBOSE: ATT: C:\Users\adwmaching\AppData\Local\Temp\BiosConfigUtility64.exe /setvalue:Thunderbolt Security Level,PCIe and DisplayPort - No Security /cpwdfile:C:\Users\user1\AppData\Local\Temp\biospassword.bin

I'm at a lose as to how to resolve this as I can't see any indication in the above line that there is a syntax error.

I run the command manually it runs fine

c:\temp\BiosSledgehammer-master\BCU-4.0.30.1>BiosConfigUtility64.exe /setvalue:"Thunderbolt Security Level","PCIe and DisplayPort - No Security" /cpwdfile:"c:\temp\BiosSledgehammer-master\PwdFiles\biospassword.bin"

Any ideas what would cause this issue ?

texhex commented 4 years ago

I can't see anything wrong with this either, this is very strange.

However, if I see this correct, you added " in front of the values, while BIOS Sledgehammer seems to do not (at least according to your log).

Does it fail for settings that do not have a space in it as well?