dd /dev/sda to img on drive

0

If I run:

sudo dd if=/dev/sda1 of=~/image.img bs=1M

Will the image.img (which is located on /dev/sda1) be continuously copied onto itself? As it gets bigger from data, will that additional data be written in the image and continue forever?

agz

Posted 2013-01-13T03:55:48.200

Reputation: 6 820

Answers

1

No, you will run out of disk space before the operation completes. The disk image image.img will be unusable.

Michael Hampton

Posted 2013-01-13T03:55:48.200

Reputation: 11 744

Oh! Wow i completely overlooked that. But technically if lets say the image.img was stored near the beginning of the block of the hard drive, would the image copy itself, or is there a RAM buffer of sorts – agz – 2013-01-13T18:49:59.000

1Yes, you might get a partial copy of image.img in the image itself. No, it won't go on indefinitely. – Michael Hampton – 2013-01-13T18:55:37.207

0

Imagine an object trying to eat itself. To contain itself in addition to itself it must be at least twice as big.

user111228

Posted 2013-01-13T03:55:48.200

Reputation:

Nothing can be twice as big as itself. :) – Michael Hampton – 2013-01-13T19:22:50.247

Hence we have a contradiction! – None – 2013-01-13T21:35:06.937