Menu

Auto rebooting after cloning process is over

Help
2011-08-23
2015-03-07
  • knockoutn336

    knockoutn336 - 2011-08-23

    Hi all,
    I wanted to have Clonezilla Live automatically reboot the computer when it is done copying an image to a partition.  Right now it brings up the options to poweroff, reboot, enter command line, or start over.  What should I add to my syslinux.cfg file to just reboot?

    Here's what I have right now
      append initrd=/live/initrd.img boot=live hostname=natty config quiet noswap nolocales edd=on nomodeset noprompt ocs_prerun="mount /dev/sda5 /mnt" ocs_prerun1="mount -bind /mnt/Backup /home/partimag/" ocs_live_run="ocs-sr -batch -g auto -e1 auto -e2 -r -j2 -k -p true restoreparts img sda3" ocs_live_extra_param="" ocs_live_keymap="NONE" ocs_live_batch="yes" ocs_lang="en_US.UTF-8" vga=788 ip=frommedia nosplash

     
  • knockoutn336

    knockoutn336 - 2011-08-24

    By the way, shutting down at the end of the process would be fine too.

    I just don't want the user to have to choose to poweroff or reboot, and I especially don't want the user to be able to enter command line.

     
  • knockoutn336

    knockoutn336 - 2011-08-24

    Also I considered adding a prerun command to shut down the system in 30 minutes or so, because the process has consistently taken around 25 minutes.  This is definitely not an ideal solution though.

     
  • knockoutn336

    knockoutn336 - 2011-08-24

    oh got it

    -p reboot

     
  • Steven Shiau

    Steven Shiau - 2011-08-29

    Sure. Enjoy that!

    Steven.

     
  • Carl Johnson

    Carl Johnson - 2015-02-26

    Where exactly did you place -p reboot in the syslinux.cfg to make this work? I tried placing it like so however the machine rebooted before imaging:

    append initrd=/live/initrd.img boot=live username=user config quiet noswap edd=on nomodeset noeject locales="en_US.UTF-8" keyboard-layouts=NONE ocs_prerun1="dhclient -v eth0" ocs_prerun2="sleep 2" ocs_prerun3="mount -t nfs 10.1.10.199:/mnt/storage /home/partimag" ocs_prerun4="sleep 2" ocs_live_run="ocs-sr -g auto -e1 auto -e2 -c -r -icds -j2 -k1 -p reboot restoredisk ask_user ask_user" ocs_live_extra_param="" ocs_live_batch=no vga=791 ip= nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=no

     
  • Fuchs

    Fuchs - 2015-02-27

    If there is an error in the append line then clonezilla goes to the end
    and makes a call
    -p true (do nothing when clone finishes) or
    -p poweroff,
    -p reboot

    It's not possible yet:
    .. restoredisk ask_user ask_user
    # http://clonezilla.org/advanced/researved-word-ocs-sr.php

    Try it with e.g.
    .. -p true restoredisk 2015-02-27-myImage-with-sda-sdb ask_user # sda or/and sdb
    (You can also make a look for blkdev.list in your image)

    and
    [-icds]
    The partitions should be equal or greater than the old ones.

    If not make a look for "Cloning to a smaller target HDD"
    in "Cloning OS drive on Dell Studio 1747 laptop"
    # http://sourceforge.net/p/clonezilla/discussion/Help/thread/4c11e2d1/

     
  • Carl Johnson

    Carl Johnson - 2015-02-27

    Thanks for the prompt response!

    I have been using a live USB to clone successfully with the above string, not including '-p reboot' parameter. That string looks like this:

    append initrd=/live/initrd.img boot=live username=user config quiet noswap edd=on nomodeset noeject locales="en_US.UTF-8" keyboard-layouts=NONE ocs_prerun1="dhclient -v eth0" ocs_prerun2="sleep 2" ocs_prerun3="mount -t nfs 10.1.10.199:/mnt/storage /home/partimag" ocs_prerun4="sleep 2" ocs_live_run="ocs-sr -g auto -e1 auto -e2 -c -r -icds -j2 -k1 -p true restoredisk ask_user ask_user" ocs_live_extra_param="" ocs_live_batch=no vga=791 ip= nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=no

    As recomended above, I have '-p reboot' in the string. Everything works well. All I have to do is select the appropriate image, choose a target to image, and confirm twice that I want to do this. Upon completion, I am prompted with the shut down, reboot, rerun options.

    I would like it to automatically select reboot upon successful completion. When I use the parameter in the string in the above post, it skips the whole select image, target and confirm process and goes straight to the poweroff menu.

     
  • Fuchs

    Fuchs - 2015-02-28

    With the LibreOffice Writer (or Winword):
    .. There are all spaces between the commands in the append line and no newline in it. That's correct.
    Are the first and the second append line the original lines (besides the -p ..) ?

    To find the error you can test it with
    ocs_live_run="ocs-live-general"

     
    • Carl Johnson

      Carl Johnson - 2015-03-02

      There is no new line or carriage return. There are spaces between each command. Still at a loss on how to automatically restart clonezilla after a successful restore.

       
  • Fuchs

    Fuchs - 2015-02-28

    A correction. It is possible, indeed:
    .. restoredisk ask_user ask_user
    or
    .. restoredisk ask_user all
    according to
    # http://clonezilla.org/advanced/researved-word-ocs-sr.php

     
  • Carl Johnson

    Carl Johnson - 2015-03-02

    Ahh I found it, under ocs_live_run="ocs-sr..." I entered --postaction reboot. So mine looks like:

    label Clonezilla live
    MENU DEFAULT
    # MENU HIDE
    MENU LABEL Clonezilla live (Default settings, VGA 1024x768, autodeploy)
    # MENU PASSWD
    kernel /live/vmlinuz
    append initrd=/live/initrd.img boot=live username=user config quiet noswap edd=on nomodeset noeject locales="en_US.UTF-8" keyboard-layouts=NONE ocs_prerun1="dhclient -v eth0" ocs_prerun2="sleep 2" ocs_prerun3="mount -t nfs 10.1.10.199:/mnt/storage /home/partimag" ocs_prerun4="sleep 2" ocs_live_run="ocs-sr -g auto -e1 auto -e2 -c -r -icds -j2 -k1 --postaction reboot restoredisk ask_user ask_user" ocs_live_extra_param="" ocs_live_batch=no vga=791 ip= nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=no
    TEXT HELP
    * Boot menu for BIOS machine
    * Clonezilla live version: 2.2.1-25-i486. (C) 2003-2014, NCHC, Taiwan
    * Disclaimer: Clonezilla comes with ABSOLUTELY NO WARRANTY
    ENDTEXT

    Found the answer here:

    http://allthatnetwork.blogspot.com/2012/10/clonezilla-ocs-sr-options.html

    Thanks Again!

     
  • Fuchs

    Fuchs - 2015-03-02

    That's very fine. Thank you for the reply and the link.

     
  • Steven Shiau

    Steven Shiau - 2015-03-07

    @Carl,
    I can not reproduce the problem.
    No matter I use "-p reboot" or "--postrun reboot" in the ocs-sr command, i.e.
    =========================================
    append initrd=/live/initrd.img boot=live username=user config quiet noswap edd=on nomodeset noeject locales="en_US.UTF-8" keyboard-layouts=NONE ocs_prerun1="dhclient -v eth0" ocs_prerun2="sleep 2" ocs_prerun3="mount -t nfs 192.168.120.254:/home/partimag/ /home/partimag" ocs_prerun4="sleep 2" ocs_live_run="ocs-sr -g auto -e1 auto -e2 -c -r -icds -j2 -k1 -p reboot restoredisk ask_user ask_user" ocs_live_extra_param="" ocs_live_batch=no vga=791 ip= nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=no
    =========================================
    Or
    =========================================
    append initrd=/live/initrd.img boot=live username=user config quiet noswap edd=on nomodeset noeject locales="en_US.UTF-8" keyboard-layouts=NONE ocs_prerun1="dhclient -v eth0" ocs_prerun2="sleep 2" ocs_prerun3="mount -t nfs 192.168.120.254:/home/partimag/ /home/partimag" ocs_prerun4="sleep 2" ocs_live_run="ocs-sr -g auto -e1 auto -e2 -c -r -icds -j2 -k1 --postaction reboot restoredisk ask_user ask_user" ocs_live_extra_param="" ocs_live_batch=no vga=791 ip= nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=no
    =========================================
    Both works. The machine is automatically rebooted after ocs-sr is done.

    Steven.

     

Log in to post a comment.