Menu

ISO Boot - menuentry - clonezilla

czfan
2026-03-01
4 days ago
  • Entri3

    Entri3 - 4 days ago

    The Problem

    Your broken menuentry has the kernel parameters split across two lines:

    linux (loop)/live/vmlinuz ... username=u>
    ocs_live_run="ocs-live-general" ...
    

    The > characters are line truncation artifacts (likely from a text editor hitting a line length limit). GRUB then sees ocs_live_run="ocs-live-general" as a standalone command on the next line, which is invalid GRUB syntax — hence the errors:

    error: syntax error.
    error: Incorrect command.
    Syntax error at line 180
    

    Everything after linux must be on one single line. GRUB has no line continuation syntax.


    Important: Choosing the Right toram Option

    Since the ISO lives on your hard disk, Clonezilla must be fully loaded into RAM before it tries to clone that disk — otherwise the drive is in use and imaging will fail or produce a corrupt result.

    There are two options:

    Option What it does Use when
    toram=filesystem.squashfs Copies only the live filesystem (~500MB) to RAM ISO is on a separate drive from the one being cloned
    toram Copies the entire ISO to RAM ISO is on the same drive being cloned ✅

    If in doubt, use bare toram — it is the safe default for most Clonezilla use cases. You will need enough free RAM to hold the full ISO (~700MB–1GB+).


    Clean Working Menuentry

    Option A — toram (safe default, ISO on same disk being cloned)

    menuentry "Clonezilla 3.3.1-35 DE (toram - same disk)" {
      ISO="/boot/iso/clonezilla-live-3.3.1-35-amd64.iso"
      search --set=root -f $ISO
      loopback loop $ISO
      linux (loop)/live/vmlinuz boot=live findiso=$ISO toram union=overlay username=user config components quiet noswap edd=on nomodeset ip=frommedia net.ifnames=0 vga=791 locales=de_DE.UTF-8 keyboard-layouts=de ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_batch="no" i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1
      initrd (loop)/live/initrd.img
    }
    

    Option B — toram=filesystem.squashfs (ISO on a separate drive)

    menuentry "Clonezilla 3.3.1-35 DE (toram squashfs only - separate disk)" {
      ISO="/boot/iso/clonezilla-live-3.3.1-35-amd64.iso"
      search --set=root -f $ISO
      loopback loop $ISO
      linux (loop)/live/vmlinuz boot=live findiso=$ISO toram=filesystem.squashfs union=overlay username=user config components quiet noswap edd=on nomodeset ip=frommedia net.ifnames=0 vga=791 locales=de_DE.UTF-8 keyboard-layouts=de ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_batch="no" i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1
      initrd (loop)/live/initrd.img
    }
    

    For an English locale, simply change locales=de_DE.UTF-8 keyboard-layouts=de to locales= keyboard-layouts= in either entry above.


    Key Points

    • search --set=root -f $ISO is better than hardcoding (hd0,gpt6) — it automatically finds whichever partition contains the ISO, making the config portable across different machines or partition layouts.
    • Remove set root=(hd0,gpt6) from inside the linux line — that is a GRUB shell command, not a kernel parameter. Placing it mid-line inside linux ... does nothing useful and can cause confusion.
    • The entire linux line must be one line — no wrapping, no > continuation characters.
    • ocs_live_run, ocs_live_extra_param, and ocs_live_batch are kernel cmdline parameters passed to the live system, not separate GRUB commands. They must stay on the linux line.

     

    Last edit: Entri3 4 days ago

Log in to post a comment.

MongoDB Logo MongoDB