next_inactive up previous


LINUX--a free unix-386 kernel

Linus Torvalds ([email protected])

October 10, 1991

Introduction to LINUX

What is LINUX?

LINUX is a free unix-like kernel for 386-AT computers, coming with full source code. It is meant for hackers/computer science students to use, learn and enjoy. It is written mostly in C, but parts of it are in gnu-format assembler, and the boot-sequence is in intel 086 assembly language. The C-code is relatively ANSI, with a few GNU enhancements (mostly __asm__ and inline).

While there are a number of unices available for 386 computers, most of them cost a lot of money, and come with no source. Thus, they are ideal for actually using your computer, but if you want to learn how they work, you are f- -ked.

There are also a few unices available with source. Minix, the learning tool written by Andrew S. Tanenbaum, has been used in universities as a teaching tool for years. The BSD-386 system comes with source, but has a restrictive copyright and costs a lot of money ($995 is the starting price, I think). The GNU kernel (Hurd) will be free, but is currently not ready, and will be too big to understand and learn.

LINUX most closely resembles Minix, in that it is small and not very sophisticated, and thus easy (well...) to understand. LINUX was also written under Minix, so there are quite a bit of similarities, and any Minix hacker will feel relatively at home with LINUX. None of the Minix code was used in the project though, so the Minix copyright doesn't cover the new system. It also is completely free, and has a very loose copyright. Thus there is no need for megabytes of diffs like under Minix.

The LINUX copyright

While being freely distributable, I do restrict the use of LINUX in a few ways:

This should be loose enough not to cause any worry in anybody using or expanding the system. If you have a friend who really doesn't want the source, but just a working binary, you may of course give it to him without worrying whether I will sue you. Keep it between friends, though.

Hardware/software needed to get LINUX running

LINUX was written on a 386-AT running Minix. As LINUX is a real operating system, and goes directly to the hardware to do things, you have to have a very similar system to get it going without problems:

While LINUX will be expanded to be a self-sufficient system, Minix-386 is currently needed to get the ball rolling. You need Minix to make the initial root file system, and to compile the OS binary. After that LINUX is a self-sufficient system, but Minix is recommended in order to make file system checking (fsck) and to recompile the system after making changes.

Getting LINUX

LINUX can currently be gotten by anonymous ftp from `nic.funet.fi' in the directory '/pub/OS/Linux'. This directory contains the full source to the operating system, as well as a couple of binaries so that you can actually use the system.


NOTE! The binaries are mostly GNU software, and are under a stricter copyright (the GNU copyleft) than the LINUX sources. Thus you may not redistribute them without distributing their source, found in /pub/GNU. See any GNU software package for more information on the GNU copyleft.

The various files found in this directory are:

The absolute minimum needed to get a system going is the OS source and the bash and update binaries. You won't be doing much with just these though.

Installation

After you have gotten the necessary LINUX files, you need to compile the system and make a root directory. The necessary binaries need to be put in the root file system. Do this:

  1. Back up your software. While LINUX never has destroyed any of my files, nothing is certain. Better safe than sorry.
  2. Choose/make a standard Minix HD-partition to be the new LINUX root file system.
  3. Make the necessary device nodes on the new root. LINUX uses the same type of nodes as Minix, so use the Minix mknod command to make the following devices: Node numbers are the same as in Minix.
  4. Move the necessary files to the new root partition. The files should be in the following directories:

    Hopefully you now have a functioning unix, and you are logged in as root. LINUX currently has no 'init' process, and as soon as you log out, the system will sync and just wait. Use the three-finger-salute to reboot your machine.

Things missing/incomplete in LINUX

While LINUX is meant to be a fully selfsufficient kernel, this is currently not the case. As already mentioned, you need Minix to set things up, and to check the file system once it's running. There are a number of other deficiencies:

As you can see, LINUX is as yet not a complete system. Your help is appreciated to make it better. I'm not interested in Minix-commands rewritten for LINUX, unless you have written them yourself from scratch. You are of course free (and encouraged) to use everything you have in your Minix-distribution for your own LINUX-system, but due to the Minix copyrights, they cannot be distributed to a wider audience.

Some of the probelms mentioned here will be fixed by me (ie serial lines/387/floppy support) as soon as possible, but I'm hoping to get help with the libraries etc. Bug-reports/patches and wish-lists will be appreciated, and if you actually have the patch to the problem, I'll try to implement it right away. Small changes will be sent out as patches to the mailing list and be set up on `nic.funet.fi', but after heavy rewrites or bigger patches, the whole system will be updated at `nic.funet.fi'.

Porting software for LINUX

LINUX was designed to make porting relatively easy. Thus the full termios-implementation, and the somewhat POSIX library. The (admittedly relativly few) programs I've ported posed no problems.

Even though LINUX resembles Minix a great deal, Minix programs are not generally easier to port than programs designed for some other unix. Thus I wouldn't recommend starting from a Minix-version of a particular program, but instead trying to port the ``virgin'' program from scratch. Being closer to SYSV than BSD means that most programs port easily when given a -DUSG or -DSYSV flag.

One of the more difficult problem in porting can be missing library functions. These must be written by you, or copied from some other source (Minix being one possibility for those that have it). Alternatively, some programs (notably GNU) have various flags making it possible to define which functions aren't available (the GNU fileutils will compile quite nicely, once a sufficient number of -DXXX_MISSING flags are added to the Makefile.)

Programs already ported

These programs have already been ported to LINUX:

All of the above sources can be found on `nic.funet.fi' (mostly in `/pub/gnu'), and most of the LINUX-binaries can be found in the directory '/pub/OS/Linux'. All of these programs compiled without changes, even though gcc (cc1) has some enhancements of my own. Mail me for diffs/sources, but try first to compile them yourself.

Additionally I have reports that GNU diff compiles cleanly and works.

Technical help

LINUX currently has a mailing-list, which you can subscribe to by mailing to the address: [email protected] and asking to be included into the list. You can then ask questions by mailing them to [email protected], which will duplicate your question/answer/whatever and send them to all persons on the list.

Note the difference between Linux-activists and Linux-activists-request -- the first sends mail to all persons on the list, the second is used only to subscribe and unsubscribe from the list.

Naturally, you can also mail me directly at [email protected]. I'll try to answer all questions within a day or two.

Although `nic.funet.fi' will probably be kept reasonably up-to-date, there are a few problems with it (ie, I cannot personally get to the files, but have to go through a couple of persons). Thus people on the mailing-list will get patches/binaries faster if they ask for them.

Thanks

I'd like to thank the academy ...

Seriously, this system never would have seen the light of day or would have been much worse without the help of some others. Bruce Evans helped me find the places needed to be changed in order for gcc to correctly handle floating point, and came with a lot of useful ideas/suggestions (and his Minix-386 was used to build the system). Also, Earl Chew's estdio package was used for the standard IO-library. More freely distributable packages like this!

Alain W Black and Richard Tobin made the gcc for Minix, without which I couldn't have compiled the thing. GNU made most of the programs I use under LINUX. Alfred Leung sent the US keyboard patches.

PS. ``Thanks'' to [email protected] for his ``constructive'' criticism and ``witty'' comments. He was also my first $\alpha$-tester, and should be given a medal for courage.

About this document ...

LINUX--a free unix-386 kernel

This document was generated using the LaTeX2HTML translator Version 2002 (1.62)

Copyright © 1993, 1994, 1995, 1996, Nikos Drakos, Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999, Ross Moore, Mathematics Department, Macquarie University, Sydney.

The command line arguments were:
latex2html -local_icons -address [email protected] -split 1 Linux.tex

The translation was initiated by root on 2004-05-08


next_inactive up previous
[email protected]