2
I tried checksum Fedora Workstation 29 and Fedora KDE Plasma but it's always fail. Am I doing something wrong, is the tutorial incomplete or the file in the server is corrupted?
Details:
I use Windows -> commands in Powershell:
FOR KDE:
$image = "Fedora-KDE-Live-x86_64-29-1.2.iso"
$checksum_file = ""Fedora-Spins-29-1.2-x86_64-CHECKSUM"
$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"
Download Checksum: 5f7103a79e705bc1be95b7a2350b82cae857196542396cec0e3e7dfd7d16815a
echo "Expected Checksum: $expected_checksum"
Expected Checksum: #
if ( $download_checksum -eq "$expected_checksum" ) { echo "Checksum test passed!" } else { echo "Checksum test failed." }
Checksum test failed.
For workstation:
$image = "Fedora-Workstation-Live-x86_64-29-1.2.iso"
$checksum_file = "Fedora-Workstation-29-1.2-x86_64-CHECKSUM"
$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"
Download Checksum: 653cc283749100e9b46625d23938ff890ae29482bef142f5a0f99c5a5ddc03e9
echo "Expected Checksum: $expected_checksum"
Expected Checksum: #
if ( $download_checksum -eq "$expected_checksum" ) {echo "Checksum test passed!"} else {echo "Checksum test failed."}
Checksum test failed.
Hi! Thanks very much for your detailed answer! I tried using the command above (sha256sum) in the powershell of Windows but I have an error 'CommandNotFoundException'. By the way, I just had an answer in Fedora's forum which was also useful and I could finally do the checking procedure. I'll leave the link: [link]https://ask.fedoraproject.org/en/question/134513/checksum-fail-fedora-29-or-spin-kde-plasma. They had outdated instructions in Fedora's docs, the correct script is: $expected_checksum = ((Get-Content $checksum_file | Select-String -Pattern $image) -split ") = ")[2].ToLower()
– spCl – 2019-04-01T11:55:52.173@spCl, I assumed from the question and tags that you were doing this in Linux. Windows may not come bundled with the checksum utility (and the iso download is probably to a different directory). But free checksum utilities are readily available. This link on the Fedora site covers some, but looks a bit dated. (cont'd)
– fixer1234 – 2019-04-01T12:19:35.343There's an old thread here that asked about Win 7, but includes some relatively recent updates. But a Google search should show currently available utilities, like here (which is just the first one that came up in Google). Even if the utility is old, as long as it can calculate the sha256 hash and runs in your version of Windows, that's all you need. These utilities are pretty simple, so even ancient ones are likely to run in any version of Windows.
– fixer1234 – 2019-04-01T12:20:26.917But if you got the official instructions to work, that's even better. :-) – fixer1234 – 2019-04-01T12:22:59.003
Thank you, you were really nice to answer my question with a lot of info! I hope it will be useful for others, too! :) – spCl – 2019-04-03T19:47:35.687