Use mount command with offset and loop instead of losetup and partprobe
Use mount command with offset and loop instead of losetup and partprobe

Kernel sometimes caches the partition tables in the file if
using loopback devices directly with losetup, and partprobe
does not cause the kernel to re-read the partition tables.

Mount with -o loop,offset seems to avoid kernel caching the partition
table, but this is not entirely confirmed yet.

resin-io/resin-preload-image-script,resin-io/resin-preload-image-script