VisionSensor Linux  2024-05-14
Linux backup and recovery

Recovery package

New Linux releases for the VisionSensor are provided as recovery packages. A recovery package contains the Linux image (tar.gz) and scripts for installing images and for creating backup images.

Recovery Package contents
File Description
helpers/∗ Files required by the installation scripts.
html/∗ This document, the most recent release is also available online
deb∗.tar.gz Linux image: compressed tarball containing the root filesystem.
deb∗-elbe-report.txt Report file generated by the ELBE build system
deb∗-license.txt Licenses of installed packages within the Linux image
MAKE_SD.cmd,
MAKE_SD.sh
Installs the Linux image on a µSD card by using a card reader. After starting the VisionSensor with the prepared card, the device will install the new system and boot automatically into the installed system.
Remote_OS_Backup.cmd,
Remote_OS_Backup.sh
Used to backup a the filesystem of a running device by using ssh / scp. The created Linux image will be downloaded automatically. It can then be used with MAKE_SD.∗ and Remote_OS_Installer.∗ to restore the file system, or to duplicate the file system on another device.
Remote_OS_Install.cmd,
Remote_OS_Install.sh
Installs the Linux image on a running device by using using ssh / scp. The old installation will be overwritten completely.

The recovery packages and tar.gz images provided by IMAGO have a unique version number which is part of the file name.

Example: deb10_vspv_v1.2_a.tar.gz

deb10 OS: Debian 10
vspv Target device: VisionSensor PV, vspv3 is used for the VisionSensor PV3
v1.2 Image version (see page Release Notes)
a Image configuration
Note
New Linux releases can be found at the IMAGO Download Portal (register here).

Backup and recovery instructions

Extract the recovery package on a Windows or Linux host. The included shell scripts (*.sh) and batch files (*.cmd) are controlled interactively. Just execute the file and follow the instructions.

Note
The VIBFinder 2 tool for Windows also supports Image Backup and Recovery. Only the Linux image (tar.gz) is required.
  • Remote_OS_Backup.cmd / Remote_OS_Backup.sh:
    Backup the filesystem of a remote device by using ssh / scp. The created Linux image (tar.gz) will be downloaded automatically. It can then be used with the install script to restore the filesystem.
  • Remote_OS_Install.cmd / Remote_OS_Install.sh:
    Install the Linux image (tar.gz) on a remote device by using using ssh / scp. The existing filesystem will be replaced completely.

Please note that the executable flags for the Linux scripts have to be set after extracting the recovery ZIP file:

$ unzip Linux_Recovery_*.zip
$ cd Linux_Recovery_*
$ chmod +x *.sh

The scripts and batch files can also be controlled using command line parameters. Use the parameter -h for help:

$ ./Remote_OS_Install.sh -h
Usage: Remote_OS_Install.sh [options] [device_address] [image_file]
OPTIONS:
-h Print this help
-o Set Ext4 journaling mode to data=ordered
(data=journal is used by default)
-y Say yes to all questions
EXAMPLE:
./Remote_OS_Install.sh 192.168.2.3 backup.tar.gz
Note
  • The backup and recovery scripts currently support the partition layout described in section Mass storage devices.
  • The Linux root partition /dev/mmcblk0p2 must have enough free disk space to store the Linux image during backup and recovery.
  • Do not remove power during backup and recovery.
  • All existing data will be lost during image recovery, except for hidden files / directories under the root directory (e.g. /.my_data).
  • Avoid using a DHCP assigned IP address as target device for the backup script or batch file. The IP address may change after reboot during the backup process and the download of the image may fail. Instead, use a fixed IP address or the mDNS hostname <serial number>.local, e.g. VSPV2209103853.local.
  • The bootloader and the FPGA firmware will automatically be updated to the version contained in the image during recovery.

µSD card preparation using a card reader

The script / batch file MAKE_SD.sh / MAKE_SD.cmd prepares a µSD card by using a host with a memory card reader. The script creates a FAT boot partition (/dev/mmcblk0p1) and copies the image and a RAM disk containing a minimal Linux environment to the card. After starting the VisionSensor with this card, the Linux partition will be created (/dev/mmcblk0p2) and the root filesystem image gets extracted. The device will then reboot automatically into the installed system.

Warning
Make sure to enter the correct target disk and device identifier for the memory card reader. Selecting the wrong device may destroy data on other disks!
Note
The size of the first FAT partition may be larger than on delivered devices because the image has to fit on this partition.