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

📄 monitor.8

📁 Unix操作系统minix 2.0源码
💻 8
📖 第 1 页 / 共 2 页
字号:
          number to disk 0.
          Some Operating Systems can only be booted from the active partition,
          if  you  use  a '*', e.g.  boot *hd3, then partition 3 is first made
          active.  You'll then need to use installboot -master with a fix  key
          to forcefully boot the Minix partition at startup.

     delay [msec]
          Delay (500 msec default).
          Fast booting speed was one of the objectives when this  program  was
          created,  so  a  hard  disk  boot usually takes only a fraction of a
          second.  If you need some time (to  hit  Escape,  or  stare  at  the
          numbers) you can use delay to make the monitor pause for a specified
          amount of time.  To specify a delay just before  Minix  is  started,
          you  can  set  the  variable  delay  to  a  number  of milliseconds.
          Example:

               main() {delay 250; delay=500; boot}

          Look at this carefully, 'delay 250'  means:  "wait  1/4  sec  now!",
          while 'delay=500' means: "wait 1/2 sec after loading Minix".

          If you use delay=swap then the monitor  will  wait  until  you  have
          inserted a root diskette and typed RETURN.

     echo word ...


                                                                             4



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


          Print these words.
          Used to tell you that you just selected image X.

     ls [directory]
          List contents of a directory.
          Useful when looking for kernel images.

     menu
          Menu driven startup.
          This command allows you to execute functions defined with a key.  If
          no  menu  functions  have  been  defined then menu will use this one
          hidden built-in function:

               *(=,Start Minix) { boot }

          Kernel selecting functions only add new options to this set, but  if
          you define a two argument function yourself then the above one is no
          longer shown, allowing you to customize the menu  completely.   Your
          first function definition should therefore be one that starts Minix.

          Menu entries are shown in the same order as set shows them.  If  you
          don't like the order then you have to unset the functions and retype
          them in the proper order.

          If you  type  a  key  then  a  scheduled  trap  is  killed  and  the
          appropriate  menu  function  is  executed.  If you need more time to
          choose then hit the spacebar.  A key not on the menu  also  kills  a
          trap, but does nothing more.

     save
          Save environment.
          This will save all the  environment  variables  and  functions  with
          nondefault  values to the parameter sector (the second sector on the
          boot device), so they are automatically set the next time  you  boot
          the monitor.

     set
          Show environment.
          Show the current values of the environment variables and  functions.
          Default  values  are  shown  between parentheses to distinguish them
          from values that were explicitly set.

     trap msec command
          Schedule command.
          Schedules a command to be executed after  msec  milliseconds.   Only
          the  monitor  mode cannot be interrupted, a scheduled trap is killed
          when the prompt is printed.  Example:

               main() {trap 10000 boot; menu}



                                                                             5



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


          This gives you 10 seconds to choose a menu option  before  Minix  is
          booted.

     unset name ...
          Unset environment variables.
          Removes the named variables and functions from the environment,  and
          sets  special  variables back to their default values.  This is also
          the only way to remove the "device name translation" property from a
          variable.

     exit
          Exit the monitor
          Reboot the machine, exit to Minix or exit to DOS as appropriate.

DEVICES
     The Minix kernel can't do anything with device names, so they have to  be
     translated  to device numbers before they are passed to the kernel.  This
     number is found under the st_rdev field (see stat(2)) of the file on  the
     boot  file  system.   The  monitor will look for the device file with the
     working directory set to '/dev'.  If it can't find the device  name  then
     it  will  translate  names like 'ram', 'fd1', 'hd6', 'hd3a', and 'sd2' to
     what it itself thinks the numbers should be.

     The special name bootdev is translated to the name of the  device  booted
     from, like 'fd0', or 'hd3', and then searched for in /dev.  Bootdev can't
     be translated to a device other then  the  fd  or  hd  devices,  so  SCSI
     devices for instance must be named explicitly.

EXTENSIONS
     A few extensions have been made to this program for kernel hackers.  They
     may  be triggered by setting bits in the flags word in the kernel startup
     code (the mpx file.)  The flag bits are:

     0x0001    Call kernel in 386 mode.

     0x0002    Do not make space for the bss areas of processes other then the
               kernel.

     0x0004    Use the stack size set by chmem(1).

     0x0008    Load MM, FS, etc. into extended memory.

     0x0010    No need to patch process sizes into the kernel.

     0x0020    The kernel can return to the monitor on halt or reboot.







                                                                             6



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


MS-DOS MONITOR
     Minix-vmd has a version of the monitor that runs under MS-DOS to  boot  a
     "DOS virtual disk".  It is a simple COM program that interprets an MS-DOS
     file as a disk, loads a Minix kernel from the  active  partition  in  the
     same  way as the BIOS based monitor, and executes it to start Minix.  All
     the monitor commands function in  the  same  way,  except  for  the  boot
     command,  it  can  only load Minix.  The memory that MS-DOS has in use is
     copied out of the way when Minix takes control, and is put back in  place
     when  Minix exits.  This memory shuffling also happens when the BIOS disk
     driver makes BIOS calls, slowing things to a crawl.  It is better to  use
     a  Minix  driver.   The MS-DOS monitor does not work if there is a memory
     manager active that runs in 386 protected mode, like EMM386.

SEE ALSO
     chmem(1), stat(2), installboot(8), usage(8), boot(8).

BUGS
     The delay command will hang forever on the original IBM PC (not the XT!).
     Not that it matters, as everything takes forever on that box.

     Reading the first sector to boot a floppy (e.g.  boot fd1), is done using
     whatever  floppy  parameters  boot  currently  has  available.  This will
     probably always work.

     The two forms of delay are a crock.

     The word emssize comes from EMS, that has to do with expanded memory, not
     extended memory.

ACKNOWLEDGMENTS
     Guy Helmer, for the floppy sensing code that somehow disappeared into the
     boot block.

     Earl Chew, for the inspiration his ShoeLace package provided,  unless  he
     wants  to  file  a  "look  and  feel"  suit against me, then I will say I
     modeled it after the SunOS ROM boot monitor, which is also true.

AUTHOR
     Kees J. Bot (kjb@cs.vu.nl)













                                                                             7

⌨️ 快捷键说明

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