⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 usage.8

📁 minix操作系统最新版本(3.1.1)的源代码
💻 8
📖 第 1 页 / 共 3 页
字号:
in other situations than described here..SS "15. VIRTUAL CONSOLES"Hold down the ALT key and press the left or right arrow key, F1, or F2.This switches the console between two login sessions.  (Unless you havean old mono adapter, because virtual consoles sit in video memory, anda mono adapter only has memory for one.).PPNote that kernel messages, including function key output, only appear onthe first console.  This may be confusing, but it keeps the other consolesclean..SS "16. LOW ON MEMORY"The normal installation requires that you have enough memory for a large RAMdisk.  You can still install MINIX normally if you either have a high densitydiskette drive for a combined root+usr floppy, or you have two floppy drivesof at least 720 kb.  Before booting you have to set the variable.B rootdevto the same value as.BR ramimagedev .This is slower then a RAM disk, but saves a lot of memory..PPThe automatic installation script knows how to handle this new situation.If you install manually then you have to use.PP.XB "cpdir\0\-vx\0/\0/mnt".PPto copy the root device to disk.  When it is time to fill /usr and you onlyhave one floppy drive then hit DEL to get out of the installation script andreboot as described in "TESTING".  You can then finish the installationmanually..igSee the XT640K.TXT file for more advice on small machines....SS "17. LOW ON MEMORY AND ONLY ONE 720 KB FLOPPY DRIVE"If you only have one 720 kb floppy drive and your system is low on memorythen you can use the \s-2TINYROOT.MNX\s+2 boot image.  This image contains asmall kernel with only the BIOS disk driver, and a small root file system.You can use this disk to boot your machine.  Use the normal \s-2ROOT.MNX\s+2 toinstall the root file system.  Keep booting your machine with\s-2TINYROOT\s+2 until you have compiled a small kernel for your system.Use the.B rootdevboot variable to select the hard disk root file system.  Do.B notuse \s-2TINYROOT\s+2 for anything other than booting, always use\s-2ROOT\s+2 when mentioned..SS "18. FLOPPY DRIVE 1 IS A HIGH DENSITY DRIVE"If you would like to install from floppy drive 1 then you need to copy atleast one sector from the \s-2USR\s+2 image onto a diskette for drive 0.The \s-2USR\s+2 bootstrap has been rigged to boot the other drive..SS "19. INSTALLING ON A SECOND HARD DISK"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\0/dev/c0d0\0/usr/mdec/jumpboot\01".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 Windows fdisk.  First verify that theBoot Monitor can boot a Windows partition, because then the MINIX masterbootstrap can do it too..SS "20. LOTS OF MEMORY ON A 286"You will have a hard time making MINIX use up 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 "21. LOTS OF MEMORY ON A 386+"Processes can be as big as you would like on a 386, but in practice 4 MB isa lot, and 8 MB is infinite.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 by setting.B ENABLE_CACHE2to 0 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 "22. 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 shell used by MINIX is a minimal version of.BR ash ,the BSD shell.  It has been modified to offer simple line editing using the.BR editline (3)library..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 driversyou don't need, or may be missing drivers that you might want.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.  The full list of configurable parametersand what they do are described in.BR config (8).It is invaluable in figuring out what to change and how in <minix/config.h>..PPConfiguring 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 "23. 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..PPWhen exiting MINIX running under DOS the Boot Monitor's.B exitcommand will return you to the DOS prompt.  The Boot Monitor and MINIXare together just a pretty big DOS program as far DOS is concerned..SH FILES.TP 12.B /usr/astHonorary home directory of Andrew S. Tanenbaum.  Doubles as the place wherethe default setup for a new user is found..SH "SEE ALSO".BR dosminix (8),.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 config (8),.BR console (4),.BR dev (4),.BR adduser (8),.BR TZ (5),.BR mkdist (8),.BR shutdown (8)..br"Operating Systems \- Design and Implementation 2/e" by Andrew S. Tanenbaumand Albert S. Woodhull..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..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 c0to.B esdior.B bioswill be necessary..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 + -