Linux system errors

Linux 5 Input/Output Error (EIO)

5
HighLinux System

Input/Output Error (EIO) — a hardware-level read or write operation to a device failed

What 5 Means

The 5 error on the Linux system errors indicates input/output error (eio) — a hardware-level read or write operation to a device failed. This typically occurs due to failing hard drive or ssd with unreadable sectors.

Exit code 5 or errno 5 (EIO) is returned by the kernel when a device reports an I/O failure. It commonly appears in system logs as 'Input/output error' when reading files or executing programs on a degraded storage device.

Technical Background

EIO (errno 5) is a low-level error from the storage subsystem. When the kernel's block layer cannot complete an I/O request, it propagates EIO up to the calling process.

The kernel logs storage failure messages via dmesg, including the affected device path and sector number. The smartctl utility reads a drive's SMART data, including reallocated sector counts and uncorrectable error counts that indicate progressive hardware degradation.

Common Causes

  • Failing hard drive or SSD with unreadable sectors
  • Filesystem corruption causing the kernel to reject I/O operations
  • Faulty storage cable, controller, or USB connection

Typical Scenarios

  • Reading a file from a failing disk returns EIO and the operation terminates
  • Package manager failing mid-install because the filesystem reports I/O errors
  • SSH key or configuration file becoming unreadable due to filesystem corruption

What to Know

An EIO error is a signal of hardware or filesystem degradation. The kernel propagates errno 5 upward when the block layer cannot complete an I/O request, making it visible to any process that touches the affected storage path.

Frequently Asked Questions

Common questions about Linux 5 error

Run 'dmesg | grep -i error' to see kernel storage error messages, and use 'smartctl -a /dev/sdX' to read the drive's SMART data including reallocated sector counts and uncorrectable error counts.

Related Error Codes