📄 monitor.8
字号:
.TH MONITOR 8.SH NAMEmonitor, edparams \- load and start MINIX 3, modify boot parameters.SH SYNOPSIS.B /boot.br.B edparams.I device.RI [ command " ...]".br.B boot.com.I virdisk.RI [ command " ...]".SH DESCRIPTION.de SP.if t .sp 0.4.if n .sp..This text describes the Boot Monitor, a boot time interactive program designednot only to load and start MINIX 3, its most important task, but to alsoprovide an interface to configure MINIX 3 and to boot other operating systems..PPThe monitor is controlled with an environment that is modeled after theBourne shell. This environment is filled at startup with default valuesthat depend on the machine the monitor is running on and the environmentsettings saved into the boot parameters sector (the second sector on adevice). When the environment is loaded, the monitor executes the functionnamed.BR main ,which by default starts a simple menu..PPThe environment can be manipulated at boot time from the monitor prompt,but may also be edited using.B edparamson a given device..B Edparamssimulates the monitor as much as it can, echoing commands it can't executebetween brackets. It can also be used in Makefiles and scripts by givingit commands as arguments..PPThe DOS version of the monitor, usually named.B boot.comunder DOS, boots MINIX 3 from a "DOS virtual disk"..B Boot.comis a simple COM program that interprets a DOSfile as a disk, loads a MINIX 3 kernel from the active partition in the sameway as the BIOS based monitor, and executes it to start MINIX 3. All themonitor commands function in the same way, except for the.B bootcommand, it can only load MINIX 3. The monitor grabs as much free memory asit can for MINIX 3 to work in, as the.B memoryvariable shows. Further details on how to run MINIX 3 under DOS, Windows 95,or even Windows NT are written down in.BR dosminix (8)..SH COMMANDSThe 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 byhitting the Escape key. These are the monitor commands:.PP\fIname\fP = [\fBdevice\fP] \fIvalue\fP.SP.RSSet environment variable..brChanges the value of.I nameto.IR value .The optional word.B devicemarks.I nameas being subject to device translation. (See the section on devices.) These(name, value) pairs are passed to the kernel who uses them to configureitself. These variables are passed by default:.SP.B rootdev.RSThis is the device used as your root device. It is by default set to.BR ram,which means that the device specified by.B ramimagedevwill be loaded into the RAM disk and used as root. If you change thisvariable then a physical device will be used as root, and the RAM disk willbe uninitialized and have the size specified by.BR ramsize ..RE.SP.B ramimagedev.RSDescribes the device to use to initialize the RAM disk if.B rootdevis set to.BR ram .It's by default set to.BR bootdev ,a special name for the device the monitor booted from..RE.SP.B ramsize.RSThe size of the RAM disk. If the RAM disk is used for the root file systemthen the root file system is stretched out to.B ramsizeif possible..RE.SP.B processor.RSSet by default to.BR 86 ,.BR 186 ,.BR 286 ,.BR 386 ,.BR 486 ", ..."depending on the hardware you have. You can set it to a smaller value totest your kernel in a more limited environment..RE.SP.B bus.RSThe type of system bus, either.BR xt ,.BR ator.BR mca .This answers basic questions like: "How many interrupt controllers and howto initialize?" Or: "Does the keyboard have LEDs?".RE.SP.B memory.RSList of memory free for use by MINIX 3. It is a comma separated list of.IR base:sizepairs denoting the byte offsets and sizes of free memory in hexadecimal..B "800:925E0,100000:F00000"is a typical example of about 585K starting at 2K, and 15M starting at 1M.(The first 2K are BIOS parameters and the 53K under the 640K boundary isthe monitor itself.) The very last number you can play with if you knowwhat you are doing. Either increase it if the monitor has it wrong, ordecrease it to test if MINIX 3 still runs with less memory then normal..RE.SP.B video.RSDescribes capabilities of the VDU:.BR mda ,.BR cga ,.B egaor.BR vga ..RE.SP.B chrome.RSEither.B coloror.BR mono ..RE.SP.B c0.RSBy default.B at(AT compatibles),.B bios(XT or PS/2), or.B dosfile(running under DOS).The.B c0variable binds a driver to the first controller, i.e. the.B /dev/c0*devices. The monitor sets.B c0to a suitable default, so that most machines can find their disk..RE.SP.B console.RSIf set to a hexadecimal value it makes the monitor set the BIOS video mode tothis value when MINIX 3 is started.This allows the use of video modes with more rows or colums than thestandard 80x25 mode. You can use any text mode in the 00-FF range, and VESAextended modes in the 100-FFF range. Most text modes use a 9x16 font with400 scanlines on screen, so you see 400/16 = 25 lines. The text mode can bemodified by adding special flags to the console setting. Add2000 to switch to 480 scan lines, adding 20% more lines to the screen. Add4000 to select a 9x14 font, so 28 or 34 lines are shown. Add 8000 insteadto select an 8x8 font showing 50 or 60 lines. Each setting has drawbacks.Using 480 scanlines implies a 60 Hz refresh, so the screen may flicker. The8x8 font looks squashed. More letters on screen require more memory, so thereis less for virtual consoles. Interesting modes to try are 4003 (80x28),2003 (80x30), 6003 (80x34), 8003 (80x50), A003 (80x60), 109 (132x25),10A (132x43), 10B (132x50), 10C (132x60). The 109 VESA mode is oftenavailable, and can be modified like mode 3. Use mode 7 instead of 3 formonochrome. Which modes and flags work can only be found out by experiment.More parameters may follow the mode number that are of interestto the console driver, see.BR boot (8)..RE.SP.B dosfile-d0.RSSet by the DOS version of the monitor to the name of the virtual disk, i.e.the.I virdiskargument as shown above. The "dosfile" driverwill use this as the name of the file to use as a disk..RE.SPTwo variables are only used by the monitor, even though they are passed to thekernel too:.SP.B image.RSThe name of the file containing the kernel image, by default.BR minix .If it refers to a directory however then the newest file inside thedirectory is chosen to be the kernel image. The names inside.B /minix/are best set to the MINIX 3 version you are using, which looks good when themonitor prints its name. Rules for pretty printing image names:.RS.SPA '/' or '_' is changed to a space..SPThe first letter is changed from lowercase to uppercase..SPAn 'r' if followed by a digit changes to " revision "..RE.RE.SP.B label.RSIf set then only processes marked with this label or without a label areloaded from the image..RE.SP.B Installboot \-bootwill create functions to select images and labels. These functions will set.B labeland.B imageand echo what you selected. The two numbers separated by a colon used as animage name tell the starting sector and sector count of the image on disk..RE.SP\fIname\fP() \fIcommand\fP.RSDefine function..brFunctions may be used to bundle a set of commands, so that you can easilyboot MINIX 3 with a different set of parameters then normal. E.g..SP.RSram() { rootdev=ram; boot }.RE.SPwill allow you to run MINIX 3 with the root device on RAM for a change, if younormally use a real device as root. There are three predefined functions,.BR leader ,with default value an.B echocommand that shows the monitor's startup banner,.BR main ,with default value.BR menu ,and.BR trailer ,with default value a command that clears the screen.The monitor executes.B leader;mainat startup to show the banner message and a menu. The.B trailerfunction is executed just before MINIX 3 is started. These three functions canbe redefined as you please..RE.SP\fIname\fP(\fIkey\fP) \fIcommand\fP.RSDefine kernel selecting function..brThe menu command uses functions like these to add menu entries to selecta different kernel from a boot disk..B Installboot \-bootproduces these functions when the images are labeled. The label.B ATwould give:.SP.RSAT(a) {label=AT;image=42:626;echo AT kernel selected;menu}.RE.SPWith the menu option:.SP.RSa Select AT kernel.RE.SPTyping.B a
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -