Auto samba mounting nightmares

ndog37
2011-04-26
2014-06-21
  • ndog37
    ndog37
    2011-04-26

    Clonezilla is very frustrating to get working for me

    I'm using a PXE server with clonezilla-live-1.2.8-23-i686

    I'm trying to auto mount a samba share passing a user name and password. If I do this manually by typing it works, however automating the process is not going anywhere…

    For example, if I define to point at my bash script it will download and save in tmp dir

    ocs_prerun="busybox tftp -g -r actual.sh -l /tmp/actual.sh 192.168.1.22"
    

    However if I combine the two commands, it overwrites the file? or doesn't download it. It becomes a 0 byte file.
    However this behavour is not consistent and happens about 75% of the time. In the cases where it doesn't overwrite the file the script doesnt execute properly anyway.

    ocs_prerun="busybox tftp -g -r actual.sh -l /tmp/actual.sh 192.168.1.22"
    ocs_live_run="sudo bash /tmp/actual.sh"
    

    actual.sh

    1
    2
    3
    #!/bin/sh
    mount -t cifs -o username=administrator,password=apple -o domain=workgroup //192.168.1.3/images2/clonezilla /home/partimag
    ls -al /home/partimag
    

    I have also tried using this to mount the samba share, however this is a bad idea. This goes and updates ocs-live.conf with invalid parameters and gives an error chown: invalid user: `administrator,password=apple.administrator,password=apple`. It then gives mount error(101) and CIFS VFS error. It then prompts to login to debian which is broken. I think this may be a bug actually.

    ocs_prerun="mount -t cifs -o username=administrator,password=apple //192.168.1.3/images2/clonezilla /home/partimag"
    

    I have tried an earlier version of clonezilla, however it did not support the , or . characters and has not worked…

    I hope to get this working to automount a samba share, preferably using a script.sh file to perform the samba mount, I just need a version that works

    Thanks!!

     
  • Steven Shiau
    Steven Shiau
    2011-04-26

    How about posting your pxelinux config file?
    It's easier for us to reproduce the problem here.

    Steven.

     
  • ndog37
    ndog37
    2011-04-26

    not working

    label ClonezillaPXE3
        MENU LABEL ^3. Clonezilla Live - Restore from samba share
        kernel clonezilla/live/vmlinuz
      append initrd=clonezilla/live/initrd.img boot=live live-config noswap nolocales edd=on nomodeset noprompt vga=788 nosplash ocs_live_keymap=NONE ocs_lang=en_US.UTF-8 ocs_prerun="sudo mount -t cifs -o user=administrator,password=apple //192.168.1.3/images2/clonezilla /home/partimag" fetch=tftp://192.168.1.22/clonezilla/live/filesystem.squashfs
    

    working with sleep 2

    label ClonezillaPXE3
        MENU LABEL ^3. Clonezilla Live - Restore from samba share
        kernel clonezilla/live/vmlinuz
      append initrd=clonezilla/live/initrd.img boot=live live-config noswap nolocales edd=on nomodeset noprompt vga=788 nosplash ocs_live_keymap=NONE ocs_lang=en_US.UTF-8 ocs_prerun1="sleep 2" ocs_prerun2="sudo mount -t cifs -o user=administrator,password=apple //192.168.1.3/images2/clonezilla /home/partimag" fetch=tftp://192.168.1.22/clonezilla/live/filesystem.squashfs
    

    Wow, i just spent 5 hours working on getting this working and tryed adding a sleep command and suddenly it works. This is the code that I got to work. Notice I have put the sleep 2 command first. Now it works. Without sleep 2, it doesn't work.

    Now I have finally got the folder mounted succesfully, I will forget about using a script.sh to mount the share because I cant get it working either way.

    Next I need to create and pull an image to my /part/image folder

     
  • ndog37
    ndog37
    2011-04-26

    Also I would like to add I am now using clonezilla-live-1.2.8-29-i686 and it still works well.
    I am using this command to debug my pxe booting now.

    label ClonezillaPXE3
        MENU LABEL ^3. Clonezilla Live - Restore from samba share
        kernel clonezilla/live/vmlinuz
      append initrd=clonezilla/live/initrd.img boot=live live-config noswap nolocales edd=on nomodeset noprompt vga=788 nosplash ocs_live_keymap=NONE ocs_lang=en_US.UTF-8 ocs_prerun1="sleep 2" ocs_prerun2="sudo mount -t cifs -o user=administrator,password=apple //192.168.1.3/images2/clonezilla /home/partimag" ocs_prerun3="ls -al /home/partimag" ocs_prerun4="sleep 10" fetch=tftp://192.168.1.22/clonezilla/live/filesystem.squashfs
    

    Thanks for making this software!

     
  • Steven Shiau
    Steven Shiau
    2011-04-27

    So all work there?

    Steven.

     
  • ndog37
    ndog37
    2011-05-05

    Yes working very well!

    I am going to install this into 600 linux servers. Very good software!

     
  • Steven Shiau
    Steven Shiau
    2011-05-09

    600 linux servers…. Cool!
    Enjoy!

    Steven.

     
  • Bret
    Bret
    2014-06-17

    I am also have this problem

    kernel /live/vmlinuz
    append initrd=/live/initrd.img boot=live username=user config quiet noswap edd=on nomodeset noeject ocs_prerun="dhclient -v eth0" ocs_prerun1="sleep 2" ocs_prerun2="mount -t cifs -o user=swinneyb,password=95honda //10.100.75.1/Images /home/partimag" locales="en_US.UTF-8" keyboard-layouts=NONE ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_batch=no vga=788 ip= nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=no

    Help!

     
  • Steven Shiau
    Steven Shiau
    2014-06-21

    Could you please new a thread? Or at least describe the error messages you had there. It's better to take a photo about the error messages on the screen then post it.

    Steven.