set efiname64 "cdboot8pe64"
set efiname32 "cdboot8pe32"
echo Seach for "%efiname64%.efi"...
for %b in fs0 fs1 fs2 fs3 fs4 fs5 fs6 fs7 fs8 fs9
echo Seaching %b ...
if exist %b:\%efiname64%.efi then
echo %efiname64% found in %b:!
%b:
%efiname64%
if not %lasterror% == 0 then
%efiname32%
endif
exit
endif
endfor
以上是可行的~但 fs0 fs1 fs2 fs3 fs4 fs5 fs6 fs7 fs8 fs9这段不满意,有办法自动获取所有fs,而不用这里指定吗?
GRUB配置:menuentry "启动 Win8 PE (请注意选择版本)"{
echo "正在加载 Win8 PE,请等待...."
if [ "${grub_cpu}" == "x86_64" ]; then
search --file /grub2/uefi/shell64.efi --set=root
chainloader /grub2/uefi/shell64.efi
fi
if [ "${grub_cpu}" == "i386" ]; then
search --file /grub2/uefi/shell32.efi --set=root
chainloader /grub2/uefi/shell32.efi
fi
}