Draft:Installing Windows NT on MIPS

This page provides instructions on installing builds of Windows NT compiled for the MIPS architecture. Windows NT 3.1, Windows NT 3.5x, and Windows NT 4.0 were all compiled many architectures, including the MIPS architecture.

Overview
Microsoft initially developed Windows NT on internally-designed i860XR-based (Dazzle) workstations, which would later be ported onto MIPS and i386 hardware. These MIPS builds were compiled for Microsoft's Jazz architecture and thus were tested and meant to be run on the MIPS Magnum R4000. Throughout the lifespan of these versions, MIPS had minimal application support from application developers. Support for the MIPS architecture was dropped after the release of Windows NT 4.0, and no build of Windows 2000 was compiled for the MIPS architecture.

Prerequisites
The following requirements used in order to install this version onto a virtual machine are listed below:
 * A copy of QEMU (at least v6.2.0, v7.0.0 or above is recommended)
 * A version of the ARC boot firmware designed for the MIPS Magnum R4000 system

This guide will use Windows NT 4.0 with Service Pack 1 as the build of Windows that will be installed, but this should also work for build 1314 (Beta 2) and the RTM build.

First, create the virtual hard disk via this command. The size of the disk can be any value, but it must have at least 150 MB of space and should be less than or equal to 4 GB. You can specify the size as #M for megabytes or #G for gigabytes. qemu-img create -f qcow2 nt4mips.img 500M

Next, you must ensure the ARC firmware file is in the same directory of the QEMU installation. This file should be named. To start up the virtual machine, enter the following command: qemu-system-mips64el -M magnum -m 128 -net nic -net user -global ds1225y.filename=nvram -hda nt4mips.img -cdrom 

This will start up a QEMU Magnum MIPS machine with 128 MB of RAM, a network card, a hard drive, and the installation media disk. The global parameter of the command is necessary in order to save the NVRAM properly. During the boot sequence, it will state that the NVRAM (ARC information) isn't set up. Use the arrow keys to run the system setup and select "Initialize system". Use the default values for "Set default configuration" (except the monitor resolution, which can be set to the option of your desire) and "Set default environment", and ensure that the value isn't all zeroes in "Set ethernet address". The ARC date should be the current date with GMT time; if it isn't, change it via the "Set time" option.

Once you exit the setup program, you may notice that the system is frozen. QEMU is unable to properly reset the MIPS system, hence halting the system when a reboot or shutdown occurs. Simply close QEMU and relaunch it with the above command. You now need to run ARCINST in order to partition and format a drive, much like the  and   commands on a x86 system. Select "Run a program" on the boot loader, and type  and press Enter.

From this point, you must create two partitions - one for the system itself and one for the boot loader. Windows Setup expects a separate partition that will be installed on, and will refuse to install on the same partition as the default system partition to prevent an unbootable system. Create the system partition first, which must not use all the space on the drive. Instead, use all but at least 5-6 MB of space on the drive. The remaining space will be used for the boot loader partition, which must be created second. Afterwards, exit ARCINST. You may notice that there are a few "Start" entries on the ARC bootloader, but they should be ignored. Run setup again, and in "Initialize system", select "Set default environment" and change the default system partition to 2, while setting everything else to default.

Exit the system setup, and go back to "Run a program". With the partitions now ready, setup can be started. Run  and setup will immediately load. Setup will function exactly like in a x86 install; just select the largest partition as the installation drive. You can choose to format the drive as FAT or NTFS; if you choose to format in NTFS, you may have to wait a few seconds during the disk convert before it is safe to reboot the system (it will halt at "Converting file system" after the NTFS conversion is completed). For internet access, you must install the TCP/IP protocol and click "Yes" on the DHCP prompt.

After completion of the GUI portion of setup, you will be prompted on login to press Ctrl to unlock the system. From here, press Ctrl in the QEMU window to open the console, then enter the command. Press Ctrl to go back to the monitor and log into the system as usual.

Bugs and quirks

 * QEMU is unable to properly restart/shut down the machine in the event of a reboot or power off. You must close QEMU and reload it using the command to reboot.
 * It is recommended to use QEMU 6.2.0 or above, otherwise the following problems can occur on older versions:
 * the date of the ARC can be set to the year 2033 and the clock is set to "8:85:00". This can also cause the boot to hang during the RTC check during the POST. Using a patched ARC firmware file that removes the RTC check can rectify this problem
 * on QEMU versions below 2.9.0, a serious memory leak will occur during ARCINST that will likely lag/crash the host system.
 * setup can crash if a exhaustive disk scan is performed
 * Windows NT 3.1 does not work and crashes booting setup or the operating system on older versions of QEMU.
 * If you keep getting the NVRAM is out of date or uninitiated upon reboot, check to ensure you have entered the global parameter correctly as shown.
 * The Magnum machine will not detect more than 128 MB of RAM.