System Installation – Fix errno 5 Input/Output Error When Installing Ubuntu

live-usbsystem-installation

Today I downloaded Ubuntu for my laptop. It runs great from a bootable USB, but when I tried to install it, I got the following error message:

The installer encountered an error copying files to the hard disk:

[Errno 5] Input/output error

This is often due to a faulty CD/DVD disk or drive, or a faulty hard   
disk. It may help to clean the CD/DVD, to burn the CD/DVD at a lower  
speed, to clean the CD/DVD drive lens (cleaning kits are often   
available from electronics suppliers), to check whether the hard disk  
is old and in need of replacement, or to move the system to a cooler  
environment.  

enter image description here

I tried everything to install it on my laptop including redownloading the Ubuntu ISO image, but nothing worked.

Best Answer

You may have some bad sectors on the target HDD.

To check sda1 volume for bad sectors in Linux run fsck -c /dev/sda1. For drive C: in Windows it should be chkdsk c: /f /r.

IMHO chkdsk way will be more suitable as it will remap bad blocks on the HDD while Linux fsck simply marks such blocks as unusable in the current file system.

Quote from man fsck.ext2

-c This option causes e2fsck to use badblocks(8) program to do a read-only scan of the device in order to find any bad blocks. If any bad blocks are found, they are added to the bad block inode to prevent them from being allocated to a file or directory. If this option is specified twice, then the bad block scan will be done using a non-destructive read-write test

Related Question