
set root=(http,$SERVER_IP$)
set pxe_http_port=$HTTP_PORT$
set prefix=(http,$SERVER_IP$)/uis_loader/grub2

uds_func_install_mods
uds_func_set_gfx

set timeout=0

menuentry uds {   

    set gfxpayload=keep
    
    echo "Loading kernel ..."
	kfreebsd  $HTTP_IMG_ROOT$/boot/kernel/kernel    
	kfreebsd_loadenv $HTTP_IMG_ROOT$/boot/device.hints
    
    echo "Loading mfsroot ..."
	kfreebsd_module (http,$SERVER_IP$)/virtualiso/extfile/$BOOT_LABEL$-amd64-uds-mfsroot type=mfs_root

	set kFreeBSD.boot.netif.hwaddr=$CLIENT_MAC_COLON_LOWER$
	set kFreeBSD.boot.netif.ip=$CLIENT_IP$
	set kFreeBSD.boot.netif.netmask=$SERVER_MASK$
	set kFreeBSD.boot.netif.gateway=$GATEWAY_IP$
    set kFreeBSD.boot.server.ip=$SERVER_IP$
    set kFreeBSD.boot.server.imgurl=$HTTP_IMG_URL$
    set kFreeBSD.boot.server.ks=http://$SERVER_IP$:$HTTP_PORT$/kickstart/01-$CLIENT_MAC_DASH_LOWER$.auto
    
	boot
}
