Menu

Trouble creating a Custom Boot Menu for Clonezilla Live Debian

2016-06-15
2016-06-26
  • Chris Siwirski

    Chris Siwirski - 2016-06-15

    Hi Everyone,

    I am looking to create a custom boot menu for Clonezilla Live Debian-based, and I am running into an error with the last command.

    First, I run a normal restoredisk to get this command:

    Please note, if I press enter, it works just fine.

    Then, I modify the syslinux.cfg file to have this as the first option:

    # Since no network setting in the squashfs image, therefore if ip=, the network is disabled. That's what we want.
    label Clonezilla live
      MENU DEFAULT
      # MENU HIDE
      MENU LABEL Clonezilla live (M&N, VGA 800x600)
      # MENU PASSWD
      kernel /live/vmlinuz
      append initrd=/live/initrd.img boot=live union=overlay username=user config components quiet noswap edd=on nomodeset nodmraid noeject locales=en_US.UTF-8 keyboard-layouts=NONE vga=788 ip= net.ifnames=0  nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1 ocs_prerun1="mount /dev/sdb1 /home/partimag" ocsprerun2="sleep 10" ocs_live_run="/usr/sbin/ocs-sr -g auto -e1 auto -e2 -c -r -j2 -scr -p true restoredisk 2016-05-11-MNWin7x64EDv5_2 sda"
      TEXT HELP
    
      * Boot menu for BIOS machine
      * Clonezilla live version: 2.4.6-25-amd64. (C) 2003-2016, NCHC, Taiwan
      * Disclaimer: Clonezilla comes with ABSOLUTELY NO WARRANTY
      ENDTEXT
    

    However, when I run that config, I get this error:

    If I look at the contents of clonezilla.log, is does not give more details. It just contains the same first line of red text shown above "... does NOT exist!".

    I can see that it says "/dev/sbd1 is already mounted on /lib/live/mount/medium", so it can't mount it to "/home/partimag". So that's why the file does not exist. Any idea how to get around this? I am running this off a 16GB USB stick.

    Can anyone please help? I am a little lost as to why is doesn't like the code that it generated.

    Thanks,
    Chris

     
    • Steven Shiau

      Steven Shiau - 2016-06-19

      So what do you have in the /home/partimag/?
      Please run
      ls -l /home/partimag/
      to list the contents and show that to us when you see those error messages.

      Steven

       
  • Joe St.Louis

    Joe St.Louis - 2016-06-17

    I believe at this point in the boot process you will have to point to the full path.

    eg ... restoredisk /lib/live/mount/medium/2016-05-11-MNWin7x64EDv5_2 ...

    I've not used the ocs directly from a boot menu like this so if that doesn't work, you will probably, just want to create a batch file to do the command after the boot happens and point to it in there in stead.

     
  • Chris Siwirski

    Chris Siwirski - 2016-06-20

    Hi Guys,

    I ended up figuring it out after all. It turns out I was missing some of the code to run the Boot to RAM config.

    Specifically, these commands:
    ocs_live_run="ocs-live-general"
    ocs_live_extra_param=""
    ocs_live_batch=no
    toram=filesystem.squashfs

    So the complete config is:

    # Since no network setting in the squashfs image, therefore if ip=, the network is disabled. That's what we want.
    label Clonezilla live
      MENU DEFAULT
      # MENU HIDE
      MENU LABEL M&N Standard Image 2016-05-11-MNWin7x64EDv5.2 (Default settings, VGA 800x600)
      # MENU PASSWD
      kernel /live/vmlinuz
      append initrd=/live/initrd.img boot=live union=overlay username=user config components quiet noswap edd=on nomodeset nodmraid noeject locales=en_US.UTF-8 keyboard-layouts=NONE ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_batch=no vga=788 toram=filesystem.squashfs ip= net.ifnames=0  nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1 ocs_prerun1="mount /dev/sdb1 /home/partimag" ocsprerun2="sleep 10" ocs_live_run="/usr/sbin/ocs-sr -g auto -e1 auto -e2 -c -r -j2 -scr -p true restoredisk 2016-05-11-MNWin7x64EDv5.2 sda"
      TEXT HELP
    
      * Boot menu for BIOS machine
      * Clonezilla live version: 2.4.6-25-amd64. (C) 2003-2016, NCHC, Taiwan
      * Disclaimer: Clonezilla comes with ABSOLUTELY NO WARRANTY
      ENDTEXT
    

    So everything is working fine now.

    I was going crazy, because I could go through the steps manually and everything worked.

    Thanks,
    Chris

     
  • Steven Shiau

    Steven Shiau - 2016-06-26

    Thanks for sharing that.
    Yes, it's better to edit the file syslinux/{isolinux.cfg,syslinux.cfg}, append boot parameters or just modify it. Not to write that from scratch.

    Steven

     

Log in to post a comment.

MongoDB Logo MongoDB