<HTML ><HEAD ><TITLE >Configure the LILO 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 boot loader" HREF="configure-boot-loader.html"><LINK REL="NEXT" TITLE="Configure the GRUB boot loader" HREF="configure-boot-loader-grub.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.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-boot-loader-grub.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-LILO" ></A >4.1. Configure the <SPAN CLASS="APPLICATION" >LILO</SPAN > boot loader</H1 ><P ><SPAN CLASS="APPLICATION" >LILO</SPAN > is the Linux Boot Loader used on Intel machines. Other boot loaders for Intel machines exist, common alternatives are <SPAN CLASS="APPLICATION" >GRUB</SPAN > and <SPAN CLASS="APPLICATION" >SYSLINUX</SPAN >. Equivalents to <SPAN CLASS="APPLICATION" >LILO</SPAN > exist for other processor architectures, their names are usually some play upon <SPAN CLASS="QUOTE" >"LILO"</SPAN >.</P ><P ><SPAN CLASS="APPLICATION" >LILO</SPAN > is documented in the <I CLASS="CITETITLE" >lilo(8)</I > and <I CLASS="CITETITLE" >lilo.conf(5)</I > manual pages; the <I CLASS="CITETITLE" ><SPAN CLASS="APPLICATION" >LILO</SPAN > Generic boot loader for Linux … User's Guide</I > found in the file <TT CLASS="FILENAME" >/usr/share/doc/lilo…/doc/User_Guide.ps</TT >; and the <A HREF="http://www.tldp.org/HOWTO/mini/LILO.html" TARGET="_top" ><I CLASS="CITETITLE" >LILO mini-HOWTO</I ></A >.</P ><P >The <SPAN CLASS="APPLICATION" >LILO</SPAN > configuration is kept in the file <TT CLASS="FILENAME" >/etc/lilo.conf</TT >. The first part of the file applies to all images. The following parts are <TT CLASS="LITERAL" >image</TT > descriptions for each kernel.</P ><P >Set <SPAN CLASS="APPLICATION" >LILO</SPAN > to use the serial port. The syntax of the serial line parameters follows that used by the kernel.</P ><DIV CLASS="FIGURE" ><A NAME="CONFIGURE-BOOT-LOADER-LILO-SYNTAX" ></A ><P ><B >Figure 4-1. Syntax of <SPAN CLASS="PRODUCTNAME" >LILO</SPAN > <B CLASS="COMMAND" >serial</B > command, in <SPAN CLASS="ACRONYM" >EBNF</SPAN ></B ></P ><P CLASS="LITERALLAYOUT" >serial=<TT CLASS="REPLACEABLE" ><I ><serial_port></I ></TT >[,<TT CLASS="REPLACEABLE" ><I ><speed></I ></TT >[<TT CLASS="REPLACEABLE" ><I ><parity></I ></TT >[<TT CLASS="REPLACEABLE" ><I ><data></I ></TT >]]]</P ></DIV ><P >Where the variables are the same as used by the kernel (shown in <A HREF="preparation-setspeed.html#PREPARATION-SETSPEED-MODESYNTAX" >Figure 2-7</A >) and:</P ><DIV CLASS="FIGURE" ><A NAME="CONFIGURE-BOOT-LOADER-LILO-EBNF" ></A ><P ><B >Figure 4-2. <SPAN CLASS="PRODUCTNAME" >LILO</SPAN > <B CLASS="COMMAND" >serial</B > <SPAN CLASS="ACRONYM" >EBNF</SPAN > variables</B ></P ><P CLASS="LITERALLAYOUT" ><TT CLASS="REPLACEABLE" ><I ><serial_port></I ></TT > ::= <TT CLASS="LITERAL" >0</TT > | <TT CLASS="LITERAL" >1</TT >| … | <TT CLASS="LITERAL" >3</TT ></P ></DIV ><P >Our examples use <TT CLASS="FILENAME" >/dev/ttyS0</TT >, which <SPAN CLASS="APPLICATION" >LILO</SPAN > knows as port <TT CLASS="LITERAL" >0</TT >.</P ><DIV CLASS="FIGURE" ><A NAME="CONFIGURE-BOOT-LOADER-LILO-CONFIGURATION" ></A ><P ><B >Figure 4-3. <SPAN CLASS="APPLICATION" >LILO</SPAN > boot loader sample configuration</B ></P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="PROGRAMLISTING" >serial=0,9600n8 timeout=100 restricted password=<TT CLASS="REPLACEABLE" ><I >PASSWORD</I ></TT ></PRE ></FONT ></TD ></TR ></TABLE ></DIV ><P >The parameters <TT CLASS="LITERAL" >restricted</TT > and <TT CLASS="LITERAL" >password</TT > are used to avoid someone dialing in, booting the machine, and stepping around the Linux access permissions by typing:</P ><DIV CLASS="EXAMPLE" ><A NAME="CONFIGURE-BOOT-LOADER-LILO-HACK" ></A ><P ><B >Example 4-1. Using kernel parameters to avoid access permissions</B ></P ><TABLE BORDER="1" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="SCREEN" ><TT CLASS="PROMPT" >LILO:</TT > <B CLASS="COMMAND" >linux init=/sbin/sash</B ></PRE ></FONT ></TD ></TR ></TABLE ></DIV ><P >The password should be good, as it can be used to gain <SPAN CLASS="SYSTEMITEM" >root</SPAN > access. The <SPAN CLASS="APPLICATION" >LILO</SPAN > password is stored in plain text in the configuration file, so it should never be the same as any other password. The permissions on the configuration file should be set so that only <SPAN CLASS="SYSTEMITEM" >root</SPAN > can read <TT CLASS="FILENAME" >/etc/lilo.conf</TT >.</P ><DIV CLASS="INFORMALFIGURE" ><A NAME="AEN922" ></A ><P ></P ><TABLE BORDER="1" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="SCREEN" ><TT CLASS="PROMPT" >bash#</TT > <B CLASS="COMMAND" >chmod u=rw,go= /etc/lilo.conf</B ></PRE ></FONT ></TD ></TR ></TABLE ><P ></P ></DIV ><P ><SPAN CLASS="APPLICATION" >LILO</SPAN > has an option to display a boot message. This does not work with serial consoles. Remove any lines like:</P ><DIV CLASS="INFORMALFIGURE" ><A NAME="CONFIGURE-BOOT-LOADER-LILO-REMOVE-MESSAGE" ></A ><P ></P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="PROGRAMLISTING" >message=/boot/message</PRE ></FONT ></TD ></TR ></TABLE ><P ></P ></DIV ><P ><SPAN CLASS="APPLICATION" >LILO</SPAN > is now configured to use the serial console. The kernels booted from <SPAN CLASS="APPLICATION" >LILO</SPAN > are yet to be configured to use the serial console.</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.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-grub.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >Configure the 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 the <SPAN CLASS="APPLICATION" >GRUB</SPAN > boot loader</TD ></TR ></TABLE ></DIV ></BODY ></HTML >