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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
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.
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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"
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
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.
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.
oh got it
-p reboot
Sure. Enjoy that!
Steven.
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
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/
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.
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"
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.
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
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!
That's very fine. Thank you for the reply and the link.
@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.