I have created a USB live stick for our technicians to image devices to a network (SMB share).
Where I run into trouble is in this command:
"/usr/sbin/ocs-sr -q2 -c -j2 -z1p -i 1000000 -p true savedisk ask_user sda"
Sometimes the input device will be sdb instead of sda requiring the tech to edit the grub.cfg (or syslinux.cfg) file. In my particular case, when sdb is required sda is pointing to my USB stick. Device sdb is a non-mounted drive (which is necessary for cloning).
Is there a mechanism to automatically select sda or sdb based on mount status? Lacking that, how about giving the user the choice to select the proper input drive?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
"how about giving the user the choice to select the proper input drive?" -> You can make it as:
"/usr/sbin/ocs-sr -q2 -c -j2 -z1p -i 1000000 -p true savedisk ask_user ask_user"
"Is there a mechanism to automatically select sda or sdb based on mount status? " -> For the moment, there is not. However, we can try to add that, like using "unmounted_disk". Of course, there should be only one existing.
Steven
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Oh, in your case, actually there is a reserved disk name you can use, "all". It will search all the unmounted disk. So it should work in your case.
i.e.
"/usr/sbin/ocs-sr -q2 -c -j2 -z1p -i 1000000 -p true savedisk ask_user all"
Ref: http://clonezilla.org/advanced/researved-word-ocs-sr.php
Please let us know the results.
Thanks.
Steven
Last edit: Steven Shiau 2016-06-13
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK, that meets my needs (Darn! I thought I read everything on the site but missed that page). But I have attend to another problem, which I may post in a separate topic, but I will be more diligent in looking for an answer before posting.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Solved! The "all" parameter did the trick. In the event there are more than one unmounted drive(s), what is the consequence? The article you linked to, says, "when using this in the restoring mode, you have to make sure the number of umounted disks/parts match the one in the source image" with no indication of what happens when they don't.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If the number does not match, then the execution might fail.
For example, if your image is saved from 2 disks, while when restoring, "all" is used on the destination machine with 1 disk, then only the image from the 1st disk will be restored. However, on the other hand, if the image is saved from 1 disk, and you use "all" on the destination machine which has 2 disks, then Clonezilla will complain there is no image for 2nd disk (sdb).
Steven
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I have created a USB live stick for our technicians to image devices to a network (SMB share).
Where I run into trouble is in this command:
"/usr/sbin/ocs-sr -q2 -c -j2 -z1p -i 1000000 -p true savedisk ask_user sda"
Sometimes the input device will be sdb instead of sda requiring the tech to edit the grub.cfg (or syslinux.cfg) file. In my particular case, when sdb is required sda is pointing to my USB stick. Device sdb is a non-mounted drive (which is necessary for cloning).
Is there a mechanism to automatically select sda or sdb based on mount status? Lacking that, how about giving the user the choice to select the proper input drive?
"how about giving the user the choice to select the proper input drive?" -> You can make it as:
"/usr/sbin/ocs-sr -q2 -c -j2 -z1p -i 1000000 -p true savedisk ask_user ask_user"
"Is there a mechanism to automatically select sda or sdb based on mount status? " -> For the moment, there is not. However, we can try to add that, like using "unmounted_disk". Of course, there should be only one existing.
Steven
Oh, in your case, actually there is a reserved disk name you can use, "all". It will search all the unmounted disk. So it should work in your case.
i.e.
"/usr/sbin/ocs-sr -q2 -c -j2 -z1p -i 1000000 -p true savedisk ask_user all"
Ref: http://clonezilla.org/advanced/researved-word-ocs-sr.php
Please let us know the results.
Thanks.
Steven
Last edit: Steven Shiau 2016-06-13
OK, that meets my needs (Darn! I thought I read everything on the site but missed that page). But I have attend to another problem, which I may post in a separate topic, but I will be more diligent in looking for an answer before posting.
No problem. Sometimes I miss some like you.
Steven
Solved! The "all" parameter did the trick. In the event there are more than one unmounted drive(s), what is the consequence? The article you linked to, says, "when using this in the restoring mode, you have to make sure the number of umounted disks/parts match the one in the source image" with no indication of what happens when they don't.
If the number does not match, then the execution might fail.
For example, if your image is saved from 2 disks, while when restoring, "all" is used on the destination machine with 1 disk, then only the image from the 1st disk will be restored. However, on the other hand, if the image is saved from 1 disk, and you use "all" on the destination machine which has 2 disks, then Clonezilla will complain there is no image for 2nd disk (sdb).
Steven