In a simple boot procedure from an ISO image the below statements works well:
menuentry "Ubuntu.iso" {
set isofile="/iso/ubuntu.iso"
loopback loop (hd0,3)$isofile
linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=$isofile noeject noprompt --
initrd (loop)/casper/initrd.lz
}
where hd0
is the first hdd and 3 is the partition number.
I wish how to know to do into a lvm environments
loopback loop (hd0,3)$isofile ----> (hd0,???)
The result of blkid command is
/dev/sda1: UUID="28f0906e-d285-42dd-b3cd-18ef27b9261e" TYPE="ext2"
/dev/sda5: UUID="Nx2a6F-O11u-sZxe-HDvm-6a2u-zdUf-suvn46" TYPE="LVM2_member"
/dev/mapper/sal06--vg-root: UUID="2adef9b5-66de-4ffc-9c04-b33199815a35" TYPE="ext4"
/dev/mapper/sal06--vg-swap_1: UUID="95938380-8ee5-42c9-ad1b-eee1338870db" TYPE="swap"
My iso is in /dev/mapper/sal06--vg-root
.