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:
-
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
-
Run this command (replace
/dev/sdc
with the actual device and change689963008
according to the original ISO's size):sudo dd if=/dev/sdc iflag=fullblock count=$((689963008/512)) 2>/dev/null | md5sum -
Check the output against the original ISO's MD5 sum.
If you want to get fancy:
Enable the Universe repository (you can do that in Software & Updates);
Install
pv
:sudo apt-get install pv
;-
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
-
Run this command (replace
/dev/sdc
with the actual device and change689963008
according to the original ISO's size):sudo dd if=/dev/sdc iflag=fullblock count=$((689963008/512)) 2>/dev/null | pv -s 689963008 | md5sum -
Check the output against the original ISO's MD5 sum.