About File Checksum

  • 1. Background

Some of us have bad habits when using USB flash drive and often pull it out directly.
If you pull the USB drive out immediately after finish copy a big ISO file, most probably the file in the USB will be corrupted. Because alough it seems that the copy operation has been finished, there may be still some data is in the system cache and not yet fully flushed to the USB drive. As a result, you may run into problems when you boot the corrupted ISO file.
Because Linux and Windows use different caching mechanisms, this problem is especially obvious in Linux systems, and it is very easy to cause problems.
So we should develop a good habit of using USB drive and use safe operations to remvoe the USB drive before pull it out.

Besides, we can checksum the file after copy.

  • 2. Checksum

Alough you can checksum the file in the original system. But I recommend to checksum in Ventoy to avoid the interference of system cache.

  • 3. Usage

Ventoy provides a hotkey m for file checksum.
When in Ventoy's main menu, select the image file, press m and then select the checksum type.

  • 4. Checksum file compare
  • 4.1 .md5/.sha1/.sha256/.sha512 file
  • At the same time, if there exist a text file with name FILENAME + .md5/.sha1/.sha256/.sha512 suffix, then Ventoy will automatically read the checksum value from the file and compare with the calculated result.
    It should be noted that, the text file must have a name with an additional .md5/.sha1/.sha256/.sha512 suffix, don't replace the old suffix with .md5/.sha1/.sha256/.sha512.
    For example:


    The following 3 formats of .md5/.sha1/.sha256/.sha512 file are supported. (Take sha256 for example)

    f8d3ab0faeaecb5d26628ae1aa21c9a13e0a242c381aa08157db8624d574b830  ubuntu-21.10-desktop-amd64.iso
    SHA256 (ubuntu-21.10-desktop-amd64.iso) = f8d3ab0faeaecb5d26628ae1aa21c9a13e0a242c381aa08157db8624d574b830

  • 4.2 VENTOY_CHECKSUM file
  • Also you can write the checksum values to a VENTOY_CHECKSUM file, Ventoy will automatically find the corresponding checksum value of the file and compare with the calculated value.
    Here there are 2 types of VENTOY_CHECKSUM file (Local and Global).
    A local VENTOY_CHECKSUM file can be put in a directory or sub-directory and only contains the checksum values of the image files that are in the same directory or sub-directory.
    The global VENTOY_CHECKSUM file is in the root of the partition. You can write all the checksum values for all the image files to this file no matter where these image files are.

    VENTOY_CHECKSUM supports the following 2 formats (Take sha256 for example):

    f8d3ab0faeaecb5d26628ae1aa21c9a13e0a242c381aa08157db8624d574b830  ubuntu-21.10-desktop-amd64.iso
    SHA256 (ubuntu-21.10-desktop-amd64.iso) = f8d3ab0faeaecb5d26628ae1aa21c9a13e0a242c381aa08157db8624d574b830

    It should be noted that you must use the full path in global VENTOY_CHECKSUM file. For example:

    f8d3ab0faeaecb5d26628ae1aa21c9a13e0a242c381aa08157db8624d574b830  ISO/ubuntu-21.10-desktop-amd64.iso
    SHA256 (ISO/ubuntu-21.10-desktop-amd64.iso) = f8d3ab0faeaecb5d26628ae1aa21c9a13e0a242c381aa08157db8624d574b830

  • 4.3 Priority
  • If there exist a corresponding .md5/.sha1/.sha256/.sha512 file, then it will be used.
    Or Ventoy will try to search in VENTOY_CHECKSUM file, firstly try local VENTOY_CHECKSUM file and then try global VENTOY_CHECKSUM file.

  • 5. Screenshot