Problem with Automated Disk Restore from a PXE Boot

  • Dwerp

    Dwerp - 2014-06-25

    I'm attempting to PXE boot a computer and automatically restore a disk image to the system.

    Anyway, to do this I have 3 systems:
    1) TFTP/DHCP server. IP address
    2) Windows computer with a SMB share (Stores the disk image. IP address
    3) PXE client (Gets an IP from DHCP)

    So I am able to PXE boot Clonezilla, however it appears the SMB share is not mounting correctly.
    I set my PXE variables as follows:

    ocs_prerun1="dhclient -v eth0"
    ocs_prerun2="sleep 2"
    ocs_prerun3="mount -t cifs -o user=myusername,password=mypassword // /home/partimag"
    ocs_prerun4="sleep 2"
    ocs_live_run="ocs-sr -g auto -e1 auto -e2 -c -r -j2 -k -p true restoredisk PC1Backup sda"

    I get the error "No disk or partitions image directory is found in /home/partimag! Program terminated!!!!".

    If I lengthen the two sleep periods, I can see that the mount command never mounts a filesystem to /home/partimag. If I copy and paste the mount command into the terminal between while the system is sleeping, the restore works fine.

    Any ideas why this isn't mounting correctly? Thanks!

    P.S. Any way to prevent Clonezilla from prompting when it overwrites the disk? Thanks, again!

  • Dwerp

    Dwerp - 2014-06-26

    I figured it out. First thing was I need a "Sudo" on the beginning of ocs_prerun3.

    Secondly apparently if your password has an exclamation mark in it, it will never run line 3. I setup a different username/password combo without symobls and it works fine now.

    Anyone know how to prevent clonezilla from warning me (And requiring me to hit Y) when I try to overwrite a disk? Thanks!

  • Dwerp

    Dwerp - 2014-06-26

    Nevermind on that too.

    Apparently my ocs-sr just need a -b (For batch), so it doesn't prompt for anything.

  • Steven Shiau

    Steven Shiau - 2014-06-30

    Cool! For sure you can find the solutions.
    Thanks for sharing that.



Log in to post a comment.