I need some help to get a dd command line that is moving my partition blockwise to the right.
I stumbled upon an error when using tools to image some pcs and now I need to repartiition those machines without losing any data. This works pretty well with gparted 0.18.0. There I move my second partition to the right with an offset of 79MB. Then I grow my first partition 79MB. Everything is working flawlessly. But since there are about 35 machines I wanted to build a script that does that.
The resizing and everything is pretty easy. What I don't get in my head is the moving of the partition to the right. Basically I need a dd command line that does that. My thinking is that I need to start at the back and work my way the front. So I thought:
- if and of are the same partition (remember is already grown to fit the offset data) /dev/sda2
- the bs may be 16MiB since that is what gparted benchmarked
- what would be the parameters that achive the copying from right to left so that the data doesn't get overwritten
I talked to the maintainer of gparted and he said dd is used to achieve this. But I can't figure out how.