How to save OS image file from VisionSOM-6ULL eMMC
From SomLabs Wiki
How to save OS image file from the eMMC memory
When you make changes on your SoM, like writing files, you can export your data (no matter if you use eMMC memory or SD card), then you upload the disk image and have the exact same data on all devices. In this article you will learn how to copy your disk data onto a flash drive.
Mount the flash drive
At first, connect the flash drive to the USB port. To start using it, you have to mount it.
“Mounting” means attaching an additional filesystem to the currently accessible filesystem. In Windows different filesystems are defined as “C:”, “D:”. In Linux there is one tree filesystem and you can mount a device, so that you can access the content of additional filesystem in a directory (i.e. /mnt/usb instead of F:).
You need to find the name of your flash drive. Use the [code]lsblk[/code] method (plug the flash drive in and out to see what name shows up after running [code]lsblk[/code]). The name of the flash drive will most likely be sda1.
Create the folder you would like to mount. I would recommend to create a /mnt/sda1 folder:
Mount the flash drive.
mount /dev/sda1 /mnt/sda1
You can access the flash drive using the /mnt/sda1 directory. In Windows you would use F:/path/to/a/file.txt but here you use /mnt/sda1/path/to/a/file.txt path.
Export the disk image
Before exporting the data, use the [code]sync[/code] method.
sync() causes all pending modifications to filesystem metadata and cached file data to be written to the underlying filesystems. Export the data using the [code]dd[/code] method:
sudo dd if=/dev/mmcblk1 of=/mnt/sda1/imagename.img
mmcblk1 is the default name of the root Linux filesystem (the content of eMMC or SSD). After the method has finished running run the [code]sync[/code] method again. When you are done with the flash drive, unmount it:
Notice, that here you use the /dev/ directory, not the /mnt/ directory.