<commit_before># Minix 2 QD edition

## Introduction

This is a very quick-and-dirty distribution of the old Minix 2 operating
system by <NAME>. It's not official in any way.

### What is Minix 2?

Minix 2 is a pedagogical operating system designed for teaching an OS
course, developed around 1996. Despite being restricted in scope and
suitable for understanding by students, it's actually a surprisingly
powerful and thoroughly usable Unix clone which will run in tiny amounts of
RAM. The entire distribution, source code and C compiler included, will fit
in about 40MB of disk and it'll recompile its own kernel and userspace in
1MB of RAM. (Slowly.) It'll run entirely off floppy disk. It'll even boot on
an original IBM PC, with the 512MB upgrade, although even Minix has trouble
there.

What you get is: multiuser logins, all the standard Unix tools, a full
Bourne shell, an ANSI C89 C compiler, a Modula-2 compiler, TCP/IP
networking, a vi clone, an emacs clone, a pico clone, source for nearly
everything, awk, bc, a game, and huge amounts of other stuff. It's (almost)
completely self-hosted --- you can hack Minix on Minix.

This makes it both interesting simply as a work of art, but also quite
useful when retrocomputing.

## What's here?

What you will find here is the contents of the last Minix 2 release, 2.0.4,
extracted and massaged so that it'll live in a standard user directory, plus
a set of scripts that will take the distribution and turn it into a bootable
Minix hard drive image. Minix is self-hosting, so we need to bootstrap a
Minix somehow to build it on.

You won't find *all* the source here, because Minix came with most source,
but not all; the C compiler is ACKPACK, a special version of the [Amsterdam
Compiler Kit](http://tack.sf.net), carefully cut down and modified to run on
Minix. Back when this was released, this wasn't open source.

Note: this is Minix i86. The largest binaries can get is 64kB+64kB. This is
restrictive compared to Minix i386, but it'll also build and run on machines
with as little as 1MB of RAM, which is the main case I'm interested in.

## Instructions

You will need a Linux machine and `qemu-system-i386` and `rsync`.

### Building and booting

Do:

    $ ./mkall

This will rebuild all the installation images from the files in `fs`.

  * `combo-1440kB.img.gz`, `combo-1200kB.img.gz`: combined root/usr floppy
    disk images. These contain a single filesystem with no division into root
    and usr. You can boot these. By default, the disk image will be loaded
    into a ramdisk to free up the floppy disk drive, but if you have less than
    about 3MB of RAM you should mount them directly; at the boot monitor prompt.
    hit ESC, then type `rootdev=fd0`, then `boot`.

  * `hd-64MB.img.gz`: exactly the same content as above, but in a bootable hard
    disk image. Use this if you want to run Minix in a virtual machine.

  * `root-720kB.img.gz`, `usr-720kB.img.gz`: split root and usr floppy disk
    images. A 720kB floppy isn't big enough for the combined disk, so you need
    to boot the root disk, let it load itself into a ramdisk, and then it'll
    prompt you to replace the floppy with the usr image. It'll ask for a device;
    you want `/dev/fd0`.

### Installing onto a hard drive

Once you have a floppy based system booted, you want to copy Minix onto your
computer's hard drive.

The detailed instructions are long and complicated, but the tl;dr version is
to log in as root, and then:

    $ part

...is the partition editor; the Minix partition type is 81. If you have less
than 4MB RAM, create a swap partition (of about 4MB). You'll probably want to
reboot (Minix sometimes forgets to reload the partition table). I'm going to<commit_msg>Oops, misdescribed the hd-64MB image.<commit_after># Minix 2 QD edition

## Introduction

This is a very quick-and-dirty distribution of the old Minix 2 operating
system by <NAME>. It's not official in any way.

### What is Minix 2?

Minix 2 is a pedagogical operating system designed for teaching an OS
course, developed around 1996. Despite being restricted in scope and
suitable for understanding by students, it's actually a surprisingly
powerful and thoroughly usable Unix clone which will run in tiny amounts of
RAM. The entire distribution, source code and C compiler included, will fit
in about 40MB of disk and it'll recompile its own kernel and userspace in
1MB of RAM. (Slowly.) It'll run entirely off floppy disk. It'll even boot on
an original IBM PC, with the 512MB upgrade, although even Minix has trouble
there.

What you get is: multiuser logins, all the standard Unix tools, a full
Bourne shell, an ANSI C89 C compiler, a Modula-2 compiler, TCP/IP
networking, a vi clone, an emacs clone, a pico clone, source for nearly
everything, awk, bc, a game, and huge amounts of other stuff. It's (almost)
completely self-hosted --- you can hack Minix on Minix.

This makes it both interesting simply as a work of art, but also quite
useful when retrocomputing.

## What's here?

What you will find here is the contents of the last Minix 2 release, 2.0.4,
extracted and massaged so that it'll live in a standard user directory, plus
a set of scripts that will take the distribution and turn it into a bootable
Minix hard drive image. Minix is self-hosting, so we need to bootstrap a
Minix somehow to build it on.

You won't find *all* the source here, because Minix came with most source,
but not all; the C compiler is ACKPACK, a special version of the [Amsterdam
Compiler Kit](http://tack.sf.net), carefully cut down and modified to run on
Minix. Back when this was released, this wasn't open source.

Note: this is Minix i86. The largest binaries can get is 64kB+64kB. This is
restrictive compared to Minix i386, but it'll also build and run on machines
with as little as 1MB of RAM, which is the main case I'm interested in.

## Instructions

You will need a Linux machine and `qemu-system-i386` and `rsync`.

### Building and booting

Do:

    $ ./mkall

This will rebuild all the installation images from the files in `fs`.

  * `combo-1440kB.img.gz`, `combo-1200kB.img.gz`: combined root/usr floppy
    disk images. These contain a single filesystem with no division into root
    and usr. You can boot these. By default, the disk image will be loaded
    into a ramdisk to free up the floppy disk drive, but if you have less than
    about 3MB of RAM you should mount them directly; at the boot monitor prompt.
    hit ESC, then type `rootdev=fd0`, then `boot`.

  * `hd-64MB.img.gz`: is a bootable hard drive image containing absolutely
    everything; compilers, games, all the source code, the lot. Don't be put
    off by the size. Use this if you want to run Minix in a virtual machine.

  * `root-720kB.img.gz`, `usr-720kB.img.gz`: split root and usr floppy disk
    images. A 720kB floppy isn't big enough for the combined disk, so you need
    to boot the root disk, let it load itself into a ramdisk, and then it'll
    prompt you to replace the floppy with the usr image. It'll ask for a device;
    you want `/dev/fd0`.

### Installing onto a hard drive

Once you have a floppy based system booted, you want to copy Minix onto your
computer's hard drive.

The detailed instructions are long and complicated, but the tl;dr version is
to log in as root, and then:

    $ part

...is the partition editor; the Minix partition type is 81. If you have less
than 4MB RAM, create a swap partition (of about 4MB). You'll probably want to
reboot (Minix sometimes forgets to reload the partition table). I'm going to
{'fraction_non_alphanumeric': 0.05816259087904825, 'fraction_numerical': 0.01612690019828156, 'mean_word_length': 3.779532533164877, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2688744', 'n_tokens_mistral': 2296, 'n_tokens_neox': 2096, 'n_words': 1248}