Some of our images have a different partition layout, so those hardcoded p1 and p2 in the script will fail with, e.g., RockPi flasher images.
Ideally, we should be using https://github.com/balena-io-modules/balena-image-fs to get the embedded image (instead of implementing a different solution here).