How to clone Jetson Nano SD Card?

Ok. So you want to master an image that can be flashed onto an SD card of any size with your own software pre-installed? No problem. I’m going to do this with you in this thread rather than write something all at once so others can follow along.

First, let’s prep a VM. You’ve already done this part, but i’ll put this for the benefit of others. I’m going to use multipass since it’s the easiest way I know of to start an Ubuntu VM and works on every platform.

After installing it:

multipass launch -c $(nproc) -d 64G -m 8G -n tegra-image-maker bionic
  • If you’re not on Linux, substitute $(nproc) with the number of cpus on your system.
  • If you don’t have 8G of free memory, 4G will probably work.

That creates a new ubuntu vm with access to all cpus on the system, a 64G disk, 8G of ram, named tegra-image-maker, using ubuntu bionic (18.04). As of writing, bionic is the default anwyay, but this will change.

It may take a while to start the VM.

When it’s done, we can enter it like this:

 $ multipass exec tegra-image-maker bash
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

ubuntu@tegra-image-maker:~$ 

Next, we’ll update the VM.

sudo apt update && sudo apt dist-upgrade -y --autoremove

If you get any interactive menu prompts, select “install the package maintainer’s version”.

Next, let’s install some software we’ll need to build a system image. I will probably forget some stuff here, so i’ll edit this to add things as we discover what’s missing later.

Off the top of my head, for what we’re doing, we probably only need qemu-user-static, so let’s install that. Note: building the kernel will require an arm toolchain, but we’re going to use the pre-compiled kernel and modules by Nvidia.

sudo apt install qemu-user-static binfmt-support

Let me know when you’re caught up @sarthak.srivastava14apr , and we’ll continue.

1 Like