25

I tried to install Windows NT4, and I gave it the highest available CPU in QEMU (because that's the default, and of course it's an x64 capable CPU), and it crashed after text mode install. It did not produce a normal panic screen but rather it trashed video memory before transitioning to graphics mode.

The QEMU documentation says that NT4 works with a a pentium CPU; which I trust as far as the guy testing it found that he needed to limit the CPU type down to pentium, but I would not be suprised to find it was the only CPU type tried as NT4 wouldn't know how to get any benefit out of a newer CPU anyway.

Restricting the VM to a Pentium CPU resulted in the install working.

Why did Windows NT4 crash on the emulated x64 CPU?

Stephen Kitt
  • 121,835
  • 17
  • 505
  • 462
Joshua
  • 1,829
  • 14
  • 22
  • 2
    Adding the info which VM you are using might help. @RonJohn Yes but the CPU would not be in 64-bit mode unless the OS has code to enter into 64-bit mode, and therefore an OS not understanding 64-bit mode would not try to enter 64-bit mode to begin with. – Justme Oct 24 '23 at 04:26
  • @RonJohn XP also came before AMD64 and they run just fine. I don't think x64 XP was ever released to the public, and Vista was such a failure, so I think most of the AMD64 machines ran 32-bit XP all the way until Windows 7. – user3528438 Oct 24 '23 at 09:00
  • 3
    @user3528438 x64 XP was absolutely released to the public, Windows XP 64-Bit Edition for Itanium and Windows XP Professional x64 Edition for x86-x64 released April 2002 – Alan B Oct 24 '23 at 09:40
  • @RonJohn that's not the way it works; in any configuration capable of booting NT4 in the first place, the CPU is in 16-bit mode when it boots the OS, until the OS asks to go to 32-bit or 64-bit mode. NT4 of course doesn't ask for 64-bit. – hobbs Oct 24 '23 at 12:49
  • @hobbs is that how VMs work? – RonJohn Oct 24 '23 at 12:53
  • 2
    @RonJohn yes, they still boot in the same way — either BIOS-style boot in 16-bit mode, or UEFI boot. NT4 only supports the former, if the OP got to the text-mode installer that’s not the problem here. – Stephen Kitt Oct 24 '23 at 12:54
  • @StephenKitt ok. I figured that eventually it would run into some instruction-level incompatibility. – RonJohn Oct 24 '23 at 12:59
  • @Justme UEFI can bring an x86-64 CPU into 32-bit or 64-bit before booting the OS, so it's not guaranteed that an OS will be starting in 16-bit mode. (Though I believe this is currently very uncommon. However, it may become the default in the future.) – 8bittree Oct 26 '23 at 17:32
  • 1
    @8bittree: It already works. Grub-EFI never goes to 16 bit mode. But NT4 clearly doesn't write an EFI boot record so it has no choice but to switch to 16 bit mode and load the first sector of the HD if it's going to do anything at all. – Joshua Oct 26 '23 at 17:40
  • @AlanB Indeed, that's why the ones of us who had access to it knew that Vista's troubles had nothing to do with Vista itself, but rather the atrocious drivers from device manufacturers :D Vista was the first time consumer devices had to start taking 64-bit seriously, but it was a very painful journey. XP x64 was borderline unusable unless you had the right kind of hardware. – Luaan Oct 27 '23 at 06:07
  • @Luaan: Having used XP, Vista, and 7 on the same hardware I must disagree, but that's getting off topic. (32 bit, correct drivers available ...) – Joshua Oct 27 '23 at 13:38

1 Answers1

43

If you’re trying to install Windows NT 4 without Service Pack 6, this could be the result of NT4’s mis-handling of the CPUID instruction. In particular, it would crash on anything after CPU family 7; this isn’t specific to 64-bit CPUs. This is described succinctly in Q238891:

The Windows NT 4.0 kernel currently contains two restrictions that limit the kernel's use to certain processors:

  • A check for a Pentium processor that was never released.

  • A processor bit configuration that limits the maximum processor family to seven.

The result of this is that NT4 pre-SP6 can’t be installed on many CPUs newer than a Pentium III. Ironically, Core-based CPUs identify themselves as family 6, so assuming the description in the KB note is complete, and depending on what is involved in the “check for a Pentium processor that was never released”, this particular bug shouldn’t affect them; but KB notes are prone to being incomplete.

This wasn’t the first time NT used CPUID incorrectly; the October 1992 pre-release can’t be installed because of a bug in its setup of CPUID calls, and the NT 3.1 release doesn’t handle CPUID properly either.

(The issues fixed in NT4 SP6 are listed in Q241211 and Q244690.)

Stephen Kitt
  • 121,835
  • 17
  • 505
  • 462