On UNIX, the boot code is traditionally found in the directory /usr/mdec. Some modern UNIX variants keep this tradition up (e.g. OpenBSD) while others have changed the directory layout (e.g. FreeBSD). I was able to find a /usr/mdec directory in 5th edition UNIX, but not in any of the incomplete earlier versions. No explanation for the name is given.

Where does the name /usr/mdec come from and what does it mean?

  • 2
    I suspect the dec part was chosen because the code is DEC-specific... Jul 31 '18 at 13:22
  • 2
    There are also references to mdec in V4. Jul 31 '18 at 13:31
  • 3
    I suspect it to mean DEC as well - the directory contains DEC machine specific boot code
    – tofro
    Jul 31 '18 at 14:01

These directories have such terse names, don't they? And the etymology is not always documented, nor obvious. In many cases, the etymology of a name in UNIX is simply lost to obscurity.

But the directory you're asking about appears to contain images for magtapes and DECtapes, at least to begin with, or in the earliest versions of UNIX. From the manpage linked to by Stephen Kitt,

The tp command places a bootstrap program on the otherwise unused block zero of the tape. The DECtape version of this program is called tboot, the magtape version mboot.

There also is mention of a /usr/mdec/uboot, which is a bootstrap of the filesystem. I don't know whether that was a magtape or a DECtape.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.