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

📄 usage.8

📁 Unix操作系统minix 2.0源码
💻 8
📖 第 1 页 / 共 3 页
字号:


USAGE(8)                  Minix Programmer's Manual                   USAGE(8)


NAME
     usage - installing and using Minix

DESCRIPTION
     This manual page describes the installation  and  use  of  Minix  from  a
     System  Administrators point of view.  It contains an installation guide,
     instructions on how to do the initial configuration and some other  info.
     Please  read  this  document entirely before attempting to install Minix.
     The installation  steps  are  in  the  proper  order,  but  not  all  the
     information  you  may  need  is  presented  at  the  right moment.  Other
     detailed information that may be useful  can  be  found  in  boot(8)  and
     hier(7).

  1. REQUIREMENTS
     The minimum system Minix can be installed on comfortably is an IBM  PC/AT
     or  PS/2  with a 286 processor, 2 Mb memory, a 720 kb diskette drive, and
     30 Mb free space on an AT, ESDI, or SCSI hard disk (the latter controlled
     by  an  Adaptec  1540.)   Minix  for the 386 (Minix-386 for short) can be
     installed on a machine with at least a 386sx processor and 3 Mb memory.

  2. MINIX INSTALLATION BACKGROUND
     The objective of the installation is to create a partition on  your  disk
     and  to put Minix into it.  Minix really requires two partitions however,
     so the single "primary" partition is split into two subpartitions.  The a
     subpartition  will  contain  the root file system, and the c subpartition
     will contain the /usr file system.  What MS-DOS calls "drives",  i.e  C:,
     D:,  E:,  Minix  calls "file systems".  Minix does not use drive letters,
     but requires that one file system is made a part of another  file  system
     by "mounting" one on the other.  The "root" file system is always present
     and starts with the directory "/", the root of the directory  tree.   The
     root  file  system contains a few programs in /bin, device files in /dev,
     and configuration files in /etc.  This is just enough to get  the  system
     started.   Minix  will  soon extend its directory tree by mounting a file
     system on the /usr directory.  What is henceforth known as the /usr  file
     system  contains  all  Minix programs in /usr/bin, file system sources in
     /usr/src, etc, etc.  The ROOT image contains the complete Minix root file
     system,  but  USR  contains  just a small subset of the /usr file system,
     with just enough utilities to install  Minix.   The  complete  /usr  file
     system  is  split  up into the USR.TAZ, SYS.TAZ and CMD.TAZ archives that
     are installed later to fill /usr.

     Let's suppose your first hard disk, which has device name  /dev/hd0,  has
     MS-DOS  already  present  in  the first primary partition (/dev/hd1), and
     some free space left after that.  After Minix is installed in  that  free
     space the disk will look like this:

         /dev/hd0    Whole hard disk #0
           /dev/hd1    MS-DOS C: drive
           /dev/hd2    Minix primary partition
             /dev/hd2a   Minix root partition


                                                                             1



USAGE(8)                  Minix Programmer's Manual                   USAGE(8)


             /dev/hd2c   Minix /usr partition

     /dev/hd0 is  the  sum  of  a  partition  table,  /dev/hd1  and  /dev/hd2.
     Likewise  is  /dev/hd2  the  sum  of  a subpartition table, /dev/hd2a and
     /dev/hd2c.  Read the "DEVICES" sections for  more  information  on  Minix
     devices.

  3. INSTALLATION
     You can install Minix automatically or manually as described the sections
     below.  The end result is the same, but manual installation allows one to
     deviate from the preconfigured choices.  You may wish to read the  manual
     pages  of  the  programs used below before you start.  You may especially
     want to read boot(8) if your machine is different from what the  majority
     buys,  because  you  may  need  to set a few boot parameters to configure
     drivers.  To do this type ESC to get to the Boot Monitor prompt, set  the
     appropriate  variables,  use  save  to  store  the  settings  and menu to
     continue where you left off.

     To install the system you need two diskettes: a  bootable  root  diskette
     and  a  diskette  full  of  binaries to use as /usr.  These diskettes are
     named ROOT and USR.  These two diskettes may also be combined on a single
     high density diskette.  In that case the USR part is on the c partition.

     Insert the ROOT diskette, boot the machine and type '=' to the menu.  The
     Minix  kernel  is  loaded  and  takes  control when you see the copyright
     banner.  After loading the root diskette into the RAM disk  you  will  be
     asked to finish the name of the device to mount on /usr.  Type fd0c for a
     diskette that contains both ROOT and USR, otherwise replace ROOT  by  USR
     and type fd0.  Login as root.

  4. AUTOMATIC INSTALLATION
     Type setup to start the installation script.  First it offers to  install
     a  national keyboard map.  The names should be clear, except for us-swap,
     which swaps the CTRL and CAPS LOCK keys of a standard US  style  keyboard
     for  people who believe that the natural place of CTRL is next to A.  The
     default suggested between [ and ] is the US standard keyboard.

     The next thing to do is to make a partition, for this you are placed in a
     partition  table  editor named part.  This partition table editor is very
     easy to use (in the author's opinion), but you  will  probably  hate  it.
     You  can  move all over the place with the arrow keys, change values, and
     make a mess of your partition table real  quick.   So  if  you  get  into
     trouble,  type  'q'  to  quit,  'n' to not write the table, and RETURN to
     start over.  Use the '?' key to get help.

     With the '+' and '-' keys you can select the disk device to  install  on,
     probably  /dev/hd0,  the first hard disk.  Type 'r' to load the partition
     table of the selected disk.  Either create one new partition by modifying
     a partition marked "None", or reuse an existing partition by changing its
     type to "MINIX" (hex code 81).  The FIPS program can be used under MS-DOS


                                                                             2



USAGE(8)                  Minix Programmer's Manual                   USAGE(8)


     to shrink an MS-DOS partition.  FIPS splits the DOS partition in two,  so
     one  of  the  two  can be used for Minix.  You have to be absolutely sure
     which one.  When in doubt, first use  the  FDISK  program  under  DOS  to
     delete  the extra partition, and let Minix part create a new one.  DO NOT
     use part to shrink an existing partition!  Minix needs a partition of  at
     least  20  Mb, but not larger than 128 Mb (Minix-86) or 1 Gb (Minix-386).
     The system needs 30 Mb in compiled state.

     The script then wants to know the name of the partition  you've  created,
     this  name  is  probably still visible on the screen (hd2, hd6, something
     like that.)  The new partition table is reloaded into  the  disk  driver,
     and  the  new Minix partition is carved up into two subpartitions, a 1440
     kb root and the rest for /usr.

     After  making  /usr,  it  is  immediately  put  to  use  to  replace  the
     installation /usr file system so that you can remove the USR diskette and
     insert the ROOT diskette (unless they are one and the  same).   The  root
     file system is filled with the contents of the ROOT diskette and slightly
     patched up to work on the hard disk (/etc/fstab.)

     To compute the size of the so-called "second level block cache"  you  are
     asked to specify the RAM size of your machine.  If you have plenty, i.e 4
     Mb or more then simply hit RETURN,  otherwise  enter  the  size  of  your
     system RAM in kilobytes.

     You can now skip the next section and move to "TESTING", but  it  may  be
     instructive to read it anyway.

  5. MANUAL INSTALLATION
     The instructions that follow are at a very low level and require  you  to
     be very careful.  The big advantage is that you know precisely what tools
     have been used and how everything works.  The disadvantage  is  that  you
     may easily make a mistake that either forces you to start over if you are
     lucky, or wipes out the contents of your hard disk if you are not.   Only
     if  you  really  want  to  do something different should you use a manual
     installation.  Slavishly following the steps shown below will  only  make
     you end up with the same result as an automatic installation.

     Run part to make partitions to load the system into.  The best  thing  to
     do  is  to  make one large primary partition of type "MINIX" and to carve
     this partition up into  three  subpartitions  for  root  and  /usr.   The
     assumption  is  that  you will use the second partition on the first hard
     disk, /dev/hd2, and that hd2a is the root subpartition and hd2c is  /usr.
     If  you  want  to  use  the  first  partition on the second hard disk for
     instance, then substitute hd6 and hd6[ac] for the above.  On a SCSI  disk
     it  will  be  /dev/sd2  for the second partition on the disk at target 0.
     See the section on devices below, and the manual pages of part(8), hd(4),
     and  sd(4).   Start  part  and  select  the  whole  hard disk device (the
     "multiple of 5" device) that you want to  install  Minix  onto.   In  our
     example it will be /dev/hd0.


                                                                             3



USAGE(8)                  Minix Programmer's Manual                   USAGE(8)


     Use part to make a single partition in the  primary  partition  table  of
     type  "MINIX",  then hit '>' on this new partition to make a subpartition
     table.

     For the root subpartition you are advised to use 1440  kb  exactly.   You
     can  make  it larger if you want to, but it is advisable never to let the
     contents outgrow a floppy.  (The ROOT diskette is a copy of a  root  file
     system, and will be used to fill your root subpartition.)

     The second subpartition is either empty or a "scratch" partition.   Minix
     no longer uses the b subpartition for anything useful anymore, but it has
     become customary to have root on a and /usr  on  c.   (You  are  free  to
     ignore this convention, of course.)

     Use the rest of the partition for the /usr c subpartition.

     When you are done check  that  /dev/hd2a  is  active  (the  *  after  the
     partition number) so you can boot from it later.

     If your  disk  has  bad  blocks  then  don't  put  the  root  or  scratch
     subpartition  on  top  of  them.  Make sure the inode tables in the other
     partitions don't have bad blocks either.  You can put  the  subpartitions
     out  of order on the disk if that helps.  Subpartition tables, other than
     the main partition table, are not sorted by the driver.

     After making the partitions you do not have to reboot.  The  disk  driver
     reloads  the  partition  tables  on the next access if the disk is not in
     use.  (Open or mounted.)

     To be able to boot from /dev/hd2a you must place a  master  bootstrap  in
     /dev/hd2.   It  has  been placed there by part if it told you that it was
     creating a new partition table, but

          installboot -m /dev/hd2 /usr/mdec/masterboot

     will put it there for sure.

     You will start by making a file system for /usr and filling it partially.
     This  may  seem  to be out of order, but you can't insert the ROOT floppy
     right now.

          mkfs /dev/hd2c
          readall -b /dev/hd2c | sh
          mount /dev/hd2c /mnt
          cpdir -v /usr /mnt

     This will create a file system on /dev/hd2c, mount it on /mnt,  and  copy
     the  contents  of  the USR floppy onto it.  The call to readall marks bad
     blocks on the file system as unusable, you can omit this on a drive known
     to be spotless (IDE or SCSI.)


                                                                             4



USAGE(8)                  Minix Programmer's Manual                   USAGE(8)


     You can now use the new /usr in place of the USR floppy:

          umount /dev/hd2c
          umount /dev/fd0     # fd0c if combined
          mount /dev/hd2c /usr

     This little dance has freed up your floppy drive, so  please  remove  the
     USR diskette and replace it by the ROOT diskette.  Make a file system for
     the root with at least 512 inodes (files), and fill it from the floppy:

          mkfs -i 512 /dev/hd2a
          mount /dev/fd0 /fd0
          mount /dev/hd2a /mnt
          cpdir -v /fd0 /mnt
          umount /dev/fd0

⌨️ 快捷键说明

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