Menu

ocs_repository not working via grub

Help
2019-10-18
2021-01-21
  • jeff.sadowski

    jeff.sadowski - 2019-10-18

    Useing clonezilla version stable - 2.6.3-7
    I have 2 methods of pxeboot for it
    One I use pxelinux

    label Clonezilla-live 2019-09-03 x64
      menu label Clonezilla Live 2019-09-03 stable x64 fast
      kernel cz190903.x64/live/vmlinuz
      append initrd=cz190903.x64/live/initrd.img vga=788 video=800x600 vmwgfx.enable_fbdev=1 boot=live union=overlay username=user hostname=clonezilla ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_batch="no" locales=en_US.UTF-8 keyboard-layouts=NONE toram=filesystem.squashfs fetch=http://tftp/tftp/cz190903.x64/live/filesystem.squashfs ocs_repository="smb://domain;clonezilla:password@smb/clonezilla/"
    

    The other is grub with the config

    menuentry "Clonezilla-live 2019-09-03 x64"{
      linux /cz190903.x64/live/vmlinuz boot=live union=overlay username=user hostname=clonezilla ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_batch="no" locales=en_US.UTF-8 keyboard-layouts=NONE toram=filesystem.squashfs fetch=http://tftp/tftp/cz190903.x64/live/filesystem.squashfs ocs_repository="smb://domain;clonezilla:password@smb/clonezilla/"
      initrd /cz190903.x64/live/initrd.img
    }
    

    When I boot via pxelinux it mounts /home/partimag.
    When I boot using UEFI grub it does not.

     

    Last edit: jeff.sadowski 2019-10-18
  • jeff.sadowski

    jeff.sadowski - 2019-10-18

    I tried working around this via

    ocs_prerun="mount //smb/clonezilla /home/partimag -o username=clonezilla,domain=domain,password=password"
    

    but this causes it to lockup on booting via grub
    It locks up running the command on
    2.6.3-7
    and
    20191016-eoan

    I can run other commands via ocs_prerun with no problems but this particular mount command causes it to freeze up.

     

    Last edit: jeff.sadowski 2019-10-18
  • Steven Shiau

    Steven Shiau - 2019-10-19

    Try to use the password which won't confuse the parsing program, especially do not use some special characters as part of your password.

    Steven

     
  • jeff.sadowski

    jeff.sadowski - 2019-10-19

    I'll even give the password I tried.
    Password:
    Cl0nezilla
    but is still ignores the option in EFI mode.

     
  • Steven Shiau

    Steven Shiau - 2019-10-19

    So what's the results when you run:
    cat /proc/cmdline

    Steven

     
  • jeff.sadowski

    jeff.sadowski - 2019-10-19

    Can't wait to try that Monday :-) I wonder of the order matters.

     

    Last edit: jeff.sadowski 2019-10-19
  • Steven Shiau

    Steven Shiau - 2019-10-20

    Basically Clonezilla read the content of /proc/cmdline, parse it, then run it. If the /proc/cmdline is the same for both booting from syslinux and grub, then there is no reason that Clonezilla will run it differently. Hence we can just check /proc/cmdline to realize what happened there.

    Steven

     
  • jeff.sadowski

    jeff.sadowski - 2019-10-21

    root@clonezilla:~# cat /proc/cmdline
    BOOT_IMAGE=/cz191016.x64/live/vmlinuz boot=live union=overlay username=user hostname=clonezilla ocs_live_run=ocs-live-general ocs_live_extra_param= ocs_live_batch=no locales=en_US.UTF-8 keyboard-layouts=NONE toram=filesystem.squashfs fetch=http://tftp/tftp/cz191016.x64/live/filesystem.squashfs ocs_repository=smb://mydomain;clonezilla:Cl0nezilla@smb/clonezilla/

    mydomain is my domain
    clonezilla is the username
    Cl0nezilla is the password
    smb is my samba server
    and
    clonezilla is a share on it

    these credetials work just fine if I enter them manually.

     
  • jeff.sadowski

    jeff.sadowski - 2019-10-21

    I do the exact same ocs_repository for a legacy pxe boot and it works flawlessly. Something about it booting UEFI pxe it seems to ignore ocs_repository

     
  • jeff.sadowski

    jeff.sadowski - 2019-10-21

    I do the exact same ocs_repository for a legacy pxe boot and it works flawlessly. Something about it booting UEFI pxe it seems to ignore ocs_repository

     
  • jeff.sadowski

    jeff.sadowski - 2019-10-21

    I found a work around.
    I created a script mount.sh

    1
    2
    #!/bin/bash
    mount //smb/clonezilla /home/partimag -o username=clonezilla,domain=mydomain,password=Cl0nezilla
    

    then I was able to use ocs_prerun like so

    ocs_prerun="wget http://tftp/tftp/mount.sh -P /root;bash /root/mount.sh"
    

    This works.

     
  • Steven Shiau

    Steven Shiau - 2019-10-23

    Thanks. I confirmed this issue, and it was fixed in the git repository. The next testing Clonezilla live will contain the fixed codes.

    Steven

     
  • Steven Shiau

    Steven Shiau - 2019-10-24

    This issue is fixed in Clonezilla live 2.6.4-10 or 20191024-*:
    https://clonezilla.org/downloads.php

    Please give it a try and let us know the results. Thanks.

    Steven

     
  • jeff.sadowski

    jeff.sadowski - 2019-10-24

    Awesome thanks. But I really like my work around. I have it change the root password allow root login via ssh and start the ssh service then it reports the ip to a file so I can ssh to it.

     
  • Steven Shiau

    Steven Shiau - 2019-10-24

    Definitely! Script will be much more flexible compared with the parameter ocs_repository.

    Steven

     
  • ptrj

    ptrj - 2020-12-11

    Hi,

    i have problem with ocs_repository to put domain in to login for smb share for group.cfg. In documentation is syntax smb://domain;login:password@ip/share/path and it doesn't work.
    I have hack this like smb://login:password,domain=my_domain@IP/share/
    Maybe it helps

     
    • jeff.sadowski

      jeff.sadowski - 2020-12-11

      Thank you for this but it was something that Steven did with a newer version that had fixed it. Everything has been working flawless "on this aspect" for a long time. :-) I am very pleased with it. I haven't even needed my own script in such a long time that I had even taken that out.

       
  • Steven Shiau

    Steven Shiau - 2020-12-14

    @ptrj,
    As jeff.sadowski mentioned, please give the latest Clonezilla live a try, e.g., 2.7.0-10 or 20201102-groovy:
    https://clonezilla.org/downloads.php
    and let us know the results.

    @ jeff.sadowski,
    Thanks for your feedback. It's nice to know you enjoy this feature of Clonezilla live.

    Steven

     
  • Karlhein Reimann

    I tried clonezilla-live-2.7.0-10-amd64 and there I have the same problem than ptrj (booting in uefi and using grub.cfg) and his solution also works here.

    And thank you for Clonezilla live. It's an awesome software.

    Karl

     
    👍
    1

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.