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
source to share
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.
source to share
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)
source to share