Menu

Semi-Automated Clonezilla Live (samba share)

Rubens
2016-04-09
2016-04-18
  • Rubens

    Rubens - 2016-04-09

    Hello there,

    Sorry if this has been posted/answered before but I after reading a lot I cannot find a working solution.
    The scenario:
    I'm in a coporate where we are using clonezilla for years and we want to automate as much as posible the backup-restore options for clonezilla live.

    We have a repository for images on a network server where we can acces via samba.
    The repository is structured by Manufacturer and then by model type; something like this:

    /repository/HP/DC7900SFF
    /repository/HP/DC8000SFF
    /repository/TOSHIBA/Qosmio X70
    etc etc...

    I just want clonezilla to prompt for a manufacturer & model and then mount the samba share accordingly.
    So far I modified the syslinux.cfg to run clonezilla live, get an IP address from a DHCP server, load locales & keymap and mount the samba share

    ...../initrd.img boot=live union=overlay username=user hostname=wily config quiet components noswap edd=on nomodeset nodmraid noeject locales=ca_ES.UTF-8 keyboard-layouts=es ocs_prerun="dhclient -v eth0" ocs_prerun1="sleep 2" ocs_prerun2="mount -t cifs -o user=admin,domain=ourdomain,password=pass //10.10.x.xx/repository/ /home/partimag" ocs_prerun3="sleep2" ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_batch=no vga=788 ip= net.ifnames=0 splash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1

    but as clonezilla just shows the first level of a directory we cannot navigate thru the different subfolders where the images for a specific machine are stored.

    So what we need is ask user to type in the manufacturer/model and then clonezilla mount the samba share to:
    //10.10.x.xx/repository/manufacturer/model --> just to clarify our needs

    I don't know if it can be done by just modifying the syslinux.cfg or we need a custom script to acomplish that but I'm not very familiar on how to do it so if someone can point me to the right direction I woukld be so pleased.

    Thanks so much in advance!

     
    • Steven Shiau

      Steven Shiau - 2016-04-10

      For this kind of purpose, definitely you need to have a customized script for that. There are some examples in the directory /usr/share/drbl/samples/custom-ocs* you can refer to.

      Steven

       
  • Rubens

    Rubens - 2016-04-10

    Also I would like to know if I can encrypt the password in the sintax to mount the samba share
    command usercrypted=crypted password obtained from:
    echo YOURPASSWORD | mkpasswd -s on a debian machine but it does not work and keeps me asking for password.

    ie my syntax:
    boot=live union=overlay username=user hostname=wily config quiet components noswap edd=on nomodeset nodmraid noeject locales=ca_ES.UTF-8 keyboard-layouts=es ocs_prerun="dhclient -v eth0" ocs_prerun1="sleep 2" ocs_prerun2="mount -t cifs -o user=admin,domain=ourdomain,usercypted=pass //10.10.x.xx/repository/ /home/partimag" ocs_prerun3="sleep2" ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_batch=no vga=788 ip= net.ifnames=0 splash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1

     
  • Steven Shiau

    Steven Shiau - 2016-04-10

    Are you sure mkpasswd can be used for encrypting the password for CIFS?

    Steven

     
    • Rubens

      Rubens - 2016-04-10

      I dont' actually knolw, I'm just wondering a way to encrypt the assword in my sintax.
      Can you please explain a bit on how to make a custom script? Do I have to create it from the shell prompt?

      Thanks so much for your answer

       
  • Rubens

    Rubens - 2016-04-13

    Thanks Steven, did not find any way to crypt the password on the syslinux.cfg but anyway I wrote the script and mounts the samba share accordingly with the folder the user inputs.

    Im not very familiar with bash scripting but got my answer after googling a lot and it was much simplier than I thought, I will move on automatizing my pen to backup/restore servers/machines.

    Thanks for this awesome product & your gratitude!

     
  • Steven Shiau

    Steven Shiau - 2016-04-17

    Acutally I have no idea how to encrypte the password for mounting the samba server. That's why I was asking.
    Anyway, now you have found your solution. Cool.
    Enjoy Clonezilla!

    Steven

     
  • Rubens

    Rubens - 2016-04-17

    Nevermind Steven, found a better way to mount the samba share.
    Once launching CZ it asks for a password needed to mount our cz repository.
    Everything working as expected.

    Enjoying the jewel for quile long now!!

    Thanks so much from the sunny Barcelona

     
  • Steven Shiau

    Steven Shiau - 2016-04-18

    Cool! Thanks for all the feedbacks.

    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.