Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lenovo new bios mode #22

Open
Muri-dk opened this issue Oct 12, 2022 · 16 comments
Open

Lenovo new bios mode #22

Muri-dk opened this issue Oct 12, 2022 · 16 comments

Comments

@Muri-dk
Copy link

Muri-dk commented Oct 12, 2022

Hi there
New type of bios on Lenovo T14 Gen 3/T16 Gen 1. Invoke-LenovoBIOSUpdate.ps1 does not recognize WINUTPT64.exe because it does not exist, I try to rename existing WINUTPT.exe to WINUTPT64.exe but it does not work. Can anyone figure it out?

File structure of bios:
Bios_T14_G3

@xyzSaft
Copy link

xyzSaft commented Oct 14, 2022

Hi, I have the same problem on X13 Gen 3. It looks like Lenovo is going to use another .exe file in the future but is not available in the BIOS packages I have checked so far. It would be nice if the Invoke-LenovoBIOSUpdate.ps1 could be updated to work with the new "WinPEuptp.exe" file (when Lenovo releases it).

https://forums.lenovo.com/t5/Enterprise-Client-Management/Missing-WINUPTP64-exe-from-L14-T14-Gen-3-BIOS/m-p/5171737?page=1#5768692

@Muri-dk
Copy link
Author

Muri-dk commented Oct 14, 2022

I also ran into that link, bad from Lenovo they should inform in Readme file for bios file, that winuptp.exe wont work in Winpe. I have spend a few day to figure out the problem.

@Nitr0Guy
Copy link

We are encountering the same "issue" on Lenovo X1 Carbon Gen 10, is there any timeline for this issue to be addressed ?

@Muri-dk
Copy link
Author

Muri-dk commented Nov 21, 2022

We are encountering the same "issue" on Lenovo X1 Carbon Gen 10, is there any timeline for this issue to be addressed ?

From Lenovo forum: https://forums.lenovo.com/t5/Enterprise-Client-Management/Missing-WINUPTP64-exe-from-L14-T14-Gen-3-BIOS/m-p/5171737?page=1#5779523
"The latest version of the WINUPTP tool was given a modern user interface using WPF which unfortunately is not supported in WinPE. A new release of that tool has been made which will include a new file: WinPEuptp.exe. This file will work in a WinPE 64-bit environment. Normally the next release of a model's BIOS update will pick up the new tool and include the new file. We will look into when that will be for L14 and T14 and expedite if necessary."

Get latest bios from download site, your model is supported now.
Change your TS like below.
billede

Make copy of lenovo bios script and rename like this.
billede

Change for new lenovo bios script to use WinPEUPTP.exe
billede

Make wmi queries in TS to use the old lenovo bios script and new lenovo bios script to update bios for the correct lenovo model.

@Nitr0Guy
Copy link

Thank you so much ! @Muri-dk

@keniem
Copy link

keniem commented Feb 5, 2023

This issue can be easily resolved by making the modification to line 129 in the code as specified. No additional changes are required.

$WinUPTPUtility = Get-ChildItem -Path $Path -Filter "*.exe" -Recurse | Where-Object { $_.Name -like "WinUPTP64.exe" -or $_.Name -like "WINPEUPTP.EXE" } | Select-Object -First 1 -ExpandProperty FullName

@JustFixItNow
Copy link

Big thanks to Keniem for getting me on the right track, only issue with that simple solution is that it does not work in the live OS. So if you also use it to update already running machines it will fail.

Another issue is that the WinPE file is missing from most BIOS packages I've tried .. and have had a case with Lenovo support for a while now. Finally got the file today... but this issue is soooo F*****ing dumb, why even change the BIOS packages and why add the new winPE file sometimes .. other times just forget it... DUUUUMB!!

Anyhow, I've added a permanent fix to the script with a new switch -PXE that needs to be added to the TS for it to run in winPE mode and I've also added some more code so it will prefer the WinUPTP64(if it's there) when running in the live OS.

As you can see on the below image, you just add the -PXE switch to your windows installtion TS and just don't add it to the update TS if you use it.
image

So how to use the new modifications is rather easy.

  1. Replace old script(remove the _v2 from the file..)
  2. The WINPEUPTP.exe file just needs to be pasted into one of the new BIOS packages mysteriously missing it...(Thanks Lenovo...)
  3. Change your TS that installs windows so it has the -PXE switch in it.
  4. Done

If you use it and find any bugs, do let me know! I've moved this to production in my setup, as did not find anything out of order.
I've uploaded the changed script and the WINPEUPTP file as a zip so everyone can still run in winPE, I take no credit for the script... but who knows when there will be an official fix.
Invoke-LenovoBIOSUpdate_V2.zip

@bao86
Copy link

bao86 commented Feb 20, 2023

Big thanks to Keniem for getting me on the right track, only issue with that simple solution is that it does not work in the live OS. So if you also use it to update already running machines it will fail.

Another issue is that the WinPE file is missing from most BIOS packages I've tried .. and have had a case with Lenovo support for a while now. Finally got the file today... but this issue is soooo F*****ing dumb, why even change the BIOS packages and why add the new winPE file sometimes .. other times just forget it... DUUUUMB!!

Anyhow, I've added a permanent fix to the script with a new switch -PXE that needs to be added to the TS for it to run in winPE mode and I've also added some more code so it will prefer the WinUPTP64(if it's there) when running in the live OS.

As you can see on the below image, you just add the -PXE switch to your windows installtion TS and just don't add it to the update TS if you use it. image

So how to use the new modifications is rather easy.

1. Replace old script(remove the _v2 from the file..)

2. The WINPEUPTP.exe file just needs to be pasted into one of the new BIOS packages mysteriously missing it...(Thanks Lenovo...)

3. Change your TS that installs windows so it has the -PXE switch in it.

4. Done

If you use it and find any bugs, do let me know! I've moved this to production in my setup, as did not find anything out of order. I've uploaded the changed script and the WINPEUPTP file as a zip so everyone can still run in winPE, I take no credit for the script... but who knows when there will be an official fix. Invoke-LenovoBIOSUpdate_V2.zip

Hello,
Thanks for sharing 👍
I got error when using your fix (WinPEUPTP error code -1) when i'm trying to update bios on T14 Gen 3 (Intel Processor).
I launch the update step after The partition Step.
Any idea ?

@JustFixItNow
Copy link

Can you send a screen of the Invoke-lenovoBIOSupdate step? I think you're either missing the parameter or might be a typo.

Also I usually run mine after the Drivers(after windows has been applied) but before the config manager installs and restarts. So still WinPE

@bao86
Copy link

bao86 commented Feb 21, 2023

image
image

This is the parameters : -PXE -Path '%ASPackageLocation01%'

Should I put the Update BIOS step elsewhere like this ?

image

@JustFixItNow
Copy link

Have you changed the previous script to spit out %ASPackageLocation01% as a value? Also I think your issue might be the " '' " around your variable.

@JustFixItNow
Copy link

As a side note, I have mine after the Drivers yes. No reason not to. It needs to reboot soon after anyhow. So less reboots overall.

@bao86
Copy link

bao86 commented Feb 21, 2023

image
Don't know why i'm getting exitcode -1 from winPEuptp process.
The BIOS Update step was run Before "Installation of Drivers" Step and After "Applying Windows Image"

The value of %ASPackageLocation01% seems correct.
image

I will try with that this afternoon :
"BIOS Update" step run after "Drivers" Step

@JustFixItNow
Copy link

Oh I tought you were getting the -1 error code from powershell in the TS. If it's from the actual BIOS log it's usually means the BIOS is already up to date.

But it looks like the script is working. There's a lot of custom stuff going on in your TS not standard to the MSendpoint documentation.. so I don't really know about the variables and the custom download script you got going :(
Normally you would have Invoke-CMDownloadBIOSPackage.ps1 checking through the SCCM for BIOS packages and then returning 1 package, then adding the path to the %OSDBIOSPackage01% variable.

As you're running something 100% custom I can't really say what might go wrong, but I would check if the BIOS even needs updating on the machine you're trying to test on :)

@bao86
Copy link

bao86 commented Feb 21, 2023

You were right .... The machine has already the lastest bios version :/ Dummy LENOVO, there is multiple BIOS Type for 1 modele ...
image

@JustFixItNow
Copy link

JustFixItNow commented May 25, 2023

Just a quick update, found some wierd inconsitancy with older gen 2 BIOS upgrades in PXE... not sure why, but it seems to get stuck. So I made an update.. not pretty put it works. It now looks for WinUPTP64.exe before explicitly choosing witch BIOS format to use, the new or the old.

This has fixed the getting stuck issue for me :) let me know if anyone finds any other issues.. as it seems we won't be getting any official fixes...
Invoke-LenovoBIOSUpdate_V3.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants