doc102.htm
来自「Reh Hat user manual. really goooood」· HTM 代码 · 共 224 行
HTM
224 行
<html><body><a href="doc103.html"><img src=../icons/next.gif alt="Next"></a><a href="doc000.html"><img src=../icons/up.gif alt="Up"></a><a href="doc101.html"><img src=../icons/previous.gif alt="Previous"></a><a href="doc000.html"><img src=../icons/contents.gif alt="Contents"></a><a href="doc123.html"><img src=../icons/index.gif alt="Index"></a><hr><h2><a name="sD.6">D.6 MILO's User Interface</a></h2><title>MILO's User Interface</title><p>Once you have correctly installed/loaded/run MILO you will see the MILO (for MIniLOader) prompt displayed on your screen. There is a verysimple interface that you must use in order to boot a particular Linux kernel image. Typing "help" is a good idea as it gives a useful summaryof the commands.<p><h3><a name="sD.6.1">D.6.1 The ''help'' Command</a></h3><title>The ''help'' Command</title><p>Probably the most useful command that MILO has:<p><blockquote><font size=-1><tt><pre>MILO> helpMILO command summary:ls [-t fs] [dev:[dir]] - List files in directory on deviceboot [-t fs] [dev:file] [boot string] - Boot Linux from the specified device and filerun [-t fs] dev:file - Run the standalone program dev:fileshow - Display all known devices and file systemsset VAR VALUE - Set the variable VAR to the specified VALUEunset VAR - Delete the specified variablereset - Delete all variablesprint - Display current variable settingshelp [var] - Print this help textDevices are specified as: fd0, hda1, hda2, sda1...Use the '-t filesystem-name' option if you want to use anything but the default filesystem ('ext2').Use the 'show' command to show known devices and filesystems.Type 'help var' for a list of variables.</pre></tt></font></blockquote><p><b>Note</b> that the <tt>bootopt</tt> command only appears on AlphaPC64 (and similar) systems. Refer to the board's dcoumentation to find out just what it means.<p><b>Devices.</b> Until youuse a command that needs to make use of a device, no deviceinititalisation will take place. The first <tt>show</tt>, <tt>ls</tt>, <tt>boot</tt> or <tt>run</tt>commands all cause the devices within MILO to be initialised.Devices are namedin the same way (exactly) that Linux itself will name them. So, thefirst IDE disk will be called 'hda' and it's first partition will be 'hda1'.Use the <tt>show</tt> command to show what devices are available.<p><b>File Systems.</b> MILO supports three file systems, MSDOS, EXT2 and ISO9660. So long as a device is available to it, MILO can <tt>list</tt><tt>boot</tt> or <tt>run</tt> an image stored on one of these file systems.MILO's default file system is <tt>EXT2</tt> and so you have tell MILO thatthe file system is something other than that.All of the commands that use filenames allow you to pass the file system using the <tt>-t [filesystem]</tt>option.So, if you wanted to list the contents of a SCSI CD ROM, you might type thefollowing:<p><blockquote><font size=-1><tt><pre> MILO> ls -t iso9660 scd0:</pre></tt></font></blockquote><p><b>Variables.</b> MILO contains some settable variables that helpthe boot process. If you are loading via the Windows NT ARC firmware, thenMILO makes use of the boot option environment variables set up by thatfirmware. For some systems, MILO (for example, the AlphaPC64) maintainsits own set of environment variables that do not change from boot to boot.These variables are:<p><blockquote><font size=-1><tt><pre>MILO> help varVariables that MILO cares about: MEMORY_SIZE - System memory size in megabytes BOOT_DEV - Specifies the default boot device BOOT_FILE - Specifies the default boot file BOOT_STRING - Specifies the boot string to pass to the kernel SCSIn_HOSTID - Specifies the host id of the n-th SCSI controller. PCI_LATENCY - Specifies the PCI master device latency AUTOBOOT - If set, MILO attempts to boot on powerup and enters command loop only on failure. AUTOBOOT_TIMEOUT - Seconds to wait before auto-booting on powerup.</pre></tt></font></blockquote><p><b>BEWARE</b> of setting AUTOBOOT without setting the timeout, you can end upautomatically booting after a timemout of 0 seconds which may not be what you want.<p>PCI_LATENCY is the number of PCI bus cycles that PCI bus mastering device hangs ontothe PCI bus for once it has control. The default value for this is 32 and the maximum value is 255.Setting a high value means that each time a device gets control of the PCI bus it cantransfer more data.However, setting it high also means that devices may have to wait longer to get control.<p><h3><a name="sD.6.2">D.6.2 Booting Linux </a></h3><title>Booting Linux </title><a name="i273"><p>The <tt>boot</tt> command boots a linux kernel from a device.You will need to have a linux kernel image onan EXT2 formated disk (SCSI, IDE or floppy) or an ISO9660 formatted CD available to MILO. The image can be gzip'd and in this case MILO will automatically gunzip it.Early versions of MILO recognised a gzip'd file by the .gz suffix but later MILOs lookfor magic numbers in the image.<p>You should note that the version of MILO does not usually have to matchthe version of the Linux kernel that you are loading.You boot Linux using the following command syntax:<p><blockquote><font size=-1><tt><pre> MILO> boot [-t file-system] device-name:file-name [[boot-option] [boot-option] ...]</pre></tt></font></blockquote><p>Where <tt>device-name</tt> is the name of the device that you wish touse and <tt>file-name</tt> is the name of the file containing the Linuxkernel. All arguments supplied after the file name are passed directlyto the Linux kernel. <p>If you are installing Red Hat, then you will need to specify a rootdevice and so on. So you would use:<p><blockquote><font size=-1><tt><pre> MILO> boot fd0:vmlinux.gz root=/dev/fd0 load_ramdisk=1</pre></tt></font></blockquote><p> MILO will automatically contain the block devices thatyou configure into your vmlinux. I have tested the floppy driver, the IDEdriver and a number of SCSI drivers (for example, the NCR 810), and these work fine. Also, it is important to set the host id of the SCSI controllerto a reasonable value. By default, MILO will initialize it to thehighest possible value (7) which should normally work just fine.However, if you wish, you can explicitly set the host id of the<em>n</em>-th SCSI controller in the system by setting environmentvariable <tt>SCSI</tt><em>n</em><tt>_HOSTID</tt> to the appropriatevalue. For example, to set the hostid of the first SCSI controller to7, you can issue the following command at the MILO prompt:<p><blockquote><font size=-1><tt><pre> setenv SCSI0_HOSTID 7</pre></tt></font></blockquote><p><h3><a name="sD.6.3">D.6.3 Rebooting Linux </a></h3><title>Rebooting Linux </title><p>You may want to reboot a running Linux system using the<tt>shutdown -r now</tt> command. In this case, the Linux kernelreturns control to MILO (via the HALT CallPAL entrypoint).MILO leaves a compressed copy of itself in memory for just thisreason and detects that the system is being rebooted from informationheld in the HWRPB (Hardware Restart Parameter Block).In this case it starts to reboot using exactly the same command thatwas used to boot the Linux kernel the last time.There is a 30 second timeout that allows you to interrupt this process and boot whatever kernel you wish in whatever way you wish.<p><h3><a name="sD.6.4">D.6.4 The ''bootopt'' command </a></h3><title>The ''bootopt'' command </title><p>For flash based systems such as the AlphaPC64, EB164 and the EB66+, thereare a number of possible boot options and these are changed using the <tt>bootopt</tt> command. This has one argument, a decimal number which is the type of theimage to be booted the next time the system is power cycled or reset:<p><b>0</b> Boot the Evaluation Board Debug Monitor,<p><b>1</b> Boot the Windows NT ARC firmware.<p>In order to tell the boot code to boot the MILO firmware from flashthen you need a boot option that means boot the N'th image. For this, you need to 128 plus N, so if MILO is the third image, you would use the command:<p><blockquote><font size=-1><tt><pre> MILO> bootopt 131</pre></tt></font></blockquote><p><tt>Note:</tt> Be very careful with this command. A good rule is never toset bootopt to 0 (the Evaluation Board Debug Monitor), but instead use the system's jumpers to achieve the same thing. <p><p><hr><a href="doc103.html"><img src=../icons/next.gif alt="Next"></a><a href="doc000.html"><img src=../icons/up.gif alt="Up"></a><a href="doc101.html"><img src=../icons/previous.gif alt="Previous"></a><a href="doc000.html"><img src=../icons/contents.gif alt="Contents"></a><a href="doc123.html"><img src=../icons/index.gif alt="Index"></a><hr></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?