Wednesday, August 17, 2005

Boot Windows PE from HDD to RAM

Here is how it is done...

Create your winpe ISO using whatever method and whatever source you like.

Grab ntldr, ntdetect and ramdisk.sys from a Windows Server 2003 + SP1 source. Replace the ramdisk.sys in your PE ISO with the one from 2K3 + SP1 (if you used a different source for your PE build).

In the root of the target HDD, put ntldr, ntdetect and the winpe ISO. Make sure the name of the ISO is in 8.3 format.... for this example, I will creatively use the name 'winpe.iso'.

In the root of the target HDD, create a winnt.sif file with the following entries

BootDevice = "ramdisk(0)"
BootPath = "\i386\System32\"
OsLoadOptions = "/noguiboot /fastdetect /minint /rdexportascd /rdpath=winpe.iso"

So now you have 4 files on the target HDD, being ntldr (W2K3 + SP1), (W2K3 + SP1), winpe.iso (any build you like) and winnt.sif.

Now when you boot the machine next, you'll see winpe fly into RAM and you can do anything you like without having to wait for CD / disk reads etc. Go ahead, format c: from within Windows PE... see if windows pe cares!

So now you can use Windows PE for remote server builds by taking a ghost image with the 4 files, booting the remote server off a floppy and dumping down the image, then rebooting. no more waiting for Window PE to crawl across a WAN from your laptop to the target server!


Anonymous said...

I was wondering if you could provide more details to how to run WinPE in RAMdisk.

I tried running it like you have posted it but the system just reboots back to WinXP.


n00dles -[the indelible]- said...

To get this to work you need a formatted HDD with only those 4 files on it... you can't leave an existing Windows installation on the same disk.

If you mean you are trying to boot Windows PE from a CD into RAM, here is how to do it:

AFter creating your Windows PE .iso file, create a new directory on your HDD. We'll call it C:\PECD2RAM. Copy your PE.iso file into this directory.

Now create an i386 sub-directory, and copy in bootfix.bin, and setupldr.bin from your original Windows PE build directory (or from your Win PE .iso file).

Next create the same winnt.sif file as you would for the 'PE HDD to RAM' technique, and put it into the C:\PECD2RAM directory.

Finally create a new .iso file using oscdimg and specify C:\PECD2RAM as the top level directory to build the .iso from.

And that's it. Hopefully that answered your question!

Anonymous said...

Suppose we would like to boot WinPE from an ISO located on the C: Drive with Windows Installation pre-existing? How would we go about that?

Anonymous said...

NVM, figured out how to do it: using mkbt.exe and nu2peldr.exe, and small addition to the boot.ini, booting an ISO from hard disk is quite simple; You also have full access to the Hard Disk after the boot into PE. You can Ghost a new image right under PE this way.

windrainman said...

Could I do the same for a nlite iso instead of the winpe.

windrainman said...

Can I boot a nlite iso in a similar way?

Giggity Goebbels said...

Is it possible to boot a full copy of windows XP Embedded this way?thanks.