I'm not sure how to explain this in the subject better, so the "question" may not be right. But here goes. I have three hard drives. Drive A is a 320GB drive, Drive B is a 80 GB Drive, and Drive C is a 1TB Drive. I've copied the data from the 80 GB drive over to the 1TB drive, and am going to resize the partition (so I can copy the data from the 320 GB drive over next).

My question is this: If I boot into the operating system on the 1TB drive, can I use dd to copy the 320 GB drive over to another partition on that physical drive? I know that I shouldn't copy a live partition over (meaning I couldn't copy the data from the 320 GB drive over if I'm running that operating system).

My reasoning is this: I tried using Acronis TrueImage, Partition Manager, and Image 4 DOS/Linux (both applications), and it was going to take over a week to copy the data over. That means that for a week, I'm not able to use the computer, which isn't acceptable (unless it's my only option). I'm hoping that this works, so I can at least use the computer while I'm doing the copy.

If I have to, I can either boot to a Live CD (not really a preferred option) or use "Drive B", but I'd like to remove that drive as soon as possible.


2 Answers 2


Yes, what you want to do will work fine, given the following two conditions are true:

  1. There is no (mounted) filesystem on the partition that you are dd'ing to.
  2. The partition you are dd'ing to is at least the same size as the one you're dd'ing from (i.e. 320 GB).

The reason that it will work fine is that partitions are just files in UNIX. Their contents only have special meaning if they contain a mounted filesystem.

Assuming you have a layout that looks like this:

1 TB = sda, two partitions, sda1 that you booted from and sda2 that you are dd'ing to

320 GB = sdb, one partition, sdb1 that you are dd'ing from

Your command would look like this:

dd if=/dev/sdb1 of=/dev/sda2 bs=1M

The bs=1M parameter is there to ensure that dd copies the data in large chunks instead of issuing a request for each sector.

  • 1
    if=source of=destination i think there's something wrong in the advice above.
    – user365812
    Sep 7, 2014 at 8:50
  • In the example above, sdb1 is the source and sda2 is the destination. I edited the answer to be more clear about that. Sep 10, 2014 at 16:28
  • 1
    No need to perform resize2fs after the copy? Even when sizes are different? Oct 31, 2015 at 16:47

In general its ok to dd any partition while it is not mounted. If you have to mount the source partition for reading while the dd runs, it would be better to mount it read only with the -o ro parameter.

if you want to first boot into the source partition amd then use dd to copy it, you can do mount -o ro,remount / to make it read only after booting.

  • Read only doesn't mean the filesystem isn't fooling around with the journal or reorganizing free space or whatever.
    – vonbrand
    Feb 17, 2013 at 12:59
  • @vonbrand could you provide an example of linux filesystem implementation that does that while in RO mode?
    – Basilevs
    Sep 7, 2014 at 9:00
  • @vonbrand In UNIX filesystems, being mounted ro very much does mean that no writes should be issued to the underlying device. Feb 11, 2015 at 5:04

Your Answer

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