Someone asked me if I could describe how to perform DOS memory allocation. It's not the first time, either. It's a nearly lost art. To try to illustrate that it's a non-trivial job, I decided to do something simpler: describe how DOS allocates drive letters.
I have a feeling I've done this before somewhere, but I couldn't find it, so I tried writing it up as an exercise.
Axioms:
Assigning upper memory blocks is more complicated.
NT changes this and I am not 100% sure of the details. From observation:
[part № 1] [part № 2] [part № 4] [part № 3]
They will blue-screen on boot if you have this. Linux doesn't care.
Riders:
Errors & omissions excepted, as they say. Corrections and clarifications very welcome. To comment, you don't need an account — you can sign in with any OpenID, including Facebook, Twitter, UbuntuOne, etc.
I have a feeling I've done this before somewhere, but I couldn't find it, so I tried writing it up as an exercise.
Axioms:
- DOS only understands FAT12, FAT16 and in later versions FAT32. HPFS, NTFS and all *nix filesystems will be skipped.
- We are only considering MBR partitioning.
- Hard disks support 2 partition types: primary and logical. Logical drives must go inside an extended partition.
- MBR supports a legal max of 4 primaries per drive.
- Only 1 primary partition on the 1st drive can be marked "active" and the BIOS will boot that one _unless_ you have a *nix bootloader installed.
- You can only have 1 extended partition per drive. It counts as a primary partition.
- To be "legal" and to support early versions of NT and OS/2, only 1 DOS-readable primary partition per drive is allowed. All other partitions should go inside an extended partition.
- MS-DOS, PC DOS and NT will only boot from a primary partition. (I think DR-DOS is more flexible and I don't know for FreeDOS.)
- It starts with drive letter C.
- It enumerates all available hard drives visible to the BIOS.
- The first *primary* partition on each drive is assigned a letter.
- Then it goes back to the start and starts going through all the physical hard disks a 2nd time.
- Now it enumerates all *logical* partitions on each drive and assigns them letters.
- So, all the logicals on the 1st drive get sequential letters.
- Then all the logicals on the next drive.
- And so on through all logicals on all hard disks.
- Then drivers in CONFIG.SYS are processed and if they create drives (e.g. DRIVER.SYS) those letters are assigned next.
- Then drivers in AUTOEXEC.BAT are processed and if they create drives (e.g. MSCDEX) those are assigned next.
Assigning upper memory blocks is more complicated.
NT changes this and I am not 100% sure of the details. From observation:
- NT 3 did the same, but with the addition of HPFS and NTFS (NT 3.1 & 3.5) and NTFS (3.51) drives.
- NT 4 does not recognise HPFS at all but the 3.51 driver can be retrofitted.
- NT 3, 4 & 5 (Win2K) *require* that partitions are in sequential order.
[part № 1] [part № 2] [part № 4] [part № 3]
They will blue-screen on boot if you have this. Linux doesn't care.
Riders:
- The NT booloader must be on the first primary partition on the first drive.
- (A 3rd party boot-loader can override this and, for instance, multi-boot several different installations on different drives.)
- The rest of the OS can be anywhere, including a logical drive.
NT 6 (Vista) & later can handle it, but this is because MS rewrote the drive-letter allocation algorithm. (At least I think this is why but I do not know for sure; it could be a coincidence.)
Conditions:
Conditions:
- The NT 6+ bootloader must be in the same drive as the rest of the OS.
- The bootloader must be on a primary partition.
- Therefore, NT 6+ must be in a primary partition, a new restriction.
- NT 6+ must be installed on an NTFS volume, therefore, it can no longer dual-boot with DOS on its own & a 3rd party bootloader is needed.
NT 6+ just does this:
- The drive where the NT bootloader is becomes C:
- Then it allocates all readable partitions on drive 1, then all those on drive 2, then all those on drive 3, etc.
So just listing the rules is quite complicated. Turning into a step-by-step how-to guide is significantly longer and more complex. As an example, the much simpler process of cleaning up Windows 7/8.x/10 if preparing to dual-boot took me several thousand words, and I skipped some entire considerations to keep it that "short".
Errors & omissions excepted, as they say. Corrections and clarifications very welcome. To comment, you don't need an account — you can sign in with any OpenID, including Facebook, Twitter, UbuntuOne, etc.
Windows NT was allegedly partly developed on OS/2. Many MSers loved OS/2 at the time -- they had co-developed it, after all. But there was more to it than that.
Windows NT was partly based on OS/2. There were 3 branches of the OS/2 codebase:
[a] OS/2 1.x – at IBM’s insistence, for the 80286. The mistake that doomed OS/2 and IBM’s presence in the PC industry, the industry it had created.
[b] OS/2 2.x – IBM went it alone with the 80386-specific version.
[c] OS/2 3.x – Portable OS/2, planned to be ported to multiple different CPUs.
After the “divorce”, MS inherited Portable OS/2. It was a skeleton and a plan. Dave Cutler was hired from DEC, which refused to allow him to pursue his PRISM project for a modern CPU and successor to VMS. Cutler got the Portable OS/2 project to complete. He did, fleshing it out with concepts and plans derived from his experience with VMS and plans for PRISM.