Software⏱️ 3 min readπŸ“… 2026-06-19

How to Fix: Can I pause dd writing, remove the medium, mount it again and continue without causing I/O error?

Fixing issues with paused dd writing, removing the medium, and continuing without I/O errors.

Quick Answer: Try using the --skip-full-block option with dd to avoid data corruption when resuming the process.

This issue affects users who are creating compressed images of internal drives using dd and pv on a LiveCD GNU/Linux system. The problem arises when pausing the process, removing the medium, mounting it again, and attempting to continue without causing I/O errors.

This can be frustrating for users who need to perform such operations frequently, as it may lead to failed backups or corrupted data.

⚠️ Common Causes

  • The primary reason for this issue is that the kernel does not properly close file descriptors when a process is paused and then resumed. This can cause issues when trying to access the same file descriptor after the process has been restarted.
  • Another potential cause could be the use of gzip, which may not handle compressed data correctly if it was not created with gzip in mind.

πŸ› οΈ Step-by-Step Verified Fixes

Pause dd writing, remove the medium, mount it again, and continue

  1. Step 1: Pause the dd process using Ctrl+Z hotkey and then unmount the drive. Verify that the file descriptor is closed by checking if the device is still accessible.
  2. Step 2: Remove the USB drive from the system and wait for any pending I/O operations to complete.
  3. Step 3: Plug the drive back in, mount it to the same directory where it was previously mounted, and resume the dd process using fg 1. This will ensure that all file descriptors are properly reopened before continuing with the compression process.

Use skip=X to append remaining data after pausing

  1. Step 1: Pause the dd process using Ctrl+Z hotkey and add a large number (e.g., skip=1000000) to the command to specify how many records should be skipped. This will allow you to continue with the compression process without having to pause and resume.
  2. Step 2: Resume the dd process using the modified command, which will append the remaining data to the compressed image file instead of overwriting it.

🎯 Final Words

To avoid I/O errors when pausing and resuming a dd process on a LiveCD GNU/Linux system, it is recommended to use either method 1 or method 2. Both methods ensure that all file descriptors are properly reopened before continuing with the compression process, minimizing the risk of data corruption or failure.

Did this fix your problem?

If not, try searching for specific error codes.

πŸ” Search Error Database

❓ Frequently Asked Questions