i need help with some trouble in my Clonezilla Script.
I have modified the syslinux.cfg that i can choose an action with clonezilla. One Option is, to create an Image (always the same machines) with clonezilla to my USB HD. With the ocs_prerun option I mount a partition and delete some big files (Backup Files). Then the Script will take an Image to my USB HD in one folder named images. Here is my Problem. I want to ask the user for a name for the folder, where the image will be saved. But i can't make a script, where i can ask the user for a name and get this in a variable. Because i need some quotation marks with the option 'read -p "Give a name for the Image" Varaible_name. I tried it with an sh script, but this will not be able too.
How can i solve this, when I want a query in the ocs_prerun option? Can you help me?
Big thanks to your answers!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
But now I have another Problem. My Images will be saved (USB Drive, SDC1 is my Clonezilla Boot Partition) on /sdc2/clonezilla/images/IMAGENAME. I can't use the ocs_repository because of the directory "clonezilla/images" (can only use ocs_repository to root of sdc2).
I tried it with a "mount -t ntfs-3g /dev/sdc2/clonezilla/images /home/partimag" but I get an error "Not a directory". I can save the Image, when ich only mount /dev/sdc2, but i can save them in the root of the disk.
How can I save the Image in a special Directory on my HDD, when I use a Script and the "ask_user" parameter for the Name of the Image? Without the ask_user parameter i can solve this with ocs_live_run=".... savedisk /clonezilla/images sda sdb"
Big thanks again for your help!
Last edit: Benjamin 2018-01-15
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hallo,
i need help with some trouble in my Clonezilla Script.
I have modified the syslinux.cfg that i can choose an action with clonezilla. One Option is, to create an Image (always the same machines) with clonezilla to my USB HD. With the ocs_prerun option I mount a partition and delete some big files (Backup Files). Then the Script will take an Image to my USB HD in one folder named images. Here is my Problem. I want to ask the user for a name for the folder, where the image will be saved. But i can't make a script, where i can ask the user for a name and get this in a variable. Because i need some quotation marks with the option 'read -p "Give a name for the Image" Varaible_name. I tried it with an sh script, but this will not be able too.
How can i solve this, when I want a query in the ocs_prerun option? Can you help me?
Big thanks to your answers!
There are some reserved words for this kind of purpose. Check this:
http://clonezilla.org/advanced/reserved-word-ocs-sr.php
Steven
Thank you for your answer. It works great!
But now I have another Problem. My Images will be saved (USB Drive, SDC1 is my Clonezilla Boot Partition) on /sdc2/clonezilla/images/IMAGENAME. I can't use the ocs_repository because of the directory "clonezilla/images" (can only use ocs_repository to root of sdc2).
I tried it with a "mount -t ntfs-3g /dev/sdc2/clonezilla/images /home/partimag" but I get an error "Not a directory". I can save the Image, when ich only mount /dev/sdc2, but i can save them in the root of the disk.
How can I save the Image in a special Directory on my HDD, when I use a Script and the "ask_user" parameter for the Name of the Image? Without the ask_user parameter i can solve this with ocs_live_run=".... savedisk /clonezilla/images sda sdb"
Big thanks again for your help!
Last edit: Benjamin 2018-01-15
I found another Thread --> https://sourceforge.net/p/clonezilla/discussion/Clonezilla_live/thread/a49cc9d2/?limit=25
So i can solve my problem with mount -bind :-) Thanks to you!