Mass Flashing SSD instead of USB

I have 10 SSD disks that I need to load Resin onto an Intel NUC. These will all end going onto Intel NUCs, but I don’t have the all of the hardware yet, only 1. The only way I see this working is:

  1. Flash USB drive,
  2. Push hardrive into Hardware
  3. Go through installation steps
  4. Take out hardrive and Repeat

Is there anyway I do the installation steps to install resin on a hardrive ONCE, and then copy that hardrive to all my other ones?

If not, is there an easier way to physically create copies without having to do these installation steps for each device.

1 Like

Hi @bgold, and welcome to the forums!

Have you considered one of the usual hard drive cloning suspects? I’ve not personally tried it with a Resin install (yet) but Clonezilla has saved me when copying one drive to another before. If you need an exact copy it should do the trick providing you have another machine available to plug both drives into. You could also look at partclone, or partimage or even dd.

Hope this helps!

Hey @chrisys

Thanks for the suggestions. If I clone the drives though, wouldn’t Resin think each drive is the same device in the dashboard?

I was hoping that each hardrive would have a different device name if they pop up on Resin. Unless it’s device specific and not drive specific.

Hmm yes good point. I’ll gladly do some testing to work out the easiest way to do this for you but might take me a few days to get back to you.

I’d very much appreciate that @chrisys - thank you for your help! Just looking for a solution to prep SSD (hard drives) without having to insert them one by one into my hardware.

This sounds like a similar deployment question as my question (currently unanswered):

@bgold I talked to my colleague @shaunmulligan who replied to @jason10’s thread, he pointed out this tool which should help:

The tool will extract the disk image from the flasher so you can write it directly to an SSD. Clone the repo and run ./docker-run with an absolute path to the image you’ve downloaded for your NUC. The resultant disk image will then appear in the output folder.

I’ve just tried this myself and flashed the image to a drive but don’t have any hardware available to do a full test with right now. The great thing is that with this method you can still use the preloading instructions from the other thread too!

Thanks @chrisys I will take a look at this! Thanks so much for the guidance and appreciate the help @shaunmulligan

No need to do any preloading but that’s good to know.

@chrisys I flashed an image using the tool mentioned above but it doesn’t seem to work. I’m not sure exactly why (I have no monitor) but didn’t end up appearing online after doing: ./docker-run PATH-TO-IMAGE and then flashing it using etcher

I guess the first thing to work out here is if it’s actually booting. If you’ve no monitor available can you check the devices is getting an IP address from your DHCP server and is reachable on LAN?

@chrisys So I just hooked it into the monitor and it looks like I get a GNU Grub version 2.02 bash screen. No Resin logo pops up or anything of that nature.

Hi @chrisys just following back up on this.

Hi @bgold thanks for following up! We haven’t yet been able to work through reproducing this issue for you but we’re still aware of it and will take a look as soon as possible.

Hi. What OS version are you trying with?

Hi @bgold,
Are you still facing issues with this?
If so, what OS version did you try unwrapping and got stuck in the bash screen?

Maybe use a disk cloner as suggested from one template image.
All will have the same uuid. But when you have all the disks cloned, put them in a “dock” connected to a computer and mount it, and then run a script to replace the configfile ? Should be a quick process, could be semi-automized ? Just a thought, havent tried.
Devices and their config-files files would have to be pregenerated as explained here:

I have done it this way with a disk now, worked fine. Maybe the balena cli image modification tool could be extended to be able to be able to change a non-mounted physical disk device aswell…but I also consider mounting and copying the file onto the physical disk to be sufficient/as easy, so I wouldn’t really care about that feature.