On a Ubuntu 20.04 Server. How to setup grub so that it can boot on a recent Clonezilla image (ISO preferred, but also possible ZIP) ?
I've found great post here https://askubuntu.com/a/490206/30535 , that worked for me as as long as I don't use LVM.
Disk setup looks like this :
lsblk
sda 8:0 0 40G 0 disk
├─sda1 8:1 0 1M 0 part
├─sda2 8:2 0 1G 0 part /boot
└─sda3 8:3 0 39G 0 part
└─ubuntu--vg-ubuntu--lv 253:0 0 39G 0 lvm /
sr0 11:0 1 1024M 0 rom
df -h / /boot
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-ubuntu--lv 39G 6.5G 31G 18% /
/dev/sda2 976M 199M 711M 22% /boot
The Ubuntu entry that works looks like this :
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-95cc5dff-ed40-9541-44e7-dca7da766a4c' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 6c60cf4b-a54a-4584-43b6-f1b83b7db110
else
search --no-floppy --fs-uuid --set=root 6c60cf4b-a54a-4584-43b6-f1b83b7db110
fi
linux /vmlinuz-5.4.0-67-generic root=/dev/mapper/ubuntu--vg-ubuntu--lv ro nosplash debug
initrd /initrd.img-5.4.0-67-generic
}
After adapting oldfred's suggestion to Clonezilla, I have this.
menuentry "Clonezilla live" {
insmod part_gpt
insmod lvm
insmod ext2
set root="lvm/ubuntu--vg-ubuntu--lv"
search --no-floppy --fs-uuid --set=root --hint=${root} 6c60cf4b-a54a-4584-43b6-f1b83b7db110
set isofile="(lvm/ubuntu--vg-ubuntu--lv)/clone_sys/clonezilla.iso"
echo "Using ${isofile} ..."
loopback loop $isofile
linux (loop)/live/vmlinuz boot=live live-config noswap nolocales edd=on nomodeset ocs_live_run=\"ocs-live-general\" ocs_live_extra_param=\"\" ocs_live_keymap=\"\" ocs_live_batch=\"no\" ocs_lang=\"\" vga=788 ip=frommedia nosplash toram=filesystem.squashfs findiso=$isofile
initrd (loop)/live/initrd.img
}
Now, this boot, up to the message live-boot will now start a shell. The error message was : Unable to find a medium containing a live file system
, leaving me in a (initramfs) console.
I do not know nor use LVM. But have this in my notes for booting Fedora from LVM. You need to adjust for your path & ISO.