Sorry in advance if I misused or missed something obvious.
I am attempting to setup clonezilla to do a few things. Preferably completely unattended after selecting the first menu item. Generally I have broken these out into a few steps in the syslinux config file.
mount the 2nd partition shared with the clonezilla live usb by label name "images"
clone preselected image from config from the partition labeled "images" to all connected drives excluding the one holding clonezilla and images partitions (but I haven't gotten it to work with ask_user either)
shutdown if no errors. Keep errors displayed if any.
The issue I encounter when attempting to use either test or test2 when attempting this is that I can't get the image repo mounted for use. If I go into enter_shell I can run commands manually to get exactly the desired results, but I don't get the same from letting things naturally run course.
Below is the config file.
Created by generate-pxe-menu! Do NOT edit unless you know what you are doing!
Keep those comment "MENU DEFAULT" and "MENU HIDE"! Do NOT remove them.
Note!!! If "serial" directive exists, it must be the first directive
default vesamenu.c32
timeout 0
prompt 0
noescape 1
MENU MARGIN 5
MENU BACKGROUND ocswp.png
Set the color for unselected menu item and timout message
MENU COLOR UNSEL 7;32;41 #c0000090 #00000000
MENU COLOR TIMEOUT_MSG 7;32;41 #c0000090 #00000000
MENU COLOR TIMEOUT 7;32;41 #c0000090 #00000000
MENU COLOR HELP 7;32;41 #c0000090 #00000000
MENU MASTER PASSWD
say **********
say Clonezilla, the OpenSource Clone System.
say NCHC Free Software Labs, Taiwan.
say clonezilla.org, clonezilla.nchc.org.tw
say THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!
say **********
ocs_live_repository="dev:///LABEL=images" -> What's the error message about this? Please run:
df -ah
in the command line prompt to show the status.
Or when you manually run:
sudo mount -L images /home/partimag
What's the error message?
ocs_live_run="ocs-restore-mdisks -b -a shutdown -p "-e1 auto -e2 -r -icds -j2 -k1 -scr -p true" ask_user ask_user"" -> you'd better to make it like:
ocs_live_run="ocs-restore-mdisks -b -a shutdown -p '-e1 auto -e2 -r -icds -j2 -k1 -scr -p true' ask_user ask_user"
Steven
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello, I forgot to post the version used as well. The version I happen to be running is clonezilla-live-2.7.1-22-amd64
I don't see an error on boot up as the text scrolls by too fast to catch anything. But there doesn't seem to be any red text which usually indicates something is wrong.
After booting up the system using test2 with the " changed to ' as you suggested it defaulted to asking for image repository mounting steps which is the same behavior.
I went into local device -> enter_shell and did the following.
sudo su
df -ah (no /home/partimag mountpoint)
sudo mount -L image /home/partimag (typo but errors as it should)
sudo mount -L images /home/partimag
df -ah (correct /home/partimag mountpoint)
umount /home/partimag
ocs-live-repository dev:///LABEL=images
df -ah (no home/partimag mountpoint)
Logs shown in pictures 1,2,3 done in that order.
Is there a way to change logging to get all outputs/errors from ocs related files? Or general OS logs that may be helpful?
Things work for test if I run them after dropping into enter_shell and sudo su but not unattended.
test2 doesn't seem to mount even if I run it manually.
Also a slightly modified append line. Errors out on disks not accessible/mounted but that is expected seems to image ones it is able to find which works fine and scales well.
You can give Clonezilla live >= 2.7.3-9 or 20210714-* a try: https://clonezilla.org/downloads.php
In these releases, you can use "all" as the device name for ocs-restore-mdisks, and it will find all the local non-busy disks. E.g., make your boot parameter as:
ocs_live_run="ocs-restore-mdisks -b -a shutdown -p '-e1 auto -e2 -r -icds -j2 -k1 -scr -p true' image_name all"
//NOTE// Make sure all the attached local disks are the destination disks. This setting will overwrite all the data on them. Hence please use it carefully.
Steven
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
Sorry in advance if I misused or missed something obvious.
I am attempting to setup clonezilla to do a few things. Preferably completely unattended after selecting the first menu item. Generally I have broken these out into a few steps in the syslinux config file.
The issue I encounter when attempting to use either test or test2 when attempting this is that I can't get the image repo mounted for use. If I go into enter_shell I can run commands manually to get exactly the desired results, but I don't get the same from letting things naturally run course.
Below is the config file.
Created by generate-pxe-menu! Do NOT edit unless you know what you are doing!
Keep those comment "MENU DEFAULT" and "MENU HIDE"! Do NOT remove them.
Note!!! If "serial" directive exists, it must be the first directive
default vesamenu.c32
timeout 0
prompt 0
noescape 1
MENU MARGIN 5
MENU BACKGROUND ocswp.png
Set the color for unselected menu item and timout message
MENU COLOR UNSEL 7;32;41 #c0000090 #00000000
MENU COLOR TIMEOUT_MSG 7;32;41 #c0000090 #00000000
MENU COLOR TIMEOUT 7;32;41 #c0000090 #00000000
MENU COLOR HELP 7;32;41 #c0000090 #00000000
MENU MASTER PASSWD
say **********
say Clonezilla, the OpenSource Clone System.
say NCHC Free Software Labs, Taiwan.
say clonezilla.org, clonezilla.nchc.org.tw
say THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!
say **********
Allow client to edit the parameters
ALLOWOPTIONS 1
simple menu title
MENU TITLE clonezilla.org, clonezilla.nchc.org.tw
label test
MENU DEFAULT
MENU HIDE
MENU LABEL test
MENU PASSWD
kernel /live/vmlinuz
append initrd=/live/initrd.img boot=live union=overlay username=user config components quiet noswap edd=on nomodeset noeject ocs_live_prerun="sudo mount -L images /home/partimag" ocs_live_prerun1="ocs-restore-mdisks -b -a shutdown -p "-e1 auto -e2 -r -icds -j2 -k1 -scr -p true" ask_user ask_user"" ocs_live_run="" ocs_live_extra_param="" keyboard-layouts=NONE ocs_live_batch="yes" locales=en_US.UTF-8 vga=788 ip= nosplash net.ifnames=0 splash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1
label test2
MENU DEFAULT
MENU HIDE
MENU LABEL test2
MENU PASSWD
kernel /live/vmlinuz
append initrd=/live/initrd.img boot=live union=overlay username=user config components quiet noswap edd=on nomodeset noeject ocs_live_repository="dev:///LABEL=images" ocs_live_run="ocs-restore-mdisks -b -a shutdown -p "-e1 auto -e2 -r -icds -j2 -k1 -scr -p true" ask_user ask_user"" ocs_live_extra_param="" keyboard-layouts=NONE ocs_live_batch="yes" locales=en_US.UTF-8 vga=788 ip= nosplash net.ifnames=0 splash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1
ocs_live_repository="dev:///LABEL=images" -> What's the error message about this? Please run:
df -ah
in the command line prompt to show the status.
Or when you manually run:
sudo mount -L images /home/partimag
What's the error message?
ocs_live_run="ocs-restore-mdisks -b -a shutdown -p "-e1 auto -e2 -r -icds -j2 -k1 -scr -p true" ask_user ask_user"" -> you'd better to make it like:
ocs_live_run="ocs-restore-mdisks -b -a shutdown -p '-e1 auto -e2 -r -icds -j2 -k1 -scr -p true' ask_user ask_user"
Steven
Hello, I forgot to post the version used as well. The version I happen to be running is clonezilla-live-2.7.1-22-amd64
I don't see an error on boot up as the text scrolls by too fast to catch anything. But there doesn't seem to be any red text which usually indicates something is wrong.
After booting up the system using test2 with the " changed to ' as you suggested it defaulted to asking for image repository mounting steps which is the same behavior.
I went into local device -> enter_shell and did the following.
Logs shown in pictures 1,2,3 done in that order.
Is there a way to change logging to get all outputs/errors from ocs related files? Or general OS logs that may be helpful?
Things work for test if I run them after dropping into enter_shell and sudo su but not unattended.
test2 doesn't seem to mount even if I run it manually.
Neither case works booting up on it's own.
Thanks again for the help.
In your test2, please copy & paste this to replace your append line:
append initrd=/live/initrd.img boot=live union=overlay username=user config components quiet noswap edd=on nomodeset noeject ocs_repository="dev:///LABEL=images" ocs_live_run="ocs-restore-mdisks -b -a shutdown -p '-e1 auto -e2 -r -icds -j2 -k1 -scr -p true' ask_user ask_user" ocs_live_extra_param="" keyboard-layouts=NONE ocs_live_batch="yes" locales=en_US.UTF-8 vga=788 ip= nosplash net.ifnames=0 splash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1
It's "ocs_repository", not "ocs_live_repository", and the ocs_live_run you'd better to separate single quotes and double quotes as the above line.
Steven
Thanks that worked.
Also a slightly modified append line. Errors out on disks not accessible/mounted but that is expected seems to image ones it is able to find which works fine and scales well.
Fill image name and destination drives as needed.
append initrd=/live/initrd.img boot=live union=overlay username=user config components quiet noswap edd=on nomodeset noeject ocs_repository="dev:///LABEL=images" ocs_live_run="ocs-restore-mdisks -b -a shutdown -p '-e1 auto -e2 -r -icds -j2 -k1 -scr -p true' image_name sda sdb sdc sdd sde sdf" ocs_live_extra_param="" keyboard-layouts=NONE ocs_live_batch="yes" locales=en_US.UTF-8 vga=788 ip= nosplash net.ifnames=0 splash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1
Possible feature to wildcard sda, sdb, etc to write to everything that is connected and not in use but otherwise works great.
You can give Clonezilla live >= 2.7.3-9 or 20210714-* a try:
https://clonezilla.org/downloads.php
In these releases, you can use "all" as the device name for ocs-restore-mdisks, and it will find all the local non-busy disks. E.g., make your boot parameter as:
ocs_live_run="ocs-restore-mdisks -b -a shutdown -p '-e1 auto -e2 -r -icds -j2 -k1 -scr -p true' image_name all"
//NOTE// Make sure all the attached local disks are the destination disks. This setting will overwrite all the data on them. Hence please use it carefully.
Steven
We have implemented the wildcard for the destination disks in Clonezilla live >= 2.7.3-12 or 20210727-*:
https://clonezilla.org/downloads.php
You can run it like:
ocs-restore-mdisks -b -a choose -p "-g auto -e1 auto -e2 -r -j2 -c -scr -p true" focal-mbr-20210531 sd*
Steven