1

I'm trying to install Ubuntu from a live USB but always encounter errors in the copying files installation phase.

The error message says that this I/O error are commonly due to faulty Medium or HDD. I'm checking my SSD and making a new Live USB to try again.

So this is my concern I can md5sum the ISO I download, but how do I check the live USB is good?

userDepth
  • 2,040

1 Answers1

3

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.

kos
  • 41,268