liveusb-creator skip copying iso files
Originally created by Tails on #5300 (Redmine)
We’ve seen such issues at "Clone & upgrade" time reported quite often recently on our various support channels:
Not enough free space on device.
1712MB ISO + 0MB overlay > 1485MB free space
Every time it was caused by random cruft (generally a Tails ISO) added to the source USB stick, and every time we were able to communicate with the reporter long enough, removing that cruft fixed the issue.
First, there seems to be a bug in the 1712MB size computation: even when random files were added on the source partition, given the size of the source partition is the same as the size of the target partition, it has to fit. This should be trivial to fix.
Second, perhaps we could add a very dumb and simple filter to the clone process, to skip copying .iso files. This would have avoided the issue in all cases I’ve been given to see.
Alternative proposal
Add a file listing all files expected in a Tails system partition (should be easy to create at build time) and only copy these files? That would prevent the cloned Tails to carry random shit.
But that seems more complicated to implement. So maybe the easiest, the better.