Windows Server 2003 (NT 5.2.3790.0) build guide

Building

Important: Currently the build doesn’t seem to play well when building with more than 4 threads. If your build machine has more than that it’s recommended to cap it to 4 threads maximum via the -M 4 switch, added to the build command (eg. build /cZP -M 4, or bcz -M 4)

Clean build

Performs clean rebuild of all components (recommended for first build!):

  • build /cZP (bcz is also aliased to this)

“Dirty” build

Builds only components that have changed since last clean build:

  • build /ZP (bz is also aliased to this)

Post-build

  • Download the win2003_x86-missing-binaries_v2.7z pack, which contains missing binaries for both x86fre & x86chk builds.
  • (unfortunately this is quite a big pack, and it’s likely the link will inevitably go down some day, however this pack isn’t actually required - instead you can make use of missing.cmd with each of the win2k3 ISOs listed below, which should be pretty simple to track down)
  • From that 7z, extract the contents of the binaries folder for the build type you’re building into your build trees binaries folder (eg. D:\binaries.x86fre, should have been created during the build), the 7z should contain files for all SKUs (uses pidgen.dll from Win2003 Enterprise, so your builds should accept Enterprise product keys)
  • When asked during extraction to overwrite folders select Yes, but when asked to overwrite files like DUser.pdb/dll make sure to select No!
  • Once missing files have been added, you should have files such as binaries.x86{fre/chk}\_pop3_00.htm, binaries.x86{fre/chk}\ql10wnt.sys, etc.
  • Inside the razzle window run tools\postbuild.cmd (use -sku:{sku} if you want to process only specific one (no brackets!), expect filechk errors if you ignore this and didn’t use missing.7z / missing.cmd with every sku)

Once postbuild has finished, assuming you used the win2003_x86-missing-binaries.7z file above and followed the guide properly, it should have hopefully succeeded without errors, and there shouldn’t be any binaries.x86fre\build_logs\postbuild.err file!

Otherwise take a look inside the postbuild.err - most messages in here are negligible, but if you see filechk errors associated with the edition you want to use, you may need to re-run missing.cmd, or extract 2k3-missing.7z again.

If postbuild.err contains messages like (crypto.cmd) ERROR or (ntsign.cmd) ERROR try re-importing the tools\driver.pfx key-file (double-click it, press Next through the prompts, password is empty), and make sure your system date is set to the current date (updated test certs are only valid from October 2020 to October 2021)

Creating bootable ISO files

  • Execute tools\oscdimg.cmd {sku} [destination-file (optional)] 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
  • ISO will be saved to {build-drive}\{build-tag}_{sku}.iso, unless [destination-file] is provided as a parameter.

Troubleshooting

If you get any problems during the build hopefully your problem might be answered here, if it’s not feel free to post in the thread.

After running razzle it shows a bunch of errors, “tfindcer not recognized” etc

You’re likely on a 64-bit system but running razzle.cmd directly, you should use razzle64.cmd instead, this’ll set things up so that razzle will use the correct tools for you. Hopefully with that the tfindcer not recognized & other errors should go away.

During build I get a directui.lib(parse.obj) LNK2011 error, mentioning precompiled object not linked in

This is caused by the pre-built parse.obj file we currently have to use in order to build a working directui.lib, currently this file requires your source tree to be inside a srv03rtm folder on the root of a drive, using any other folder will cause the error to happen. Sadly attempts to fix this such as editing the parse.obj or updating the code to build parse.cpp instead haven’t been successful yet.

Any idea how to fix CK1011: type information corrupt, recompile module map_kv.cxx error?

Seems to be caused by switching between fre/chk, clean-build fails to delete some remnant from whatever you built last which breaks the build. Manually deleting the \com\ole32\olethunk\ole16\compobj\obj\ folder & \com\ole32\olethunk\ole16\compobj\msvc.pdb file should allow clean-build to work again, after that just bcz inside the \com\ole32\olethunk\ole16\ dir.

After a full build I get 1000+ errors, build.err has has bad storage class errors inside

Seems to be caused by your locale, this is reported to happen with Simplified Chinese language, but can probably happen with other languages too. Besides changing your locale/language settings, you could also try editing the source files to remove the characters that cause problems, an anon posted a list of the files that need changes here

On Windows 7 I get NTVDM crashes while building

All NTVDM errors should have hopefully been solved in the v8 release of this guide/ZIP, but if you still run into any NTVDM error a copy of your build.log file would help a lot to figure out what caused it, if you ZIP that up and post in the thread hopefully we can figure something out.