Menu

Clonezilla Server Automation

2013-11-20
2013-11-23
  • Jordan Camara

    Jordan Camara - 2013-11-20

    Hi All –

    I’ve been able to successfully set up my drbl server booting from full DRBL via PXE on a subnet. This is a software testing environment with multiple images on each machine. I know you can start the clonezilla server via bash script using the generated “drbl-ocs” command, but is there a way to automate a sequence of images? Say if I wanted to deploy all clean images to one machine, how would I accomplish this?

     
  • Jordan Camara

    Jordan Camara - 2013-11-21

    Is there a way in bash script to wait for the "success" notification string?

    The echoed string usually looks like this:

    Client 192.168.0.11 (00:1e:c9:30:c3:f1) finished cloning. Stats: Multicast restored XP-Ubuntu-IMAGE, /dev/sda1, success, 40164 MB, 81.109 mins, 492.0 MB/min; /dev/sda2, success, 36964 MB, 22.640 mins, 1632.0 MB/min;

     
  • Jordan Camara

    Jordan Camara - 2013-11-21

    It might be possible using the script below:

    while read line; do
    case "$line" in
    success)
    break
    ;;
    esac
    done

    Testing this on the command seems successful, but I will try this out when I get the chance

     
  • Steven Shiau

    Steven Shiau - 2013-11-22

    "is there a way to automate a sequence of images? Say if I wanted to deploy all clean images to one machine, how would I accomplish this?" -> After you run "dcs" to start Clonezilla SE, it gives you a drbl-ocs command in green. I thought this is what you want? If not, I do not get your idea. Please describe more.
    Thanks.

    Steven.

     
  • Jordan Camara

    Jordan Camara - 2013-11-22

    Oh okay. Yes, I can use the drbl-ocs command in a bash script, but is there a way to run multiple drbl-ocs commands in a sequence?

    For example, if I wanted to restore all partitions on the same machine:

    1. Run drbl-ocs to restore the first image.
    2. Wait for "success" notification from the client.
    3. Run drbl-ocs to restore the second image.
    4. Wait for "success" notification from the client.
    5. Run drbl-ocs to restore the third image.

    I'm having trouble figuring out waiting for the success notification. Any tips?

     
  • Steven Shiau

    Steven Shiau - 2013-11-23

    Good point. So far there is no good mechanism to wait for the success notification. There is a daemon called /usr/sbin/ocsmgrd which you might modify to this purpose. However, on the client side you still have to add some codes, too.
    If you make it, please send us the patches so that we could add that in the future release.
    Thanks.

    Steven.

     

Log in to post a comment.

MongoDB Logo MongoDB