5

I have a dual boot system with Windows and Ubuntu and used to add Clonezilla as third item on my boot menu via this script:

menuentry "Backup/Restore" {
set isofile="/home/xaqon/clonezilla.iso"
loopback loop $isofile
linux (loop)/live/vmlinuz boot=live union=overlay username=user config components quiet noswap nolocales edd=on nomodeset nodmraid ocs_live_run=\"ocs-live-general\" ocs_live_extra_param=\"\" keyboard-layouts=\"\" ocs_live_batch=\"no\" locales=\"\" vga=788 ip=frommedia nosplash toram=filesystem.squashfs findiso=$isofile
initrd (loop)/live/initrd.img
} 

While the ISO image resides on my /home directory, I use the latest stable release of Clonezilla (amd64) and don't use UFEI (I use legacy mode for booting). Now the code snippet doesn't work anymore on my Thinkpad E-550 and Ubuntu 16.04.1 besides Grub Customizer doesn't recognize Clonezilla ISO images. Is there any script for Grub Customizer custom entries to handle the situation?

cl-netbox
  • 31,491
Xaqron
  • 1,292

1 Answers1

4

Don't use GRUB Customizer, better just use the capability of GRUB to boot from ISO files directly. Here is an example from my setup where Clonezilla boots from a folder on a separate partition of the disk - just replace the disk and partition matching the location of the ISO file on your disk and partition. Revert all the changes you have made with GRUB Customizer, then open a terminal and execute the following command :

sudo nano /etc/grub.d/40_custom

Add the following lines to the file :

menuentry "clonezilla" {
set isofile="/various/clonezilla-live-2.5.0-5-amd64.iso"
loopback loop (hd0,4)$isofile
linux (loop)/live/vmlinuz boot=live components config findiso=$isofile ip=frommedia toram=filesystem.squashfs union=overlay username=user
initrd (loop)/live/initrd.img
}

Press Ctrl + X to close the file and confirm the changes with Y.
Execute sudo update-grub to update the GRUB boot configuraton.

Note : Replace clonezilla-live-2.5.0-5-amd64.iso with the name of your Clonezilla ISO file.
Replace the path (folder /various in my setup) with the path (folder) where your file is located.
Replace hd0,4 with your disk and partition number, you can identify them by executing df -l.
In my example hd0,4 stands for disk 0 (sda) and partition number 4 on this disk. Place the ISO file on a separate partition to guarantee a completely unmounted Ubuntu root system partition.

cl-netbox
  • 31,491