Windows Server 2003 (NT 5.2 / 3790) guide
Preparing Environment
- Extract source tree, in this guide we will assume C:\NT(if you wish for your binaries to match RTM as closely as possible, useD:\srv03rtm)
- Unset Read Only on extracted directory (including subfolders and files)
- Create desktop shortcut for %windir%\system32\cmd.exe /k C:\NT\tools\razzle.cmd free offline(see below for explanation) and changeStart intoC:\NT(do not open it yet!)
- Acquire new certificates and overwrite old files with newly extracted ones (archive also contains private keys in .derformat if you wish to renew them at any point)
- Manually import \tools\driver.pfxcertificate and private key (if asked for password, simply press Next without typing anything)
- Apply patches (available below) to NT tree
- Copy these files/directories from XP source tree and copy them into 2K3 tree:- \public\internal\windows\lib\i386\directui.lib
- \public\internal\windows\lib\i386\conlibk.lib
 
- Acquire these files/directories and copy them into source tree:- \base\ntos\ex\exinit.c
- \base\ntos\ex\systime.c
- \base\ntos\ex\exp.h
- \tools\missing.cmd
- \tools\oscdimg.cmd
 
- Copy these files/directories and store them safely outside source tree:- \ds\security\services\ca\tools\certut\obj\
- \inetcore\outlookexpress\external\obj{pd}\
 
- Now you can open new razzle window by using your shortcut
Building
You are now ready to attempt first build. First, decide on how you would like to proceed.
Clean build
- perl tools\timebuild.pl -NOPOSTBUILD -NOSCORCH
- Copy back the files you've stored outside of source tree in preparation step
- Run build /ZPagain and ensurebuild.erris empty
"Dirty" build
- nmake set_builddate set_buildnum set_buildname -f makefil0
- perl tools\timebuild.pl -NOCLEANBUILD -NOPOSTBUILD -NOSCORCH
- Run build /ZPagain and ensurebuild.erris empty
Rest of instructions are the same for both types:
- Mount RTM CD and execute tools\missing.cmd(optionally, perform this step for every SKU)
- Edit \tools\postbuildscripts\pbuild.datand comment out (;) thesxs_make_asms_cabslines
- tools\postbuild.cmd(use- -sku:{sku}if you want to process only specific one, expect errors if you ignore this and have skipped on- missing.cmdoptional step)
Getting ISO files
- Execute tools\oscdimg.cmd {sku}where{sku}is one of:- srv- Windows Server 2003 Standard Edition
- sbs- Windows Server 2003 Small Business Edition
- ads- Windows Server 2003 Enterprise Edition
- dtc- Windows Server 2003 Datacenter Edition
- bla- Windows Server 2003 Web Edition
- per- Windows XP Home Edition
- pro- Windows XP Professional
 
Patches
Following patches should be applied before building:
Additions
Why build flags are necessary
Certain parts of code are missing but present in pre-built form, using -NOCLEANBUILD and -NOSCORCH ensures that they are not removed from the tree
Removing timebomb
Comment out timebomb lines from tools\postbuildscripts\pbuild.dat before running postbuild for the first time (currently there is no guide to revert it)
Different build options
You can modify your razzle shortcut (or execute command manually inside C:\NT) to include (or remove) additional argument(s):
- free- build 'free' bits (production, ommiting it will generated checked bits)
- CkhKernel- build 'checked' (testing) kernel/hal/ntdll when building 'free' bits
- no_opts- disable binary optimization (useful for debugging, but will most likely fail a full build, some code can't be built without optimization)
- verbose- enable verbose execution of the build process
- binaries_dir <basepath>- specifies custom output directory (default is- binaries, the suffix added after- .is non-customizable)
Other options are not described here, see razzle.cmd /? for details.
Creating fresh build
You can use tools\postbuild.cmd -full to create fresh package, however this has not been properly tested yet, expect the unexpected!
Original CD filenames
- 5.2.3790.0.srv03_rtm.030324-2048_x86fre_server-standard_retail_en-us-NRMSFPP_EN.iso(SHA1: A600409482A5678EF6AF2B26D3576D6D9894178D)
- 5.2.3790.0.srv03_rtm.030324-2048_x86fre_server-datacenter_retail_en-us-NRMDOEM_EN.iso(SHA1: E2B47A7CE45C6C6305594CEE4C1B64894805AAF4)
- 5.2.3790.0.srv03_rtm.030324-2048_x86fre_server-enterpriseserver_retail_en-us-NRMEFPP_EN.iso(SHA1: 0309FFB4181BA5122C692A6E1079E9FC1D53FCE4)
- 5.2.3790.0.srv03_rtm.030324-2048_x86fre_server-webserver_retail_en-us-NRMWFPP_EN.iso(SHA1: 46C1CCB2CFC96803E304A35BEF50CD71B2C1DE38)
- 5.1.2600.0.xpclient.010817-1148_x86fre_client-home_retail_en-us-WXHFPP_EN.iso(SHA1: B273C8D41E3844E3E46722F52F5A4CF9F206C8D0)
- 5.1.2600.0.xpclient.010817-1148_x86fre_client-professional_retail_en-us-WXPFPP_EN.iso(SHA1: 1400DED4402D50F3864ED3D8DCF5CC52BA79A04A)
- sbs.iso(coverted from mdf; SHA1: CDB30C80FDE314C16CA11F5CD31650ECBEC7A214)
Product keys
- Standard Edition: M6RJ9-TBJH3-9DDXM-4VX9Q-K8M8M