Linux - a free unix-386 kernel
Linus Torvalds (Torvalds@kruuna.helsinki.fi)
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 relative, 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--y.
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 NOTY, 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 does not 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: You May Free Copy and Redistribute The Source and Binaries, As long as:
complete source is available. Thus binaries may not be distributed by themselves, even if you have made changes to them. you do not profit from the distribution. In fact even `` handling costs '' are not acceptable. you keep the appropriate copyrights intact . you may change the source to your liking, but if you distribute parts of the new system (or just binaries), all the new code must be included. you may make small excepts from the code without including copyrights. This is up to you , but a reference to me or the code would be appreciated. This should be loose enough not to cause any worry in anybody using or expanding the system. If you have a friend who really does not 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 WRITTEN ON A 386-At Running Minix. AS Linux Is A Real Operating System, And Goes Directly to the Hardware To Do Do Things, You Have To Have A Very Similar System To Get It Going WITHOUT PROBLEMS:
386-AT (PS / 2'S Are Different Enough That Things Won't work) VGA or EGA Screen Hardware. Standard At Hard-Disk Interface, IDE Disks Work Fine (IN Fact That What I Use). Normal Real-mode Bios. Some Machines Seem to Run The Bootup Program, And on Such Machines Linux Won't Boot Up and Run Correctly.
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 copyled.
THE VARIOS FILES FOUND in this Directory Are:
Linux-0.03.tar.z - Complete Source to the Operating System, IN A 16-Bit Compressed Tar Archive. Linux.tex - Latex Source for this File. Bash.z - Bash Binary To Run Under Linux. this binary SHOULD BE PUT Under Tha Name / Bin / Shin The File System Reserved for Linux (See Installation). Update.z - Update Binary, To Be Put in / Bin / Update. gccbin.tar.z - GNU CC Binaries Needed .. to get a working compiler This tarred archive contains the compiler, loader, assembler and support programs (nm, strip etc) It also contains a small library sufficient for most programs include.tar.Z -. include-files necessary to get gcc working unistd.tar.Z -. source to the unistd library routines (ie system call interface) With this you can build a bigger library by using system-independent library sources utilbin.tar.Z -.. binaries to various GNU Utilities, Including GNU FileUtils, Make and Tar. Also Contains The Emacs-Clone Uemacs. Readme, Relnotes-0.01, Installation - ASCII FILES Containing Some (Somewhat Out-of-Date) in Formation About Linux.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.
Installation
After you have gotten the next to compile the system and make a root directory. The next in the root file system. Do this:
Back up your software. While LINUX never has destroyed any of my files, nothing is certain. Better safe than sorry. Choose / make a standard Minix HD-partition to be the new LINUX root file system. 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:
/ dev / tty / dev / tty [0-2] / dev / hd [0-9] Node Numbers Are The next nextories. The nextories. The Files Should Be in The Following Directories: 0000-00-00 00- 00 00 00 / bin:
SH, IE Bash.Z. Update / usr / bin:
Contents of utilbin.tar.z / usr / incrude:
Contents of incrude.tar.z / usr / local / lib:
Contents of gccbin.tar.z, ExcePting GCC / USR / local / bin:
GCC LINKS TO Files In / USR / LOCAL / LIB OF Your Choice. I LINK LD, AS, NM, Strip and Size To Their Counterparts In / USR / local / lib / gcc-xxx. Edit the Linux / include / Linux / Config .h file for your system This file contains the system-specific information:. memory space, disk types, root partition number (again the numbering is the same as in Minix), keyboard type (currently just US and Finnish) etc. Compile the LINUX sources. A simple make should do the trick, after you have edited the makefiles to suit your system (ie, removed the -mstring-insns flag and changed the paths to suit you.) Users of gcc versions earlier than 1.40 will probably have to add gnulib to the `LIBS = '-.. line in the makefile Copy the resultant Image-file to a floppy (. ie, cp Image / dev / PS0 or similar) Reboot with the new floppy The startup screen should tell you that The System Is Booting (Loading System ...), Then Some Vital Root File System Information (XXX / XXX Inodes / Blocks Free), FOLLOWED BY A OK. And The Bash Prompt (Initially bash # if you have no .bashrc file). 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..:
Incomplete hardware-support. Some of the standard features of an AT are not currently supported. Most notably are floppy disk drives, making using LINUX for real work (backing up etc) currently not possible. Also some of the features of the serial lines aren 't yet implemented (hard-wired to 2400bps, no hang-up notification etc). Incomplete standard C library. The libc.a found in the gcc distribution package is not complete, and I'm very much interested in freely distributable library functions . some of the system calls are not fully implemented. This concerns mostly `` seldom-used '' features like debugging (yeah, who needs it anyway, do not all your programs work the first time :-) and some other features. As mentioned, no login and init processes. Currently LINUX boots up in single-user mode, with the root as console-user. This is enough for some porting work, but not really practical. 387-support is not yet implemented, although some Skeleton Routines Are Present. The GCC-Binary Found on `nic.funet.fi 'will correctly use soft-float (ie emulation function calls) for the four basic math operations. 387-support will materialize as soon as a 387 finds its way into my computer. Hopefully in a month or two . None of the important system-administration commands has yet been written for LINUX. These include things like mkfs, format, fsck, mknod etc. some of these need kernel features not yet implemented (format, mknod), some just need to be written . As with the library, I'd Welcome Any Freely Distributable Files.
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 can not 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 relative termios-importation, and the pointwhat posix library. The (Admittedly Relativly Few) Program I've ported posed no problem.
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 would not recommend starting from a Minix-version of a particular program, but instead trying to port the `` .
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 are not available (the GNU fileutils will compile quite nicely, once a sufficient number of -DXXX_MISSING flags are added to the Makefile.) Programs already ported
Thase Programs Have Already Been Ported to Linux:
GNU CC (GCC, CC1, CPP) GNU Assembler (AS386) GNU Binutils (LD, Ar, NM, Size, Strip, Ranlib) GNU COMPRESS (16-BIT) GNU Tar Gnu Make GNU Bash (Bourne Again Shell) Gnu Sed GNU Bison (Yacc-Lookalike) GNU AWK GNU FileUtils (LS, CP, RM, MKDIR, RMDIR, TAIL ETC) Less Uemacs
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 the 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:. Linux-activists-request@niksula.hut.fi and asking to be included into the list You can then ask questions by mailing them to Linux- .
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 torvalds @ Kruuna.helsinki.fi. 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 The 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 Free this!
Alain W Black and Richard Tobin Made The GCC for Minix, WITHOUT WHICH I COULDN '的 c' s.........................
Ps. `` Thanks '' to wirzeniu@kruuna.helsinki.fi for his `` Constructive '' criticism and `` witty '' Comments. He Was Also my first -tester, and shouth 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)