change your live_run script to ask_user, it requires one more small step to allow the image to drop on the nvme drive.
some caveats that I've run into:
1) make sure your BIOS is operating in AHCI not RAID mode (can't see the NVME inside clonezilla otherwise - you'll want to set this back before rebooting into windows.
2) if you're using GPT, you'll need to run parted and fix the allocation in order for windows to see the whole disk
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thnx, but its not the solution i want.
First of all it will not be fully automatic. For now i just put my flash in and start PC and Clonezilla do all the work by itself.
As a whole, i have two problems. In case of HDD it determines as SDA, so my flash determines as SDB and script works.With m.sata my flash determines as SDA, thus i'll need to change it, but i dont know how to do it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If I understand correctly, if you run the restore in batch, it will not ask user and will convert the drive automatically during the restore. To be precise, it creates a temporary linked image in temp folder and restores that.
Last edit: Art M 2019-02-18
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am not sure that in this situation you can make it fully automatic.
I'm in the exact same boat, but I've gone ahead with ask_user and forcing confirmation. My plan is to distribute a usb stick with everything preloaded on it, that the user just has to confirm the target, and then confirm the operation.
I'd caution against trying to totally automate the NVME case, because Intel Optane cache drives present themselves as nvme. The appropriate thing to do here is ignore the cache drive, and push the image to the "other" drive -- sda, sdb, nvme0n1 etc...
If you have really effective inventory management, then pushing the image with nvme specified to appropriate targets would seem to be the only way to get this done with a "zero touch" push.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
why dont you use variables to customize your script for sda and nvme?
do you want a user input to choose between sda and nvme while restoring or automated choosing?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Do your computers have different hardware setups? Like different manufacturer or model? You could use this difference with the command *dmidecode *
So you could build a script which would work like:
model A = use nmve
model B = use sda
run clonezilla on both machines and chose on clonezilla startup Enter shell
type the following to get your model names
dmidecode -s system-version
note the output of the shell
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yep, you're right! How many machines you want to image with this option? If just a several, mac adress or serialnumber would be a solution. dmidecode also allows to read your serialnumber, which sould be unique.
dmidecode -s system-serial-number
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Has there been any progress on this?
I basically have to clone twice nowadays every time, because some systems have NVME, some don't.
So my workflow is: Clone SATA systems -> stop lite-server -> cnvt-ocs-dev -> start lite-erver -> clone NVME systems.
I noticed ocs-live-get-img now has a -d option. It would save a ton of time to be able to trigger this from the lite-server, even if it's just something simple like
if [ -f /dev/nvme0n1 ] ; then ocs-live-get-img -d /dev/nvme0n1 else ocs-live-get-img -d /dev/sda fi.
👍
1
Last edit: Siet 2021-02-04
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Using ocs-live-get-img with the -d option on a lite-client now results in the error "This job is started by Clonezilla server, and the source disk name is different from target disk name! To restore the image to different disk names is not supported in this case! Only the same disk name will work! We will not create a temp image here!"
Last edit: Siet 2023-06-12
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thus i restore my images manually, now my keys transformed to:
menuentry --hotkey=r "Clonezilla live (VGA 800x600 & To RAM)" --id live-toram {
search --set -f /live/vmlinuz
$linux_cmd /live/vmlinuz boot=live union=overlay username=user config components quiet loglevel=0 noswap edd=on nomodeset enforcing=0 locales=en_US.UTF-8 keyboard-layouts=none ocs_prerun="mount -U EC67-6C36 /home/partimag/" ocs_live_run="ocs-sr -g auto -e1 auto -e2 -r -j2 -scr -p true restoredisk "200617" ask_user" ocs_postrun="sudo poweroff" ocs_live_extra_param="" ocs_live_batch="no" vga=788 toram=live,syslinux,EFI,boot,.disk,utils ip= net.ifnames=0 nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1
$initrd_cmd /live/initrd.img
}
And for now i need to only choose disk to restore image to. And it is better for me not to format anything really unattended.
But i 'm still don't know fully unattended way to restore 1 image to hdd or ssd or nvme independently.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I appreciate your response.
However, you seem to be pulling the image from a local device (with UUID EC67-6C36).
But I'm using Clonezillas lite-server in BitTorrent mode to do a network deployment to many devices, so I can't use your suggestion.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Start Clonezilla as a Lite-Server on PC 1 (Choose restore image, use an image with the sda naming scheme, choose BitTorrent method)
Start Clonezilla on PC 2, which uses the nvme0n1 naming scheme
Use Shell on PC 2
Run ocs-live-get-img -d /dev/nvme0n1 [IP of PC 1]
Result on Clonezilla from June 2020: Works
Result on current Clonezilla: The error message "This job is started by Clonezilla server, and the source disk name is different from target disk name! To restore the image to different disk names is not supported in this case! Only the same disk name will work! We will not create a temp image here!"
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Please give testing Clonezilla live >= 3.1.1-7 or 20230706-* a try: https://clonezilla.org/downloads.php
This issue should have been fixed.
Please let us know the results. Thanks.
Steven
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Help needed.
My script is here for autorestore my image:
menuentry "5-efi-2019-02-05-09-img"{
search --set -f /live/vmlinuz
linux /live/vmlinuz boot=live union=overlay username=user hostname=cosmic config quiet components noswap edd=on nomodeset locales=en_US.UTF-8 keyboard-layouts=none ocs_prerun="mount /dev/sdb1 /home/partimag/" ocs_prerun1="mount /dev/sdb2 /home/partimag/" ocs_prerun2="mount /dev/sdb3 /home/partimag/" ocs_prerun3="mount /dev/sdb4 /home/partimag/" ocs_postrun="sudo poweroff" ocs_live_run="/usr/sbin/ocs-sr -g auto -e1 auto -e2 -r -j2 -scr -p true restoredisk 5-efi-2019-02-05-09-img sda" ocs_live_extra_param="" ocs_live_batch="no" vga=788 toram=live,syslinux,EFI ip= net.ifnames=0 splash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1
initrd /live/initrd.img
It works very well on PCs with HDD, but now i have new one with m.sata drive, which initializes as nvme0n1 and script fails with erro r.
I want my script work both with HDDs and M.SATAs.
Is there any way to change drive name on ocs_prerun so that my m.sata drive would be called SDA?
change your live_run script to ask_user, it requires one more small step to allow the image to drop on the nvme drive.
some caveats that I've run into:
1) make sure your BIOS is operating in AHCI not RAID mode (can't see the NVME inside clonezilla otherwise - you'll want to set this back before rebooting into windows.
2) if you're using GPT, you'll need to run parted and fix the allocation in order for windows to see the whole disk
Thnx, but its not the solution i want.
First of all it will not be fully automatic. For now i just put my flash in and start PC and Clonezilla do all the work by itself.
As a whole, i have two problems. In case of HDD it determines as SDA, so my flash determines as SDB and script works.With m.sata my flash determines as SDA, thus i'll need to change it, but i dont know how to do it.
If I understand correctly, if you run the restore in batch, it will not ask user and will convert the drive automatically during the restore. To be precise, it creates a temporary linked image in temp folder and restores that.
Last edit: Art M 2019-02-18
I am not sure that in this situation you can make it fully automatic.
I'm in the exact same boat, but I've gone ahead with ask_user and forcing confirmation. My plan is to distribute a usb stick with everything preloaded on it, that the user just has to confirm the target, and then confirm the operation.
I'd caution against trying to totally automate the NVME case, because Intel Optane cache drives present themselves as nvme. The appropriate thing to do here is ignore the cache drive, and push the image to the "other" drive -- sda, sdb, nvme0n1 etc...
If you have really effective inventory management, then pushing the image with nvme specified to appropriate targets would seem to be the only way to get this done with a "zero touch" push.
why dont you use variables to customize your script for sda and nvme?
do you want a user input to choose between sda and nvme while restoring or automated choosing?
It would be great if choose wolud be done automatically, but manual choise is ok too.
I dont understand how to script it, could you please help me?
Do your computers have different hardware setups? Like different manufacturer or model? You could use this difference with the command *dmidecode *
So you could build a script which would work like:
model A = use nmve
model B = use sda
run clonezilla on both machines and chose on clonezilla startup Enter shell
type the following to get your model names
note the output of the shell
Not infallible !
May require root access & in my case:-
A unique identifier could be a MAC address on a ethernet or wifi connection,
This could be found buried in the output of the
ip addrcommand.Yep, you're right! How many machines you want to image with this option? If just a several, mac adress or serialnumber would be a solution. dmidecode also allows to read your serialnumber, which sould be unique.
/proc/partitionshas a list of all your partitions in it.Same problem here.
I would love a "Restore to sda, if not available restore to nvme0n1" option.
Has there been any progress on this?
I basically have to clone twice nowadays every time, because some systems have NVME, some don't.
So my workflow is: Clone SATA systems -> stop lite-server -> cnvt-ocs-dev -> start lite-erver -> clone NVME systems.
I noticed ocs-live-get-img now has a -d option. It would save a ton of time to be able to trigger this from the lite-server, even if it's just something simple like
if [ -f /dev/nvme0n1 ] ; then ocs-live-get-img -d /dev/nvme0n1 else ocs-live-get-img -d /dev/sda fi.
Last edit: Siet 2021-02-04
Cool. It's a nice way to solve this.
Steven
Sadly, this stopped working.
Using ocs-live-get-img with the -d option on a lite-client now results in the error "This job is started by Clonezilla server, and the source disk name is different from target disk name! To restore the image to different disk names is not supported in this case! Only the same disk name will work! We will not create a temp image here!"
Last edit: Siet 2023-06-12
Thus i restore my images manually, now my keys transformed to:
menuentry --hotkey=r "Clonezilla live (VGA 800x600 & To RAM)" --id live-toram {
search --set -f /live/vmlinuz
$linux_cmd /live/vmlinuz boot=live union=overlay username=user config components quiet loglevel=0 noswap edd=on nomodeset enforcing=0 locales=en_US.UTF-8 keyboard-layouts=none ocs_prerun="mount -U EC67-6C36 /home/partimag/" ocs_live_run="ocs-sr -g auto -e1 auto -e2 -r -j2 -scr -p true restoredisk "200617" ask_user" ocs_postrun="sudo poweroff" ocs_live_extra_param="" ocs_live_batch="no" vga=788 toram=live,syslinux,EFI,boot,.disk,utils ip= net.ifnames=0 nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1
$initrd_cmd /live/initrd.img
}
And for now i need to only choose disk to restore image to. And it is better for me not to format anything really unattended.
But i 'm still don't know fully unattended way to restore 1 image to hdd or ssd or nvme independently.
I appreciate your response.
However, you seem to be pulling the image from a local device (with UUID EC67-6C36).
But I'm using Clonezillas lite-server in BitTorrent mode to do a network deployment to many devices, so I can't use your suggestion.
Could you please describe more, step by step, about how to reproduce this issue? In detail so that we can try to reproduce it?
Steven
Result on Clonezilla from June 2020: Works
Result on current Clonezilla: The error message "This job is started by Clonezilla server, and the source disk name is different from target disk name! To restore the image to different disk names is not supported in this case! Only the same disk name will work! We will not create a temp image here!"
Please give testing Clonezilla live >= 3.1.1-7 or 20230706-* a try:
https://clonezilla.org/downloads.php
This issue should have been fixed.
Please let us know the results. Thanks.
Steven