pop-os / popsicle

Multiple USB File Flasher
MIT License
633 stars 76 forks source link

Duplicator mode #182

Open cassidyjames opened 2 years ago

cassidyjames commented 2 years ago

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:

  1. Use 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.
  2. Create an .img of that drive
  3. Use Popsicle to copy that .img to several additional drives

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.

ids1024 commented 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?

cassidyjames commented 2 years ago

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. :)

ids1024 commented 2 years ago

Yep, there are other uses for a duplicator mode.

ids1024 commented 2 years ago

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.