User:Maffblaster/Infrastructure/Disk images

When working with small systems (such as SoCs, or other types of embedded systems), it is useful to know how to manipulate disk images. This article will attempt to flush out different capture methods, how to maintain them, mount them, convert them to virtual machines, view data inside, etc.

Capture
There are many tools available in Gentoo to capture disk images. Capturing an image is nothing more than making backup of the system. Generally this involves physically connecting the disk to a system and creating a file from the disk image. Starting from easier and faster methods, and moving to harder and slower methods:


 * 1) Connect the disk by inserting it into an external USB device, then connecting the USB device to a system.
 * 2) Connect the disk directly to the system's motherboard.
 * 3) Connect the disk to another system, and then send the data to a new system.

See the Backup article for more information on creating backups in general.

Once the disk is connected choose a tool to use to capture the disk image. For this example, a variant of dd will be used to ensure the integrity of the backup.

Compress
To get the best backup to space ratio, compressing a raw image after the capture will be highly beneficial.