#!ipxe
set boot-url http://${dhcp-server}

# Setup some basic convenience variables
set menu-timeout 5000
set submenu-timeout ${menu-timeout}

# Ensure we have menu-default set to something
isset ${menu-default} || set menu-default exit

################ Begin Boot from Operating System Menu ################

:BootOSDLC
menu Khoi dong tu cac he dieu hanh
item back ...Tro lai trinh don khoi dong chinh
item bootlinuxDLC    Khoi dong tu Linux
item bootxpDLC    Khoi dong tu Windows XP
item bootw78DLC    Khoi dong tu Windows Vista/7/8
iseq ${menu-default} menu-recovery && isset ${submenu-default} && goto menu-recovery-timed ||
choose selected && goto ${selected} || goto start

:bootlinuxDLC
chain ${base-url}/DLC1/Programs/Dos/Files/grub.exe --config-file="find --set-root /boot/grub/core.img;kernel /boot/grub/core.img;boot" || goto failed
goto start

:bootxpDLC
chain ${base-url}/DLC1/Programs/Dos/Files/grub.exe --config-file="find --set-root --ignore-floppies --ignore-cd /ntldr || rootnoverify (hd0) && chainloader +1 && boot;map () (hd0) && map (hd0) () && map --rehook;find --set-root --ignore-floppies --ignore-cd /ntldr;chainloader /ntldr" || goto failed
goto start

:bootw78DLC
chain ${base-url}/DLC1/Programs/Dos/Files/grub.exe --config-file="find --set-root --ignore-floppies --ignore-cd /bootmgr || rootnoverify (hd0) && chainloader +1 && boot;map () (hd0) && map (hd0) () && map --rehook;find --set-root --devices=h /bootmgr;chainloader /bootmgr" || goto failed
goto start

################ End Boot from Operating System Menu ################

:menu-recovery-timed
choose --timeout ${submenu-timeout} --default ${submenu-default} selected && goto ${selected} || goto start

:back
chain ${boot-url}/Programs/Dos/Menu/vn/LAN/Menu.ipxe