28
submitted 2 months ago by dRLY@lemmy.ml to c/opensource@lemmy.ml

I am having issues getting results on searches because I get a bunch of results for doing a many ISOs to one USB (like Ventoy). Though I do get some results for hardware devices that can clone one USB to one or more blank USBs. But those hardware devices sell for hundreds of dollars.

I have a periodic need to update around 17 bootable USB drives at work. The drives are burned from ISO files (PC repair tools) and need to be updated with updated versions of the ISO. Currently I have to start each one at a time and is annoying (not as bad as some sys admins out there needing to do hundreds of drives).

So I was wondering if anyone knows of FOSS (or even mostly FOSS) plans/instructions for making a one to many USB clone hardware device using RPi or similar (I have a RPi 5 and a Pico W atm)? If a purpose built hardware device isn't around. Are there any FOSS software programs for Windows (my only real option at work) that can handle taking one ISO to burn onto many USBs? I am fine with it doing them one at a time if they are all plugged-in automatically or if it can do small groups of like four or five.

Just seems like out of all the different guides/plans/kits for things like RPi or similar-ish boards. That there would be something like those pricey one to many cloning devices. Thanks in advance to everyone that can point me to anything useful!

top 7 comments
sorted by: hot top controversial new old
[-] solrize@lemmy.world 12 points 2 months ago

Get a USB hub (7 port is common), plug the USB drives in, then run a script that copies the iso to one drive after another. USB itself sucks enough that trying to do them in parallel is likely asking for trouble.

[-] hydrogen@lemmy.ml 6 points 2 months ago

Not on Windows, maybe WSL? Popsicle from System76

[-] perry@lemy.lol 4 points 2 months ago

Since you asked for windows, etcher can do multiple drives as of v1.4.3

https://blog.balena.io/etcher-now-with-multi-write-and-compute-module-support/

[-] tofubl@discuss.tchncs.de 4 points 2 months ago* (last edited 2 months ago)

I have done a similar thing in the past, but to flash firmware onto any device with a certain USB descriptor that gets plugged in. It was a mess of USB hubs and cables, but it worked.

What I did was write a udev rule that checks for the vendor and product id of a newly plugged in device and calls a script when there's a match. The script then performs the flashing and logs the output.

In your case:

  1. dd the source USB to a file (make sure the partition you're dding is smalled than any target drive
  2. Udev rule according to your needs (all the same product or different drives?)
  3. Script that dds the file you created earlier back to the newly plugged in drive.

Edit. Did this on a rpi3

[-] vk6flab@lemmy.radio 3 points 2 months ago

If you use a raspberry pi for each USB device, you could use multicast to distribute the iso across the network once and have each pi write it to the USB drive connected locally.

I also had a quick look around and found this:

One other idea I came across was to setup the devices as a raid array and write to the raid device.

[-] cmnybo@discuss.tchncs.de 2 points 2 months ago

Does your windows machine have WSL? I would just write a bash script that would DD the image to the drives. Keep in mind that you will be severely bandwidth limited by the USB interface, so it will take a long time. All of the ports on the controller share the same bandwidth. Ideally you would build a PC with lots of USB controller cards for that.

[-] IrritableOcelot@beehaw.org 1 points 2 months ago* (last edited 2 months ago)

Is that true? I thought that pairs of USB-A ports shared the same PCIe lanes, and USB-C each got their own set?

Edit: thinking about it a bit more, I suppose it could depend on how the SOC/chipset allocates those lanes, but in my experience when writing a single USB I'm usually limited by the thermals of the USB, and writing well below the speed of the port. I suppose if you were writing many at once (or if your USBs were nice) that could bottleneck on the port speed.

this post was submitted on 15 Oct 2024
28 points (96.7% liked)

Open Source

31712 readers
169 users here now

All about open source! Feel free to ask questions, and share news, and interesting stuff!

Useful Links

Rules

Related Communities

Community icon from opensource.org, but we are not affiliated with them.

founded 5 years ago
MODERATORS