📄 usage.8
字号:
Minix doesn't care if it is installed on the second disk of a system withtwo disks. The only problem is to get it booted. You can either rig upa diskette to boot Minix as shown earlier, or you can use the same trickon the first disk. The command.PP.XB "installboot\0\-m\05\0/dev/hd0\0/usr/mdec/masterboot".PPwill lock the first disk into booting the second disk. Note that thiscommand modifies the disk outside a Minix partition, overwriting a bit ofcode that has likely been put there by DOS fdisk. First verify that theBoot Monitor can boot a DOS partition, because then the Minix masterbootstrap can do it too..SS "19. LOTS OF MEMORY ON A 286"You will have a hard time making Minix run out of 3 Mb memory. Memory youcan spare can be used for a "second level block cache" on the RAM disk. TheFile System uses the second level cache to store copies of disk blocks thatare pushed out of the normal (primary) block cache. The size of the primarycache is compiled into the FS server, but the size of the second level cachecan be set with the.B ramsizeboot variable. Set it to a number between 0 and 512. 512 kilobytes isenough to keep most of the compiler cached..SS "20. LOTS OF MEMORY ON A 386+"Processes can be as big as you'd like on a 386, but in practice 4 Mb isnice. The installation script sets up a second level cache for Minix-386of up to 1024 kilobytes. This is because the default file system cacheis only 80 kb. Your first point of call is to get rid of the poorlyperforming second level cache and to assign the memory used by it to thenormal block cache by enlarging the appropriate.B NR_BUFSand.B NR_BUF_HASHconstants in <minix/config.h> with as much as you can spare. (1024 forNR_BUFS is the minimum to keep.B "cc \-c"cached. 2048 is then a nice value for NR_BUF_HASH.)Disable the second level cache, compile a new kernel, reboot and set.B ramsizeto 0..SS "21. LOTS OF DISK SPACE"The maximum file system size is 1 Gb for Minix-386 and 128 Mb forMinix-86. (Minix-86 can handle larger file systems, but.B fsckcan't check them.) Note that a Minix file system can only contain 65535inodes (files), so the average file should be 16 kb to completely fill it.It may be better to make two smaller file systems. Besides, fsck takesforever on a large file system..SH SYSTEM ADMINISTRATIONThe system has been set up with the idea that working as root is a bad thingto do. As root you are in no way protected from doing stupid things. Sodon't do development as root, but work as.BR bin !Only in exceptional cases do you want to become root. Being root is fun forwannabe hackers; administrators know better..PPTo make life easier for bin, some programs like.BR su (1),.BR install (1)and.BR shutdown (8)treat bin and other members of the operator group as special and allow themthe privileges of root. (One is an operator if one'sgroup id is zero.) Operators should share the shadow password of root byhaving.B ##rootin their password field. This way they all have one face (password)to the outside world, forming no greater security risk than root alone..PPThe home directory of bin contains one important Makefile. You can use itto recompile all the commands and libraries of the system. Type.B maketo see the usage message. If you want to compile just one command then youcan simply type.B maketo do so. To put it in its proper place you have to type.BR "make install" .Read the Makefiles in the.B commandsand.B libsubdirectories to understand how everything is put together. If you aretight on memory then.B makemay fail to traverse down the source tree and also compile things. You willhave to type.B makein each subdirectory. You can run make in /usr/src at the end to see ifyou've missed something or not..PPThe login shell of bin is.BR ash ,the BSD shell. It has been modified to offer simple line editing using the.BR editline (3)library..B Ashis rather big, so you may have to change bin's shell back to.B /bin/shwith.BR chsh (1)if you are low on memory. Do not change root's shell to ash, and do notreplace /bin/sh by ash. It may run out of memory at the wrong moment..PPThe kernel is not compiled from the master Makefile. To make a new kernelyou have to step into the.B toolsdirectory. There you can run four different make commands:.PP.TP.B makeThis makes all the different kernel parts and combines them in the filenamed.BR image ..TP.B make fdbootAs above and then makes a boot floppy that you can use to restart yoursystem with. You are prompted for the floppy device name..TP.B make hdbootFirst makes the image file and then copies it into the directory.BR /minix .If there are already two images in that directory then the newest image willbe removed to make space for this newer image. It is assumed that theoldest image is the most stable system image, one that always works, andthat the newest image is experimental. Check beforehand what.B /minixcontains before you run.BR "make hdboot" .Remove the oldest image if you want another image to become the stableimage. The Boot Monitor chooses the newest image in.B /minixto boot. You can use the monitor command.B ls minixto view the images present, and set the.B imagevariable to the full name of the image you want to use instead if the newestdoesn't work. The images in.B /minixare named using the Minix release and version numbers with an extra revisionnumber added to distinguish the images..PPThe first new kernel you would like to make is one configured for yoursystem. The kernel you are running now contains several hard disk driversyou don't need, and it does not have a TCP/IP server that you may want tohave. In <minix/config.h> you can find a number of.BI ENABLE_ XXXvariables that can be set to.B 0to exclude, or.B 1to include a particular driver. Another driver related variable is.BR DMA_SECTORS .This variable sets the size of a buffer used by DMA based disk drivers (allbut the floppy, AT/IDE, and Adaptec drivers). Raise its value to greatlyimprove throughput, especially writing. A value of 16 shows good results.(The BIOS driver benefits most, because it is a long way to the BIOS fromprotected mode, especially from 286 protected mode.) You can increase.B NR_CONSif you want to have more virtual consoles. Having more consoles costslittle memory, because all the consoles are kept in video memory. Scrollingspeed of the console will go down if more virtual consoles share theavailable memory. CGA cards have space for 4 consoles, EGA and VGA canhave 8 consoles. The.B NR_PTYSvariable sets the number of pseudo-ttys. You need pseudo-ttys to be able tologin remotely over a network with the.B rlogincommand. Each remote login session needs one pseudo-tty. If you fear thatthe system will now run out of processes then increase.BR NR_PROCS .Configuring a new kernel is sometimes not enough to enable new devices, yousometimes need to use the.B MAKEDEVcommand to make new device files in.BR /dev .For pseudo-ttys you also have to check if.B /etc/ttytabmentiones the new devices..PPNew additions to the system can be made in the.B /usr/localtree. An empty directory tree has been set up for you and binaries andmanual pages are already in the search paths. You can make a new user entrywith the.B addusercommand..PPThe.B TZvariable in.B /etc/profiletells the time zone offset from the wall clock time to GMT. You have tochange it for your time zone. (See.BR TZ (5).).PPThe function keys produce debug dumps, showing various interesting dataabout the system. F1 lists processes and F5 shows ethernet stats, whichmay be of use now. Read.BR console (4)to know all the details of the screen and keyboard..SS "22. SYSTEM SHUTDOWN"You can't just turn a Minix system off. Minix must be told to flush themodified data in the file system cache first. The followingcommands/keystrokes can be used to exit Minix properly:.TP.B shutdownFirst alert all users and then all processes of the impending shutdownthen halt or reboot the system in one of various ways. See.BR shutdown (8)..TP.B reboot / haltAlert all processes of the system shutdown then reboot or halt..TP.B \s-2CTRL\-ALT\-DEL\s+2Halt the system by running.BR "shutdown \-h now" ..PPMinix halts by returning to the Boot Monitor, Minix reboots by instructingthe monitor to reboot Minix. (Minix is just a subprocess to the monitor.)Either halt Minix and use monitor commands to escape Minix, or use.B shutdown \-Rto reset the system..SH FILES.TP 12.B /usr/astHonorary home directory of Andew S. Tanenbaum. Doubles as the place wherethe default setup for a new user is found..SH "SEE ALSO".BR monitor (8),.BR boot (8),.BR part (8),.BR mkfs (1),.BR mount (8),.BR M (8),.BR fstab (5),.BR hier (7),.BR console (4),.BR dev (4),.BR adduser (8),.BR TZ (5),.BR mkdist (8),.BR shutdown (8)..br"Operating Systems \- Design and Implementation" by Andrew S. Tanenbaum..SH NOTESThe notation.BI < file .h>refers to a C language include file in /usr/include..PP.B Rootand.B bindo not have the current directory in their program search path to avoidexecuting programs left around by malicious people. This means that to run.B foofrom the current directory,.B ./foomust be typed..PPSome of the commands have changed since earlier Minix versions. For instance.B mkfsdoesn't need a size argument anymore, and.B volautomagically determines if it needs to read or write. Keep this in mindif you use an older Minix version to examine the newer system..SH BUGSThere are many PS/2 models, all different. Some will run Minix, some won't,some crippled if you lie to Minix by setting.B processorto.BR 86 .Almost no PS/2 has a standard disk, so setting.B hdto.B esdior.B bioswill be necessary..PPWhile testing a full library rebuild of this distribution it sometimeshappened that some things were not put back into the library. This seemsto be fixed, but we do not understand why the fix fixed the problem. Soif you see strange "undefined" errors when compiling a program after alibrary rebuild then run.B make installagain in.B /usr/src/lib/to try and add the missing pieces..PPExcept for the floppy driver none of the DMA based drivers know about DMAbeing limited to a 24 bits address, i.e. the first 16 Mb. So under Minix-386you run a slight risk that a.B taror.B ddcommand may use a buffer above 16 Mb for reading or writing to a characterdevice. This only happens if the low 16 Mb is taken by some huge processes,and you have more than 16 Mb, of course..SH AUTHORKees J. Bot (kjb@cs.vu.nl)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -