Jump to content

Cut Down WinPE to load on PCs with 224mb-256mb With WDS


Richie Firestorm

Recommended Posts

Is there any way to cut down a WinPE wim image that will load into RAM for calling an XP install from WDS?

I've got it working on computers with over 384mb, but I have a large number of computers with 256mb (less with shared VGA) that networking fails to work on.

This is a limitation with WinPE, so I was wondering if it was possible to chop out everything except the ability to boot from PXE then call the wim image from WDS

I know I could buld a bootable USB drive to do this, but it would be better to just PXE boot WinPE which would then call the XP wim.

Any ideas or is it just not possible?

Link to comment
Share on other sites


Ok, I've managed to build both a USB and CD WinPE 2 that installs fine on PCs >=512mb.

However, I'm having the same problem with the <=256mb PCs. It dawned on me that the USB/CD WinPE is still loading the RAMDisk version, so I need to know how to create a "flat file" version. Anyone know how I can do this?

Link to comment
Share on other sites

There's a Walk-thorugh titled "Boot Windows PE from CD-ROM"

(... as opposed to booting from RAM disk.)

This walkthrough describes how to boot Windows PE directly from

CD-ROM/DVD-ROM media but not into a RAM disk. This method enables you to

start a computer that has fewer than 512 megabytes (MB) of memory for

the purpose of deployment or recovery.

From the 'Windows PE Tools Command Prompt':

imagex /apply <your .wim> <your index number> <your directory>

Then the boot info is added to the directory.

copy <bootmgr> <your directory>

bootmgr can be found at, for example:

C:\Program Files\Windows AIK\Tools\PETools\x86\bootmgr

or

C:\winpe_x86\ISO\bootmgr

Then:

mkdir <your directory>\boot

cd /d <your directory>\Windows\System32

bcdedit /createstore <your directory>\boot\BCD
bcdedit ... etc
... etc
... from the Walk-through

Note that the bcdedit used is from the applied image and, therefore, the applied image must be the same architecture as the current architecture.

Then create the .iso.

oscdimg -n -m -o -b<etfsboot.com> <your directory> <your new ISO directory>/<your ISO name>.iso

etfsboot.com can be found at, for example:

C:\Program Files\Windows AIK\Tools\PETools\x86\boot\etfsboot.com

or

C:\winpe_x86\etfsboot.com

Regards

Link to comment
Share on other sites

Thanks for that info.

I've managed to come to that conclusion myself (tested and working on a computer with 220mb RAM)

I did the following:

1. Created a WinPE 2.0 CD (not RAMDisk version)

2. Booted client PC with the WinPE CD

3. Mapped to a network share that had my prebuilt (and pre-sysprepped) XP WIM file

4. Ran diskpart with the following:

select disk 0

clean

create partition primary

active

assign letter=c

format fs=ntfs quick

exit

5. imagex.exe /apply <mapped drive>\xp.wim 1 c:

6. once download completed, exited cmd prompt and PC rebooted into sysprep stage of XP installation

This is probably the best I can manage, unless there is some way of PXE booting to a really tiny WinPE that provides networking, diskpart and the imagex tools

Link to comment
Share on other sites

It is possible to make a WinPE 2.1 flat file disc.

Follow the instructions here, for the most part (special thanks to paxamime for going through the trouble to make those batch files in the first place!):

http://www.msfn.org/board/index.php?s=&amp...st&p=577244

However, you will need to make these modifications:

1) On 2Mount.bat, change boot.wim to winpe.wim.

2) Create a new batch to run after 5Unmount.bat called 6Apply.bat with the following:

REM 6-Apply.bat
REM This will apply the winpe.wim image to a new directory called winpe_flat.
REM No mounting or unmounting of images are necessary in a flat file structure.

%systemdrive%
echo Applying the current winpe.wim to C:\PE\winpe_flat to create a flat-file structure.
mkdir c:\PE\winpe_flat
cd \
cd %programfiles%\Windows AIK\Tools\x86
ImageX /apply c:\PE\winpe_x86\winpe.wim 1 c:\PE\winpe_flat

echo Adding a boot directory to C:\PE\winpe_flat
mkdir c:\PE\winpe_flat\boot
xcopy c:\PE\winpe_x86\ISO\boot]*.* /e /f c:\PE\winpe_flat\boot\

pause

3) Make a 7Bootloader.bat file with the following contents:

@echo off

echo 7-Bootloader.bat
echo This will create a new BCD database for your flat-file PE disc.

:STEP1
set peiso=%systemdrive%\PE\winpe_flat
goto STEP2

:STEP2
echo Deleting the existing BCD directory and preparing to create a new one.
del C:\PE\winpe_flat\boot /q
goto STEP3

:STEP3
echo Creating a new bcd

Bcdedit /createstore %peiso%\boot\BCD
Bcdedit /store %peiso%\boot\BCD /create {bootmgr} /d "Boot Manager"
Bcdedit /store %peiso%\boot\BCD /set {bootmgr} device boot
Bcdedit /store %peiso%\boot\BCD /create /d "WinPE" /application OSLoader > guid.txt
goto STEP4

:STEP4
echo The previous command returns a GUID value.
echo The next command parses the GUID and adds it to the remaining commands.
for /f "tokens=3" %%h in (guid.txt) do (set guid=%%h)
goto STEP5

:STEP5
Bcdedit /store %peiso%\boot\BCD /set %guid% osdevice boot
Bcdedit /store %peiso%\boot\BCD /set %guid% device boot
Bcdedit /store %peiso%\boot\BCD /set %guid% path \windows\system32\winload.exe
Bcdedit /store %peiso%\boot\BCD /set %guid% systemroot \windows
Bcdedit /store %peiso%\boot\BCD /set %guid% winpe yes
Bcdedit /store %peiso%\boot\BCD /set %guid% detecthal yes
Bcdedit /store %peiso%\boot\BCD /displayorder %guid% /addlast

echo The custom boot loader has been created.
pause

4) Change 6MakeISO.bat to 8MakeISO.bat.

5) Burn ISO to CD.

6) Boot from it. :) You will NOT be asked to "Press any key to boot from CD or DVD..."

Link to comment
Share on other sites

This is probably the best I can manage, unless there is some way of PXE booting to a really tiny WinPE that provides networking, diskpart and the imagex tools

peimg /prep

and

imagex /export

Both help to reduce the size of the final boot.wim (and .iso). The first one removes unwanted 'staged' packages. The second removes extraneous code created when customizing the image.

Regards

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...