old-www/HOWTO/Remote-Serial-Console-HOWTO/configure-boot-loader.html

410 lines
6.6 KiB
HTML

<HTML
><HEAD
><TITLE
>Configure the boot loader</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="Remote Serial Console HOWTO"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="Optionally configure the BIOS"
HREF="bios.html"><LINK
REL="NEXT"
TITLE="Configure the LILO boot
loader"
HREF="configure-boot-loader-lilo.html"></HEAD
><BODY
CLASS="CHAPTER"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Remote Serial Console HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="bios.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="configure-boot-loader-lilo.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="CHAPTER"
><H1
><A
NAME="CONFIGURE-BOOT-LOADER"
></A
>Chapter 4. Configure the boot loader</H1
><DIV
CLASS="TOC"
><DL
><DT
><B
>Table of Contents</B
></DT
><DT
>4.1. <A
HREF="configure-boot-loader-lilo.html"
>Configure the <SPAN
CLASS="APPLICATION"
>LILO</SPAN
> boot
loader</A
></DT
><DT
>4.2. <A
HREF="configure-boot-loader-grub.html"
>Configure the <SPAN
CLASS="APPLICATION"
>GRUB</SPAN
> boot
loader</A
></DT
><DT
>4.3. <A
HREF="configure-boot-loader-syslinux.html"
>Configure the <SPAN
CLASS="APPLICATION"
>SYSLINUX</SPAN
> boot
loader</A
></DT
></DL
></DIV
><P
>When a PC boots the CPU it runs code from Read-Only Memory.
This code is the Basic Input/Output System, or
<SPAN
CLASS="ACRONYM"
>BIOS</SPAN
>. The <SPAN
CLASS="ACRONYM"
>BIOS</SPAN
> then loads a
boot loader from the Master Boot Record of the first hard
disk.<A
NAME="AEN810"
HREF="#FTN.AEN810"
><SPAN
CLASS="footnote"
>[1]</SPAN
></A
>
In turn, the boot loader reads the operating system into memory and
then runs it.<A
NAME="AEN822"
HREF="#FTN.AEN822"
><SPAN
CLASS="footnote"
>[2]</SPAN
></A
></P
><P
>Neither the <SPAN
CLASS="ACRONYM"
>BIOS</SPAN
> nor the boot loader are
strictly necessary. For example, there are <A
HREF="http://www.acl.lanl.gov/linuxbios/"
TARGET="_top"
>versions of Linux</A
>
that run directly from the flash memory which usually contains the
<SPAN
CLASS="ACRONYM"
>BIOS</SPAN
>. Linux was originally designed to run
without an interactive boot loader, by placing the kernel at
particular sectors of the disk.</P
><P
>The benefits of using a boot loader are:</P
><P
></P
><UL
><LI
><P
>Multiple operating systems can be booted. See the <A
HREF="http://www.tldp.org/HOWTO/Linux+Windows-HOWTO/"
TARGET="_top"
><I
CLASS="CITETITLE"
><SPAN
CLASS="SYSTEMITEM"
>Linux</SPAN
> + <SPAN
CLASS="SYSTEMITEM"
>Windows</SPAN
> HOWTO</I
></A
> for
more information.</P
></LI
><LI
><P
>Parameters can be passed to the kernel interactively. This
is useful for solving hardware problems; for example, some
interrupt lines can be disabled, direct memory access to some
drives can be disabled, and so on. See the <A
HREF="http://www.tldp.org/HOWTO/BootPrompt-HOWTO.html"
TARGET="_top"
><I
CLASS="CITETITLE"
><SPAN
CLASS="SYSTEMITEM"
>Linux</SPAN
>
BootPrompt-HOWTO</I
></A
> for a list of kernel
parameters.</P
></LI
><LI
><P
>Differing kernels can be interactively loaded. This is
useful when deploying a new kernel, as it provides simple fallback
to a proven kernel.</P
></LI
></UL
><P
>For these reasons systems administrators want to be able to
interactively control the boot loader from the serial
console.</P
><P
><SPAN
CLASS="APPLICATION"
>LILO</SPAN
>,
<SPAN
CLASS="APPLICATION"
>GRUB</SPAN
> and
<SPAN
CLASS="APPLICATION"
>SYSLINUX</SPAN
> are popular boot loaders for
<SPAN
CLASS="PRODUCTNAME"
><SPAN
CLASS="ACRONYM"
>IBM</SPAN
>
<SPAN
CLASS="ACRONYM"
>PC</SPAN
>s</SPAN
>. Find which of these boot
loaders your <SPAN
CLASS="SYSTEMITEM"
>Linux</SPAN
>
installation uses and then follow the instructions for your boot
loader in the following section.</P
></DIV
><H3
CLASS="FOOTNOTES"
>Notes</H3
><TABLE
BORDER="0"
CLASS="FOOTNOTES"
WIDTH="100%"
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="5%"
><A
NAME="FTN.AEN810"
HREF="configure-boot-loader.html#AEN810"
><SPAN
CLASS="footnote"
>[1]</SPAN
></A
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="95%"
><P
>As usual with <SPAN
CLASS="PRODUCTNAME"
><SPAN
CLASS="ACRONYM"
>IBM
PC/AT</SPAN
></SPAN
> hardware <SPAN
CLASS="QUOTE"
>"loads a boot loader
from the <SPAN
CLASS="ACRONYM"
>MBR</SPAN
> of the first hard disk"</SPAN
> is a
simplification. <SPAN
CLASS="ACRONYM"
>BIOS</SPAN
> settings permitting, the
<SPAN
CLASS="ACRONYM"
>MBR</SPAN
> can be loaded from the first two detected
hard disks of any controller card containing a
<SPAN
CLASS="ACRONYM"
>BIOS</SPAN
> extension. Thus the
<SPAN
CLASS="ACRONYM"
>MBR</SPAN
> can be loaded from one of the first two
detected <SPAN
CLASS="ACRONYM"
>IDE</SPAN
> disks and one of the first two
detected <SPAN
CLASS="ACRONYM"
>SCSI</SPAN
> disks.</P
></TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="5%"
><A
NAME="FTN.AEN822"
HREF="configure-boot-loader.html#AEN822"
><SPAN
CLASS="footnote"
>[2]</SPAN
></A
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="95%"
><P
>Another simplification. A 512 byte <SPAN
CLASS="ACRONYM"
>MBR</SPAN
>
is too small to contain a program big enough to load a complex
operating system. Thus most boot loaders have two stages, the
first stage is located in the <SPAN
CLASS="ACRONYM"
>MBR</SPAN
> and is only
able to load the second stage of the boot loader from somewhere on
a disk (such as the boot sector of the first partition). The
second stage of the boot loader presents the user interface and
loads the operating system.</P
></TD
></TR
></TABLE
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="bios.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="configure-boot-loader-lilo.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Optionally configure the <SPAN
CLASS="ACRONYM"
>BIOS</SPAN
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Configure the <SPAN
CLASS="APPLICATION"
>LILO</SPAN
> boot
loader</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>