Issue installing updates from Linux samba share

Issue installing updates from Linux samba share

Postby asderferjerkel » 05.11.2015, 09:47


I'm having some issues installing updates over a network share, which I've downloaded using from version 10.2 on a Debian server.

Everything downloads fine, but when it comes to installing them on clients, I get this error from hashdeep64:

Code: Select all
Checking .NET Framework 4 installation state...
Installing .NET Framework 4.6...
Verifying integrity of ..\dotnet\NDP46-KB3045557-x86-x64-AllOS-ENU.exe...
hashdeep64.exe: Unable to load any matching files.
Try `hashdeep64.exe -h` for more information.
ERROR: File hash does not match stored value (file: ..\dotnet\NDP46-KB3045557-x86-x64-AllOS-ENU.exe).
Warning: Installation of ..\dotnet\NDP46-KB3045557-x86-x64-AllOS-ENU.exe failed (errorlevel: ).

Installation successful. Please reboot your system now and recall Update afterwards.

I've checked the sha1 hashes myself and they all match up as they should. I suspect the issue comes from this findstr line in InstallOSUpdate.cmd:

Code: Select all
%SystemRoot%\System32\findstr.exe /L /I /C:%% /C:## /C:%1 ..\md\hashes-%%i-%%j.txt >"%TEMP%\hash-%%i-%%j.txt"

If I run this manually on the hashes file like so:

Code: Select all
Z:\cmd>%SystemRoot%\System32\findstr.exe /L /I /C:%% /C:## /C:..\dotnet\NDP46-KB3045557-x86-x64-AllOS-ENU.exe ..\md\hashes-dotnet.txt

I get this output:

Code: Select all
%%%% HASHDEEP-1.0
%%%% size,md5,sha1,sha256,filename
## Invoked from: /home/user/wsusoffline/client/md
## $ hashdeep -c md5,sha1,sha256 -l ../dotnet/NDP46-KB3045557-x86-x64-AllOS-DEU.exe ../dotnet/NDP46-KB3045557-x86-x64-AllOS-ENU.exe ../dotnet/NDP46-KB3045557-x86-x64-AllOS-FRA.exe ../dotnet/dotnetfx35.exe

So it's missing the line with the actual hash itself on. I think it's because the search string has backslashes, whilst the path in hashes-dotnet.txt has forward slashes:

Code: Select all

If I replace the backslashed search strings in DoUpdate.cmd with forward slashes, I get this error:

Code: Select all
Installing ../dotnet/NDP46-KB3045557-x86-x64-AllOS-ENU.exe...
'..' is not recognized as an internal or external command, operable program or batch file. cmd.exe can't handle forward slashes in relative paths.

As Debian's hashdeep64 uses forward slashes in paths, the easiest fix I can think of is using sed to replace them with backslashes before writing the hashes file, so editing each hashdeep line in from:

Code: Select all
(cd ../client/md; hashdeep -c md5,sha1,sha256 -l -r ../$Vz > hashes-${Vz}.txt)


Code: Select all
(cd ../client/md; hashdeep -c md5,sha1,sha256 -l -r ../$Vz | sed 's/\//\\/g' > hashes-${Vz}.txt)

I can then delete the integrity database by clearing md/*, recreate it by rerunning, and then everything works fine. Would it be possible to have this fix incorporated into the next release of the Linux download script? Thanks!

edit: Just realised the above is already covered by the tr commands just before cleanup. Not sure why it didn't run on some patches (I can only assume I tried installing before it was quite finished) but you can safely ignore this thread!

Return to Linux

Who is online

Users browsing this forum: No registered users and 1 guest