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:
Flash USB drive,
Push hardrive into Hardware
Go through installation steps
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.
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.
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.
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!
@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 @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.
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: https://www.balena.io/blog/advanced-device-provisioning-workflow-for-large-fleets-preloading-and-pre-provisioning/
Edit:
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.