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

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

#check for help text which only occurs in 0.4.6
iftitle [if "%G%"=="" && 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
set G=
configfile (md)0xa000+0x50 || configfile /menu.lst

iftitle [if "%G%"=="" && if not exist GRUB_USB && if exist /%grub%/grldr_045] $$STRmg14
echo Loading Grub4Dos 0.4.5...
chainloader /%grub%/grldr_045
