I'm working on a bash script that automates creating a clonezilla image, and a clonezilla recovery iso.
Syslinux and grub can boot and run the script fine, and ocs-sr creates an image in a folder, however the script doesn't fully complete because after ocs-sr finishes creating the image folder, it then shows an interactive menu asking me if i want to power off, reboot, or cmd.
I've tried adding -b -batch --batch etc, and "ocs_live_batch=yes", and other things, but the script still wont progress after running ocs-sr.
Hello,
I'm working on a bash script that automates creating a clonezilla image, and a clonezilla recovery iso.
Syslinux and grub can boot and run the script fine, and ocs-sr creates an image in a folder, however the script doesn't fully complete because after ocs-sr finishes creating the image folder, it then shows an interactive menu asking me if i want to power off, reboot, or cmd.
I've tried adding -b -batch --batch etc, and "ocs_live_batch=yes", and other things, but the script still wont progress after running ocs-sr.
What am I doing wrong?
Kind Regards, Thanks
syslinux.cfg
LABEL run_script
MENU LABEL RUN SCRIPT
KERNEL /live/vmlinuz
APPEND boot=live union=overlay username=user config components quiet noswap edd=on nomodeset enforcing=0 noprompt vga=788 ip= nosplash net.ifnames=0 splash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1 keyboard-layouts=uk locales=en_GB.UTF-8 loglevel=3 ocs_1_cpu_udev ocs_live_batch=yes ocs_live_run="sudo bash /run/live/medium/script.sh"
INITRD /live/initrd.img
script.sh
echo -e "Starting disk image creation..."
ocs-sr --batch -q2 -j2 -nogui -z9p -sfsck -scs -senc savedisk "$IMAGE_NAME" "$SRC_DISK"
Breaks here, and asks if i want to power off etc, and doesn't continue the script......
echo -e "Creating recovery ISO..."
ocs-live-dev -g auto -e1 auto -e2 auto -k1 -scr --batch -p noprompt \
--recovery-iso \
--recovery-name "$IMAGE_NAME" \
--language en_GB.UTF-8 \
--keymap NONE \
--keyboard-layout UK \
--iso "$CZ_ISO_DIR"
So where do the variables "$IMAGE_NAME" and "$SRC_DISK" come from?