How to check the integrity of Live USB in Ubuntu [duplicate]

You can check the integrity of the image written to the USB drive by checking its MD5 sum against the original ISO's MD5 sum:

  1. Check the original ISO's size:

    % ls -l archlinux-2015.10.01-dual.iso 
    -rwxrwxr-x 1 user user 689963008 nov 22 21:35 archlinux-2015.10.01-dual.iso
    
  2. Run this command (replace /dev/sdc with the actual device and change 689963008 according to the original ISO's size):

    sudo dd if=/dev/sdc iflag=fullblock count=$((689963008/512)) 2>/dev/null | md5sum -
    
  3. Check the output against the original ISO's MD5 sum.

If you want to get fancy:

  1. Enable the Universe repository (you can do that in Software & Updates);

  2. Install pv: sudo apt-get install pv;

  3. Check the original ISO's size:

    % ls -l archlinux-2015.10.01-dual.iso 
    -rwxrwxr-x 1 user user 689963008 nov 22 21:35 archlinux-2015.10.01-dual.iso
    
  4. Run this command (replace /dev/sdc with the actual device and change 689963008 according to the original ISO's size):

    sudo dd if=/dev/sdc iflag=fullblock count=$((689963008/512)) 2>/dev/null | pv -s 689963008 | md5sum -
    
  5. Check the output against the original ISO's MD5 sum.