Hardware⏱️ 3 min read📅 2026-06-19

How to Fix: SET_MAX_ADDRESS failed: Input/output error

HPA (Head Protection Area) issue causing 2TB drive to appear as 1TB in BIOS. Input/output error when trying to set max address.

Quick Answer: Try using the `hdparm` command with the `-N` option and a specific sector value, or consider re-seating the hard drive.

The 'SET_MAX_ADDRESS failed: Input/output error' issue affects users who are experiencing problems with a 2TB drive being visible as a 1TB drive in their BIOS. This problem is often caused by Hardware Protection Algorithm (HPA) issues, which can lead to frustration and data loss if not addressed promptly.

Resolving this issue requires patience and persistence, but it's essential for restoring the full capacity of the affected storage device.

⚠️ Common Causes

  • The primary reason for this error is an invalid HPA setting. When the kernel device driver encounters an invalid HPA setting, it fails to set the maximum address, leading to the 'SET_MAX_ADDRESS failed: Input/output error' message.
  • Another possible cause of this issue is a buggy kernel device driver that's unable to handle the HPA settings correctly.

🚀 How to Resolve This Issue

Resetting the BIOS

  1. Step 1: Boot into the BIOS setup utility by pressing the designated key (usually F2, F12, or Del) during boot-up. Navigate to the Advanced or Legacy tab and look for the HPA settings section.
  2. Step 2: Set the HPA setting to 'Auto' or 'Default' value, then save the changes and exit the BIOS setup utility.
  3. Step 3: Reboot the system and verify that the storage device is now recognized as its full capacity (2TB).

Using hdparm with a different approach

  1. Step 1: Run the following command to reset the HPA setting: `sudo hdparm -N /dev/sda` This will attempt to set the maximum address, but it may fail due to the buggy kernel device driver.
  2. Step 2: Try using the `-p` option followed by the desired value (in this case, `3907029168`) to set the maximum visible sectors: `sudo hdparm -N p3907029168 /dev/sda` This approach bypasses the HPA setting and sets the maximum address directly. However, it may still fail due to the kernel driver issue.
  3. Step 3: If the above steps fail, try using a different approach, such as reinstalling the storage device or seeking further assistance from the system administrator.

💡 Conclusion

Resolving the 'SET_MAX_ADDRESS failed: Input/output error' issue requires patience and persistence. By following one of the methods outlined in this guide, you should be able to restore the full capacity of your affected storage device.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions