As far as I know /dev/sda5 is needed because there are multiple partitions and when I wrote the incorrect number of partition it couldn't boot. (But again, I don't really know anything about the underlying process, I just kinda brute forced my way through the problem.) I tried booting it without the img_path parameter but then it couldn't locate the partition where the ISO is stored.
I feel so dumb but I just figured it out. I used an external HDD to boot Linux to install ChromeOS. Since I installed it from Linux, it treated the external HDD as the main one (/dev/sda), and the internal as the second one (/dev/sdb). That's why the kernel referenced /dev/sdb as the location of the chromeos ISO. I renamed it to sda and now it works without any problems. Thank you for all your help and sorry that the problem was caused because of an oversight by me.
i also asked for help in a Brunch/Chrome forum, they said if I can singleboot the same img then the error must lie in the grub. I am not exactly sure what bootloader it uses when I singleboot it. The parms I think are the same. How could I make sure?
I am sure sure this ISO should work. The debug menu is almost the same, I was already using that to be able to log the error.
I followed these instructions: https://github.com/sebanc/brunch/wiki/Detailed-installation-instructions-from-Windows (UEFI procedure step 30) The chromeos-install script generates it (and the kernel's params too)
This is the menunetry: menuentry 'ChromeOS ' --class custom --class icon-android { set reviewpause=2 # start-grub2win-custom-code img_part=/dev/sdb5 img_path=/chromeos.img search --no-floppy --set=root --file $img_path loopback loop $img_path linux (loop,gpt7)/kernel boot=local noresume noswap loglevel=7 options= \ cros_secure cros_debug loop.max_part=16 img_part=$img_part img_path=$img_path \ quiet initrd (loop,gpt7)/initramfs.img # end-grub2win-custom-code g2wsleep $reviewpause savelast 0 'ChromeOS'...
This is the menunetry (disablevmx=off and enforce_hyperthreading=1 are optional): menuentry 'ChromeOS ' --class custom --class icon-android { set reviewpause=2 start-grub2win-custom-code img_part=/dev/sdb5 img_path=/chromeos.img search --no-floppy --set=root --file $img_path loopback loop $img_path linux (loop,gpt7)/kernel boot=local noresume noswap loglevel=7 disablevmx=off options= \ cros_secure cros_debug enforce_hyperthreading=1 loop.max_part=16 img_part=$img_part img_path=$img_path \ quiet initrd...
Hi! Here it is. Thanks!