Читать книгу Mastering Linux System Administration - Richard Blum - Страница 44

Real World Scenario CHECKING THE UBUNTU SERVER ISO IMAGE FILE

Оглавление

Once the Ubuntu Server ISO image file is completely downloaded, you need to verify it. To do this, we'll employ hashing. Hashing uses a one‐way mathematical algorithm to create a fixed‐length hash, which is basically a series of letters and numbers. A hash is also called a message digest, a hash value, a fingerprint, a signature, or cipher text. One cool thing about hash values is that hashing produces the same hash value for files that are the same. You can take a file with a picture in it and copy it to another location. If we use hashing to produce a hash value for the original picture file and for the copied picture file and those two hash values match, we know that the picture was not corrupted when it was copied to the new location.

Follow these steps to produce a hash value to check your image file:

1 On your Windows 10 system, open the Windows 10 PowerShell app by typing Windows PowerShell in the search bar and clicking the resulting Windows PowerShell app icon.

2 After the Windows PowerShell app window is open and you have a prompt, assuming you downloaded your Ubuntu Server image file to the Downloads folder, type cd Downloads and press Enter. The prompt should now show that you are in the Downloads folder.

3 Run the PowerShell hashing utility on the Ubuntu Server image file by typing Get‐FileHash ubuntu, and press the Tab key so that PowerShell autocompletes the Ubuntu Server's image filename for you. Go on to the next step before you press Enter.

4 Complete the rest of the PowerShell command by pressing the spacebar, typing ‐Algorithm SHA256, and pressing Enter. Be patient! It may take a while for the command to output the SHA256 hash value. You should see something similar to the following:Don't exit the PowerShell window yet. You need to compare your resulting hash value with the current SHA256 hash value on the Ubuntu website.

5 Open your favorite web browser and go to releases.ubuntu.com/focal/SHA256SUMS. (If this web page has been moved, you may need to search the releases.ubuntu.com site to find the Ubuntu Server ISO image file's SHA256 hash value.)

6 Compare the hash value on the website with your hash value in PowerShell for the Ubuntu Server ISO image file. If they match, no file corruption occurred when you downloaded the file, and congratulations—you're ready to move forward in the installation process! However, if the hash values don't match, you need to download the file again and repeat this checking process.

7 Type exit at the PowerShell prompt to leave the app.

Verifying that the Ubuntu Server ISO image file is a good copy will save you time. If you tried to use a corrupt image file in an installation, it may work partway through the process and then quit before completion. That's frustrating. It's always best to check that your file is good before proceeding within an install.

Mastering Linux System Administration

Подняться наверх