Menu

Multiple custom-ocs

Troy Town
2009-06-10
2013-04-05
  • Troy Town

    Troy Town - 2009-06-10

    I was able to create my own custom-ocs with CloneZilla running locally on the drive.  But i can see that I am limited to create only one "custom-ocs" ... What I want to do is.....

    #1.  Add multiple custom-ocs scripts in the /opt/drbl/sbin folder.

    #2.  Name my own "custom-ocs" file to whatever i want to call it instead of always defaulting to just the title "custom-ocs".

    Can this be done? and how?

    Thanks Steven...

      

     
    • Steven Shiau

      Steven Shiau - 2009-06-11

      Troy,
      Actually you can use any name. Just remember to use the boot parameter "ocs_live_run=$your_custom_program" to assign that. (Replace $your_custom_program" with yours".
      However, the program "ocs-iso" or "ocs-live-dev" now only accepts one customized file. Definitely you can hack Clonezilla live to insert more. Either put it inside the filesystem.squashfs or you can use some boot parameters (ocs_live_prerun*) to make it.

      For more info about boot parameters of Clonezilla live, please check:
      http://clonezilla.org/clonezilla-live/doc/fine-print.php?path=./99_Misc/00_live-initramfs-manual.doc#00_live-initramfs-manual.doc

      Steven.

       
    • Troy Town

      Troy Town - 2009-06-12

      Hmmm, but would "ocs_live_prerun" work in correspondence with Grub. For example, this is my GRUB entry for my "custom-ocs" script to function.

      title       Restore WinXP 32 Image
      root       (hd0,05)
      kernel      /live-hd/vmlinuz1 boot=live union=aufs ip=frommedia live-media-path=/live-hd vga=791 toram bootfrom=/dev/sda6 noprompt noprompt ocs_live_run="custom-ocs" ocs_live_extra_param="" ocs_live_keymap="NONE" ocs_live_batch="yes" ocs_lang="en_US.UTF-8" vga=791 nolocales
      initrd     /live-hd/initrd1.img
      boot

      custom-ocs sits in the /opt/drbl/sbin folder and you can see that ocs_live_run access the script and runs.  But my custom-ocs was created by the ocs-live-dev setup.  One thing i noticed is if I just create a folder called "pkg" and copy my custom-ocs script to that folder I don't have use the ocs-live-dev.  That was just a side note.  How would I insert more custom-ocs inside the filesystem.squashfs when that is a binary file.  How can i hack that? Or do you think iusing the "ocs_live_prerun" better way to go?  and how would I use that in correspondence with GRUB?

      Hope this made sence...

      Thanks Steven

       
      • Steven Shiau

        Steven Shiau - 2009-06-12

        Actually you can put your custom-ocs* in any dir, e.g. /live-hd/, then use ocs_live_run="/live-hd/custom-ocs" in the boot parameter to run custom-ocs. For the 2nd one (e.g custom-ocs2), use ocs_live_run="/live-hd/custom-ocs2"...
        These boot parameters will work with grub, syslinux, isolinux, pxelinux...

        Steven.

         
    • Troy Town

      Troy Town - 2009-06-12

      I wish it was that easy... here is the error message that I get.

      /opt/drbl/sbin/ ocs-live-run-menu: line 78: /live-hd/custom-ocs: No such file or directory

      Here is my new Grub entry

      title Restore WinXP 32 Image
      root (hd0,05)
      kernel /live-hd/vmlinuz1 boot=live union=aufs ip=frommedia live-media-path=/live-hd vga=791 toram bootfrom=/dev/sda6 noprompt noprompt ocs_live_run="/live-hd/custom-ocs" ocs_live_extra_param="" ocs_live_keymap="NONE" ocs_live_batch="yes" ocs_lang="en_US.UTF-8" vga=791 nolocales
      initrd /live-hd/initrd1.img 
      boot

      Note: my custom-ocs script is in the /live-hd/ directory

      Here is the problem, and correct me if I'm wrong.  ocs_live_run activates the ocs-live-run-menu script.  That command can only read scripts that are in the /opt/drbl/sbin directory. ocs-run-menu-menu can only run what is inside CZ,,, not outside CZ where the home,live-hd,syslinux, and utils, directories exist.  This is why we get the error message about of no file or directory found.

      In my original Grub entry i had ocs_live_run="custom-ocs" and worked fine.  That is because "custom-ocs" was inserted in the /opt/drbl/sbin directory where ocs-live-run-menu can activate it.

      There is one weird thing you have when you use the ocs-live-dev.  It creates a "pkg" folder where the home, live-hd, syslinux, and utils directories exist with the custom-ocs script inside the pkg folder.  I can skip using the ocs-live-dev setup and just create my own pkg folder and put the custom-ocs scrtip inside the folder. And for some reason, custom-ocs will show up in the /opt/drbl/sbin directory.  But only 1 custom-ocs will be there, i can't add anymore.

      Let know what you think.

       
      • Steven Shiau

        Steven Shiau - 2009-06-13

        Sorry, wrong path. I should say you can see the files you put in /live-hd are actually now in "/live/image/live-hd/" when running in Clonezilla live.
        Therefore you should be able to assign:
        ocs_live_run="/live/image/live-hd/custom-ocs"

        Please post the results there.

        Steven.

         
    • Troy Town

      Troy Town - 2009-06-16

      Thank you Steven,

      I was able to create 7 different type of "custom-ocs" and they work great.  I corrected the path and it resolved the problem.  Thank you again.

      -Troy

       
      • Steven Shiau

        Steven Shiau - 2009-06-17

        Troy,
        Great! Maybe you can share how you make it ? We can put it on http://clonezilla.org/related_article/
        Thanks in advance.

        Steven.

         
    • Troy Town

      Troy Town - 2009-06-18

      Sure I can do that. Not a problem... I will post it some time this month.

       
      • Steven Shiau

        Steven Shiau - 2009-06-18

        Trony,
        Thanks in advance.

        Steven.

         
    • Troy Town

      Troy Town - 2009-06-30

      Hi Steven,

      I'm ready to document on the how the procedure was created... Do i just post it here and then you will move it over to the related article section?.... Hope to hear from you soon...

      -Aaron
      aka Troy =)

       
      • Steven Shiau

        Steven Shiau - 2009-07-01

        Troy,
        Thanks for sharing that. If you can, please email me <steven _at_ nchc org tw> and we can put it on http://clonezilla.org/related_article/

        Steven.

         

Log in to post a comment.

MongoDB Logo MongoDB