Automated Clonezilla image creation and restoring

Automated Clonezilla Restore or create image

I added and edited these lines on my /syslinux/syslinux.cfg file (Of course change *USERNAME*, *PASSWORD*. and *IP* if you are going to try this):

Restore disk image:

label Restore disk image
MENU DEFAULT
# MENU HIDE
MENU LABEL Restore disk image
# MENU PASSWD
kernel /live/vmlinuz
append initrd=/live/initrd.img boot=live config noswap edd=on nomodeset noprompt locales=en_US.UTF-8 keyboard-layouts=NONE ocs_live_batch="yes" ocs_prerun="dhclient -v eno1" ocs_prerun1="sleep 2" ocs_prerun2="sudo mount -o user=*USERNAME*,password=*PASSWORD* //*IP*/images /home/partimag" ocs_prerun3="sleep 2" vga=788 nosplash ocs_live_run="sudo ocs-sr -g auto -e1 auto -e2 -r -j2 -p reboot restoredisk ask_user sda"
TEXT HELP
ENDTEXT

This will start Clonezilla, ask stupid keyboard question and after that:
– Get IP-address from DHCP server for eno1 (First ethernet network interface)
– Mount images directory from my NAS
– Show list of all images on my NAS
– Restore selected images to the first disk on my computer.
– Reboot the computer

Automated Clonezilla list of images

Create disk image:

label Create disk image
MENU DEFAULT
# MENU HIDE
MENU LABEL Create disk image
# MENU PASSWD
kernel /live/vmlinuz
append initrd=/live/initrd.img boot=live config noswap edd=on nomodeset noprompt locales=en_US.UTF-8 keyboard-layouts=NONE ocs_live_batch="yes" ocs_prerun="dhclient -v eno1" ocs_prerun1="sleep 2" ocs_prerun2="sudo mount -o user=*USERNAME*,password=*PASSWORD* //*IP*/images /home/partimag" ocs_prerun3="sleep 2" vga=788 nosplash ocs_live_run="sudo ocs-sr -q2 -j2 -z1p -i 2000 -p reboot savedisk ask_user all"
TEXT HELP
ENDTEXT

This will start Clonezilla, ask stupid keyboard question and after that:
– Get IP-address from DHCP server for eno1 (First ethernet network interface)
– Mount images directory from my NAS
– Ask name for the new image file
– Creates image of the first harddrive of my computer to my NAS
– Reboot the computer

Any idea how could I get rid of the stupid keyboard-layout question?

"Keyboard configuration"
[Keep]  Keep the default keyboard layout - US keyboard
[Change] Change keyboard layout

Edit: This “Keyboard configuration” problem is now fixed thanks to Gordon Malm on comments =)

You can just hit enter when you see this windows because [Keep] is already selected and that is ok… This is small thing but it just annoys me :-D

2 comments to Automated Clonezilla image creation and restoring

  • Gordon Malm

    Since it has been 4 months since your post you probably already figured this out, but the problem is a typo in your append/boot options line. If you change ‘keyboards-layouts’ to ‘keyboard-layouts’ it will not ask you the question. I prefer to set it explicitly to ‘us’ rather than ‘NONE’ though (difference can be seen via ‘localectl’).

    • I have good news and bad news… bad news is that I still had that problem but the good news are that your comment helped to fix that so big thanks to you and I will updated my post soon =)

Leave a Reply to Petri Cancel reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

  

  

  

This site uses Akismet to reduce spam. Learn how your comment data is processed.