iPXE discussion forum
including install.bat with initrd - Printable Version

+- iPXE discussion forum (https://forum.ipxe.org)
+-- Forum: iPXE user forums (/forumdisplay.php?fid=1)
+--- Forum: General (/forumdisplay.php?fid=2)
+--- Thread: including install.bat with initrd (/showthread.php?tid=10075)

including install.bat with initrd - stodeti - 2017-06-21 10:12


I am trying to install WIN12kR2 OS with iPXE scripted install, I want to start the OS install automatically with install.bat and winpeshl.ini files. Those files are loaded successfully. But it halts at winpeinit screen. Below is my menu.ipxe content. But when I include those two files (install.bat and winpeshl.ini) in boot.wim instead of sourcing via initrd option it works perfectly.

echo Installing Win2012 R2 ${arch} Server
set base-url ${http-url}/win/winpe/${arch}/media
kernel ${boot-url}win12/wimboot
initrd ${http-url}/install.bat install.bat
initrd ${http-url}/winpeshl.ini winpeshl.ini
initrd ${base-url}/sources/boot.wim boot.wim
initrd ${base-url}/bootmgr bootmgr
initrd ${base-url}/Boot/BCD BCD
initrd ${base-url}/Boot/boot.sdi boot.sdi
initrd ${base-url}/Boot/Fonts/wgl4_boot.ttf wgl4_boot.ttf
echo Booting
boot || goto failed

---- install.bat contents -----
net use \\\share\installers /user:root pass123
\\\share\installers\WIN12KR2\setup.exe /unattend:\\\share\unattend.xml

---- winpeshl.init contents -----

RE: including install.bat with initrd - NiKiZe - 2017-06-22 17:54

Commit in wimboot that introduced that load files from initrd into wim:

The example shows winpeshl.ini which is located in %SYSTEMROOT%\System32
files injected into the wim by wimboot will only be in /windows/system32 as such you will have to make sure that your winpeshl.ini refers to that same place...

example winpeshl.ini:
AppPath = %SYSTEMROOT%\System32\install.bat"

and for your install.bat (you should probably rename it startnet.cmd to conform to winPE standard) I would strongly suggest some updates:
:: wpeinit loads the shell
:: Make sure network is up before continuing
wpeutil WaitForNetwork
:: also make sure we have dns
net start dnscache
REM possible loop here until network is confirmed up

earlier post of mine on similar topic: http://forum.ipxe.org/showthread.php?tid=7059&pid=13472#pid13472

RE: including install.bat with initrd - stodeti - 2017-06-23 07:00

Thanks, It worked fine with latest wimboot files from git