due to limitation in infrastructure, I cannot boot any VM from any ISO file, specifically I need gparted and clonezilla.
In a CentOS 7 test installation, I can do something like:
in /etc/grub.d/40_custom
menuentry 'clonezilla' {
set isofile="/clonezilla.iso"
loopback loop (hd0,1)$isofile
linux (loop)/live/vmlinuz boot=live config nolocales edd=on nomodeset noprompt ocs_live_extra_param="" keyboard-layouts="NONE" ocs_live_batch="no" locales="en_US.UTF-8" net.ifnames=0 vga=788 ip=frommedia toram=filesystem.squashfs union=overlay nosplash findiso="$isofile"
initrd (loop)/live/initrd.img
}
Then copy the clonezilla.iso file under /boot. This is working perfect. Problem is that in all VM I have (RedHat 7) there is no space under boot and Clonezilla is 422MB, and doesn't fit into /boot partition.
/dev/sda1 485M 258M 202M 57% /boot
Is there any other way to boot Clonezilla/Gparted ISO from GRUB? Maybe copying under /root or / (LVM partition)?
/dev/mapper/lvm01-root.vol 5.9G 3.7G 2.3G 62% /
Thank you Lucas
EDIT:
Thanks to @Tom Yan for advice. Now I'm able to boot the ISO, but unfortunately clonezilla, after a few seconds, reports the following error: "Unable to find a medum containing a live file system"
menuentry "Clonezilla" {
insmod lvm
set root='hd0,5'
ISO="/clonezilla.iso"
search --set -f $ISO
loopback loop $ISO
linux (loop)/live/vmlinuz boot=live union=overlay username=user config components findiso=$ISO
initrd (loop)/live/initrd.img
}
insmod lvm
(and changing "root" with e.g.search -s
, course; the default "root" is what the/boot/
was whengrub-install
was performed.)(hd0,1)
before$isofile
when you have "root" properly set/changed, btw. (You probably never needed it there anyway. And it's fragile.)insmod lvm
once you are out of the grub context.)