I have an ubuntu system, and I want to have a semi-automated way of running a clonezilla unattended image / re-image from a USB drive. To that end, I've modified the GRUB menu items to be along these lines: (One for Restore, one for image):

menuentry "RESTORE IMAGE" --id live-default {   $linux_cmd /live/vmlinuz boot=live union=overlay username=user config components noswap edd=on nomodeset enforcing=0 noprompt ocs_prerun="mount -L Images /mnt" ocs_prerun1="mount --bind /mnt/images /home/partimag/" ocs_live_run="ocs-sr -g auto -e1 auto -e2 -r -j2 -c -k0 -scr -icds -p reboot restoredisk ask_user ask_user" keyboard-layouts=en-us ocs_live_batch="yes" locales=en_US.UTF-8 vga=788 ip= nosplash net.ifnames=0 i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1   $initrd_cmd /live/initrd.img }

What I want to be able to do from the running machine is something like the following:

  1. Set next boot (using efibootmgr?) to USB drive
  2. touch or set something to choose either the RESTORE or IMAGE option on the USB drive GRUB menu item.
  3. Reboot into USB drive, run the selected boot path

The dumb way I can think of this is modifying the USB grub.conf each time to set the default menu item. There has to be a better way, right?

1 Answer 1


Step 1: Use efibootmgr you mentioned

Step 2: There is a set default="0" in /clonezilla-usb-drive/boot/grub.cfg

Replace it with your menuentry title or id or index


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .