# Use Grub4dos 0.4.6 built-in USB drive - useful for BIOSes which have buggy USB code!

iftitle [cat --locate="GRUB4DOS 0.4.5" (md)0x200+0x100 && if not "%GRUB_USB%"=="045"] $$STRm014
echo Loading Grub4Dos 0.4.6...
chainloader /%grub%/grldr_046

iftitle [cat --locate="GRUB4DOS 0.4.6" (md)0x200+0x100 && if "%GRUB_DUN%"==""] $$STRm015
debug 1
usb --init
echo
debug off
pause --wait=3
# don't do usb --init again in menu.lst
set GRUB_USB=
set GRUB_DUN=1
configfile (md)0xa000+0x50 || configfile /menu.lst

iftitle [cat --locate="GRUB4DOS 0.4.6" (md)0x200+0x100 && if not exist GRUB_USB && if exist /%grub%/grldr_045] $$STRmg14
echo Loading Grub4Dos 0.4.5...
chainloader /%grub%/grldr_045
