coderobe / VBiosFinder

Extract embedded VBIOS from (almost) any BIOS Update
GNU Affero General Public License v3.0
129 stars 21 forks source link

Thinkpad T440p "can't determine vbios type" #16

Closed norbertogriffiths closed 5 years ago

norbertogriffiths commented 5 years ago

Hello,

Thanks for creating this tool.

I'm trying to use it to extract the VBIOS of the GT730m in the Thinkpad T440p. Unfortunately, no matter how I try it, it fails with "can't determine vbios type" (It says it succeeded, but the output folder only contains the input file).

Lenovo offers an updater from within Windows and a standalone bootable updater. Here is the result of each:

https://download.lenovo.com/pccbbs/mobiles/gluj41us.exe

output will be stored in '/VBiosFinder/tmp-vbiosfinder'
checking for ruby... yes

checking for innoextract... yes
checking for upx... yes
checking for 7z... yes
trying to extract ./gluj41us.exe
found innoextract archive
Extracting "version 2.53 (GLET99WW)" - setup data version 5.5.7
 - "app/WINUPTP.EXE" - overwritten
 - "app/WINUPTP.EXE"
 - "app/306C1.PAT"
 - "app/306C2.PAT"
 - "app/306C3.PAT"
 - "app/40650.PAT"
 - "app/40651.PAT"
 - "app/BCP.evs"
 - "app/BIOS_LOGO.TXT"
 - "app/chklghd2.exe"
 - "app/chklogo.exe"
 - "app/chklogo.exe.config"
 - "app/WinFlash32.exe"
 - "app/WinFlash32s.exe"
 - "app/WinFlash64.exe"
 - "app/WinFlash64s.exe"
 - "app/wininfo.exe"
 - "app/wininfo64.exe"
 - "app/WINUPTP64.EXE"
 - "app/32bit/tpnflhlp.sys"
 - "app/64bit/tpnflhlp.sys"
 - "app/GLET99WW/$01E0000.FL1"
 - "app/GLET99WW/$01E0000.FL2"
Done.
trying to extract ./app/306C1.PAT
trying to extract ./app/306C2.PAT
trying to extract ./app/306C3.PAT
trying to extract ./app/32bit/tpnflhlp.sys
trying to extract ./app/40650.PAT
trying to extract ./app/40651.PAT
trying to extract ./app/64bit/tpnflhlp.sys
trying to extract ./app/BCP.evs
trying to extract ./app/BIOS_LOGO.TXT
trying to extract ./app/GLET99WW/$01E0000.FL1
trying to extract ./app/GLET99WW/$01E0000.FL2
trying to extract ./app/WINUPTP.EXE
trying to extract ./app/WINUPTP64.EXE
trying to extract ./app/WinFlash32.exe
trying to extract ./app/WinFlash32s.exe
trying to extract ./app/WinFlash64.exe
trying to extract ./app/WinFlash64s.exe
trying to extract ./app/chklghd2.exe
trying to extract ./app/chklogo.exe
trying to extract ./app/chklogo.exe.config
trying to extract ./app/wininfo.exe
trying to extract ./app/wininfo64.exe
extracting uefi data
trying to extract ./app/306C1.PAT
found UEFIExtract archive
trying to extract ./app/306C2.PAT
found UEFIExtract archive
trying to extract ./app/306C3.PAT
found UEFIExtract archive
trying to extract ./app/32bit/tpnflhlp.sys
found UEFIExtract archive
trying to extract ./app/40650.PAT
found UEFIExtract archive
trying to extract ./app/40651.PAT
found UEFIExtract archive
trying to extract ./app/64bit/tpnflhlp.sys
found UEFIExtract archive
trying to extract ./app/BCP.evs
found UEFIExtract archive
trying to extract ./app/BIOS_LOGO.TXT
found UEFIExtract archive
trying to extract ./app/GLET99WW/$01E0000.FL1
found UEFIExtract archive
trying to extract ./app/GLET99WW/$01E0000.FL2
found UEFIExtract archive
trying to extract ./app/WINUPTP.EXE
found UEFIExtract archive
trying to extract ./app/WINUPTP64.EXE
found UEFIExtract archive
trying to extract ./app/WinFlash32.exe
found UEFIExtract archive
trying to extract ./app/WinFlash32s.exe
found UEFIExtract archive
trying to extract ./app/WinFlash64.exe
found UEFIExtract archive
trying to extract ./app/WinFlash64s.exe
found UEFIExtract archive
trying to extract ./app/chklghd2.exe
found UEFIExtract archive
trying to extract ./app/chklogo.exe
found UEFIExtract archive
trying to extract ./app/chklogo.exe.config
found UEFIExtract archive
trying to extract ./app/wininfo.exe
found UEFIExtract archive
trying to extract ./app/wininfo64.exe
found UEFIExtract archive
trying to extract ./gluj41us.exe
found UEFIExtract archive
trying to extract ./mkmf.log
found UEFIExtract archive
filtering for modules...
got 5755 modules
finding vbios
4 possible candidates
checking for rom-parser... yes
can't determine vbios type
can't determine vbios type
can't determine vbios type
can't determine vbios type
Job done. Extracted files can be found in /VBiosFinder/tmp-vbiosfinder/../output
Cleaning up garbage

https://download.lenovo.com/pccbbs/mobiles/gluj41us.iso

output will be stored in '/VBiosFinder/tmp-vbiosfinder'
checking for ruby... yes

checking for innoextract... yes
checking for upx... yes
checking for 7z... yes
trying to extract ./gluj41us.iso
extracting uefi data
trying to extract ./gluj41us.iso
found UEFIExtract archive
trying to extract ./mkmf.log
found UEFIExtract archive
filtering for modules...
got 5727 modules
finding vbios
4 possible candidates
checking for rom-parser... yes
can't determine vbios type
can't determine vbios type
can't determine vbios type
can't determine vbios type
Job done. Extracted files can be found in /VBiosFinder/tmp-vbiosfinder/../output
Cleaning up garbage

I tried with the current version of UEFIExtract, as well as a specific old version you recommended in another issue. The result was exactly the same.

What does this error message mean? How does the tool recognize something as a VBIOS without at the same time knowing what type it is? Do you have any suggestions how I could fix this?

coderobe commented 5 years ago

Thanks for the report! VBiosFinder uses rom-parser to label the found vbios files. can't determine vbios type indicates that VBiosFinder was unable to successfully call rom-parser - meaning it exited abnormally trying to read those files.

I'll check that out further... I'll also make it store the unlabelled vbios images in case the labelling fails, so that when this happens again, at least you'll have the files for further inspection.

I'll follow up with more info once i have figured out what's going on.

coderobe commented 5 years ago

Hrm, i tried with the ISO you provided, and it successfully labels the included VBIOS ROMs properly. The VBIOS ROMs in the ISO are for the NVidia GK208M [GeForce GT 730M] (10de:1290) and Intel Haswell Integrated Graphics (8086:0406)

[coderobe@anshin VBiosFinder]$ ./vbiosfinder extract $PWD/../gluj41us.iso
output will be stored in '/home/coderobe/VBiosFinder/tmp-vbiosfinder'
checking for ruby... yes

checking for innoextract... yes
checking for upx... yes
checking for 7z... yes
trying to extract ./gluj41us.iso
extracting uefi data
trying to extract ./gluj41us.iso
found UEFIExtract archive
trying to extract ./mkmf.log
filtering for modules...
got 5517 modules
finding vbios
4 possible candidates
checking for rom-parser... yes
Found VBIOS for device 8086:0406!
Found VBIOS for device 8086:0406!
Found VBIOS for device 10de:1290!
Found VBIOS for device 10de:1290!
Job done. Extracted files can be found in /home/coderobe/VBiosFinder/tmp-vbiosfinder/../output
Cleaning up garbage

Can you check that your rom-parser binary runs successfully?

coderobe commented 5 years ago

I just pushed https://github.com/coderobe/VBiosFinder/commit/5aa46de7bf89af129e1b3101e5ad51fa5f91261c, which should save the vbios files even when rom-parser fails.

norbertogriffiths commented 5 years ago

Ah, it was not clear to me that rom-parser failed. It turns out rom-parser fails, because it uses a special type of MMAP, which is incompatible with the shared file system of the VM I was running it in. Fixing that your tool works fine and successfully extracts the VBIOSs. Thanks for your help.

Btw, your update to store the unknown VBIOSs works, but since the tool gives them all the same file name, they overwrite each other and only the last one ends up in the output.