086-088.html

来自「linux-unix130.linux.and.unix.ebooks130 l」· HTML 代码 · 共 132 行

HTML
132
字号
<HTML>

<HEAD>

<TITLE>Linux Unleashed, Third Edition:Using LILO</TITLE>

<SCRIPT>
<!--
function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>

 -->




<!--ISBN=0672313723//-->

<!--TITLE=Linux Unleashed, Third Edition//-->

<!--AUTHOR=Tim Parker//-->

<!--PUBLISHER=Macmillan Computer Publishing//-->

<!--IMPRINT=Sams//-->

<!--CHAPTER=4//-->

<!--PAGES=086-088//-->

<!--UNASSIGNED1//-->

<!--UNASSIGNED2//-->



<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="084-086.html">Previous</A></TD>

<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>

<TD><A HREF="../ch05/089-092.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>

<P><BR></P>

<H3><A NAME="Heading19"></A><FONT COLOR="#000077">Removing or Disabling LILO</FONT></H3>

<P>To prevent LILO from booting the system, the boot sector must be disabled (by using <TT>fdisk</TT> to change the active partition) or removed completely. Most versions of LILO can be quickly disabled with the following command:</P>

<!-- CODE SNIP //-->

<PRE>

/etc/lilo/lilo -u

</PRE>

<!-- END CODE SNIP //-->

<P>If you are using the newer directory structure, substitute the pathname as necessary.

</P>

<P>When removing a LILO boot sector in the Master Boot Record of the disk, the MBR must be replaced with another record. If you want to replace the MBR with a DOS MBR from a booted DOS disk, enter the following command:</P>

<!-- CODE SNIP //-->

<PRE>

fdisk /mbr

</PRE>

<!-- END CODE SNIP //-->

<P>Because backup copies of the boot sector are created whenever LILO creates a new version, the older versions of the boot sector can be copied back in place (assuming they are still available). For example, to restore the Master Boot Record saved in a file called <TT>boot.0800</TT> (800 is the device number of a SCSI drive), issue the following command:</P>

<!-- CODE SNIP //-->

<PRE>

dd if=/etc/lilo/boot.0800 of=/dev/sda bs=446 count=1

</PRE>

<!-- END CODE SNIP //-->

<P>If you are using another device, substitute the name of the saved boot file and the device name.

</P>

<H3><A NAME="Heading20"></A><FONT COLOR="#000077">Troubleshooting LILO</FONT></H3>

<P>LILO displays error messages when it can&#146;t function properly. These error messages should be sufficient to identify the problem. The most common error messages and their solutions are shown in Table 4.4.

</P>

<TABLE WIDTH="100%"><CAPTION ALIGN=LEFT><B>Table 4.4.</B>LILO error messages.

<TR>

<TH COLSPAN="2"><HR>

<TR>

<TH WIDTH="40%" ALIGN="LEFT">Message

<TH WIDTH="60%" ALIGN="LEFT">Solution

<TR>

<TD COLSPAN="2"><HR>

<TR>

<TD VALIGN="TOP">Can&#146;t put the boot sector on logical partition X

<TD>LILO attempted to put the boot sector on the correct root file system on a logical partition. MBRs can only boot primary partitions by default. Override with the <TT>-b</TT> option and an explicit boot partition value or use the configuration <TT>variable boot=device</TT>.

<TR>

<TD VALIGN="TOP">Got bad geometry

<TD>The disk controller (mostly SCSI) doesn&#146;t support automatic geometry detection. Use the file <TT>/etc/lilo/disktab</TT> to provide the disk parameters.

<TR>

<TD VALIGN="TOP">Invalid partition table, entry X

<TD>The <TT>sector/head/cylinder</TT> and linear addresses of the first sector of the partition don&#146;t match. This usually occurs when an operating system creates partitions not aligned to tracks. Try the <TT>fix table</TT> option.

<TR>

<TD VALIGN="TOP">First sector doesn&#146;t have a valid boot signature

<TD>The first sector of the device doesn&#146;t seem to be a valid boot sector. Check the device name or rerun LILO to install the boot sector.

<TR>

<TD VALIGN="TOP">Cylinder number of too big

<TD>A file is located beyond the 1,024th cylinder which LILO can&#146;t access because of BIOS limitations.

<TR>

<TD VALIGN="TOP">XXX doesn&#146;t have a valid LILO signature

<TD>XXX was located but isn&#146;t a valid LILO entry. If XXX is the boot sector, you should use the <TT>-I</TT> option or the <TT>install</TT> option to install the LILO boot sector.

<TR>

<TD>XXX has an invalid stage code

<TD>The entry at XXX is corrupted. Rerun LILO.

<TR>

<TD VALIGN="TOP">Kernel XXX is too big

<TD>The kernel is larger than 512 Kb, which LILO can&#146;t handle. Remove some unused drivers and recompile the kernel.

<TR>

<TD>Partition entry not found

<TD>The partition is not in the partition table.

<TR>

<TD VALIGN="TOP">Sorry, don&#146;t know how to handle device XXX

<TD>LILO can&#146;t determine the disk parameters. Use the file <TT>/etc/lilo/disktab</TT> to specify them.

<TR>

<TD COLSPAN="2"><HR>

</TABLE>

<H3><A NAME="Heading21"></A><FONT COLOR="#000077">Summary</FONT></H3>

<P>This chapter includes all the information you need to install and use LILO to create your boot sectors for Linux. LILO is quite versatile and can handle several different configurations with ease. It allows you to tailor your installation to boot the best way for your use.

</P>

<P>Although LILO is used only when first setting up your Linux system and after kernel changes, you should know the basics of its operation so you know what is happening to your hard disks and their boot sectors. This is especially true when you use other operating systems on the same system. From here, you may want to jump ahead to other chapters:</P>

<DL>

<DD>To start using your Linux system, read Chapter 6, &#147;Getting Started.&#148;

<DD>To configure X so you can work with a GUI instead of character-based terminals, see Chapter 22, &#147;Installing and Configuring XFree86.&#148;

<DD>To administer your newly installed Linux system, see Chapter 32, &#147;System Administration Basics.&#148;

</DL>

<P><BR></P>

<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="084-086.html">Previous</A></TD>

<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>

<TD><A HREF="../ch05/089-092.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>





</td>
</tr>
</table>

<!-- begin footer information -->





</body></html>

⌨️ 快捷键说明

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