Kamino is an integrity-based disk imaging utility for Linux.
- Drive-To-Drive Cloning
- Capture Image File from Drive
- Deploy Image File to a Single Drive
- Deploy Image File to Multiple Drives Simultaneously
- Wipe a Single Drive
- Wipe Multiple Drives Simultaneously
- Automated Integrity Checking of Image Files
- Image File Manager
Kamino is written in bash and will run on most modern Linux distributions with a kernel version of 2.6 or higher. Kamino relies mainly on dd
, gzip
, and sha256sum
which are bundled with most distros. Kamino has been verified to work on Ubuntu 16.04 thru 18.04, Arch, Debian, RHEL 6.7, and Fedora 25 but will likely run on many others.
Kamino supports most block devices such as USB Drives, SATA HDDs and SSDs, SD Cards, etc. The rule of thumb is if it shows up under /dev
as sda
through sdz
, the device will most likely be supported. Optical devices (CD/DVD/BD) are not supported at this time.
Step 1: Download the latest Kamino tarball from the release folder.
Step 2: Verify the integrity of the Kamino tarball by running the following command and comparing the output to the expected hash totals:
sha256sum kamino-1.x.y.tgz
(where x.y corresponds to the version that you downloaded)
If the sha256sum output matches the expected hash totals, proceed to Step 3.
Step 3: Extract the tarball with the following command:
tar -xzvf kamino-1.x.y.tgz -C <destination directory>
(where x.y corresponds to the version that you downloaded)
This will create a folder titled "kamino" inside the <destination directory>
Example: tar -xzvf kamino-1.0.1.tgz -C /home/mike
- Running Kamino
- Capture Image
- Clone Drive
- Deploy Image (Single Drive)
- Deploy Image (Multi-Drive)
- Zeroize (Single Drive)
- Zeroize (Multi-Drive)
- Manage Images
- About Kamino
- Exiting Kamino
- kamino.config
From a terminal, cd
into the "kamino" folder. Execute kamino
via sudo
or as root:
sudo ./kamino
Kamino will start and you will be brought to the Main Menu.
Important: On your first run of Kamino, make sure you set the directory you'd like to use for image files via "Manage Images" by entering m
into the Main Menu selection followed by c
to configure the directory.
Note: If you cloned this repo and are running Kamino from the src
directory, make sure the execute bit is set for the scripts:
cd kamino
chmod +x kamino
chmod +x res/scripts/*
Enter 1
into the Main Menu selection to capture an image of a drive attached to the system.
A list of available drives will be displayed. Choose a source drive
by entering the corresponding number into the selection prompt. In the example below, /dev/sdg
is selected by entering 5
Enter a name for the image file. Do not include any file extensions since .img.gz
will be automatically appended. In the example below, the name raspberry-pi-backup
is entered.
The command to capture the image will be displayed based off of your input from the previous steps. Carefully review the output from this screen and enter y
to begin the image capture process.
Capturing a drive image can take anywhere from a minute to many hours depending on the size of the drive and the speed of your hardware. During the image capture process, the dd
status output will display to show the progress.
When the image capture is complete, a sha256sum
will be generated and saved as <image_name>.img.gz.sha256
in your images_directory
. Press enter to return to the main menu.
Enter 2
into the Main Menu selection to clone one drive directly to another.
A list of available drives will be displayed. Choose a source drive
by entering the corresponding number into the selection prompt. In the example below, /dev/sdb
is selected by entering 2
Next, choose a target drive
by entering the corresponding number into the selection prompt. In the example below, /dev/sdc
is selected by entering 2
The command to clone the drive will be displayed based off of your input from the previous steps. Carefully review the output from this screen and enter y
to begin the drive cloning process.
Cloning one drive to another can take anywhere from a minute to many hours depending on the size of the drive and the speed of your hardware. During the drive cloning process, the dd
status output will display to show the progress.
When the drive clone is complete an !!!INFO!!!
message will display. Press enter to return to the main menu.
Enter 3
into the Main Menu selection to deploy an image file to a single target drive.
A list of available images from your images_directory
will be displayed. Choose a source image
by entering the corresponding number into the selection prompt. In the example below, the ubuntu_laptop-20190103.img.gz
image file is selected by entering 2
Next, choose a target drive
that you wish to deploy the image to by entering the corresponding number into the selection prompt. In the example below, /dev/sdc
is selected by entering 3
An integrity check will be performed on the selected image file by running sha256sum
and ensuring the output matches the original hash total of the image. If the integrity check passes, the command to deploy the image will be displayed based off of your input from the previous steps. Carefully review the output from this screen and enter y
to begin the image deploy process.
Deploying an image file to a drive can take anywhere from a minute to many hours depending on the size of the image file and the speed of your hardware. During the image deploy process, the dd
status output will display to show the progress.
When the image deploy is complete an !!!INFO!!!
message will display. Press enter to return to the main menu.
Enter 4
into the Main Menu selection to deploy an image file to multiple target drives at the same time.
Note: For multi-drive operations, the target drives you select must all be the same size.
A list of available images from your images_directory
will be displayed. Choose a source image
by entering the corresponding number into the selection prompt. In the example below, the ubuntu_laptop-20190103.img.gz
image file is selected by entering 2
Next, choose two or more target drives
that you wish to deploy the image to by entering the corresponding numbers into the selection prompt. Your input should be comma-separated with no spaces. In the example below, /dev/sdb
, /dev/sdc
, and /dev/sdd
are selected by entering 2,3,4
An integrity check will be performed on the selected image file by running sha256sum
and ensuring the output matches the original hash total of the image. If the integrity check passes, the command to deploy the image will be displayed based off of your input from the previous steps. Carefully review the output from this screen and enter y
to begin the image deploy process.
Deploying an image file to multiple drives can take anywhere from a minute to many hours depending on the size of the image file and the speed of your hardware. During the image deploy process, the dd
status output will display to show the progress.
When the image deploy is complete an !!!INFO!!!
message will display. Press enter to return to the main menu.
Enter 5
into the Main Menu selection to wipe a single target drive by writing all zeroes.
A list of available drives will be displayed. Choose a drive to wipe by entering the corresponding number into the selection prompt. In the example below, /dev/sdd
is selected by entering 4
The command to wipe the drive will be displayed based off of your input from the previous step. Carefully review the output from this screen and enter y
to begin the drive wipe process.
Wiping a drive can take anywhere from a minute to many hours depending on the size of the drive and the speed of your hardware. During the wiping process, the dd
status output will display to show the progress.
When the drive wipe is complete an !!!INFO!!!
message will display. Press enter to return to the main menu.
Enter 6
into the Main Menu selection to wipe multiple target drives at the same time by writing all zeroes.
Note: For multi-drive operations, the target drives you select must all be the same size.
A list of available drives will be displayed. Choose two or more
drives to wipe by entering the corresponding numbers into the selection prompt. Your input should be comma-separated with no spaces. In the example below, /dev/sdb
, /dev/sdc
, and /dev/sdd
are selected by entering 2,3,4
The command to wipe the drives will be displayed based off of your input from the previous step. Carefully review the output from this screen and enter y
to begin the drive wipe process.
Wiping multiple drives can take anywhere from a minute to many hours depending on the size of the drives and the speed of your hardware. During the wiping process, the dd
status output will display to show the progress.
When the drive wipe is complete an !!!INFO!!!
message will display. Press enter to return to the main menu.
Enter m
into the Main Menu selection to manage images and configure which directory you would like to use for image files.
Enter c
into the prompt to configure the images directory for Kamino. In the example below, the directory /home/mike/images
is entered.
Note: A trailing slash /
at the end of the path is not necessary.
Choose an image to manage by entering the corresponding number into the selection prompt. In the example below, the raspberry-pi-backup.img.gz
image file was selected by entering 3
from the Manage Images screen.
Enter v
into the prompt to manually verify the integrity of the image file.
Enter d
into the prompt to delete the image file.
Enter a
into the Main Menu selection to see information about Kamino.
Enter q
into the Main Menu selection to exit Kamino.
The kamino.config
file is located under the kamino/res
directory. The various options (and defaults) are described below.
Note: the images_directory
option should be set via "Manage Images" within Kamino. All others can be edited in this file directly.
# Block size which is utilized for dd operations
# Default: 64K
block_size 64K
# Directory where image files are stored
images_directory /path/to/images
# Directory where temporary pids are stored
# Default: /tmp
tmp_directory /tmp
# gzip compression level [1-9]
# Default: 6
# 1 = fastest, lowest compression (produces largest image files)
# 9 = slowest, highest compression (produces smallest image files)
compression_level 6
Kamino Copyright (C) 2019 Mike Del Pozzo
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
See LICENSE for details.