📄 0031-0036.html
字号:
<HTML>
<HEAD>
<TITLE>Developer.com - Online Reference Library - 0672311739:RED HAT LINUX 2ND EDITION:LILO</TITLE>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>
-->
<!-- ISBN=0672311739 //-->
<!-- TITLE=RED HAT LINUX 2ND EDITION //-->
<!-- AUTHOR=DAVID PITTS ET AL //-->
<!-- PUBLISHER=MACMILLAN //-->
<!-- IMPRINT=SAMS PUBLISHING //-->
<!-- PUBLICATION DATE=1998 //-->
<!-- CHAPTER=03 //-->
<!-- PAGES=0027-0036 //-->
<!-- UNASSIGNED1 //-->
<!-- UNASSIGNED2 //-->
<P><CENTER>
<a href="0027-0030.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="../ch04/0037-0040.html">Next</A>
</CENTER></P>
<A NAME="PAGENUM-31"><P>Page 31</P></A>
<BR>
<P>Table 3.1./etc/lilo.conf configuration parameters
</P>
<HR>
<TABLE WIDTH="360">
<TR><TD>
Parameter
</TD><TD>
Description
</TD></TR>
<TR><TD>
boot=<boot_device>
</TD><TD>
Tells the kernel the name of the device that contains
the boot sector. If boot is omitted, the boot sector is
read from the device that is currently mounted as root.
</TD></TR>
<TR><TD>
linear
</TD><TD>
Generates linear sector addresses instead of
sector/head/cylinder addresses, which can be troublesome,
especially when used with the compact option. See
LILO's documentation for details.
</TD></TR>
<TR><TD>
install=<boot_sector>
</TD><TD>
Installs the specified file as the new boot sector.
If install is omitted, /etc/lilo/boot.b is used as
the default.
</TD></TR>
<TR><TD>
message=<message_file>
</TD><TD>
You can use this to display the file's text and
customize the boot prompt, with a maximum message of up
to 65,535 bytes. Rerun /sbin/lilo if you change this file.
</TD></TR>
<TR><TD>
verbose=<level>
</TD><TD>
Turns on progress reporting. Higher numbers give
more verbose output, and the numbers can range from
1 to 5. This also has a -v and -q option; see LILO's
documentation for details.
</TD></TR>
<TR><TD>
backup=<backup_file>
</TD><TD>
Copies the original boot sector to
<backup_file> (which can also be a device, such as
/dev/null) instead of to
/etc/lilo/boot.<number>.
</TD></TR>
<TR><TD>
force-backup<backup_file>
</TD><TD>
Similar to
backup, this option will overwrite the current backup copy, but
backup is ignored if force-backup is used.
</TD></TR>
<TR><TD>
prompt
</TD><TD>
Requires you to type a boot prompt entry.
</TD></TR>
<TR><TD>
timeout=<tsecs>
</TD><TD>
Sets a time-out (in tenths of a second) for
keyboard input, which is handy if you want to boot right away
or wait for longer than the default five seconds. Tip:
To make LILO wait indefinitely for your keystrokes, use
a value of 0.
</TD></TR>
<TR><TD>
serial=<parameters>
</TD><TD>
Allows input from the designated serial line and the
PC's keyboard to LILO. A break on the serial line mimics
a Shift key press from the console. For security,
password-protect all your boot images when using this option.
The parameter string has the syntax
<port>,<bps><parity>
<bits>, as in /dev/ttyS1,8N1. The components
<bps>,
</TD></TR>
</TABLE>
<!-- CODE SNIP //-->
<PRE>
continues
</PRE>
<!-- END CODE SNIP //-->
<A NAME="PAGENUM-32"><P>Page 32</P></A>
<P>
Table 3.1. continued
</P>
<HR>
<TABLE WIDTH="360">
<TR><TD>
Parameter
</TD><TD>
Description
</TD></TR>
<TR><TD>
</TD><TD>
<parity>, and <bits> can be omitted. If one of
these components is omitted, all the following components have
to be omitted as well. Additionally, the
comma has to be omitted if only the port number is specified.
See LILO's documentation for details.
</TD></TR>
<TR><TD>
ignore-table
</TD><TD>
Ignore corrupt partition tables.
</TD></TR>
<TR><TD>
password=<password>
</TD><TD>
Use this to password protect your boot images.
</TD></TR>
<TR><TD>
unsafe
</TD><TD>
This keyword is placed after a definition for a
partition. The keyword tells LILO not to attempt to read
the MBR or that disk's partition table entry. You can
declare all the partitions in your system as a log of all
existing partitions and then place the unsafe keyword entry
to prevent LILO from reading it.
</TD></TR>
</TABLE>
<P>After making your changes to lilo.conf, make sure to run
/sbin/lilo. You should also always run /sbin/lilo after installing a
new kernel.
</P>
<H4><A NAME="ch03_ 6">
LILO Boot Prompt Options
</A></H4>
<P>The following sample list of options can be passed to LILO at the boot prompt to enable
special features of your system or to pass options to the Linux kernel to enable a proper
boot. Knowing any needed options for your system is especially handy during the Red Hat
Linux installation process because you'll be asked for any special options if you choose to install
LILO then.
</P>
<P>Although you'll normally type linux or dos at the
LILO: prompt, you can also try one or two of the following. For a more up-to-date list of kernel messages or options, read Paul
Gortmaker's BootPrompt-HOWTO under the
/usr/doc/HOWTO directory.
</P>
<UL>
<LI> rescue—Boots Linux into single-user mode to allow system fixes (see Chapter 4
for details).
<LI> single—Similar to
rescue, but attempts to boot from your hard drive.
<LI>
root=<device>—Similar to the
/etc/lilo.conf entry, this option allows you to
boot from a CD-ROM or other storage device.
<LI>
vga=<mode>—Enables you to change the resolution of your console; try the
ask mode.
</UL>
<A NAME="PAGENUM-33"><P>Page 33</P></A>
<H3><A NAME="ch03_ 7">
Using LOADLIN.EXE to Boot Linux
</A></H3>
<P>LOADLIN.EXE is a program that uses the DOS MBR to boot Linux. This handy program,
by Hans Lermen, will also pass along kernel options.
LOADLIN.EXE is very helpful when you must boot from DOS in order to properly initialize modems or sound cards to make them
work under Linux.
</P>
<P>You need to do two things before using
LOADLIN.EXE:
</P>
<OL>
<LI> Copy LOADLIN.EXE to a DOS partition (for example,
C:\LOADLIN).
<LI> Put a copy of your kernel image
(/vmlinuz) on your DOS partition.
</OL>
<P>For example, to boot Linux, type the following from the DOS command line:
</P>
<!-- CODE SNIP //-->
<PRE>
loadlin c:\vmlinuz root=/dev/hda3 ro
</PRE>
<!-- END CODE SNIP //-->
<P>Make sure that you insert your root partition in the command line. The
ro is for read-only. When you are first booting a Linux partition, it should be mounted as read-only or data
loss could occur.
</P>
<P>
If you have a UMSDOS filesystem, you can type
</P>
<!-- CODE SNIP //-->
<PRE>
loadlin c:\vmlinuz root=/dev/hda1 rw
</PRE>
<!-- END CODE SNIP //-->
<P>The rw is for read/write. It is safe to start a UMSDOS filesystem this way. Again, make
sure that you substitute your own partition in.
LOADLIN.EXE accepts a number of options. See its documentation in the
LOADLIN.TGZ file under the Dosutils directory on the book's
CD-ROM.
</P>
<H3><A NAME="ch03_ 8">
How to Uninstall LILO
</A></H3>
<P>LILO can be uninstalled using the lilo -u command, or it can be disabled by making
another partition active using fdisk under either Linux or MS-DOS.
</P>
<P>If LILO has been installed as the MBR, you can restore the original MBR by booting
under MS-DOS and using the commands SYS c: or FDISK
/MBR.
</P>
<H3><A NAME="ch03_ 9">
Summary
</A></H3>
<P>This chapter covers the basics of configuring, installing, and using LILO, and introduces
you to the LOADLIN.EXE boot utility. Hopefully, you've seen that using LILO can give you
additional flexibility in the number of operating systems installed on your PC and that Linux
can be used along with these other systems. Don't forget to read LILO's documentation, as
you'll not only learn about how operating systems boot from your hard drive, but also how you
can customize the Linux boot prompt.
</P>
<A NAME="PAGENUM-34"><P>Page 34</P></A>
<A NAME="PAGENUM-35"><P>Page 35</P></A>
<h3><P><A NAME="1739_ 0">Part II
</P></h3>
<H2>
Configuring Other Servers
</H2>
<P><B>In This PART
</B></P>
<UL>
<LI> System Startup and Shutdown 37
<LI> Configuring and Building Kernels 53
<LI> Common Desktop Environment 75
<LI> SMTP and POP 97
<LI> FTP 131
<LI> Apache Server 153
<LI> X Window 175
</UL>
<A NAME="PAGENUM-36"><P>Page 36</P></A>
<P><CENTER>
<a href="0027-0030.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="../ch04/0037-0040.html">Next</A>
</CENTER></P>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -