I would like to provide a short tutorial to all of you out there looking for an automated Clonezilla Restore option.
Assumptions
- UEFI Boot only
- both Clonezilla
/dev/sdb1and Image repository/dev/sdb2/imagesare on the same USB stick - Restore to entire SSD
/dev/sda
I would like to
- Boot from USB stick
- Auto-select and start custom Clonezilla restore option
- Auto-load image repository from USB Stick
- User selects the image to be restored
- Auto-restore from selected image to SSD
- Auto-reboot after successful restore
Steps
In your Clonezilla USB Stick open
/boot/grub/grub.cfgusing a text editor. After the following textSince no network setting in the squashfs image, therefore if ip=, the network is disabled.add the following to make this the first Clonezilla default entry:Most important sections
ocs_prerun="mount /dev/sdb2 /mnt" ocs_prerun1="mount --bind /mnt/images /home/partimag/"mounts/dev/sdb2/imagesas image repoocs_live_run="ocs-sr -g auto -e1 auto -e2 -r -j2 -k -scr -batch -p reboot restoredisk ask_user sda"restores image to/dev/sdaand rebootsFull example of grub.cfg