Installing WinNT 4.0 in bochs


Here's the quick and dirty on installing WinNT 4.0 in bochs.   For reference, the version I installed was WinNT 4.0 Build 1381 on an internal version of bochs-991026a+.

There are a couple approaches you could take.   You could copy contents from the CDROM distro to a hard disk image file and then install from there.   I wanted to test the CDROM emulation in bochs, so I installed directly from the WinNT CD with no extra copy needed. These instructions are from a corresponding install.

First, you need to configure bochs with CDROM emulation. You need this even if you are not going to use the direct CDROM emulation, otherwise NT won't recognize the hard disk emulation (legacy IDE controller). Thanks to Chris Smith for pointing this out as well as some additional hacks for booting WinNT.

  unix>  ./configure --enable-cdrom ...
Next, you need to create a hard disk image file big enough to install WinNT. I made one using the following command. Refer to Creating a hard disk image file for more on creating disk image files.
  unix>  dd if=/dev/zero of=../483M.NT40 bs=512 count=967680
You will need to give bochs a description of the geometry of your disk drive in .bochsrc. Following was my entry. While you're editing .bochsrc, uncomment or add the cdromd directive which tells bochs to use your workstation's CDROM drive and the CD that is in it.
  diskc: file=../483M.NT40, cyl=1024, heads=15, spt=63
  cdromd: dev=/dev/cdrom, status=inserted
OK, you will need a boot floppy to kick things off, so that from DOS you have access to the CDROM to run the install program. Make a DOS boot floppy with FORMAT and FDISK on it. You will also need a driver for the CDROM. Use one for a standard IDE CDROM. For example, you can download one from The Driver Zone in atapi.zip, called GSCDROM.SYS. I put the driver and MSCDEX.EXE all on the boot floppy.

I used a CONFIG.SYS and AUTOEXEC.BAT that look like the following. Don't forget if you're editing in Unix land, use the '-t' option to mcopy to transfer text files to/from Unix and your image file.

  [config.sys]
  DOS=HIGH
  FILES=30

  LASTDRIVE=Z
  DEVICE=a:\GSCDROM.SYS /D:MSCD000 /v
  [autoexec.bat]
  @ECHO OFF
  PROMPT $p$g

  \MSCDEX /D:MSCD000 /L:D
At this point you're all set to begin the installation. Fire up bochs:
  unix>  bochs boot:a
Then fire up the WinNT install program:
  A:>  d:\i386\winnt /b /s:d:\i386
This page not finished yet.  I wanted to get this release to people who really needed the changes.  The next release should have better help on installing NT4.0.  Here are some tips though, that may help. I'm going to give the install another spin after I fix some other things and rehash this page.