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

📄 install.txt

📁 操作系统设计与实现源码
💻 TXT
📖 第 1 页 / 共 3 页
字号:
   
     18. INSTALLING ON A SECOND HARD DISK
        MINIX doesn't care if it is installed on the second disk  of
        a  system  with  two  disks.   The only problem is to get it
        booted.  You can either rig up a diskette to boot  MINIX  as
        shown  earlier,  or  you can use the same trick on the first
        disk.  The command
   
             installboot -m 5 /dev/hd0 /usr/mdec/masterboot
   
        will lock the first disk into booting the second disk.  Note
        that  this  command modifies the disk outside a MINIX parti-
        tion, overwriting a bit of code that  has  likely  been  put
        there  by  MS-DOS fdisk.  First verify that the Boot Monitor
        can boot an MS-DOS partition, because then the MINIX  master
        bootstrap can do it too.
   
     19. LOTS OF MEMORY ON A 286
        You will have a hard time making MINIX use up 3  MB  memory.
        Memory  you  can spare can be used for a "second level block
        cache" on the RAM disk.  The File  System  uses  the  second
        level  cache  to store copies of disk blocks that are pushed
        out of the normal (primary) block cache.  The  size  of  the
        primary  cache  is compiled into the FS server, but the size
        of the second level cache can be set with the  ramsize  boot
        variable.   Set it to a number between 0 and 512.  512 kilo-
        bytes is enough to keep most of the  compiler  cached.   You
        must have extended memory; expanded memory is not supported.
   
     20. LOTS OF MEMORY ON A 386+
        Processes can be as big as you would like on a 386,  but  in
        practice 4 MB is plenty for all your processes.  The instal-
        lation script sets up a second level cache for MINIX-386  of
        up to 1024 kilobytes.  This is because the default file sys-
        tem cache is only 80 kb.  Your first point of call is to get
        rid  of  the poorly performing second level cache by setting
        ENABLE_CACHE2 to 0 and to assign the memory used  by  it  to
        the  normal block cache by enlarging the appropriate NR_BUFS
        and NR_BUF_HASH constants in <minix/config.h> with  as  much
        as  you can spare.  (1024 for NR_BUFS is the minimum to keep
   
   
   
                                    10

   
   USAGE(8)             Maintenance Procedures              USAGE(8)
   
   
   
        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 ramsize to 0.
   
     21. LOTS OF DISK SPACE
        The maximum file system size is 1 GB for MINIX-386  and  128
        MB  for MINIX-86.  (MINIX-86 can handle larger file systems,
        but fsck can't check them.)  Note that a MINIX  file  system
        can  only  contain 65535 inodes (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 takes forever
        on a large file system.
   
   SYSTEM ADMINISTRATION
        The system has been set up with the  idea  that  working  as
        root  is  a bad thing to do.  As root you are in no way pro-
        tected from doing stupid things.  So don't do development as
        root,  but  work  as  bin!  Only in exceptional cases do you
        want to become root.  Being root is fun for wannabe hackers;
        administrators know better.
   
        To make life easier  for  bin,  some  programs  like  su(1),
        install(1)  and  shutdown(8)  treat bin and other members of
        the operator group as special and allow them the  privileges
        of  root.   (One  is an operator if one's group id is zero.)
        Operators should share the shadow password of root by having
        ##root  in their password field.  This way they all have one
        face (password) to the outside  world,  forming  no  greater
        security risk than root alone.
   
        The home directory of bin contains one  important  Makefile.
        You  can  use it to recompile all the commands and libraries
        of the system.  Type make to see the usage message.  If  you
        want  to  compile  just one command then you can simply type
        make to do so.  To put it in its proper place  you  have  to
        type  make  install.  Read the Makefiles in the commands and
        lib subdirectories  to  understand  how  everything  is  put
        together.   If you are tight on memory then make may fail to
        traverse down the source tree and also compile things.   You
        will  have  to  type make in each subdirectory.  You can run
        make in /usr/src at the end to see if  you've  missed  some-
        thing or not.
   
        The login shell of bin is ash, the BSD shell.  It  has  been
        modified  to offer simple line editing using the editline(3)
        library.  Ash is rather big, so you may have to change bin's
        shell back to /bin/sh with chsh(1) if you are low on memory.
        Do not change root's  shell  to  ash,  and  do  not  replace
        /bin/sh  by  ash.   It  may  run  out of memory at the wrong
        moment.
   
   
   
   
   
                                  11

   
   USAGE(8)             Maintenance Procedures              USAGE(8)
   
   
   
        The kernel is not compiled from  the  master  Makefile.   To
        make a new kernel you have to step into the tools directory.
        There you can run four different make commands:
   
        make This makes all the different kernel parts and  combines
             them in the file named image.
   
        make fdboot
             As above and then makes a boot floppy that you can  use
             to  restart your system with.  You are prompted for the
             floppy device name.
   
        make hdboot
             First makes the image file and then copies it into  the
             directory  /minix.   If there are already two images in
             that directory then the newest image will be removed to
             make  space  for  this newer image.  It is assumed that
             the oldest image is the most stable system  image,  one
             that always works, and that the newest image is experi-
             mental.  Check beforehand what /minix  contains  before
             you  run  make  hdboot.  Remove the oldest image if you
             want another image to become  the  stable  image.   The
             Boot  Monitor  chooses  the  newest  image in /minix to
             boot.  You can use the monitor command ls minix to view
             the  images  present, and set the image variable to the
             full name of the image you want to use instead  if  the
             newest  doesn't  work.   The images in /minix are named
             using the MINIX release and  version  numbers  with  an
             extra revision number added to distinguish the images.
   
        The first new kernel you would like to make is  one  config-
        ured  for  your system.  The kernel you are running now con-
        tains several hard disk drivers you don't need, and it  does
        not  have  a  TCP/IP  server  that you may want to have.  In
        <minix/config.h> you can find a number of  ENABLE_XXX  vari-
        ables  that  can  be  set to 0 to exclude, or 1 to include a
        particular  driver.   Another  driver  related  variable  is
        DMA_SECTORS.   This  variable sets the size of a buffer used
        by DMA based disk drivers (all but the floppy,  AT/IDE,  and
        Adaptec  drivers).   Raise  its  value  to  greatly  improve
        throughput, especially writing.  A value of  16  shows  good
        results.   (The  BIOS  driver benefits most, because it is a
        long way to the BIOS from protected  mode,  especially  from
        286  protected  mode.)  You can increase NR_CONS if you want
        to have more virtual consoles.  Having more  consoles  costs
        little  memory,  because  all the consoles are kept in video
        memory.  Scrolling speed of the console will go down if more
        virtual consoles share the available memory.  CGA cards have
        space for 4 consoles, EGA and VGA can have 8 consoles.   The
        NR_PTYS  variable  sets the number of pseudo-ttys.  You need
        pseudo-ttys to be able to login remotely over a network with
        the  rlogin  command.   Each  remote login session needs one
   
   
   
                                   12

   
   USAGE(8)             Maintenance Procedures              USAGE(8)
   
   
   
        pseudo-tty.  If you fear that the system will now run out of
        processes  then increase NR_PROCS.  Configuring a new kernel
        is sometimes not enough to enable new devices, you sometimes
        need  to use the MAKEDEV command to make new device files in
        /dev.  For pseudo-ttys you also have to check if /etc/ttytab
        mentiones the new devices.
   
        New additions to the system can be made  in  the  /usr/local
        tree.   An  empty directory tree has been set up for you and
        binaries and manual pages are already in the  search  paths.
        You can make a new user entry with the adduser command.
   
        The TZ variable in /etc/profile tells the time  zone  offset
        from  the wall clock time to GMT.  You have to change it for
        your time zone.  (See TZ(5).)
   
        The function  keys  produce  debug  dumps,  showing  various
        interesting  data  about the system.  F1 lists processes and
        F5 shows ethernet stats, which may be of use now.  Read con-
        sole(4) to know all the details of the screen and keyboard.
   
     22. SYSTEM SHUTDOWN
        You can't just turn a MINIX system off.  MINIX must be  told
        to  flush  the modified data in the file system cache first.
        The following commands/keystrokes can be used to exit  MINIX
        properly:
   
        shutdown
             First alert all users and then  all  processes  of  the
             impending  shutdown  then  halt or reboot the system in
             one of various ways.  See shutdown(8).
   
        reboot / halt
             Alert all processes of the system shutdown then  reboot
             or halt.
   
        CTRL-ALT-DEL
             Halt the system by running shutdown -h now.
   
        MINIX halts by returning to the Boot Monitor, MINIX  reboots
        by  instructing the monitor to reboot MINIX.  (MINIX is just
        a subprocess to the monitor.)  Either  halt  MINIX  and  use
        monitor  commands  to  escape  MINIX,  or use shutdown -R to
        reset the system.
   
   FILES
        /usr/ast    Honorary home directory of Andew  S.  Tanenbaum.
                    Doubles as the place where the default setup for
                    a new user is found.
   
   SEE ALSO
        monitor(8),  boot(8),  part(8),  mkfs(1),  mount(8),   M(8),
   
   
   
                                    13

   
   USAGE(8)             Maintenance Procedures              USAGE(8)
   
   
   
        fstab(5),  hier(7),  console(4),  dev(4), adduser(8), TZ(5),
        mkdist(8), shutdown(8).
        "Operating Systems  -  Design  and  Implementation  2/e"  by
        Andrew S. Tanenbaum and Albert S. Woodhull.
   
   NOTES
        The notation <file.h> refers to a C language include file in
        /usr/include.
   
        Root and bin do not have the current directory in their pro-
        gram  search path to avoid executing programs left around by
        malicious people.  This means  that  to  run  foo  from  the
        current directory, ./foo must be typed.
   
        Some of the commands have changed since earlier  MINIX  ver-
        sions.   For  instance  mkfs  doesn't  need  a size argument
        anymore, and vol automagically determines  if  it  needs  to
        read  or write.  Keep this in mind if you use an older MINIX
        version to examine the newer system.
   
   BUGS
        There are many PS/2 models, all different.   Some  will  run
        MINIX, some won't, some crippled if you lie to MINIX by set-
        ting processor to 86.  Almost no PS/2 has a  standard  disk,
        so setting hd to esdi or bios will be necessary.
   
        While testing a full library rebuild of this distribution it
        sometimes  happened  that some things were not put back into
        the library.  This seems to be fixed, but we do  not  under-
        stand  why the fix fixed the problem.  So if you see strange
        "undefined" errors when compiling a program after a  library
        rebuild  then run make install again in /usr/src/lib/ to try
        and add the missing pieces.
   
        Except for the floppy driver, none of the DMA based  drivers
        know  about DMA being limited to a 24 bits address, i.e. the
        first 16 MB.  So under MINIX-386 you run a slight risk  that
        a tar or dd command may use a buffer above 16 MB for reading
        or writing to a character device.  This only happens if  the
        low 16 MB is taken by some huge processes, and you have more
        than 16 MB, of course.
   
   AUTHOR
        Kees J. Bot (kjb@cs.vu.nl)
   
                                      14

   

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -