Software⏱️ 4 min read📅 2026-06-11

How to Fix: Copying raw partition sequentially, in chunks, with error recovery

Learn how to copy a raw partition in smaller chunks with error recovery using ddrescue.

Quick Answer: Use ddrescue with the -w option for sequential copying and the -e option for error recovery, then concatenate the output files.

Copying raw partitions with i/o errors can be frustrating when dealing with large files. If you're trying to copy a partition from one device to another, but only have limited space on the destination device, it's understandable that you'd want to break down the process into smaller chunks.

Fortunately, there are ways to achieve this using specialized tools and techniques. In this guide, we'll explore two methods for copying raw partitions in smaller chunks with error recovery.

🔍 Why This Happens

  • The main reason why this issue occurs is due to the limited space on the destination device. When trying to copy a large file, the destination device may not have enough free space, causing errors and interruptions during the transfer process.
  • Another potential cause is the presence of i/o errors in the original partition. These errors can be caused by various factors such as hardware failure, malware, or incorrect configuration.

✅ Best Solutions to Fix It

Using ddrescue with chunking

  1. Step 1: First, identify the total size of the partition you want to copy and calculate the number of chunks required. For example, if you have a 1GB partition, you may need 10 chunks of 100MB each.
  2. Step 2: Create a temporary file on the destination device with the same size as the first chunk. This will serve as the starting point for your transfer process.
  3. Step 3: Use ddrescue to copy the source partition in chunks, starting from the beginning. You can use the -f option to specify the number of chunks and the -s option to set the chunk size.
  4. Step 4: After each chunk is copied successfully, verify that it was transferred correctly using tools like fsck or e4defrag.
  5. Step 5: Once all chunks have been copied, use ddrescue to concatenate them together into a single file. You can use the -c option to specify the number of files and the -f option to set the output filename.

Using dd with chunking

  1. Step 1: Create a temporary file on the destination device with the same size as the first chunk. This will serve as the starting point for your transfer process.
  2. Step 2: Use dd to copy the source partition in chunks, starting from the beginning. You can use the -fsbysize option to specify the number of bytes per chunk.
  3. Step 3: After each chunk is copied successfully, verify that it was transferred correctly using tools like fsck or e4defrag.
  4. Step 4: Once all chunks have been copied, use dd to concatenate them together into a single file. You can use the -fsbysize option to specify the number of bytes per chunk and the -c option to set the output filename.

✨ Wrapping Up

In conclusion, copying raw partitions in smaller chunks with error recovery is technically possible using specialized tools like ddrescue or dd. By breaking down the transfer process into manageable chunks, you can reduce the risk of errors and interruptions during the copy process. Remember to verify each chunk before proceeding to ensure a successful transfer.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions