Bug 1299138 - Instructions for verifying ISO on windows don't work
Instructions for verifying ISO on windows don't work
Status: CLOSED DUPLICATE of bug 1175759
Product: Fedora Documentation
Classification: Fedora
Component: install-guide (Show other bugs)
Unspecified Windows
unspecified Severity high
: ---
: ---
Assigned To: Pete Travis
Fedora Docs QA
Depends On:
  Show dependency treegraph
Reported: 2016-01-16 08:46 EST by tlhackque
Modified: 2016-02-02 09:30 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-02-02 09:30:32 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description tlhackque 2016-01-16 08:46:51 EST
Description of problem:
https://docs.fedoraproject.org/en-US/Fedora/23/html/Installation_Guide/sect-verifying-images.html Section 3.3.1 gives a PowerShell procedure for verifying the signature of a download on windows.

I downloaded Fedora-Server-DVD-x86_64-23 and tried the procedure.  It fails due to the size of the file.

Another method needs to be used.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Create this script (copied and pasted from the cited webpage, except for the Parameter block):


$sha256 = New-Object -TypeName System.Security.Cryptography.sha256CryptoServiceProvider
$expected_checksum = ((Get-Content $checksum_file | Select-String -Pattern $image) -split " ")[0].ToLower()
$download_checksum = [System.BitConverter]::ToString($sha256.ComputeHash([System.IO.File]::ReadAllBytes("$PWD\$image"))).ToLower() -replace '-', ''
echo "Download Checksum: $download_checksum"
echo "Expected Checksum: $expected_checksum"
if ( $download_checksum -eq "$expected_checksum" ) {
echo "Checksum test passed!"
} else {
echo "Checksum test failed."

2. If necessary, execute: Set-ExecutionPolicy RemoteSigned

3. ..\Documents\Scripts\SHA1-Check.ps1 Fedora-Server-DVD-x86_64-23.iso Fedora-Server-23-x86_64-CHECKSUM

Actual results:

Exception calling "ReadAllBytes" with "1" argument(s): "The file is too long. This operation is currently limited to supporting 
files less than 2 gigabytes in size."
At C:\Users\timothe\Documents\Scripts\SHA1-Check.ps1:10 char:1
+ $download_checksum = [System.BitConverter]::ToString($sha256.ComputeH ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : IOException

Expected results:

The checksum is computed.

Additional info:
Also note that the script as written will fail if a path is given, as '.' and '\' are used in the pattern - which takes a REGEX, where they are special.

Note that Fedora 18 (https://docs.fedoraproject.org/en-US/Fedora/18/html/Burning_ISO_images_to_disc/sect-Burning_ISO_images_to_disc-Validating_the_Files-Validating_at_the_Windows_Command_Prompt.html)suggested an executable from http://www.labtestproject.com/files/win/sha256sum/sha256sum.exe that can handle the large file.

While the idea of a powershell script to avoid downloading an unknown executable is clever, it doesn't work.

Perhaps a signed windows executable can be provided.

Also, the procedure should indicate how to verify the PGP signature on the CHECKSUM file...
Comment 1 Pete Travis 2016-02-02 09:30:32 EST

*** This bug has been marked as a duplicate of bug 1175759 ***

Note You need to log in before you can comment on or make changes to this bug.