Copying sectors?

Is there a script I can use to copy some sectors of my hard drive?

I actually have two partitions, A and B, on my hard drive. Both are the same size. I want to run a program that will start copying data from start sector A to source sector B until end sector A is copied to end sector B.

Finding Possible Solutions ...

Thank you so much

+2


source to share


3 answers


How about using it dd

? After copying 1024 blocks (512 bytes in size, usually the sector size) with an offset of 4096 blocks from the sda ​​partition to sdb:

dd if=/dev/sda1 of=/dev/sdb1 bs=512 count=1024 skip=4096

      



PS. I am also guessing it must be a SuperUser issue, or rather ServerFault.

+9


source


If you want to access the hard drive directly and not through partitions, then, well, just do it. Something like

dd if=/dev/sda of=/dev/sda bs=512 count=1024 skip=XX seek=YY

      



should copy 1024 sectors, starting at sector XX, sectors YY-> YY + 1024. Of course, if the sector ranges overlap, the results probably won't be good.

(Personally, I wouldn't attempt this without first burning the disc, but YMMV)

+4


source


I am not sure if what you are looking for is a copier. If that's what you mean, try clonesil.
(it will show you which exact operator it uses can be used to see how to do it in a script afterwards)

+1


source







All Articles