Menu

--run-prerun-dir is not working

Timus
2011-02-08
2013-04-05
  • Timus

    Timus - 2011-02-08

    I set up a clonezilla server one year ago and it worked just fine - after some adjustments - the way I needed it.

    Now I wanted to upgrade this server, so I can use a newer clonezilla version (the old one seems not to work with grub2, …). But since this is a productive server I didn't want to touch it and decided to set up a new (virtual) machine.

    The new server is a Debian Lenny 5.0.8 (Linux obelix 2.6.26-2-686 #1 SMP Thu Jan 27 00:28:05 UTC 2011 i686 GNU/Linux).

    I did it just like one year ago, configured everything and installed drbl (apt-get install drbl).

    After that I executed /opt/drbl/sbin/drblsrv -i and /opt/drbl/sbin/drblpush -i with the same parameters and options as last time.
    I am not using DRBL, just clonezilla box mode.

    I edited /tftpboot/nbi_img/pxelinux.cfg/default and added the following lines:

    label imageserver
      MENU DEFAULT
      # MENU HIDE
      MENU LABEL Imageserver (Standard)
      # MENU PASSWD
      kernel vmlinuz-pxe
      append initrd=initrd-pxe.img devfs=nomount drblthincli=off selinux=0 1     clientdir=node_root ocs_opt="-language en  -g auto -e1 auto -e2 -r -clone-hidden-data -p poweroff -run-prerun-dir restoredisk ask_user ask_user"

    Everything works just fine till here. The client shows the menu and boots … but I just cannot get it to start my prerun script. This is essential, because my script let's me choose whether to create or restore an image and let's me browse thru my images and choose one and after all it starts the cloning / restoring process.

    So I just need the append line to start my script in /opt/drbl/share/ocs/prerun

    My script has no dots or any illegal characters:

    obelix:~# run-parts -test /opt/drbl/share/ocs/prerun
    /opt/drbl/share/ocs/prerun/ClonezillaImageSelect

    Can anyone please tell me, why my script is not executed? Has anything changed during the last months, so that -run-prerun-dir is not valid anymore?

     
  • Steven Shiau

    Steven Shiau - 2011-02-11

    "clientdir=node_root" -> So you are using Clonezilla box mode there, right?
    If so, after you put your script in /opt/drbl/share/ocs/prerun/, remember to run:
    /opt/drbl/sbin/dcs -> All -> more -> gen-template-files.
    Then the tarball template /tftpboot/node_root/drbl_ssi/template_opt_drbl.tgz will be updated.
    I think we need to have a better mechanism to deal with that. Any suggestion?

    Steven.

     
  • Timus

    Timus - 2011-02-14

    Hi Steven, thanks for your reply.

    Yes, I'm using Clonezilla box mode. I actually regenerated the template files by executing /opt/drbl/sbin/drblpush -i (or since I already have my config file I used /opt/drbl/sbin/drblpush -c /etc/drbl/drblpush.conf). But /opt/drbl/sbin/dcs -> All -> more -> gen-template-files is faster - thanks for the hint!

    But it seems like my prerun script is still not recognized. When I extract the tar-file /tftpboot/node_root/drbl_ssi/template_opt_drbl.tgz I can find my prerun script … so it should be there.

    The last lines I can see when booting my client is:

    Waiting for /usr…done.
    Waiting for udevd to be started…
    Starting portmap daemon…Already running.Use LANG en_US.UTF-8
    Reading ocs-opt from /proc/cmdline…
    Now run: ocs-sr -language en -g auto -e1 auto -e2 -r -clone-hidden-data -p poweroff -run-prerun-dir restoredisk ask_user ask_user
    .
    Starting NFS common utilities: statdSetting the TERM als linux
    idmapd******************************************.
    Clonezilla image dir: /images/partimag
    .
    **************************************.
    Shutting down the Logical Volume Manager
    Finished Shutting down the Logical Volume Manager
    No disk image is found in /images/partimag.. Make sure you already saved an image! Or make sure you did not try to restore an image saved from partition(s) to disk(s)! Program terminated!!!!
    Will now switch to single-user mode.
    INIT: Going single user
    INIT: Sending processes the TERM signal
    Give root password for maintenance
    (or type Control-D to continue):

    Of cause there is no image. I don't want to restore an image with the given command … I just want the command to run -run-prerun-dir … everything else is done by my script. But as I already said … it's just not executed!

     

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.