[Tutorial] How to install Windows NT 3.1 on VirtualBox

Tutorials for Operating Systems, Applications etc can be posted here.
Post Reply
3155ffGd
User avatar
Posts: 391
Joined: Wed May 02, 2012 12:57 am

[Tutorial] How to install Windows NT 3.1 on VirtualBox

Post by 3155ffGd »

Noting this down as a personal scratchpad because I keep forgetting the steps, but it might be useful to others too.

What you need:

* A Windows NT 3.1 ISO (obviously)
* A Windows NT 3.1 boot floppy
* ATAPI.SYS floppy from here: https://www.betaarchive.com/forum/viewt ... 61&t=36255
* AMD PCnet drivers, download from here: https://drive.google.com/file/d/0B2BOLB ... 5obFE/view

If you don't have a Windows NT 3.1 boot floppy there's a cheap trick you can use:

* Boot into any virtual machine that has a DOS prompt and CD-ROM support. I used an old virtual machine with a pre-installed MS-DOS but I suppose you could use a boot floppy or even Windows 95/98.
* On the DOS prompt, switch to the CD-ROM drive, go to the I386 folder and type WINNT to start Setup. Setup will create a boot floppy, copy various files to the hard drive and then tell you to reboot from the floppy. Don't do this and instead reboot off the hard drive again (will still be the operating system as you left it).
* Delete the temporary folder that Setup has created (C:\$WIN_NT$.~LS). Then, copy TXTSETUP.INF from the CD over the copy that is present on the boot floppy. (Or alternatively, just edit TXTSETUP.INF and delete the [MsDosInitiated] section at the very end.)

Once you have everything you need, create a new virtual machine and set it to Windows NT when it asks you to. The defaults set by VirtualBox are fine but you will need to add a floppy controller with a floppy drive (strangely enough this is not added automatically).

Before you first start the virtual machine (this is important), open a command prompt on the host and navigate to the folder where VirtualBox is installed. There, type in this command (thanks to OS/2 Museum for this):

Code: Select all

VBoxManage modifyvm "Windows NT 3.1" --cpuidset 1 00000543 00000800 00000209 078bf1bf
Replace "Windows NT 3.1" with whatever you called your virtual machine. If you don't do this, you will screw yourself over when the graphical portion of Setup starts and have to restart from the beginning again with lots of wasted time.

Start the virtual machine with the boot floppy inserted. Windows Setup will start. Choose Custom Setup when it asks you to. Windows NT will detect no SCSI drives, press S at this point and insert the ATAPI.SYS boot floppy linked above. Setup will load it and detect the CD-ROM drive. Create a partition, choose whatever you want (the NTFS conversion consistently fails for me for some reason so might as well stay with FAT). Setup will run through and switch over to the graphical portion.

Once in the graphical portion of Setup, you will eventually reach Network Setup where Windows NT will detect no network adapters. Continue to select a custom adapter, scroll all the way down to <Other> and insert the AMD PCnet driver floppy to continue (for reference the NT drivers are found under A:\WINNT if you use my linked floppy image).

Remove NetBEUI and install TCP/IP. Since Windows NT 3.1 is completely brain-dead it has no DHCP support, which means you will have to manually set an IP. If you use the NAT option under VirtualBox (which is the default) the gateway is 10.0.2.2 and your own IP should be 10.0.2.15 (or anything higher than that), subnet mask is 255.255.255.0. Note that Windows NT 3.1 seemingly does not like VirtualBox's implementation of DNS so you will be unable to use DNS this way, which means that you can't access sites like Google. Scroll to the end for a different solution.

The rest of setup is easy and you should end up with a basic installation of Windows NT 3.1.

Further work after installation:

* You will most certainly want to install a graphics card driver so you have more than 640x480. There's a VirtualBox universal driver that you can get from here: https://drive.google.com/file/d/0B2BOLB ... FoanM/view. Before you install this driver, you need to install framebuf.dll from the Windows NT CD (use Windows NT's EXPAND.EXE utility for that). Then go to Windows Setup, choose to install a different display adapter, go to Other, select the floppy, choose the desired screen resolution and color depth, and click Ignore when an error about framebuf.dll comes up. Do this before installing Service Pack 3 or you will be in serious trouble.

* You will have noticed that getting files to the virtual machine is hard because Windows NT 3.1 has no browser whatsoever and the most primitive implementation of FTP ever (and of course, no working DNS when you use VirtualBox's NAT). There are various ways around this. The way that I personally chose is to set up a second virtual machine with Windows XP, give it a second network adapter, change this network adapter to connect to an Internal network, then change the Windows NT 3.1 VM's network adapter to also connect to the same Internal network. You can then use Internet Connection Sharing on the XP computer to bridge the two adapters (see Q306126 from my Knowledge Base Archive for exact instructions). The Windows XP computer will automatically assign itself the IP 192.168.0.1 so if you go this route the NT 3.1 computer will need an IP from that range (e. g. 192.168.0.100). Don't forget to change the gateway and the DNS server to 192.168.0.1 (DNS is hidden under the Connectivity button, select "First DNS, then HOSTS" and then add the DNS server IP to the first listbox you see). The advantage of this is that since XP has folder sharing, you can comfortably move any files from the host via XP over to NT 3.1 using the administrative share C$.

You could also just use bridged networking to join the host computer's network and allow direct connectivity with the host if you have that installed (but I don't like it because it clogs my router's DHCP with virtual machines). If you do not have bridged networking installed the above solution is the best.

*Now, you should install Service Pack 3 to update Windows NT 3.1 to the newest version. You then have the basic things set up.

* The ATAPI.SYS from the boot floppy will fail on ISOs smaller than 150 MB, to circumvent that you have to replace scsicdrm.sys and scsiport.sys with the versions from build 438. You can also just use Windows NT's EXPAND.EXE for that. Do this after installing Service Pack 3 because otherwise the files will be overwritten again by the Service Pack installer.

*If you want you can replace NTLDR and NTDETECT.COM on the hard drive with the versions from Windows NT 3.51. This allows you to access memory beyond 64 MB.

*Also install the Resource Kit so you get Process Viewer which is the closest to a Task Manager you're ever gonna get for NT 3.x.

* You can install sound if you want using the driver that ships with NT 3.1 but it sounds really terrible under VirtualBox. I'd skip it. The official Soundblaster 16 driver does not work with VirtualBox (I've tried)

Anything beyond that is entirely your choice.

As for applications, there really isn't much to NT 3.1 applications, because there are so few.

* You can install Visual C++ 1.0 if you want to compile applications yourself. It's really the only compiler you have besides the official SDK/DDK.

* As for a browser, you're best off just using a 16-bit browser such as Netscape 4, it's really not that good but better than nothing.

* Windows NT 3.1 has a built-in FTP Server that is well-hidden as an optional component in the Networks section. You can also get the EMWAC server that is sort-of an IIS precursor (it took me ages to find the NT 3.1 version on the Internet, it's really hard to find). Someone also managed to compile Apache 1.3.8 for NT 3.1 which has HTTP/1.1 and is just overall better if you want to be actually serious about the HTTP server.

* SQL Server 4.21 is an easy choice, don't forget Service Pack 4.

* Other things are scarce. There's WinZip 5.5 beta, there's Tetris, and that's more or less it. Supposedly Systems Management Server was released for Windows NT 3.1 at some point but we don't have that yet (do we?).

I hope that helps and that I didn't miss anything important.

EDIT: I realized that you can't actually download the EMWAC server for Windows NT 3.1 anymore. It seems to have disappeared from the Internet. Since I might be the last person to have this little gem I'll share it for preservation purposes: https://drive.google.com/open?id=1bC8e1 ... KxU-mQWoXy

somerone
Posts: 4
Joined: Thu May 17, 2018 5:51 am

Re: [Tutorial] How to install Windows NT 3.1 on VirtualBox

Post by somerone »

Is the EMWAC zip has a virus or it just a false positive? :|

3155ffGd
User avatar
Posts: 391
Joined: Wed May 02, 2012 12:57 am

Re: [Tutorial] How to install Windows NT 3.1 on VirtualBox

Post by 3155ffGd »

VirusTotal shows zero hits on this file, so it's very likely a false positive. It wouldn't matter much inside a Windows NT 3.1 virtual machine anyway.

3155ffGd
User avatar
Posts: 391
Joined: Wed May 02, 2012 12:57 am

Re: [Tutorial] How to install Windows NT 3.1 on VirtualBox

Post by 3155ffGd »

One last warning that I feel is appropriate here:

If you for some reason decide to install NT 3.1 on the Buslogic adapter (instead of using IDE as in my tutorial), do not for whatever reason choose the NTFS conversion.

If you do, Windows NT 3.1 will screw itself over at the conversion part and leave you with a broken partition. All you can do at this point is start over from the beginning.

A safe way to use NTFS, for both IDE and the Buslogic adapter, is to create two partitions in the text-mode portion of setup. Install NT on the first partition (and format it with FAT) and leave the second unformatted. Once NT is installed, you can use format on the command-line to format the partition as NTFS, e. g. format d: /fs:ntfs.

Having NT on an NTFS partition legit is probably possible but so sophisciated that it's easier to not bother, because the only thing that can format NTFS that NT 3.1 understands is... NT 3.1. So you'd need a second installation to create an NTFS partition on the first and then install NT in the already formatted NTFS partition. Or something like that, at least.

condor.07
User avatar
Permanently Banned
Posts: 42
Joined: Sun Feb 12, 2017 12:50 am

Re: [Tutorial] How to install Windows NT 3.1 on VirtualBox

Post by condor.07 »

3155ffGd wrote: * A Windows NT 3.1 boot floppy
* ATAPI.SYS floppy from here: https://www.betaarchive.com/forum/viewt ... 61&t=36255
Why use Floppy when you can make the CD-ROM bootable ?!
3155ffGd wrote:* Boot into any virtual machine that has a DOS prompt and CD-ROM support. I used an old virtual machine with a pre-installed MS-DOS but I suppose you could use a boot floppy or even Windows 95/98.
you can install it from scratch without any operating system installed
3155ffGd wrote:Before you first start the virtual machine (this is important), open a command prompt on the host and navigate to the folder where VirtualBox is installed. There, type in this command (thanks to OS/2 Museum for this):

Code: Select all

VBoxManage modifyvm "Windows NT 3.1" --cpuidset 1 00000543 00000800 00000209 078bf1bf
If you use "Windows NT" with VirtualBox, you only need to edit the "INITIAL.INF" and "SETUP.INF" files
If you use "MS-DOS" with VirtualBox it works perfectly without any changes

SistemaRayoXP
User avatar
Posts: 371
Joined: Wed Sep 13, 2017 1:26 am
Location: Tlajomulco de Zuñiga, Jalisco, Mexico.
Contact:

Re: [Tutorial] How to install Windows NT 3.1 on VirtualBox

Post by SistemaRayoXP »

condor.07 wrote:Why use Floppy when you can make the CD-ROM bootable ?!
It's possible to make it bootable, but no one has take the time to make it and share it.
condor.07 wrote:you can install it from scratch without any operating system installed
In this tutorial is taken in mind that you are using the standard Windows NT 3.1 ISO, which isn't bootable by default. If you have a non-bootable ISO of WinNT (Any version up to XP), the most common way to install it is to boot from a DOS prompt with CD support, and to install from there. Of course you can boot this DOS from floppy, or just install a minimal DOS with CD-ROM support, just to install WinNT
condor.07 wrote:If you use "Windows NT" with VirtualBox, you only need to edit the "INITIAL.INF" and "SETUP.INF" files
If you use "MS-DOS" with VirtualBox it works perfectly without any changes
I guess you didn't understood, Windows NT 3.1 doesn't work well with any modern HyperVisor (e.g. VBox, VMWare, HyperV, and even VPC has problems with it). So, to make Windows NT 3.1 (kinda) work with VBox, you need to change the config file, but as you can't change it from the GUI/Manager, you need to run a command to change it (As VBox GUI/Manager isn't integrated with the emulator, e.g. you could run a VBox machine without GUI, just in a window without the Manager)

ATeamInc
Posts: 414
Joined: Sun Feb 25, 2018 6:49 pm

Re: [Tutorial] How to install Windows NT 3.1 on VirtualBox

Post by ATeamInc »

SistemaRayoXP wrote: I guess you didn't understood, Windows NT 3.1 doesn't work well with any modern HyperVisor (e.g. VBox, VMWare, HyperV, and even VPC has problems with it). So, to make Windows NT 3.1 (kinda) work with VBox, you need to change the config file, but as you can't change it from the GUI/Manager, you need to run a command to change it (As VBox GUI/Manager isn't integrated with the emulator, e.g. you could run a VBox machine without GUI, just in a window without the Manager)
Why use a hypervisor? Just use PCem or 86box, they're way better in running these Pre-Windows 95 stuff under emulation.

SistemaRayoXP
User avatar
Posts: 371
Joined: Wed Sep 13, 2017 1:26 am
Location: Tlajomulco de Zuñiga, Jalisco, Mexico.
Contact:

Re: [Tutorial] How to install Windows NT 3.1 on VirtualBox

Post by SistemaRayoXP »

Offtopic Comment
We're not talking about emulation. Please leave anything else as "offtopic". Also take in mind that not all computers run the same speed in emulation, also virtualization is faster, and when properly used with emulation, it gives the best speed and the less issues possible

condor.07
User avatar
Permanently Banned
Posts: 42
Joined: Sun Feb 12, 2017 12:50 am

Re: [Tutorial] How to install Windows NT 3.1 on VirtualBox

Post by condor.07 »

SistemaRayoXP wrote: I guess you didn't understood, Windows NT 3.1 doesn't work well with any modern HyperVisor (e.g. VBox, VMWare, HyperV, and even VPC has problems with it). So, to make Windows NT 3.1 (kinda) work with VBox, you need to change the config file, but as you can't change it from the GUI/Manager, you need to run a command to change it (As VBox GUI/Manager isn't integrated with the emulator, e.g. you could run a VBox machine without GUI, just in a window without the Manager)
Absolutely false!

Windows NT 3.1 works perfectly with any version VirtualBox without making any changes the config file
Instead it does not work with VMWare

SistemaRayoXP
User avatar
Posts: 371
Joined: Wed Sep 13, 2017 1:26 am
Location: Tlajomulco de Zuñiga, Jalisco, Mexico.
Contact:

Re: [Tutorial] How to install Windows NT 3.1 on VirtualBox

Post by SistemaRayoXP »

Ok, so I can think that this is like this thread. VirtualBox is a weird software which works perfectly in one PC and in other PC it just doesn't work.

however let me recall this:
3155ffGd wrote:Noting this down as a personal scratchpad because I keep forgetting the steps, but it might be useful to others too.
So don't think this is an universal guide, this might help to those that don't have that much luck installing on some hardware, but this is irrelevant to others who can install just fine (Example you condor.07)

3155ffGd
User avatar
Posts: 391
Joined: Wed May 02, 2012 12:57 am

Re: [Tutorial] How to install Windows NT 3.1 on VirtualBox

Post by 3155ffGd »

One thing I want to add:

If you noticed, Windows NT 3.1 has a slight problem with disk corruption on VirtualBox, which makes it likely that sooner or later, the system will refuse to boot with the error:

Code: Select all

The following file is missing or corrupt:

\winnt\system32\config\SYSTEM
Here's the trick: Windows XP (it has to be Windows XP, older Windowses don't work) can repair NT 3.1 registry hives!

All you need to do is copy the registry hive over to a Windows XP virtual machine. Preferably, NT 3.1 is installed on a FAT partition, so you can use an MS-DOS bootdisk and copy the SYSTEM hive to an empty floppy which XP can read.

You can then open regedit on Windows XP, select a hive like HKEY_LOCAL_MACHINE, then go to File -> Load Hive, select the NT 3.1 SYSTEM hive, choose any name (say, "winnt31"), and XP will give a short message that the hive had to be recovered.

At this point, do any change (just add a key or something) to force Windows to write the hive, then do File -> Unload Hive and copy the file back to the Windows NT 3.1 virtual machine, overwriting the existing SYSTEM hive.

And lo and behold, NT 3.1 will boot again!

I'm amazed this works at all but it does, so there.

Post Reply