I have a .RAW image file. I need to skip the first $SKIP_BLOCKS bytes which correspond to the MBR.
I previously had the file in compressed format and would do the following
xz -d -c $COMPRESSED_IMAGE_PATH | sudo dd skip=$SKIP_BLOCKS of=$PARTITION status=progress
I'm now using a different compression utility that does not stream to stdout.
Would the following work?
sudo dd skip=$SKIP_BLOCKS if=$UNCOMPRESSED_IMAGE_WITH_MBR of=$UNCOMPRESSED_IMAGE_WITHOUT_MBR status=progress
Is there a cleaner way using qemu-img (or related utilities) that will allow me to modify the image in-place. simply by truncating the first $SKIP_BYTES?