The correct source for that script is from lupin-casper
package in Ubuntu
Description: Add support for loop-mount installations to casper The
Wubi installer provides a means for installing Ubuntu into a
loop-mounted filesystem image hosted on a Windows filesystem.
lupin-casper provides hooks to find an ISO image on a hard disk and
to read a preseed file from a hard disk, which are used in the early
part of this process.
An initramfs hook installs /scripts/casper-premount/20iso_scan
inside the initramfs / initrd. If you make a custom live-build Ubuntu based ISO, you need to include that package to have Grub2 be able to live boot.
find_iso
parameter was renamed to iso-scan/filename=
which sets LIVEMEDIA
which is queried in find_livefs
in /scripts/casper
Without iso_scan
script, you end up stuck in initramfs console with error message:
unable to find a medium containing a live file system
Example grub configuration:
menuentry "Ubuntu Live CD" {
set isofile="/efi/boot/ubuntu.iso"
loopback loop (hd0,msdos1)$isofile
linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=$isofile noprompt noeject debug
initrd (loop)/casper/initrd.lz
}
Hope that helps someone... finding the source of iso_scan was rather difficult.
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/boot-repair-disk-64bit.iso splash --
. This means that the "linux file" cmd of grub2 is run (see manual), and the description of that is: "Load a Linux kernel image from file. The rest of the line is passed verbatim as the kernel command-line." ... so anything beyond the filename is meant for kernel argument processing, which can only be doc'd on the level of a particular linux distribution, family or version.