Open cassidyjames opened 2 years ago
This could be useful. Though in this particular case it sounds like it would be better if flatpak create-usb
had support for outputting an image file?
Ooh, that's not a bad idea as well. Though I could see the duplicator mode being useful in other contexts, like when we copy drives that are used in the laptop provisioning process or with other, not-only-Flatpak content.
Actually, in this case another example is that we're including a document on the root of the drive (I guess that would be step 1a) as well. :)
Yep, there are other uses for a duplicator mode.
I guess this would require that the USB drive being cloned is no larger than the ones it is cloned onto, and the full size will be copied even if the used portion is smaller?
It could perhaps detect a partition table smaller than the drive, but that would probably only happen when it was flashed from an image.
Other than that, reading from a drive instead of an image should be straightforward, so I think other than a few smaller details, this would mostly be a matter of designing and implementing a good UI for the feature.
We're using Popsicle at the Endless OS Foundation to make copies of drives used to install Flatpak'd learning apps in offline or limited connectivity deployments. Currently, our process looks like:
flatpak create-usb
to prepare one USB drive, which takes a lot of time due to downloading all the apps and dependencies, compressing them, and writing them to the drive.It could be handy to use Popsicle more like a disk duplicator, where it could read the contents of one drive and copy them bit-for-bit to additional drives, cutting out that middle step.