Hi Everyone,
I am pulling out my hair on this one. I have been stuck on this for 5 days.
I am using Clonezilla Live with the ocs_prerun commands to remove files off of the hard disk prior to writing a new operating system with ocs-sr restoredisk and then trying to get Clonezilla to see my ocs_postrun commands to write back to the newly installed drive.
Clonezilla Live is what i'm using on a USB stick, so I am not calling on scripts. I am just trying to get ocs_postrun commands to execute sequentially.
Everything works great until after the restore, when I expect to see the ocs_postrun scripts run. I know the -p true is working, due to the fact that it doesn't auto reboot.
I am trying to use 13 ocs_postrun commands at this point, but, I cannot even get one to execute during my testing.
My ocs_postrun commands are not loading, ever.... even when "-p true" is being used.
At this point I have several questions....
Am I missing some sort of flag in my ocs-sr parameters that is causing my post run commands to not be recognized?
Am I using a clonezilla version that doesn't support the ocs_postrun commands?
Are the commands and possibly the sequence of commands different due to being post? e.g.
"ocs_postrun01="" ocs_postrun02="" or
"ocs_postrun="" ocs_postrun1="" ocs_postrun2="" or
"ocs_postrun1="" ocs_postrun2=""
Another thought. When the restoredisk operation starts, it runs one quick restore process that i'm not sure what it's actually doing, and then moves on to the large image on /dev/sda5. Could it be trying to throw the ocs_postrun commands in after that first short process?
Also, I'm not sure if I am calling on ocs-live-general correctly, it's my understanding that it sets up the environment. When I do not have ocs_prerun="ocs-live-general" in the append info the restore job is unable to locate the folder containing the image files.
Thanks for any help I can get here, I am a little stressed out here.....
Here is my current setup:
append initrd=/live/initrd.img boot=live config noswap ocs_live_keymap="NONE" edd=on nomodeset noprompt ocs_prerun="ocs-live-general" ocs_prerun1="sleep 15" ocs_prerun2="sleep 10" ocs_live_run="ocs-sr -k -j2 -b -p true restoredisk Appliance_CCE3Touchscreen_Ubuntu14_4GB_2015-07-29-00-img sda" ocs_postrun="sleep 15" ocs_lang="en_US.UTF-8" vga=788 ip=frommedia nosplash
~~~By the way, these are just test parameters for my proof of concept, because I have tried about 500 different variants. I am now simplified for ease of diagnosis.
~~~
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Before you use ocs_prerun and ocs_postrun, if you have complicated or long commands, I suggest you use your own script, e.g. "my-script.sh", and assign it in ocs_live_run, e.g.
1. Make sure your script's format is Unix one by running "dos2unix my-script.sh".
2. put your script in the USB flash drive /, as /my-script.sh,
3. edit your syslinux/syslinux.cfg, make it like:
append initrd=/live/initrd.img boot=live union=overlay username=user config components quiet noswap edd=on nomodeset nodmraid locales=en_US.UTF-8 keyboard-layouts=en ocs_live_run="bash /lib/live/mount/medium/my-script.sh" ocs_live_extra_param="" ocs_live_batch=no vga=788 ip= net.ifnames=0 nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1
For the script example, you can refer to the directory /usr/share/drbl/samples/ after booting Clonezilla live, and check those custom* script.
If you really want to use ocs_prerun and ocs_postrun, make sure you modify that from the file "syslinux/syslinux.cfg" in Clonezilla live. The parameters might change compared with old one. In your append line, you have mixed old and new parameters, so please edit the append line from syslinux/syslinux.cfg, just modify and append what you need, do not write from scratch.
Here I give you an example about using Clonezilla live 2.4.7-1 for this kind of purpose:
First off, awesome!
Thank you for getting back to me so quick. I needed to know what I was missing, and you have helped me clear up some much needed answers.
I am going to try these things first thing tomorrow and will report back,
Again, thank you. It's really cool being able to get answers on specific things that just aren't clear from the spread of various information that is available for these postrun issues.
Talk to you tomorrow.
Levi
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Everyone,
I am pulling out my hair on this one. I have been stuck on this for 5 days.
I am using Clonezilla Live with the ocs_prerun commands to remove files off of the hard disk prior to writing a new operating system with ocs-sr restoredisk and then trying to get Clonezilla to see my ocs_postrun commands to write back to the newly installed drive.
Clonezilla Live is what i'm using on a USB stick, so I am not calling on scripts. I am just trying to get ocs_postrun commands to execute sequentially.
Everything works great until after the restore, when I expect to see the ocs_postrun scripts run. I know the -p true is working, due to the fact that it doesn't auto reboot.
I am trying to use 13 ocs_postrun commands at this point, but, I cannot even get one to execute during my testing.
My ocs_postrun commands are not loading, ever.... even when "-p true" is being used.
At this point I have several questions....
Am I missing some sort of flag in my ocs-sr parameters that is causing my post run commands to not be recognized?
Am I using a clonezilla version that doesn't support the ocs_postrun commands?
Are the commands and possibly the sequence of commands different due to being post? e.g.
"ocs_postrun01="" ocs_postrun02="" or
"ocs_postrun="" ocs_postrun1="" ocs_postrun2="" or
"ocs_postrun1="" ocs_postrun2=""
Another thought. When the restoredisk operation starts, it runs one quick restore process that i'm not sure what it's actually doing, and then moves on to the large image on /dev/sda5. Could it be trying to throw the ocs_postrun commands in after that first short process?
Also, I'm not sure if I am calling on ocs-live-general correctly, it's my understanding that it sets up the environment. When I do not have ocs_prerun="ocs-live-general" in the append info the restore job is unable to locate the folder containing the image files.
Thanks for any help I can get here, I am a little stressed out here.....
Here is my current setup:
append initrd=/live/initrd.img boot=live config noswap ocs_live_keymap="NONE" edd=on nomodeset noprompt ocs_prerun="ocs-live-general" ocs_prerun1="sleep 15" ocs_prerun2="sleep 10" ocs_live_run="ocs-sr -k -j2 -b -p true restoredisk Appliance_CCE3Touchscreen_Ubuntu14_4GB_2015-07-29-00-img sda" ocs_postrun="sleep 15" ocs_lang="en_US.UTF-8" vga=788 ip=frommedia nosplash
Last edit: Levi Couchot 2016-06-21
~~~By the way, these are just test parameters for my proof of concept, because I have tried about 500 different variants. I am now simplified for ease of diagnosis.
~~~
Before you use ocs_prerun and ocs_postrun, if you have complicated or long commands, I suggest you use your own script, e.g. "my-script.sh", and assign it in ocs_live_run, e.g.
1. Make sure your script's format is Unix one by running "dos2unix my-script.sh".
2. put your script in the USB flash drive /, as /my-script.sh,
3. edit your syslinux/syslinux.cfg, make it like:
append initrd=/live/initrd.img boot=live union=overlay username=user config components quiet noswap edd=on nomodeset nodmraid locales=en_US.UTF-8 keyboard-layouts=en ocs_live_run="bash /lib/live/mount/medium/my-script.sh" ocs_live_extra_param="" ocs_live_batch=no vga=788 ip= net.ifnames=0 nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1
For the script example, you can refer to the directory /usr/share/drbl/samples/ after booting Clonezilla live, and check those custom* script.
If you really want to use ocs_prerun and ocs_postrun, make sure you modify that from the file "syslinux/syslinux.cfg" in Clonezilla live. The parameters might change compared with old one. In your append line, you have mixed old and new parameters, so please edit the append line from syslinux/syslinux.cfg, just modify and append what you need, do not write from scratch.
Here I give you an example about using Clonezilla live 2.4.7-1 for this kind of purpose:
append initrd=/live/initrd.img boot=live union=overlay username=user config components quiet noswap edd=on nomodeset nodmraid locales=en_US.UTF-8 keyboard-layouts=en ocs_prerun="dhclient -v eth0" ocs_repository="nfs://192.168.120.254/home/partimag/" ocs_live_run="ocs-sr -scr -g auto -e1 auto -e2 -c -r -j2 -p true restoredisk xenial-x86-20150530 sda" ocs_postrun="sleep 5" ocs_live_extra_param="" ocs_live_batch=no vga=788 ip= net.ifnames=0 nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1
The above was tested and the ocs_postrun has been run correctly.
Steven
First off, awesome!
Thank you for getting back to me so quick. I needed to know what I was missing, and you have helped me clear up some much needed answers.
I am going to try these things first thing tomorrow and will report back,
Again, thank you. It's really cool being able to get answers on specific things that just aren't clear from the spread of various information that is available for these postrun issues.
Talk to you tomorrow.
Levi