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

📄 monitor.8

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


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


NAME
     monitor, edparams - load and start Minix, modify boot parameters

SYNOPSIS
     edparams device [command ...]
     boot.com virdisk

DESCRIPTION
     This text describes the Boot Monitor, a  boot  time  interactive  program
     designed  not  only to load and start Minix, its most important task, but
     to also provide an easy to use interface to configure Minix and  to  boot
     other operating systems.

     The monitor is controlled with an environment that is modeled  after  the
     Bourne  shell.  This environment is filled at startup with default values
     that depend on the machine the monitor is running on and the  environment
     settings  saved  into  the boot parameters sector (the second sector on a
     device).  When the  environment  is  loaded,  the  monitor  executes  the
     function named main, which by default starts a simple menu.

     The environment can be manipulated at boot time from the monitor  prompt,
     but  may  also  be  edited  using  edparams  on a given device.  Edparams
     simulates the monitor as much  as  it  can,  echoing  commands  it  can't
     execute  between  brackets.  It can also be used in Makefiles and scripts
     by giving it commands as arguments.

     The MS-DOS version of the monitor,  usually  named  boot.com  under  DOS,
     boots Minix from a "DOS virtual disk".  (See below.)

COMMANDS
     The monitor is best described by the commands you can  type  to  the  '>'
     prompt.  This is known as the "monitor mode".  You can enter this mode by
     hitting the Escape key.  These are the monitor commands:

     name = [device] value

          Set environment variable.
          Changes the value of name to value.  The optional word device  marks
          name  as  being  subject to device translation.  (See the section on
          devices.)  These (name, value) pairs are passed to  the  kernel  who
          uses  them  to  configure  itself.   These  variables  are passed by
          default:

          rootdev
               This is the device used as your root device.  It is by  default
               set   to   ram,  which  means  that  the  device  specified  by
               ramimagedev will be loaded into the RAM disk and used as  root.
               If you change this variable then a physical device will be used
               as root, and the RAM disk will be uninitialized  and  have  the
               size specified by ramsize.


                                                                             1



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


          ramimagedev
               Describes the device to use  to  initialize  the  RAM  disk  if
               rootdev  is  set  to  ram.   It's  by default set to bootdev, a
               special name for the device the monitor booted from.

          ramsize
               The size of the RAM disk.  If the RAM disk is used for the root
               file  system  then  the  root  file  system is stretched out to
               ramsize if possible.

          processor
               Set by default to 86, 186, 286, 386, 486, ...  depending on the
               hardware  you  have.  You can set it to a smaller value to test
               your kernel in a more limited environment.

          bus
               The type of system bus, either xt, at  or  mca.   This  answers
               basic  questions  like: "How many interrupt controllers and how
               to initialize?"  Or: "Does the keyboard have LEDs?"

          memsize
               Kilobytes of conventional memory.  This is the  amount  of  RAM
               within the first megabyte.

          emssize
               Kilobytes of extended memory.

          video
               Describes capabilities of the VDU:  mda, cga, ega or vga.

          chrome
               Either color or mono.

          console
               If set to a hexadecimal value makes the monitor  set  the  BIOS
               video  mode  to this value.  This allows the use of video modes
               with more rows or colums than the  standard  80x25  mode.   The
               kernel  must  of  course  be able to handle a nonstandard mode.
               More parameters may follow the mode number.  Warning:  Not  all
               monitors  can  handle  all  of  the  modes,  some  may generate
               frequencies that can damage your monitor.  Read the  manual  of
               card and monitor for details.

          Two variables are only used by the monitor,  even  though  they  are
          passed to the kernel too:

          image
               The name of the file containing the kernel  image,  by  default
               minix.   If  it  refers  to a directory however then the newest
               file inside the directory is chosen to  be  the  kernel  image.


                                                                             2



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


               The names inside /minix/ are best set to the Minix version  you
               are  using,  which looks good when the monitor prints its name.
               Rules for pretty printing image names:

                    A '/' or '_' is changed to a space.

                    The first letter is changed from lowercase to uppercase.

                    An 'r' if followed by a digit changes to " revision ".

          label
               If set then only processes marked with this label or without  a
               label are loaded from the image.

          Installboot -boot will create functions to select images and labels.
          These functions will set label and image and echo what you selected.
          The two numbers separated by a colon used as an image name tell  the
          starting sector and sector count of the image on disk.

     name() { ... }
          Define function.
          Functions may be used to bundle a set of commands, so that  you  can
          easily  boot  Minix  with a different set of parameters then normal.
          E.g.

               ram() { rootdev=ram; boot }

          will allow you to run Minix with  the  root  device  on  RAM  for  a
          change, if you normally use a real device as root.  The only pre-set
          function is main with default  value  menu,  which  is  the  default
          command executed by the monitor.  You can use newlines after the ')'
          token, the monitor will then use a '+' prompt and ask for the rest.

     name(key) { ... }
          Define kernel selecting function.
          The menu command uses functions like these to add  menu  entries  to
          select  a  different  kernel  from  a  boot disk.  Installboot -boot
          produces these functions when the images are labeled.  The label  AT
          would give:

               AT(a) {label=AT;image=42:626;echo AT kernel selected;menu}

          With the menu option:

               a       Select AT kernel

          Typing a will then execute the AT function above.

     name(key,text) { ... }
          User defined menu option.


                                                                             3



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


          This variant may be used to make any menu entry you like:

               dos(d,Boot MS-DOS) { boot hd1 }

          Text may be anything, even parentheses if they match.

     name
          Call function.
          If name is a user defined function then its value  is  expanded  and
          executed  in  place  of  name.   Try  a  recursive  one  like 'rec()
          {rec;xx}' one day.  You can see the monitor run out  of  space  with
          nice messages about using chmem(1) to increase it's heap.

     boot [-opts]
     boot device
          Boot Minix or another O.S.
          Without an argument, boot will load  and  execute  the  Minix  image
          named  by the image variable.  With options the variable bootopts is
          first set to -opts before Minix is started,  and  unset  when  Minix
          returns.   With  a  device  argument,  boot loads the boot sector of
          device into memory and  jumps  to  it,  starting  another  operating
          system.   You  would  normally use partitions on the first hard disk
          for this command (hd[1-4]), using hd0 will also work  (choosing  the
          active  partition).   One  can  also boot devices on the second hard
          disk (hd[5-9]) if the bootstrap writer did  not  hardwire  the  disk

⌨️ 快捷键说明

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