source: trunk/minix/man/man8/usage.8@ 20

Last change on this file since 20 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 33.4 KB
Line 
1.TH USAGE 8
2.SH NAME
3usage \- installing and using MINIX
4.SH DESCRIPTION
5.de SP
6.if t .sp 0.4
7.if n .sp
8..
9.de XB \" An example in bold print.
10.RS
11.nf
12.ft B
13\&\\$1
14.ft R
15.fi
16.RE
17..
18.de 3A \" Three Letter Acronym at 1 point size smaller.
19\&\\$3\s-1\\$1\s+1\\$2
20..
21.de 3B \" TLA in bold.
22\&\\$3\fB\s-1\\$1\s+1\fR\\$2
23..
24This manual page describes the installation and use of MINIX from a
25System Administrators point of view. It contains an installation guide,
26instructions on how to do the initial configuration and some other info.
27Please read this document entirely before attempting to install MINIX.
28The installation steps are in the proper order, but not all the
29information you may need is presented at the right moment.
30Other detailed information that may be useful can be found in
31.BR boot (8),
32.BR hier (7),
33and in
34.BR dosminix (8)
35if you run MINIX under DOS.
36.SS "1. MINIX UNDER DOS"
37Installation of MINIX to run under DOS is a nonevent. Chances are, you are
38reading this manual page from an already running MINIX system, but if not
39then the setup goes like this:
40.PP
41Unpack the DOSMINIX.ZIP file using one of the popular ZIP utilities, such as
42PKZIP or WinZIP. Next reboot Windows and hit F8 just when you see the
43"Booting Windows" message. From the menu that appears choose "Command
44prompt only", or if that doesn't work "Safe mode command prompt only". Under
45Windows Me you can use a startup disk to boot the PC into DOS. Move
46to the directory containing the MINIX files and type:
47.PP
48.XB "boot minix.mnx"
49.PP
50Type '=' and presto, you are running MINIX. Most of the rest of this manual,
51which deals mainly with running MINIX in a true hard disk partition, does
52not apply to you. Your system is already installed completely, with all
53binaries and sources present, so all the talk about getting MINIX on your
54disk can be skimmed over. Pay attention again when the focus shifts to the
55configuration of the system. Section 9 is where this happens first. (The
56main challange to a DOS installation is to figure out which parts of the
57installation manual do not apply.)
58.SS "2. REQUIREMENTS"
59The minimum system MINIX can be installed on comfortably is an IBM PC/AT
60or PS/2 with a 286 processor, 2 MB memory, a 720 kb diskette drive, and 35
61MB free space on an AT,
62ESDI, or SCSI hard disk (the latter controlled by an Adaptec 1540.) MINIX
63for the 386 (MINIX-386 for short) can be installed on a machine with at
64least a 386sx processor, 3 MB memory and at least 35 MB of disk space.
65.PP
66The minimum system MINIX can be installed on
67.BR un comfortably
68is an IBM PC/XT with 640 kb memory. MINIX-386 can more or less run in 2
69MB memory. See sections 16 and 17 on "low memory" issues.
70.SS "3. MINIX INSTALLATION BACKGROUND"
71The objective of the installation is to create a partition on your disk
72and to put MINIX into it. MINIX really requires at least two partitions
73however, so the single "primary" partition is split into two or three
74subpartitions.
75The
76.B s0
77subpartition will contain the root file system, the
78.B s1
79subpartition may optionally contain swapspace, and the
80.B s2
81subpartition will contain the
82.B /usr
83file system. What Windows calls
84"drives", i.e C:, D:, E:, MINIX calls "file systems". MINIX does not use
85drive letters, but requires that one file system is made a part of another
86file system by "mounting" one on the other. The "root" file system is
87always present and starts with the directory "/", the root of the directory
88tree. The root file system contains a few programs in
89.BR /bin ,
90device files in
91.BR /dev ,
92and configuration files in
93.BR /etc .
94This is just enough to get the system started. MINIX will soon extend
95its directory tree by mounting a file system on the
96.B /usr
97directory. What is henceforth known as the /usr file system contains all
98MINIX programs in
99.BR /usr/bin ,
100file system sources in
101.BR /usr/src ,
102etc, etc.
103The \s-2ROOT.MNX\s+2 image contains the complete MINIX root file system, but
104\s-2USR\s+2 contains just a small subset of the /usr file system, with just
105enough utilities to install MINIX. The complete /usr file system is
106split up into the \s-2USR.TAZ\s+2, \s-2SYS.TAZ\s+2 and \s-2CMD.TAZ\s+2
107archives that are installed later to fill /usr.
108.PP
109Let's suppose your first hard disk, which has
110device name
111.BR /dev/c0d0 ,
112has Windows already present in the first primary partition
113.RB ( /dev/c0d0p0 ),
114and some free space left after that. After MINIX is installed in that
115free space the disk will look like this:
116.PP
117.nf
118.in +4n
119.ta +\w'/dev/c0d0p1s0mmmm'u
120/dev/c0d0 Whole hard disk #0
121/dev/c0d0p0 Windows C: drive
122/dev/c0d0p1 MINIX primary partition
123/dev/c0d0p1s0 MINIX root partition
124/dev/c0d0p1s1 MINIX swap partition (optional)
125/dev/c0d0p1s2 MINIX /usr partition
126.in -8n
127.fi
128.PP
129/dev/c0d0 is the sum of a partition table, /dev/c0d0p0 and /dev/c0d0p1.
130Likewise is /dev/c0d0p1 the sum of a subpartition table, /dev/c0d0p1s0 and
131/dev/c0d0p1s2. Read the "DEVICES" sections for more information on MINIX
132devices.
133.SS "4. INSTALLATION"
134.ig \" Only relevant when on CD-ROM.
135If you have not already copied MINIX to floppy disks, please read
136the README.TXT file in the MINIX directory now, for it tells how to do this.
137You should also print out EXAMPLE.TXT and read it in parallel with this
138document. This one tells you what to do; that one shows you what the
139screen is supposed to look like at each step, so you can see if everything
140is OK.
141.PP
142..
143You can install MINIX automatically or manually as described in the sections
144below. The end result is the same, but manual installation allows
145one to deviate from the preconfigured choices. You may wish to read the
146manual pages of the programs used below before you start. You may especially
147want to read
148.BR boot (8)
149if your machine is different from what the majority buys, because you
150may need to set a few boot parameters to configure drivers. To do this type
151.B ESC
152to get to the Boot Monitor prompt, set the appropriate variables, use
153.B save
154to store the settings and
155.B menu
156to continue where you left off.
157.PP
158To install the system you need two diskettes: a bootable root diskette and a
159diskette full of binaries to use as
160.BR /usr .
161These diskettes are named
162.B \s-2ROOT\s+2
163and
164.BR \s-2USR\s+2 .
165These two diskettes may also be combined on a single high density diskette.
166In that case the \s-2USR\s+2 part is on the
167.B p2
168partition.
169.PP
170Insert the \s-2ROOT\s+2 diskette, boot the machine and type '=' to the menu.
171The MINIX kernel is loaded and takes control when you see the copyright
172banner. After loading the root diskette into the RAM disk you will be asked
173to finish the name of the device to mount on
174.BR /usr .
175Type
176.BR fd0p2
177for a diskette that contains both \s-2ROOT\s+2 and \s-2USR\s+2, otherwise
178replace \s-2ROOT\s+2 by \s-2USR\s+2 and type
179.BR fd0 .
180Login as
181.BR root .
182.SS "5. AUTOMATIC INSTALLATION"
183Before starting the installation, you must either have a free partition
184available or have at least 35 MB not in any partition so you can create
185a MINIX partition.
186.PP
187Type
188.B setup
189to start the installation script. First it offers to install a national
190keyboard map. The names should be clear, except for
191.BR us-swap ,
192which swaps the CTRL and CAPS LOCK keys of a standard US style keyboard
193for people who believe that the natural place of CTRL is next to A.
194The default suggested between [ and ] is the US standard keyboard.
195.PP
196The next thing to do is to make a partition, for this you are placed in a
197partition table editor named
198.BR part .
199This partition table editor is very easy to use (in the author's opinion),
200but you will probably hate it. You can move all over the place with the
201arrow keys, change values, and make a mess of your partition table real quick.
202So if you get into trouble, type 'q' to quit, 'n' to not write the table,
203and RETURN to start over. Use the '?' key to get help.
204.PP
205With the '+' and '\-' keys you can select the disk device to install on,
206probably
207.BR /dev/c0d0 ,
208the first hard disk. Type 'r' to load the partition table of the selected
209disk. Either create one new partition by modifying a partition marked
210"None", or reuse an existing partition by changing its type to "MINIX" (hex
211code 81). DO NOT use part to shrink an existing partition! It will destroy
212all data in that partition. MINIX needs a partition of at least 20 MB, but
213not larger than 128 MB (MINIX-86) or 1 GB (MINIX-386). The system needs 35
214MB in compiled state.
215.PP
216The script then wants to know the name of the partition you've created. The
217partition name is probably still visible on the screen. Combined with the
218drive name you have to type c0d0p1, c0d2p0 or something.
219.PP
220The next question is the amount of swapspace you want to give MINIX. There
221will be a suggested value based on the amount of memory your system has.
222If you have more then enough memory then don't bother with swap. MINIX
223doesn't handle it very well yet, or ever, only memory starved systems need it
224so that
225.B "make world"
226can run.
227.PP
228The new partition table is reloaded into the disk driver, and the
229new MINIX partition is carved up into two or three subpartitions, a 1440 kb
230root, maybe some amount of swap, and the rest for /usr.
231.PP
232After making /usr, it is immediately put to use to replace the installation
233/usr file system so that you can remove the \s-2USR\s+2 diskette and insert
234the \s-2ROOT\s+2 diskette (unless they are one and the same). The root file
235system is filled with the contents of the \s-2ROOT\s+2 diskette and slightly
236patched up to work on the hard disk (/etc/fstab.)
237.PP
238You can now skip the next section and move to "TESTING", but it may be
239instructive to read it anyway.
240.SS "6. MANUAL INSTALLATION"
241The instructions that follow are at a very low level and require you to be
242very careful. The big advantage is that you know precisely what
243tools have been used and how everything works. The disadvantage is that
244you may easily make a mistake that either forces you to start over if you
245are lucky, or wipes out the contents of your hard disk if you are not.
246Only if you really want to do something different should you use a manual
247installation. Slavishly following the steps shown below will only make
248you end up with the same result as an automatic installation.
249.PP
250Run
251.B part
252to make partitions to load the system into. The best thing to do is to make
253one large primary partition of type "MINIX" and to carve this partition up
254into three subpartitions for root, swap and /usr. The assumption is that you
255will use the second partition on the first hard disk,
256.BR /dev/c0d0p1 ,
257and that
258.B c0d0p1s0
259is the root subpartition,
260.B c0d0p1s1
261is swap and
262.B c0d0p1s2
263is /usr. If you want to use the first partition on
264the second hard disk for instance, then substitute c0d1p0 and c0d1p0s[012] for
265the above. See the section on devices below, and the manual
266pages of
267.BR part (8)
268and
269.BR controller (4).
270Start
271.B part
272and select the disk that you
273want to install MINIX onto. In our example it will be
274.BR /dev/c0d0 .
275.PP
276Use
277.B part
278to make a single partition in the primary partition table of type "MINIX",
279then hit '>' on this new partition to make a subpartition table.
280.PP
281For the root subpartition you are advised to use 1440 kb exactly. You can
282make it larger if you want to, but it is advisable never to let the contents
283outgrow a floppy. (The \s-2ROOT\s+2 diskette is a copy of a root file
284system, and will be used to fill your root subpartition.)
285.PP
286The second subpartition is for swapspace. You can use it to enlarge the
287amount of total memory (real + swap) if your system has less than 2M
288(16-bit mode) or 4M (32-bit mode). Note that only one MINIX swap partition
289is needed on your system, so if you have another MINIX partition then you can
290use its swap partition instead.
291.PP
292Use the rest of the partition for
293.BR s2 ,
294the /usr subpartition.
295.PP
296When you are done check that /dev/c0d0p1s0 is active (the * after the partition
297number) so you can boot from it later.
298.PP
299If your disk has bad blocks then don't put the root or swap subpartition
300on top of them. Make sure the inode tables in the other partitions don't
301have bad blocks either. You can put the subpartitions out of order on the
302disk if that helps. Subpartition tables, unlike the main partition
303table, are not sorted by the driver.
304.PP
305After making the partitions you do not have to reboot. The disk driver
306reloads the partition tables on the next access if the disk is not in use.
307(Open or mounted.)
308.PP
309To be able to boot from /dev/c0d0p1s0 you must place a master bootstrap in
310/dev/c0d0p1. It has been placed there by
311.B part
312if it told you that it was creating a new partition table, but
313.PP
314.XB "installboot\0\-m\0/dev/c0d0p1\0/usr/mdec/masterboot"
315.RE
316.PP
317will put it there for sure.
318.PP
319Let's start by initializing the swap partition first, if you allocated one.
320We may need it already, so mount it.
321.PP
322.XB "mkswap\0/dev/c0d0p1s1"
323.XB "mount\0\-s\0/dev/c0d0p1s1"
324.PP
325Next make a file system for on-disk /usr and copy the floppy /usr on to it.
326.PP
327.XB "mkfs\0/dev/c0d0p1s2"
328.XB "readall\0\-b\0/dev/c0d0p1s2 | sh"
329.XB "mount\0/dev/c0d0p1s2\0/mnt"
330.XB "cpdir\0\-v\0/usr\0/mnt"
331.PP
332This will create a file system on /dev/c0d0p1s2, mount it on /mnt, and copy the
333contents of the \s-2USR\s+2 floppy onto it. The call to
334.B readall
335marks bad blocks on the file system as unusable, you can omit this on a
336drive known to be spotless (\s-2IDE\s+2 or \s-2SCSI\s+2.)
337.PP
338You can now use the new /usr in place of the \s-2USR\s+2 floppy:
339.PP
340.XB "umount\0/dev/c0d0p1s2"
341.XB "umount\0/dev/fd0\0\0\0\0\0\0\0\0\0# fd0p2 if combined"
342.XB "mount\0/dev/c0d0p1s2\0/usr"
343.PP
344This little dance has freed up your floppy drive, so please remove the
345\s-2USR\s+2 diskette and replace it by the \s-2ROOT\s+2 diskette. Make a
346file system for the root with at least 512 inodes (files), and
347fill it from the floppy:
348.PP
349.XB "mkfs\0\-i\0512\0/dev/c0d0p1s0"
350.XB "mount\0/dev/fd0\0/fd0"
351.XB "mount\0/dev/c0d0p1s0\0/mnt"
352.XB "cpdir\0\-v\0/fd0\0/mnt"
353.XB "umount\0/dev/fd0"
354.PP
355Remove
356.B /mnt/etc/issue
357to get rid of the "use setup" message that greets you when you boot, and
358edit the file
359.B /mnt/etc/fstab
360to name the devices MINIX has been installed on. In our example it
361should look like this:
362.PP
363.XB "root=/dev/c0d0p1s0"
364.XB "swap=/dev/c0d0p1s1"
365.XB "usr=/dev/c0d0p1s2"
366.PP
367Unmount the new root:
368.PP
369.XB "umount\0/dev/c0d0p1s0"
370.PP
371Make it bootable:
372.PP
373.XB "installboot\0\-d\0/dev/c0d0p1s0\0/usr/mdec/bootblock\0boot"
374.PP
375The automatic script would now set the
376.B rootdev
377and
378.B ramimagedev
379boot variables. You can do this now using the
380.B edparams
381command, but it is easier to postpone it until the testing phase. The
382settings should be:
383.PP
384.XB "rootdev=c0d0p1s0"
385.XB "ramimagedev=c0d0p1s0"
386.SS "7. TESTING"
387By now a new MINIX system is present on your hard disk. Time to see if
388it works. Leave the \s-2ROOT\s+2 diskette in the drive and type
389.BR halt .
390You are now going to use the power of the Boot Monitor on the diskette to
391boot the MINIX partition on the hard disk. Use the monitor command
392.B boot c0d0p1
393to boot the primary partition MINIX has been installed in. (It is "c0d0p1" in
394our example.)
395.PP
396The hard disk bootstrap is now showing the menu again. You can type '='
397to start MINIX, but you probably want to change the boot parameters.
398Hit
399.B ESC
400once more to get to the command prompt. The command
401.B set
402shows what the current parameters are. Here is an example that shows how
403to make a menu to either start MINIX or boot Windows:
404.PP
405.XB "minix(=,Minix)\0boot"
406.XB "win(w,Windows)\0boot\0c0d0p0"
407.XB "save"
408.PP
409Windows is assumed to be in the first partition in the example above (c0d0p0).
410When finished type
411.B menu
412to see if the menu looks right. If so hit '=' to start MINIX. Log in as
413root.
414.SS "8. ADDING PROGRAMS AND SOURCES TO /usr"
415The
416.B setup
417command can also be used to add files from floppy sets to the system. The
418.B \s-2USR.TAZ\s+2
419(programs and stuff),
420.B \s-2SYS.TAZ\s+2
421(system sources), and
422.B \s-2CMD.TAZ\s+2
423(commands sources)
424are all installed relative to the
425.B /usr
426directory, so the command to use three times is
427.PP
428.XB setup\0/usr
429.PP
430.B Setup
431will ask for the size of data on the floppies, which is by default simply
432the entire floppy. You will see some "Cannot make directory" errors
433while extracting, as some directories already exist. Ignore these messages.
434You need the
435.B \s-2USR.TAZ\s+2
436set if you want a working MINIX system,
437.B \s-2SYS.TAZ\s+2
438if you want recompile the system or study it, and
439.B \s-2CMD.TAZ\s+2
440if you also want the sources of the commands. On a disk space
441starved machine you could opt to do without the commands sources, as they
442are not absolutely necessary to understand MINIX.
443.PP
444If your machine does not have enough memory to run
445.B setup\0/usr
446then type these commands manually:
447.PP
448.XB "cd\0/usr"
449.XB "vol\0/dev/fd0 | zcat | tar\0xvfp\0\-"
450.PP
451If
452.3B USR.TAZ
453is already present on the hard disk in an
454.3A DOS
455or Windows partition, then this command can be used under MINIX-386 to
456extract it to avoid the floppy detour:
457.PP
458.XB "cd\0/usr"
459.XB "mtools\0copy\0c0d0p0:USR.TAZ\0\- | setup\0/usr"
460.PP
461In 16-bit mode you don't have mtools, but maybe dosread will work:
462.PP
463.XB "cd\0/usr"
464.XB "dosread\0c0d0p0\0USR.TAZ | setup\0/usr"
465.PP
466The file doesn't have to be in the root directory of
467.BR c0d0p0 ,
468of course,
469.B "c0d1p0:/TMP/USR.TAZ"
470would name a file on the first partition of the second hard disk in the
471directory
472.BR \eTMP .
473.PP
474The /usr file system can also be filled through a network from a remote host
475if MINIX if you can get networking going with the NET.TAZ supplement. Use
476.B "setup\0/"
477to install NET.TAZ (note that it goes into / instead of /usr), then
478follow the instructions in
479.BR boot (8)
480to configure TCP/IP and boot MINIX. There are now two ways to fill
481/usr. One is to add the host name and login name of a remote host and a
482remote user to
483.BR /.rhosts ,
484as root, and to use the following command on the remote host:
485.PP
486.XB "rsh\0\-l\0root\0\fIminix-box\fP\0setup\0/usr\0< USR.TAZ"
487.PP
488Two is to use
489.B urlget
490to copy the data directly from a Web or FTP site by using these
491commands under MINIX:
492.PP
493.XB "cd\0/usr"
494.XB "urlget\0\fIurl\fP.../USR.TAZ | setup\0/usr"
495.PP
496The sources may be installed using exactly the same commands, but with
497.3B USR.TAZ
498replaced by
499.3B SRC.TAZ .
500Note that this means that the sources must also be extracted relative to
501.BR /usr .
502.SS "9. NAMES"
503A standalone machine will have to be given a name. As
504.B root
505type
506.PP
507.XB "echo\0\fIname\fB\0>/etc/hostname.file"
508.PP
509to change the host name of your machine to
510.IR name .
511.SS "10. ACTIVE ON BOOT"
512You may want to make the MINIX partition active so that it is automatically
513booted. With Windows
514.B fdisk
515or MINIX
516.BR part ,
517mark the primary partition that contains MINIX active. Using the menu you
518made earlier you can boot either MINIX or Windows at a keypress. You can even
519set timeouts. To boot MINIX automatically after 5 seconds:
520.PP
521.XB "main()\0{trap\05000\0minix;\0menu}"
522.PP
523See
524.BR monitor (8)
525for all the details on the monitor.
526.PP
527If you don't trust this then you can rig up a diskette that boots the MINIX
528partition when left in the drive:
529.PP
530.XB "installboot\0\-m\0/dev/fd0\0/usr/mdec/jumpboot\0010"
531.PP
532The numbers 010 indicate the device (disk or partition) that must be booted,
533i.e.
534.B /dev/c0d0p1s0
535in this example. Take the name of the device, and use the disk, partition
536and subpartition numbers, or less. So c0d1p2s0 -> 120, c0d3 -> 3,
537c0d2p0 -> 20.)
538.SS "11. DEVICES"
539A crash course on the MINIX devices in
540.BR /dev :
541The first two hard disks are named
542.BR c0d0
543and
544.BR c0d1 .
545These devices address the entire hard disk, from the
546first to the last byte. Each disk has four partitions, for disk 0 they are
547.BR c0d0p0 ,
548.BR c0d0p1 ,
549.BR c0d0p2 ,
550and
551.BR c0d0p3 .
552And for disk 1 they are named
553.BR c0d1p0
554to
555.BR c0d1p3 .
556These partitions may contain file systems,
557.B c0d0p0
558often contains the
559.3A MS-DOS
560or Windows "C:" file system. MINIX can use these partitions
561for file systems too, but you can also partition one of these "primary
562partitions" into four so-called "subpartitions". The subpartitions of
563.B c0d0p0
564are named
565.BR c0d0p0s0 ,
566.BR c0d0p0s1 ,
567.BR c0d0p0s2 ,
568and
569.BR c0d0p0s3 .
570The other partitions may have four subpartitions that are named in the same
571way. See
572.BR controller (4)
573for an elaborate description.
574.PP
575You may need to add devices to
576.BR /dev ,
577because not all devices are present to keep down the clutter.
578The command
579.3B MAKEDEV
580knows how to make devices, and
581.3B DESCRIBE
582can tell you what an unknown device may be, or even what all devices in
583.B /dev
584may be if called without arguments. Devices are described in
585.BR dev (4),
586with pointers to more specific pages.
587.SS "12. EDITORS"
588The editors available are
589.B elvis
590(a
591.B vi
592clone),
593.B elle
594(a simple
595.B emacs
596clone),
597and the old MINIX
598.B mined
599editor. Of these editors only elvis can recover your file after a system
600crash. Only
601.B mined
602is available at installation time. (All you need to know about mined right
603now is that CTRL-X gets you out of it.)
604.SS "13. BOOT MONITOR VS. MINIX"
605The Boot Monitor uses the
606.3A BIOS
607to address disks, so it has no idea of controllers, it just lumps everything
608together and ignores controller numbers. So what the monitor thinks are
609.BR d0 ,
610.BR d1 ,
611and
612.BR d2 ,
613may be
614.BR c0d0
615(IDE primary master),
616.BR c0d2
617(IDE secondary master), and
618.BR c1d3
619(SCSI disk at target 3).
620One must keep this in mind when MINIX is installed on a disk other than the
621very first. So if MINIX is installed in the third partition of the SCSI disk,
622then
623.B "boot d2p2"
624will boot it, and
625.B "rootdev=c1d3p2s0"
626will tell MINIX where its root file system is.
627.SS "14. NATIONAL KEYBOARDS"
628The directory
629.B /usr/lib/keymaps
630contains keymap tables for several national keyboards. If you have a German
631keyboard for instance, then
632.PP
633.XB "loadkeys\0/usr/lib/keymaps/german.map"
634.PP
635will load the German key translation table into the keyboard driver. Copy
636the map to
637.B /etc/keymap
638once MINIX is installed on the hard disk, because having to type a key
639sequence like one of these:
640.PP
641.XB "loadkezs\0\-usr\-lib\-kezmaps\-german.map"
642.XB "loqdkeys\0=usr=lib=key,qps=french.,qp"
643.PP
644on a reboot gets a bit annoying after a while. Send corrections and new
645keymaps to the person named below. (Do not send a Dutch keymap, buy
646yourself a real keyboard instead.)
647.SH SUGGESTIONS
648Below are a few useful suggestions. Some of the information can be of use
649in other situations than described here.
650.SS "15. VIRTUAL CONSOLES"
651Hold down the ALT key and press the left or right arrow key, F1, or F2.
652This switches the console between two login sessions. (Unless you have
653an old mono adapter, because virtual consoles sit in video memory, and
654a mono adapter only has memory for one.)
655.PP
656Note that kernel messages, including function key output, only appear on
657the first console. This may be confusing, but it keeps the other consoles
658clean.
659.SS "16. LOW ON MEMORY"
660The normal installation requires that you have enough memory for a large RAM
661disk. You can still install MINIX normally if you either have a high density
662diskette drive for a combined root+usr floppy, or you have two floppy drives
663of at least 720 kb. Before booting you have to set the variable
664.B rootdev
665to the same value as
666.BR ramimagedev .
667This is slower then a RAM disk, but saves a lot of memory.
668.PP
669The automatic installation script knows how to handle this new situation.
670If you install manually then you have to use
671.PP
672.XB "cpdir\0\-vx\0/\0/mnt"
673.PP
674to copy the root device to disk. When it is time to fill /usr and you only
675have one floppy drive then hit DEL to get out of the installation script and
676reboot as described in "TESTING". You can then finish the installation
677manually.
678.ig
679See the XT640K.TXT file for more advice on small machines.
680..
681.SS "17. LOW ON MEMORY AND ONLY ONE 720 KB FLOPPY DRIVE"
682If you only have one 720 kb floppy drive and your system is low on memory
683then you can use the \s-2TINYROOT.MNX\s+2 boot image. This image contains a
684small kernel with only the BIOS disk driver, and a small root file system.
685You can use this disk to boot your machine. Use the normal \s-2ROOT.MNX\s+2 to
686install the root file system. Keep booting your machine with
687\s-2TINYROOT\s+2 until you have compiled a small kernel for your system.
688Use the
689.B rootdev
690boot variable to select the hard disk root file system. Do
691.B not
692use \s-2TINYROOT\s+2 for anything other than booting, always use
693\s-2ROOT\s+2 when mentioned.
694.SS "18. FLOPPY DRIVE 1 IS A HIGH DENSITY DRIVE"
695If you would like to install from floppy drive 1 then you need to copy at
696least one sector from the \s-2USR\s+2 image onto a diskette for drive 0.
697The \s-2USR\s+2 bootstrap has been rigged to boot the other drive.
698.SS "19. INSTALLING ON A SECOND HARD DISK"
699MINIX doesn't care if it is installed on the second disk of a system with
700two disks. The only problem is to get it booted. You can either rig up
701a diskette to boot MINIX as shown earlier, or you can use the same trick
702on the first disk. The command
703.PP
704.XB "installboot\0\-m\0/dev/c0d0\0/usr/mdec/jumpboot\01"
705.PP
706will lock the first disk into booting the second disk. Note that this
707command modifies the disk outside a MINIX partition, overwriting a bit of
708code that has likely been put there by Windows fdisk. First verify that the
709Boot Monitor can boot a Windows partition, because then the MINIX master
710bootstrap can do it too.
711.SS "20. LOTS OF MEMORY ON A 286"
712You will have a hard time making MINIX use up 3 MB memory. Memory you
713can spare can be used for a "second level block cache" on the RAM disk. The
714File System uses the second level cache to store copies of disk blocks that
715are pushed out of the normal (primary) block cache. The size of the primary
716cache is compiled into the FS server, but the size of the second level cache
717can be set with the
718.B ramsize
719boot variable. Set it to a number between 0 and 512. 512 kilobytes is
720enough to keep most of the compiler cached.
721.SS "21. LOTS OF MEMORY ON A 386+"
722Processes can be as big as you would like on a 386, but in practice 4 MB is
723a lot, and 8 MB is infinite.
724The installation script sets up a second level cache for MINIX-386
725of up to 1024 kilobytes. This is because the default file system cache
726is only 80 kb. Your first point of call is to get rid of the poorly
727performing second level cache by setting
728.B ENABLE_CACHE2
729to 0 and to assign the memory used by it to the
730normal block cache by enlarging the appropriate
731.B NR_BUFS
732and
733.B NR_BUF_HASH
734constants in <minix/config.h> with as much as you can spare. (1024 for
735NR_BUFS is the minimum to keep
736.B "cc \-c"
737cached. 2048 is then a nice value for NR_BUF_HASH.)
738Disable the second level cache, compile a new kernel, reboot and set
739.B ramsize
740to 0.
741.SS "22. LOTS OF DISK SPACE"
742The maximum file system size is 1 GB for MINIX-386 and 128 MB for
743MINIX-86. (MINIX-86 can handle larger file systems, but
744.B fsck
745can't check them.) Note that a MINIX file system can only contain 65535
746inodes (files), so the average file should be 16 kb to completely fill it.
747It may be better to make two smaller file systems. Besides, fsck takes
748forever on a large file system.
749.SH SYSTEM ADMINISTRATION
750The system has been set up with the idea that working as root is a bad thing
751to do. As root you are in no way protected from doing stupid things. So
752don't do development as root, but work as
753.BR bin !
754Only in exceptional cases do you want to become root. Being root is fun for
755wannabe hackers; administrators know better.
756.PP
757To make life easier for bin, some programs like
758.BR su (1),
759.BR install (1)
760and
761.BR shutdown (8)
762treat bin and other members of the operator group as special and allow them
763the privileges of root. (One is an operator if one's
764group id is zero.) Operators should share the shadow password of root by
765having
766.B ##root
767in their password field. This way they all have one face (password)
768to the outside world, forming no greater security risk than root alone.
769.PP
770The home directory of bin contains one important Makefile. You can use it
771to recompile all the commands and libraries of the system. Type
772.B make
773to see the usage message. If you want to compile just one command then you
774can simply type
775.B make
776to do so. To put it in its proper place you have to type
777.BR "make install" .
778Read the Makefiles in the
779.B commands
780and
781.B lib
782subdirectories to understand how everything is put together. If you are
783tight on memory then
784.B make
785may fail to traverse down the source tree and also compile things. You will
786have to type
787.B make
788in each subdirectory. You can run make in /usr/src at the end to see if
789you've missed something or not.
790.PP
791The shell used by MINIX is a minimal version of
792.BR ash ,
793the BSD shell. It has been modified to offer simple line editing using the
794.BR editline (3)
795library.
796.PP
797The kernel is not compiled from the master Makefile. To make a new kernel
798you have to step into the
799.B tools
800directory. There you can run four different make commands:
801.PP
802.TP
803.B make
804This makes all the different kernel parts and combines them in the file
805named
806.BR image .
807.TP
808.B make fdboot
809As above and then makes a boot floppy that you can use to restart your
810system with. You are prompted for the floppy device name.
811.TP
812.B make hdboot
813First makes the image file and then copies it into the directory
814.BR /minix .
815If there are already two images in that directory then the newest image will
816be removed to make space for this newer image. It is assumed that the
817oldest image is the most stable system image, one that always works, and
818that the newest image is experimental. Check beforehand what
819.B /minix
820contains before you run
821.BR "make hdboot" .
822Remove the oldest image if you want another image to become the stable
823image. The Boot Monitor chooses the newest image in
824.B /minix
825to boot. You can use the monitor command
826.B ls minix
827to view the images present, and set the
828.B image
829variable to the full name of the image you want to use instead if the newest
830doesn't work. The images in
831.B /minix
832are named using the MINIX release and version numbers with an extra revision
833number added to distinguish the images.
834.PP
835The first new kernel you would like to make is one configured for your
836system. The kernel you are running now contains several drivers
837you don't need, or may be missing drivers that you might want.
838In <minix/config.h> you can find a number of
839.BI ENABLE_ XXX
840variables that can be set to
841.B 0
842to exclude, or
843.B 1
844to include a particular driver. The full list of configurable parameters
845and what they do are described in
846.BR config (8).
847It is invaluable in figuring out what to change and how in <minix/config.h>.
848.PP
849Configuring a new kernel is sometimes not enough to enable new devices, you
850sometimes need to use the
851.B MAKEDEV
852command to make new device files in
853.BR /dev .
854For pseudo-ttys you also have to check if
855.B /etc/ttytab
856mentiones the new devices.
857.PP
858New additions to the system can be made in the
859.B /usr/local
860tree. An empty directory tree has been set up for you and binaries and
861manual pages are already in the search paths. You can make a new user entry
862with the
863.B adduser
864command.
865.PP
866The
867.B TZ
868variable in
869.B /etc/profile
870tells the time zone offset from the wall clock time to GMT. You have to
871change it for your time zone. (See
872.BR TZ (5).)
873.PP
874The function keys produce debug dumps, showing various interesting data
875about the system. F1 lists processes and F5 shows ethernet stats, which
876may be of use now. Read
877.BR console (4)
878to know all the details of the screen and keyboard.
879.SS "23. SYSTEM SHUTDOWN"
880You can't just turn a MINIX system off. MINIX must be told to flush the
881modified data in the file system cache first. The following
882commands/keystrokes can be used to exit MINIX properly:
883.TP
884.B shutdown
885First alert all users and then all processes of the impending shutdown
886then halt or reboot the system in one of various ways. See
887.BR shutdown (8).
888.TP
889.B reboot / halt
890Alert all processes of the system shutdown then reboot or halt.
891.TP
892.B \s-2CTRL\-ALT\-DEL\s+2
893Halt the system by running
894.BR "shutdown \-h now" .
895.PP
896MINIX halts by returning to the Boot Monitor, MINIX reboots by instructing
897the monitor to reboot MINIX. (MINIX is just a subprocess to the monitor.)
898Either halt MINIX and use monitor commands to escape MINIX, or use
899.B shutdown \-R
900to reset the system.
901.PP
902When exiting MINIX running under DOS the Boot Monitor's
903.B exit
904command will return you to the DOS prompt. The Boot Monitor and MINIX
905are together just a pretty big DOS program as far DOS is concerned.
906.SH FILES
907.TP 12
908.B /usr/ast
909Honorary home directory of Andrew S. Tanenbaum. Doubles as the place where
910the default setup for a new user is found.
911.SH "SEE ALSO"
912.BR dosminix (8),
913.BR monitor (8),
914.BR boot (8),
915.BR part (8),
916.BR mkfs (1),
917.BR mount (8),
918.BR M (8),
919.BR fstab (5),
920.BR hier (7),
921.BR config (8),
922.BR console (4),
923.BR dev (4),
924.BR adduser (8),
925.BR TZ (5),
926.BR mkdist (8),
927.BR shutdown (8).
928.br
929"Operating Systems \- Design and Implementation 2/e" by Andrew S. Tanenbaum
930and Albert S. Woodhull.
931.SH NOTES
932The notation
933.BI < file .h>
934refers to a C language include file in /usr/include.
935.PP
936.B Root
937and
938.B bin
939do not have the current directory in their program search path to avoid
940executing programs left around by malicious people. This means that to run
941.B foo
942from the current directory,
943.B ./foo
944must be typed.
945.SH BUGS
946There are many PS/2 models, all different. Some will run MINIX, some won't,
947some crippled if you lie to MINIX by setting
948.B processor
949to
950.BR 86 .
951Almost no PS/2 has a standard disk, so setting
952.B c0
953to
954.B esdi
955or
956.B bios
957will be necessary.
958.PP
959Except for the floppy driver, none of the DMA based drivers know about DMA
960being limited to a 24 bits address, i.e. the first 16 MB. So under MINIX-386
961you run a slight risk that a
962.B tar
963or
964.B dd
965command may use a buffer above 16 MB for reading or writing to a character
966device. This only happens if the low 16 MB is taken by some huge processes,
967and you have more than 16 MB, of course.
968.SH AUTHOR
969Kees J. Bot <kjb@cs.vu.nl>
Note: See TracBrowser for help on using the repository browser.