WreX Posted November 9, 2007 Share Posted November 9, 2007 I'm working on a system that will use the Vista Boot Loader to either boot PE into RAM from a WIM on the C: drive, or boot into Win2K / XP on the D: drive using NTLDR. In my efforts to track down how to do this I looked in all of Microsoft's help and walkthroughs and several forum posts but I never found the whole thing at once. Well if you're trying to do the same thing I am, you're in luck, because I figured it out and thought I'd share. This also installs the Vista Boot Loader on a PC that didn't already have it.First create a bootable PE RAM image on CD or UFD that includes BOOTSECT.EXE in \Windows\System32\ and boot to it. The following commands assume C: is the primary, active partition, has been formatted, and has BOOT.INI, NTLDR, and NTDETECT.COM at the root. D: contains the Win2K / XP files. E: is the bootable media's drive letter.xcopy e:\boot\*.* /s /e /f c:\boot\xcopy e:\sources\*.* /s /e /f c:\sources\copy e:\bootmgr c:\del c:\boot\bcdif not exist c:\temp md c:\tempbcdedit -createstore c:\temp\bcdbcdedit -store c:\temp\bcd -create {bootmgr} /d "Boot Manager"bcdedit -store c:\temp\bcd -set {bootmgr} device bootbcdedit -store c:\temp\bcd -create {ramdiskoptions} /d "WinPE"bcdedit -import c:\temp\bcdbcdedit -set {ramdiskoptions} ramdisksdidevice partition=c:bcdedit -set {ramdiskoptions} ramdisksdipath \boot\boot.sdifor /f "tokens=3" %%a in ('bcdedit -create /d "WinPE" -application osloader') do set guid=%%abcdedit -set %guid% device ramdisk=[c:]\sources\boot.wim,{ramdiskoptions}bcdedit -set %guid% path \windows\system32\boot\winload.exebcdedit -set %guid% osdevice ramdisk=[c:]\sources\boot.wim,{ramdiskoptions}bcdedit -set %guid% systemroot \windowsbcdedit -set %guid% winpe yesbcdedit -set %guid% detecthal yesbcdedit -displayorder %guid% -addlastbcdedit -store c:\boot\bcd -create {ntldr} /d "Windows XP Professional"bcdedit -store c:\boot\bcd -set {ntldr} device bootbcdedit -store c:\boot\bcd -set {ntldr} path \ntldrbcdedit -store c:\boot\bcd -displayorder {ntldr} –addfirstbcdedit -store c:\boot\bcd -default {ntldr}bcdedit -store c:\boot\bcd -timeout 5bootsect /nt60 c:"bootsect /nt60 c:" points the boot sector on C: to the Vista Boot Loader instead of NTLDR.All the Micro$oft documentation I've looked at has been missing \boot\ from the "path \windows\system32\boot\winload.exe" commands, and the WinPE help file that's supposed to show you how to create a bootable PE RAM disk on a hard drive doesn't tell you how to configure the boot loader. Hope this helps anyone who may be struggling with this stuff. Link to comment Share on other sites More sharing options...
Jazkal Posted November 9, 2007 Share Posted November 9, 2007 Very nice work. Link to comment Share on other sites More sharing options...
spacesurfer Posted November 9, 2007 Share Posted November 9, 2007 This has been thoroughly covered here: http://www.911cd.net/forums//index.php?sho...=18971&st=0It also includes batch scripts.But it always makes more sense when you figure it out on your own. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now