Making backup images - robotique-udes/zeus_rover GitHub Wiki

Making backup images

It is important to make backups images of the micro SD cards used in the Jetsons to avoid having to redo the entire installation process if one of the SD cards stops working. These images can easily be flashed on a new micro SD card and the instantly be used in the Jetson.

Important notes:

  • If you reflash a new microSD card it must be the same size as the original or larger than the original.
  • A backup image will be the same size as the card capacity since all of the data (including the empty space) will be copied so make sure to have enough space on your computer. There is however an option to compress the image as it is being copied, which will lower it's size.

Making a backup on Linux

Find the drive name

You can find the drive name with the command following command

sudo parted -l

Or with the Disk GUI application Disk GUI application screenshot

The device name should look like this: /dev/sdX. The X represents a letter. After that, there is a number which represents the partition number. You can disregard this number since we will be copying all of the partitions.

Clone the drive

Make sure the drive is unmounted. Make sure to replace the X with the drive letter.

sudo umount /dev/sdX

Start the cloning process with the following command. Again, make sure to use the correct drive letter and choosing an appropriate file name.

sudo dd if=/dev/sdX conv=sync,noerror bs=64K | gzip -c > ~/backup_image.img.gz

When the process starts there will not be any progress indicator. The cloning could take a long time, depending on the drive size and transfer speeds.

Restoring the drive

You can copy the backup image on a new SD card with the following command. You will need to find the device name before doing this by following the same steps as in the previous section.

gunzip -c ~/backup_image.img.gz | dd of=/dev/sdX bs=64K