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 have this "disk list" table:

/dev/disk2
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *16.4 GB    disk2
   1:                      Linux                         536.9 MB   disk2s1
   2:                  Linux_LVM                         15.9 GB    disk2s2

the partition I am trying to DD is only 536MB, but when I try to dd it takes me more than one hour. my question is there a way to make the dd fast, and copy only what's important but to keep the new disk functional and have the same partition scheme.

Thanks

share|improve this question
5  
Did you try setting a block size? dd if=/dev/disk2s1 of=<destination> bs=1M –  Darth Android Aug 26 at 18:53
    
@DarthAndroid Yes I did set "bs", not a big difference, I am trying to see if it's possible to dd only what it matters. –  Midimo Aug 26 at 18:56
    
Also, you can try cat /dev/source_disk > /dev/dest_disk –  Denilson Sá Aug 26 at 18:56
1  
I'm curious what hardware you're doing this on, because dd'ing a ~500 MB disk image onto a disk taking an hour is a new phenomenon for me to hear about. If it's something particularly low powered, it may not be that odd, but if it's a desktop computer from the last decade or so, it sounds like something fishy is going on here. –  0xDAFACADE Aug 26 at 18:58

2 Answers 2

up vote 3 down vote accepted

No; dd is a dumb tool - you tell it were to start, where to stop, and it copies everything in between. It has no knowledge of partitions, partition maps, drives, filesystems, or what remotely might constitute valuable or important data (other than everything between aforementioned start and finish).

If you have a partition with low filesystem utilization (i.e., the 536MB partition only has 100MB in use, the rest is free space), then you need a partition imaging tool which supports sparse images. OSX's disk utility can do this, as well as PartImage on linux/unix and Ghost on Windows. However, this may not be any faster; it will take up less space though.

share|improve this answer

dd doesn't interpret data, it's just dumping bytes from source to target. It doesn't know what it's copying or if it matters.

If you want to make an intelligent copy (ie. skip empty space etc.) you can use partclone, partimage or Clonezilla (which is, in fact, just a more convenient wrapper to those two tools).

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.