grub4dos icon indicating copy to clipboard operation
grub4dos copied to clipboard

grub4efi issue with spaces in chainloader parameters

Open steve6375 opened this issue 1 year ago • 7 comments

image

image

If passing a filename using vdisk= it does not accept spaces. I tried with and without the \ in front of the space

However, in grub4dos, I use kernel and it does work with both leading \ or no \ in front of space

kernel /ipxe.krn vdisk=/_ISO/LINUX/Ubuntu Mint.vdi.vtoy
initrd /vdiskchain

image image

steve6375 avatar Sep 25 '22 11:09 steve6375

The same chainloader command line under grub2 UEFI64 (grubfm) works OK. chainloader (${user})/boot/grubfm/vdiskchain vdisk=${grubfm_path}

steve6375 avatar Sep 25 '22 11:09 steve6375

The chainloader of G4E directly passes the parameters to the UEFI firmware for processing. have a try:“vdisk=/_ISO/LINUX/Ubuntu Mint.vdi.vtoy"

The example of grub2 is different. It uses variables, which will resolve the space parameter.

yaya2007 avatar Sep 26 '22 01:09 yaya2007

using double-quotes works :-) “vdisk=/_ISO/LINUX/Ubuntu Mint.vdi.vtoy" Is this a bug? Does help text need modifying to specify quotes needed ? image

steve6375 avatar Sep 26 '22 07:09 steve6375

P.S. The \ character must be removed - or else error image

steve6375 avatar Sep 26 '22 07:09 steve6375

:.vtoy
# path must not have device name - must remove \ preceding spaces
errorcheck off
call :getpath %ISOC%
chainloader (bd)/_ISO/e2b/grub/vdiskchain "vdisk=%getpath%"
boot

:getpath
set getpath=%~p1%~n1%~x1
echo -e %getpath% | set getpath=
goto :eof

steve6375 avatar Sep 26 '22 07:09 steve6375

Does help text need modifying to specify quotes needed `? I think it's Microsoft's rule

yaya2007 avatar Sep 26 '22 07:09 yaya2007

The same chainloader command line under grub2 UEFI64 (grubfm) works OK. chainloader (${user})/boot/grubfm/vdiskchain vdisk=${grubfm_path}

no double-quotes are used for grub2

steve6375 avatar Sep 26 '22 08:09 steve6375