Showing posts with label PXE. Show all posts
Showing posts with label PXE. Show all posts

Wednesday, February 17, 2016

MDT 2013, PXE Boot Standalone Setup, BCD Issues

So this post is not about my entire MDT config but more focused on a recent issue that drove me nuts.  Many, many forums, blogs, websites out there about doing MDT installs without using WDS all point to using a tftp app like the free one from Solarwinds.

Which is fine, and very easy to setup and get going.  My pre-existing MDT server needed to be migrated to a physical and while doing so I decided to upgrade to Update 2 and the Windows 10 ADK.

In doing so meant that I'd have to re-do pretty much all of my configuration including the task sequences.  So I had PXE boot setup and working but was getting a blue error screen like this:


Hmm ok so in creating my BCD store file I used this batch script:

REM Creates BCD (boot configuration data) for MDT 2013 combined with WDS
REM —————————————————————————
REM CHANGE AS REQUIRED
REM ——————-
set BCD-File=C:\MDT\Boot\bcd
del %BCD-File%
Bcdedit /createstore %BCD-File%
Bcdedit /store %BCD-File% /create {ramdiskoptions}
Bcdedit /store %BCD-File% /set {ramdiskoptions} ramdisksdidevice boot
Bcdedit /store %BCD-File% /set {ramdiskoptions} ramdisksdipath \boot\boot.sdi
for /f “tokens=1-3” %%a in (‘Bcdedit /store %BCD-File% /create /d “WinPE x86” /application osloader’) do set guid1=%%c
Bcdedit /store %BCD-File% /set %guid1% systemroot \Windows
Bcdedit /store %BCD-File% /set %guid1% detecthal Yes
Bcdedit /store %BCD-File% /set %guid1% winpe Yes
Bcdedit /store %BCD-File% /set %guid1% osdevice ramdisk=[boot]\boot\LiteTouchPE_x86.wim,{ramdiskoptions}
Bcdedit /store %BCD-File% /set %guid1% device ramdisk=[boot]\boot\LiteTouchPE_x86.wim,{ramdiskoptions}
for /f “tokens=1-3” %%a in (‘Bcdedit /store %BCD-File% /create /d “WinPE x64” /application osloader’) do set guid2=%%c
Bcdedit /store %BCD-File% /set %guid2% systemroot \Windows
Bcdedit /store %BCD-File% /set %guid2% detecthal Yes
Bcdedit /store %BCD-File% /set %guid2% winpe Yes
Bcdedit /store %BCD-File% /set %guid2% osdevice ramdisk=[boot]\boot\LiteTouchPE_x64.wim,{ramdiskoptions}
Bcdedit /store %BCD-File% /set %guid2% device ramdisk=[boot]\boot\LiteTouchPE_x64.wim,{ramdiskoptions}
Bcdedit /store %BCD-File% /create {bootmgr} /d “WinPE x86”
Bcdedit /store %BCD-File% /set {bootmgr} timeout 30
Bcdedit /store %BCD-File% /set {bootmgr} displayorder %guid2% %guid1%
Bcdedit /store %BCD-File% /enum all
Which did not actually create a full, working BCD.  The syntax is off, it fails right after it creates the file and adds the ramdisk lines.

So my solution, manual creation.  I dropped to a CMD and manually ran each line in that batch leaving out the %guid1% and $guid2% parts and instead copying and pasting those manually.  I'll summarize was a ran below.

Bcdedit /createstore f:\tftp-root\boot\bcd
Bcdedit /store f:\tftp-root\boot\bcd /create {ramdiskoptions}
Bcdedit /store f:\tftp-root\boot\bcd /set {ramdiskoptions} ramdisksdidevice boot
Bcdedit /store f:\tftp-root\boot\bcd /set {ramdiskoptions} ramdisksdipath \boot\boot.sdi
Bcdedit /store f:\tftp-root\boot\bcd /create /d “WinPE x86” /application osloader
this line returns the first guid for you to record
Bcdedit /store f:\tftp-root\boot\bcd /set {insert guid1 here} systemroot \Windows
Bcdedit /store f:\tftp-root\boot\bcd /set {insert guid1 here} detecthal Yes
Bcdedit /store f:\tftp-root\boot\bcd /set {insert guid1 here} winpe Yes
Bcdedit /store f:\tftp-root\boot\bcd /set {insert guid1 here} osdevice ramdisk=[boot]\boot\LiteTouchPE_x86.wim,{ramdiskoptions}
Bcdedit /store f:\tftp-root\boot\bcd /set {insert guid1 here} device ramdisk=[boot]\boot\LiteTouchPE_x86.wim,{ramdiskoptions}
Bcdedit /store f:\tftp-root\boot\bcd /create /d “WinPE x64” /application osloader
The second guid to record
Bcdedit /store f:\tftp-root\boot\bcd /set {insert guid2 here} systemroot \Windows
Bcdedit /store f:\tftp-root\boot\bcd /set {insert guid2 here} detecthal Yes
Bcdedit /store f:\tftp-root\boot\bcd /set {insert guid2 here} winpe Yes
Bcdedit /store f:\tftp-root\boot\bcd /set {insert guid2 here} osdevice ramdisk=[boot]\boot\LiteTouchPE_x64.wim,{ramdiskoptions}
Bcdedit /store f:\tftp-root\boot\bcd /set {insert guid2 here} device ramdisk=[boot]\boot\LiteTouchPE_x64.wim,{ramdiskoptions}
Bcdedit /store f:\tftp-root\boot\bcd /create {bootmgr} /d “WinPE x86”
Bcdedit /store f:\tftp-root\boot\bcd /set {bootmgr} timeout 30
Bcdedit /store f:\tftp-root\boot\bcd {bootmgr} displayorder %guid2% %guid1%
Bcdedit /store f:\tftp-root\boot\bcd /enum all
Boom, done and working.