Balena Etcher - clone drive, now have two blank drives

Hey @destroyed

Thanks for the info.

So this is a serious bug. It happens only on Windows, this is why I couldn’t reproduce it at first (I was trying on Linux).
It affects all versions with the clone drive feature: 1.5.107, 1.5.108, 1.5.109 and , 1.5.110.

It is due to the fact that we run some diskpart commands (clean and rescan) on the drives before flashing them (otherwise Windows doesn’t let you write to the first bytes of the disk where the partition table is).
There is no check around this part so we also run this for source drives: https://github.com/balena-io-modules/etcher-sdk/blob/9e539f3842d91900181efef302791f469fdbd376/lib/source-destination/block-device.ts#L176

So even if we open the source drive readonly, we diskpart clean it first, erasing its partition table.
Then we clone it to the target drives, resulting in drives having all data except the partition table making them appear as empty.

This will be fixed in the next release 1.5.111, we’re removing the impacted versions in the meantime.

You can most probably recover data on impacted drives. You’d need to recreate the partition table for that. If you have the source image for the drive it shouldn’t be too difficult. I can provide help if needed.

Thanks again for reporting this.