Sample Header Ad - 728x90

can 'dd' be used to clone to a smaller HDD, knowing that partitions will need editing?

24 votes
6 answers
66652 views
I've used dd to clone disks like this: dd if=/dev/sdb of=/dev/sda bs=4096 conv=notrunc,noerror,sync And it's always worked fine. Any and all docs on 'dd' take pains to remind you that the target disk must be the same size or bigger than the source. Does that absolutely have to be true? Now, I quite understand that if I clone to a smaller disk I can't expect any partitions that are even *partially* 'out of bounds' on the target to be intact. However, knowing full well that I'd need to edit my partitions on the target later, deleting the 'out of bounds' ones, could I still use 'dd' to make a brute force copy of the source up to the limits of the physical size of the target? Or would 'dd' reduce the target to a smoking pile of wreckage when it reached the limit of its size ;-) BTW, researching this, I've seen recommended values for bs= of everything from bs=1024 up to bs=32M, what really is best?
Asked by Ray Andrews (2615 rep)
Oct 13, 2014, 04:16 PM
Last activity: Aug 28, 2023, 02:58 PM