Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've used dd to clone hard drives before using 'dd' and a live cd, but have run into a problem.

The issue:

dd fails with an "Input/Output Error" on /dev/sda3 , even though windows "check disk" (chkdsk) says it's ok.

Context:

  • Trying to replace my laptop hard drive w/ a faster one of the same size
  • Laptop has NTFS on a 320gb hard drive
  • Booting into knoppix
  • Knoppix recognizes 'original' drive(/dev/sda)
  • I am using a usb connection for ‘new' drive (irrelevant, but just an fyi)
  • Knoppix recognizes the usb drive as /dev/sdb
  • Using dd, as follows:

    dd if=/dev/sda of=/dev/sdb

  • `dd gives the I/O error above at 82Gb (out of 320Gb)

  • I then tried checking each partition as follows and found it failed on /dev/sda3:

    dd  if=/dev/sda1 of=/dev/null
    dd  if=/dev/sda2 of=/dev/null
    dd  if=/dev/sda3 of=/dev/null 
    
  • I have ran windows xp chkdsk on the offending drive in both "find only" and "find and fix" mode and it reports no errors

Question

How can I find and fix the error on my original hard drive partition (i.e. /dev/sda3) so that dd reads it successfully?

share|improve this question

migrated from stackoverflow.com Sep 3 '09 at 23:00

This question came from our site for professional and enthusiast programmers.

3 Answers 3

Use ddrescue for that, it's able to read damaged disks.

And chkdsk probably won't find the issue because it only does basic checks of filesystem integrity; by default, it won't check all the partition space for read errors caused by damage.

share|improve this answer
2  
The package for ddrescue is gddrescue on ubuntu if that's the livecd you're using. If you just do ddrescue you get dd_rescue which is a different older package. –  Col Sep 4 '09 at 8:16

I ran into the same problem and my OpenSUSE livecd didn't include ddrescue or Clonezilla. However, when I checked out the dd manual, I discovered that there was an option "conv=noerror" that allowed dd to continue past the I/O error.

dd conv=noerror if=/dev/sda of=/dev/sdc
share|improve this answer

To copy data to different HDD attempt use special tools. Norton Ghost (commercial) or Clonezilla (opensource) http://clonezilla.org/

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.