You could customize a Clonezilla live image to do whatever you want, for example, automate the image to always backup your HDD into a specific partition without all the steps that you must type before execute the task.
For example, everytime you execute a task with Clonezilla live, it tells your something like it just before you type "Y" to confirm the task:
Next time you can run this command directly:
/opt/drb1/sbin/ocs-sr -g auto -e1 auto -e2 -c -r -j2 -p true restoreddisk Monimage-img sda
It could be used by you to automate it into your custom Clonezilla live DVD:
Use your own script and run it on Clonezilla live
This doc describes how to use your own script and run it on clonezilla live
First, prepare your own program, say, a script "custom-ocs". A sample
script file /opt/drbl/samples/custom-ocs, which allows user to use
clonezilla live to choose (1) backup the image of /dev/hda1 (or
/dev/sda1) to /dev/hda5 (or /dev/sda5) (2) restore image in /dev/hda5
(or /dev/sda5) to /dev/hda1 (or /dev/sda1), can be found when you are
running clonezilla live (version 1.0.3-20 or later) or in DRBL server
(version 1.7.12-1 or later). More examples are available in
/opt/drbl/samples/custom-ocs, you can refer to them.
If you edit the script on MS windows, you have to convert the format
to Unix format. You can use the command "dos2unix" to convert it to
UNIX format. If you do not convert the format, your script won't work
on Unix/Linux system.
Remember to add shebang line (#!/bin/bash) in your script to avoid a
"Exec format error" issue. Boot Clonezilla live, enter command
prompt, and run "sudo su -" to become root. Mount a working space as
/home/partimag. You can use the command "prep-ocsroot" to help you to
do that, or use mount command to mount that. E.g. run "mount /dev/sda1
/home/partimag" to use /dev/sda1 as the working dir.
Copy the custom-ocs to dir /home/partimag.
Run the follow on Clonezilla live command prompt:
/opt/drbl/sbin/ocs-iso -g en_US.UTF-8 -k NONE -s -m ./custom-ocs
to create the iso file for CD/DVD. or
/opt/drbl/sbin/ocs-live-dev -g en_US.UTF-8 -k NONE -s -c -m ./custom-ocs
to create the zip file for USB flash drive.
In the above examples, "-g en_US.UTF-8" means the language will be
English, "-k NONE" means won't change the keyboard layout (default is
US keyboard). For other options, please run "/opt/drbl/sbin/ocs-iso
-h" or "/opt/drbl/sbin/ocs-live-dev -h" to get more info.