Production Deployment: Cloning a TK1

I have my TK1 set up now with Ubuntu: all packages installed, drivers, configuration files, etc, running Qt 5.9, CUDA and ROS. The set up procedure for all of the above is quite tedious, requiring a lot of manual input. Ideally moving forwards, I want to take a direct copy or clone of the working TK1 set up I have and then push it onto other TK1 modules without going through the whole set-up sequence manually.

It would be great if I could clone the contents of the MMC onto a microSD card, then do some kind of update via u-boot however I don’t really know where to start with this.

What is the feasibility of copying the rootfs from the working TK1 and replacing the files in my deployment image? Could this work? I could then use the update.sh script to push the rootfs onto the microSD card and update via the usual run setupdate command.

Any help with this would be greatly appreciated - its the last box needing to be ticked!

you can use u-boot to mount eMMC of TK1 to PC via USB interface, it is explained here.

Hi @benjamin.tx

I’ve run ums 0 mmc 0 at the u-boot stage and I have a new drive mounted showing the contents of boot - however, I can only see two files: tegra124-apalis-eval.dtb and uImage.

There is no rootfs or anything else.

Should I be seeing more files/directories?

Ok, ignore my response. I had connected it to a Windows machine which only showed the boot drive, connecting it to my Ubuntu machine brings up both a boot and rootfs drive.

So now that I have these both, I can use dd to clone to a file - correct?

What are the dangers of cloning the rootfs this way? What do I need to watch out for? Is there anything which will get messed up because of doing things this way?

ddshould work. I cloned rootfs with rsync -avxHAX. You may clean system log in /var/log/, SSH keys, bash_history and anything unique in Ubuntu as well as system information in user’s home folder.
@marcel.tx , could you provide suggestion about this?

@benjamin.tx , no sorry I won’t as I do not believe in this way of deploying an Embedded Linux system.

Note that this also has absolutely nothing to do with any of Toradex’ hardware at all and one finds countless articles across the Internet covering such wisdom or may enquire Canonical about it.

Marcel, Thanks. I also didn’t fully tested the cloned image.