I'm running a GNU/Linux system, but the hard drive is failing, so I want to make a complete disk image to copy it later to a replacement hard drive.

Can I run the dd command from system itself?

dd if=/dev/sda of=/external/disk/sda.dd

Should I rather shutdown the system, boot a LiveCD and do this when the disk is not actively used by a running operating system?

What could possibly go wrong if I don't?

  • 2
    I think you technically can but you don't want to. The resulting image will most probably be inconsistent. This is what happens when you sequentially create an image of an object that can change its state during this operation. Oct 2 '16 at 18:07
  • Indeed, the image might be inconsistent, but if you're using a journalling filesystem (like ext3/4), then changes are that you'd be able to recover these inconsistencies. If you want the best guarantee of a consistent image then it's best to copy it while no partitions on the disk are mounted, e.g. from a live CD. Oct 12 '16 at 0:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.