Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a linux installation in a 50GB partition, on an old 80GB sata disk that is starting to show some errors in it's SMART status, and also, it's an old slow disk. So I want to copy it to a newer sata disk with a spare 500GB partition on it.

I tried to do it using gparted using copy/paste. Gparted starts to copy it but fails with a read error after about 9 GB. Checking the filesystem on the source partition shows no errors, but I see 3 sectors in the SMART "Current Pending Sector Count" (using Ubuntu's Disk Utility) and I am thinking they are the problem? Is there a way to force it to remap these sectors to eliminate the errors?

Is there a way to tell gparted it continue, rather than stop, when it finds a read error? Should I try a different tool?

share|improve this question
up vote 0 down vote accepted

Why you don't use ddrescue? It was designed for that purpose in question.

share|improve this answer
Because I'd never heard of it :) It also didn't occur to me that I'd need a rescue tool as this disk is bootable and working. It boots and runs my current linux desktop system day to day. It just has a few errors that don't show up in normal use. I thought I could just copy it. – Jazz Nov 11 '12 at 10:30
Will ddrescue copy a small partition to a larger partition, and I suppose I will have to check and resize the filesystem manually after the copy? (this is why gparted is so nice - if there had been no error - because it handles everything and you don't have to muck around so much) – Jazz Nov 11 '12 at 10:39
The nice thng about ddrescue is that it skips errors (or try to fix them), and yes, you will have to resize the partition later. – NotFromBrooklyn Nov 12 '12 at 7:48
I need to be sure before I attempt this. The target PARTITION is already larger so I won't be resizing it, but if I use ddrescue to copy - partition to partition - it obviously won't fill it. What is the next step? Check the filesystem with fsck, then resize the FILESYSTEM (not the partition)? – Jazz Nov 12 '12 at 12:35
I have successfully achieved this operation. The steps were to use ddrescue -f -n /dev/sda5 /dev/sdb1 , followed by -v -f /dev/sdb1 ,followed by resize2fs /dev/sdb1. Mounting the disk at /mnt and grub-install --boot-directory=/mnt/boot gives me a bootable linux system on the new disk (without the single 12k error that was stopping gparted). – Jazz Nov 13 '12 at 5:01

Your Answer


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.