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

808 lines
11 KiB
HTML

<HTML
><HEAD
><TITLE
>Configure the SYSLINUX 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="UP"
TITLE="Configure the boot loader"
HREF="configure-boot-loader.html"><LINK
REL="PREVIOUS"
TITLE="Configure the GRUB boot
loader"
HREF="configure-boot-loader-grub.html"><LINK
REL="NEXT"
TITLE="Configure Linux
kernel"
HREF="configure-kernel.html"></HEAD
><BODY
CLASS="SECTION"
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="configure-boot-loader-grub.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 4. Configure the boot loader</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="configure-kernel.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="CONFIGURE-BOOT-LOADER-SYSLINUX"
></A
>4.3. Configure the <SPAN
CLASS="APPLICATION"
>SYSLINUX</SPAN
> boot
loader</H1
><P
><A
HREF="http://syslinux.zytor.com/"
TARGET="_top"
><SPAN
CLASS="PRODUCTNAME"
><SPAN
CLASS="APPLICATION"
>SYSLINUX</SPAN
></SPAN
></A
>
is a boot loader that is installed on a MS-DOS floppy disk. As
directed by it's configuration file
<TT
CLASS="FILENAME"
>\SYSLINUX.CFG</TT
> it will load one of the files
from the floppy disk as a Linux kernel.</P
><P
><SPAN
CLASS="APPLICATION"
>SYSLINUX</SPAN
> presents a simple text
interface that can be used to select between canned configurations
defined in the configuration file and can be used to add parameters
to the kernel.</P
><P
><SPAN
CLASS="APPLICATION"
>ISOLINUX</SPAN
> and
<SPAN
CLASS="APPLICATION"
>PXELINUX</SPAN
> are variants of
<SPAN
CLASS="APPLICATION"
>SYSLINUX</SPAN
> for CD-ROMs and Intel's <A
HREF="http://developer.intel.com/ial/wfm/"
TARGET="_top"
><SPAN
CLASS="PRODUCTNAME"
>Preboot
Execution Environment</SPAN
></A
>.</P
><P
><SPAN
CLASS="APPLICATION"
>SYSLINUX</SPAN
> supports a variety of
serial port speeds, but it only supports eight data bits, no parity
and one stop bit. <SPAN
CLASS="APPLICATION"
>SYSLINUX</SPAN
> supports the
serial ports <TT
CLASS="FILENAME"
>COM1:</TT
> through
to <TT
CLASS="FILENAME"
>COM4:</TT
>, as with most boot
loaders these are written as port <TT
CLASS="LITERAL"
>0</TT
> through to
port <TT
CLASS="LITERAL"
>3</TT
>.</P
><P
>For <SPAN
CLASS="APPLICATION"
>SYSLINUX</SPAN
> to support a serial
console add a new <EM
>first line</EM
> to
<TT
CLASS="FILENAME"
>\SYSLINUX.CFG</TT
>:</P
><DIV
CLASS="FIGURE"
><A
NAME="CONFIGURE-BOOT-LOADER-SYSLINUX-SERIAL-SYNTAX"
></A
><P
><B
>Figure 4-11. Syntax of <SPAN
CLASS="PRODUCTNAME"
>SYSLINUX</SPAN
>
<B
CLASS="COMMAND"
>serial</B
> command, in
<SPAN
CLASS="ACRONYM"
>EBNF</SPAN
></B
></P
><P
CLASS="LITERALLAYOUT"
><TT
CLASS="LITERAL"
>serial</TT
>&nbsp;<TT
CLASS="REPLACEABLE"
><I
>&#60;space&#62;</I
></TT
>&nbsp;<TT
CLASS="REPLACEABLE"
><I
>&#60;serial_port&#62;</I
></TT
>&nbsp;[&nbsp;<TT
CLASS="REPLACEABLE"
><I
>&#60;space&#62;</I
></TT
>&nbsp;<TT
CLASS="REPLACEABLE"
><I
>&#60;speed&#62;</I
></TT
>&nbsp;[&nbsp;<TT
CLASS="REPLACEABLE"
><I
>&#60;space&#62;</I
></TT
>&nbsp;<TT
CLASS="REPLACEABLE"
><I
>&#60;syslinux_flow_control&#62;</I
></TT
>&nbsp;]&nbsp;]</P
></DIV
><P
>The variables are the same as used by syntax descriptions in
<A
HREF="preparation-setspeed.html#PREPARATION-SETSPEED-MODESYNTAX"
>Figure 2-7</A
> and <A
HREF="configure-boot-loader-lilo.html#CONFIGURE-BOOT-LOADER-LILO-EBNF"
>Figure 4-2</A
> plus those in <A
HREF="configure-boot-loader-syslinux.html#CONFIGURE-BOOT-LOADER-SYSLINUX-EBNF"
>Figure 4-12</A
>.</P
><DIV
CLASS="FIGURE"
><A
NAME="CONFIGURE-BOOT-LOADER-SYSLINUX-EBNF"
></A
><P
><B
>Figure 4-12. <SPAN
CLASS="PRODUCTNAME"
>SYSLINUX</SPAN
>
<B
CLASS="COMMAND"
>serial</B
> <SPAN
CLASS="ACRONYM"
>EBNF</SPAN
> variables</B
></P
><P
CLASS="LITERALLAYOUT"
><TT
CLASS="REPLACEABLE"
><I
>&#60;space&#62;</I
></TT
>&nbsp;::=&nbsp;&#8216;<TT
CLASS="LITERAL"
> </TT
>&#8217;<br>
<TT
CLASS="REPLACEABLE"
><I
>&#60;syslinux_flow_control&#62;</I
></TT
>&nbsp;::=&nbsp;<TT
CLASS="REPLACEABLE"
><I
>&#60;hex_digits&#62;</I
></TT
><br>
<TT
CLASS="REPLACEABLE"
><I
>&#60;hex_digits&#62;</I
></TT
>&nbsp;::=&nbsp;<TT
CLASS="LITERAL"
>0x</TT
><TT
CLASS="REPLACEABLE"
><I
>&#60;hex_digit&#62;</I
></TT
><TT
CLASS="REPLACEABLE"
><I
>&#60;hex_digit&#62;</I
></TT
><TT
CLASS="REPLACEABLE"
><I
>&#60;hex_digit&#62;</I
></TT
><br>
<TT
CLASS="REPLACEABLE"
><I
>&#60;hex_digit&#62;</I
></TT
>&nbsp;::=&nbsp;<TT
CLASS="LITERAL"
>0</TT
>&nbsp;|&nbsp;<TT
CLASS="LITERAL"
>1</TT
>&nbsp;|&nbsp;&#8230;&nbsp;|&nbsp;<TT
CLASS="LITERAL"
>9</TT
>&nbsp;|&nbsp;<TT
CLASS="LITERAL"
>a</TT
>&nbsp;|&nbsp;<TT
CLASS="LITERAL"
>b</TT
>&nbsp;|&nbsp;&#8230;&nbsp;|&nbsp;<TT
CLASS="LITERAL"
>f</TT
></P
></DIV
><P
>The <TT
CLASS="REPLACEABLE"
><I
>&#60;syslinux_flow_control&#62;</I
></TT
>
variable controlling the <SPAN
CLASS="ACRONYM"
>RS-232</SPAN
> status and flow
control signals is optional. If your null-modem cable does not
present any status or handshaking signals then do not use it. The
value of <TT
CLASS="REPLACEABLE"
><I
>&#60;syslinux_flow_control&#62;</I
></TT
>
is calculated by adding the hexadecimal values for the desired flow
control behaviours listed in <A
HREF="configure-boot-loader-syslinux.html#CONFIGURE-BOOT-LOADER-SYSLINUX-FLOWCONTROL"
>Table 4-1</A
>.</P
><P
>The behaviours for a correctly-wired null-modem cable or a
correctly configured modem are marked <SPAN
CLASS="QUOTE"
>"Required for full
<SPAN
CLASS="ACRONYM"
>RS-232</SPAN
> compliance"</SPAN
> in the table. The sum
of these values is <TT
CLASS="LITERAL"
>0xab3</TT
>.</P
><DIV
CLASS="TABLE"
><A
NAME="CONFIGURE-BOOT-LOADER-SYSLINUX-FLOWCONTROL"
></A
><P
><B
>Table 4-1. <SPAN
CLASS="PRODUCTNAME"
>SYSLINUX</SPAN
> flow control
bitmap</B
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><THEAD
><TR
><TH
ALIGN="CENTER"
VALIGN="BOTTOM"
><P
>Flow control behaviour</P
></TH
><TH
ALIGN="CENTER"
VALIGN="BOTTOM"
><P
>Hex value</P
></TH
><TH
ALIGN="CENTER"
VALIGN="BOTTOM"
><P
>Required for full <SPAN
CLASS="ACRONYM"
>RS-232</SPAN
>
compliance?</P
></TH
></TR
></THEAD
><TBODY
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>Assert DTR</P
></TD
><TD
ALIGN="CENTER"
VALIGN="TOP"
><P
>0x001</P
></TD
><TD
ALIGN="CENTER"
VALIGN="TOP"
><P
>Yes</P
></TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>Assert RTS</P
></TD
><TD
ALIGN="CENTER"
VALIGN="TOP"
><P
>0x002</P
></TD
><TD
ALIGN="CENTER"
VALIGN="TOP"
><P
>Yes</P
></TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>Wait for CTS assertion</P
></TD
><TD
ALIGN="CENTER"
VALIGN="TOP"
><P
>0x010</P
></TD
><TD
ALIGN="CENTER"
VALIGN="TOP"
><P
>Yes</P
></TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>Wait for DSR assertion</P
></TD
><TD
ALIGN="CENTER"
VALIGN="TOP"
><P
>0x020</P
></TD
><TD
ALIGN="CENTER"
VALIGN="TOP"
><P
>Yes</P
></TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>Wait for RI assertion</P
></TD
><TD
ALIGN="CENTER"
VALIGN="TOP"
><P
>0x040</P
></TD
><TD
ALIGN="CENTER"
VALIGN="TOP"
><P
>No</P
></TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>Wait for DCD assertion</P
></TD
><TD
ALIGN="CENTER"
VALIGN="TOP"
><P
>0x080</P
></TD
><TD
ALIGN="CENTER"
VALIGN="TOP"
><P
>Yes</P
></TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>Ignore input unless CTS asserted</P
></TD
><TD
ALIGN="CENTER"
VALIGN="TOP"
><P
>0x100</P
></TD
><TD
ALIGN="CENTER"
VALIGN="TOP"
><P
>No</P
></TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>Ignore input unless DSR asserted</P
></TD
><TD
ALIGN="CENTER"
VALIGN="TOP"
><P
>0x200</P
></TD
><TD
ALIGN="CENTER"
VALIGN="TOP"
><P
>Yes</P
></TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>Ignore input unless RI asserted</P
></TD
><TD
ALIGN="CENTER"
VALIGN="TOP"
><P
>0x400</P
></TD
><TD
ALIGN="CENTER"
VALIGN="TOP"
><P
>No</P
></TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>Ignore input unless DCD asserted</P
></TD
><TD
ALIGN="CENTER"
VALIGN="TOP"
><P
>0x800</P
></TD
><TD
ALIGN="CENTER"
VALIGN="TOP"
><P
>Yes</P
></TD
></TR
></TBODY
></TABLE
></DIV
><P
>Our preferred configuration of 9600<SPAN
CLASS="ABBREV"
>bps</SPAN
>,
port <TT
CLASS="LITERAL"
>0</TT
>, full <SPAN
CLASS="ACRONYM"
>RS-232</SPAN
> status
signals and <SPAN
CLASS="ACRONYM"
>CTS</SPAN
>/<SPAN
CLASS="ACRONYM"
>RTS</SPAN
> flow
control is written as:</P
><DIV
CLASS="INFORMALEXAMPLE"
><A
NAME="AEN1231"
></A
><P
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="PROGRAMLISTING"
>serial 0 9600 0xab3</PRE
></FONT
></TD
></TR
></TABLE
><P
></P
></DIV
><DIV
CLASS="TIP"
><A
NAME="TIP-SYSLINUX-FLOWCONTROL"
></A
><P
></P
><TABLE
CLASS="TIP"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/tip.gif"
HSPACE="5"
ALT="Tip"></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>When using this configuration <SPAN
CLASS="ACRONYM"
>SYSLINUX</SPAN
>
will not display anything and will not accept any typed character
until the <SPAN
CLASS="ACRONYM"
>RS-232</SPAN
> status signals show a
connected modem call (or a connected terminal if you are using a
null-modem cable).</P
></TD
></TR
></TABLE
></DIV
><P
>If you have a null modem cable with no RS-232 status signals
and no flow control then use:</P
><DIV
CLASS="INFORMALEXAMPLE"
><A
NAME="AEN1238"
></A
><P
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="PROGRAMLISTING"
>serial 0 9600</PRE
></FONT
></TD
></TR
></TABLE
><P
></P
></DIV
><P
>Remember that the <B
CLASS="COMMAND"
>serial</B
> command must be
the first line in <TT
CLASS="FILENAME"
>\SYSLINUX.CFG</TT
>.</P
></DIV
><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="configure-boot-loader-grub.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-kernel.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Configure the <SPAN
CLASS="APPLICATION"
>GRUB</SPAN
> boot
loader</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="configure-boot-loader.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Configure <SPAN
CLASS="SYSTEMITEM"
>Linux</SPAN
>
kernel</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>