Create Your Own Recovery Clonezilla Live Manually |
This doc describes how to create your own recovery CD or USB flash drive manually
First, you have to use Clonezilla to save the image you want to include in the recovery CD or USB flash drive. You can do it via Clonezilla live or DRBL/Clonezilla server. Once the image is ready, you can create your own recovery CD/USB flash drive by:
- The following is for those who prefer to use command to create a Clonezilla Live ISO or zip file with a built-in image used to restore.
- For example, let's say you want to create a CD/DVD ISO file in which an existing image "sarge-image" will be inserted in. If you use Clonezilla live to boot into shell mode, you have to mount the clonezilla image home (maybe source is from ssh server, nfs server or samba server) as /home/partimag first, and run "cd /home/partimag" to change working dir so that you have a writable dir later. If you are using Clonezilla server, the clonezilla images normally already exist in the directory /home/partimag. Now you can run the following to create a Clonezilla live iso file:
ocs-iso sarge-image
If you want to create an ISO file with built-in pre-settings, such as keyboard layout, so that it can run in batch mode, you can create it like:ocs-iso -g en_US.UTF-8 -t -k NONE -e "-g auto -b -c restoredisk sarge-image hda" sarge-image
If you need to insert more than one image, run the following command:ocs-iso sarge-image etch-image
For more parameters of ocs-iso, run "ocs-iso --help". - To create Clonezilla Live in an USB flash drive with image built-in. For example, you want to create a USB flash drive in which an image sarge-image existing in the Clonezilla server will be inserted:
- Insert your USB flash drive into the USB port on your Clonezilla server and wait a few seconds. Next, run the command "dmesg" to query the device name of the USB flash drive. Let's say, for example, that you find it is /dev/sdb1. If GNU/Linux mounts the USB flash drive automatically, you must unmount it. You can run "df -h" to check to see if it was mounted automatically and, if it was, run something like "unmount /dev/sdb1" to unmount it or you can use your mouse to right-click on the device to unmount it in Gnome/KDE.
- The USB flash drive partition must be formatted. If it is not, for example, for /dev/sdb1, you can run:
mkfs.vfat -F 32 /dev/sdb1
mkfs.ext3 /dev/sdb1
WARNING!!! The above command will delete all existing data in your device! Be sure to backup important data first. Also, be aware that any typo could cause your server not to boot or cause data loss. - Run
ocs-live-dev -d /dev/sdb1 sarge-image
Taking the above steps will create a bootable Clonezilla Live USB flash drive with image sarge-image built-in. For more ocs-live-dev parameters, run "ocs-live-dev --help".
If you want to create a batch-mode Clonezilla live usb flash drive, such as. pre-set the keyboard layout, so that it can be used to boot and run in unattended mode, you can create it like:
ocs-live-dev -d /dev/sdb1 -g en_US.UTF-8 -t -k NONE -e "-g auto -b -c restoredisk sarge-image hda" sarge-image
In the above command, the clonezilla image "sarge-image" will be put in the USB flash drive. This USB flash drive will boot and run in batch mode (-t), in English environment (-g en_US.UTF-8), do NOT change the keyboard layout (-k NONE), and ocs-sr will run with parameters "-g auto -b -c restoredisk sarge-image hda" to restore image "sarge-image" into disk hda (-e "-g auto -b -c restoredisk sarge-image hda"). The parameters used in "-e" will be run by ocs-sr when cloning, so you can run "ocs-sr --help" to check all of them. The above command will create an USB flash drive, and it will allow you to boot and run in batch mode.
- For example, let's say you want to create a CD/DVD ISO file in which an existing image "sarge-image" will be inserted in. If you use Clonezilla live to boot into shell mode, you have to mount the clonezilla image home (maybe source is from ssh server, nfs server or samba server) as /home/partimag first, and run "cd /home/partimag" to change working dir so that you have a writable dir later. If you are using Clonezilla server, the clonezilla images normally already exist in the directory /home/partimag. Now you can run the following to create a Clonezilla live iso file: