What did I miss in this booting-iso-from-disk attempt?

I have downloaded an LTS version of Ubuntu and put the iso on a separate ext4 partition on a laptop that default boots 18.04.2 LTS. I’ve added the appropriate line to 40_custom in grub.d, and run update-grub successfully. I can boot to the iso from the GRUB boot menu.

I’ve tried to do this on a desktop computer (NUC), using the same exact line from the 40_custom file (but pointing to the 5th partition, which is the proper one, instead of the 8th), also update-grub(-ing) successfully, but I get an error:

error: file `/isos/ubuntu-18.04.2-desktop-amd64.iso' not found. error: no server is specified. error: you need to load the kernel first. 

Here is the line from /etc/grub.d/40_custom:

menuentry "ISO: Ubuntu 18.04.1 from (hd0,8)" {     set isofile="/isos/ubuntu-18.04.2-desktop-amd64.iso"     loopback loop (hd0,8)$  isofile     linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$  isofile noprompt noeject     initrd (loop)/casper/initrd.lz } 

Did I miss something? Did I need to prep the iso first? IIRC, all I needed to do was copy the file to the ext4 partition on the laptop, update 40_custom and properly switch to iso at boot time.