Menu

Selecting sda or sdb (or sdc for that matter)

Help
2016-06-10
2016-06-26
  • Ward Galanis

    Ward Galanis - 2016-06-10

    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?

     
  • Steven Shiau

    Steven Shiau - 2016-06-13

    "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

     
  • Steven Shiau

    Steven Shiau - 2016-06-13

    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
  • Ward Galanis

    Ward Galanis - 2016-06-17

    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.

     
  • Steven Shiau

    Steven Shiau - 2016-06-19

    No problem. Sometimes I miss some like you.

    Steven

     
  • Ward Galanis

    Ward Galanis - 2016-06-22

    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.

     
  • Steven Shiau

    Steven Shiau - 2016-06-26

    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

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.