I tried the checksum verification on Windows 10 as described here: https://docs.fedoraproject.org/en-US/fedora/f29/install-guide/install/Preparing_for_Installation/#sect-verifying-images
The variable $expected_checksum is empty after executing: $expected_checksum = ((Get-Content $checksum_file | Select-String -Pattern $image) -split " ")[0].ToLower()
This line works for me: $expected_checksum = ((Get-Content $checksum_file | Select-String -Pattern $image) -split " ")[7].ToLower()
Additionally, when calculating the $download_checksum for a Fedora Server image
$download_checksum = [System.BitConverter]::ToString($sha256.ComputeHash([System.IO.File]::ReadAllBytes("$PWD\$image"))).ToLower() -replace '-', ''
I get the following error:
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."
Indeed, the Fedora Server image is 2.9GB
Somebody just came to Ask Fedora with this issue. This one works too (tested in PowerShell Core): $expected_checksum = ((Get-Content $checksum_file | Select-String -Pattern $image) -split "\) = ")[2].ToLower()
$expected_checksum = ((Get-Content $checksum_file | Select-String -Pattern $image) -split "\) = ")[2].ToLower()
the steps given for verification don't work. should have expected that.
here's what I did to workaround instructions in https://docs.fedoraproject.org/en-US/fedora/f31/install-guide/install/Preparing_for_Installation/#sect-verifying-windows after it not working the first time.
the files were already present from first try.
open a new shell. i'm using powershell 6.2.3 for this.
gc .\Fedora-Spins-31-1.9-x86_64-CHECKSUM | sls xfce # Fedora-Xfce-Live-x86_64-31-1.9.iso: 1472069632 bytes SHA256 (Fedora-Xfce-Live-x86_64-31-1.9.iso) = e2b05ee78dc5e4c39258d2d068a5c891366de02440ebcd7bcedf1fa31d15354e
in the input to sls, use kde if your iso is for kde spin. eg:-
$expected_checksum = "e2b05ee78dc5e4c39258d2d068a5c891366de02440ebcd7bcedf1fa31d15354e"
echo $calculated_checksum $expected_checksum $calculated_checksum.Equals($expected_checksum)
the output of final step should be like -
e2b05ee78dc5e4c39258d2d068a5c891366de02440ebcd7bcedf1fa31d15354e e2b05ee78dc5e4c39258d2d068a5c891366de02440ebcd7bcedf1fa31d15354e True
the first two lines must be exactly the same and the third line must be True.
note- this is just what i do, you can improve this any way you want. I do it this way as its simpler for me.
Login to comment on this ticket.