linuxloops icon indicating copy to clipboard operation
linuxloops copied to clipboard

file /syslinux/vmlinuz. not found.

Open arifpedia opened this issue 1 year ago • 6 comments

I want to dualboot Windows 11 and ChromeOS Flex. ChromeOS-Flex.img file use a separate NTFS partition (D:). Imported ChromeOS-Flex.img.grub.txt file:

menuentry 'ChromeOS-Flex' --class 'chromeos-flex' {
	img_path="/ChromeOS-Flex.img"
	img_uuid="6d163f24-b898-4d95-a790-bb82fbd79a31"
	search --no-floppy --set=root --file ${img_path}
	loopback loop ${img_path}
	if [ -f (loop,7)/bootimage.cfg ]; then source (loop,7)/bootimage.cfg; fi
	if [ -z "${bootimage}" ]; then bootimage=A; fi
	linux (loop,12)/syslinux/vmlinuz.${bootimage} img_uuid=${img_uuid} img_path=${img_path} bootimage=${bootimage} loop.max_part=16 ro quiet splash boot=local noresume noswap loglevel=7 console= cros_efi kvm-intel.vmentry_l1d_flush=always loadpin.enabled=0 loadpin.enforce=0 rootfstype=ramfs 
	initrd (loop,7)/initramfs.img (loop,7)/firmwares.img (loop,7)/modules.img
}

Here's the error message after selecting the ChromeOS-Flex boot menu

error: ../../grub-core/fs/fshelp.c:257:file /syslinux/vmlinuz. not found.
error: ../../grub-core/loader/1386/efi/linux.c:168: you need to load the kernel first.

I am unable to boot into Flex. I followed the instructions in the tutorial and installed it using zenity mode (GUI) in WSL. Could you please assist me with this issue? Thank you.

NB:

  • Secureboot disabled
  • Bitlocker disabled

arifpedia avatar Jul 16 '24 15:07 arifpedia

When I mounted loop0p12 from the ChromeOS-Flex.img, the required file was there:

Kuma@PC:/mnt/myimage/syslinux$ ls
README  default.cfg  ldlinux.c32  ldlinux.sys  root.A.cfg  root.B.cfg  syslinux.cfg  usb.A.cfg  vmlinuz.A  vmlinuz.B

arifpedia avatar Jul 16 '24 15:07 arifpedia

This issue is quite strange, the config looks correct however it does not seem to set "bootimage=A" as expected for the first boot. My guess is that there could be a difference between the generated grub config and what is actually imported in grub2win.

To verify this, could you please boot to grub2win, move to the ChromeOS-Flex entry, press "e" and take a picture of the screen ?

sebanc avatar Jul 20 '24 07:07 sebanc

IMG_20240720_153814

arifpedia avatar Jul 20 '24 08:07 arifpedia

But if I hardcode A directly like: linux (loop,12)/syslinux/vmlinuz.A, Then ChromeOS flex can boot. Is indentation or whitespace affect to grub config?

arifpedia avatar Jul 20 '24 09:07 arifpedia

Thanks for the picture ! The config looks correct, I am not sure what causes bootimage variable not to be set....

There is no specific indentation needed in the grub config but hardcoding A as bootimage will fail upon ChromeOS-Flex update.

Could you try this config instead ?

menuentry 'ChromeOS-Flex' --class 'chromeos-flex' {
	img_path="/ChromeOS-Flex.img"
	img_uuid="6d163f24-b898-4d95-a790-bb82fbd79a31"
	search --no-floppy --set=root --file ${img_path}
	loopback loop ${img_path}
	bootimage=A
	if [ -f (loop,7)/bootimage.cfg ]; then source (loop,7)/bootimage.cfg; fi
	linux (loop,12)/syslinux/vmlinuz.${bootimage} img_uuid=${img_uuid} img_path=${img_path} bootimage=${bootimage} loop.max_part=16 ro quiet splash boot=local noresume noswap loglevel=7 console= cros_efi kvm-intel.vmentry_l1d_flush=always loadpin.enabled=0 loadpin.enforce=0 rootfstype=ramfs 
	initrd (loop,7)/initramfs.img (loop,7)/firmwares.img (loop,7)/modules.img
}

sebanc avatar Jul 20 '24 10:07 sebanc

With the config above, flex boots successfully. Thank You.

Are there any log or additional information that may be required?

arifpedia avatar Jul 20 '24 14:07 arifpedia

Thanks !

I have updated the ChromeOS-Flex config on the testing branch and will push it shorty on the main branch.

sebanc avatar Jul 21 '24 07:07 sebanc