<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V3.1//EN">
<article id="index">
<artheader>
   <title>PA-RISC/Linux Boot HOWTO</title>

   <author>
      <firstname>Deb</firstname>
      <surname>Richardson</surname>
      <affiliation>
         <orgname>The Puffin Group</orgname>
         <address>
            <email>deb@thepuffingroup.com</email>
         </address>
      </affiliation>
   </author>

   <revhistory>
      <revision>
         <revnumber>0.3 draft</revnumber>
         <date>November 24, 1999</date>
         <authorinitials>dlr</authorinitials>
      </revision>
   </revhistory>

   <abstract>
      <para>
      This document outlines the procedure for getting the current
      PA-RISC/Linux development kernel to boot on your PA-RISC system.
      </para>
     
         <para>
          This HOWTO does not currently include the information
          needed for booting your PA-RISC/Linux system from disk.
          The booting from disk procedures will be added as soon
          as they are available.  For more information about the
PA-RISC/Linux porting project, please see <ulink
url="http://www.thepuffingroup.com/parisc/">http://www.thepuffingroup.com/parisc/</ulink>.
          </para>

   </abstract>

</artheader>

<sect1 id="copyright">
<title>Copyright and Licensing</title>
<para>
Copyright (c) 1999 The Puffin Group and Deb Richardson.  This material
may be distributed only subject to the terms and conditions set forth in
the Open Publication License, v0.4 (8 June 1999) or later.  The latest
version of this license is available at <ulink
url="http://www.opencontent.org/openpub/">http://www.opencontent.org/openpub</ulink>.
</para>
</sect1>

<sect1 id="hardware">
<title>Supported Hardware</title>
<para>
The following PA-RISC machines can be booted to a sash prompt using the
latest PA-RISC/Linux development kernel.
</para>

<itemizedlist>
<listitem><para>
any 712, including 712/60, 712/64, 712/80, 712/100
</para></listitem>

<listitem><para>
newer 715s, including 715/75, 715/100
</para></listitem>

<listitem><para>
A180C and similar
</para></listitem>
</itemizedlist>

<para>
The following hardware won't work:
</para>

<itemizedlist>
<listitem><para>
anything PA1.0 or PA2.0 based
</para></listitem>

<listitem><para>
older 715s have I/O architecture problems that are still being worked on
</para></listitem>
</itemizedlist>

</sect1>

<sect1 id="preparation">
<title>Preparing to boot</title>

<sect2 id="consoles">
<title>Consoles</title>

<para>
In order to boot your PA-RISC system with the PA-RISC/Linux kernel, you
must first get a console on that system.  You can use either a graphics
console, which requires that a monitor be attached to the system, or a
serial console, which allows communication with the system from a remote
Linux machine.
</para>

<para>
If you have a monitor for your PA-RISC system, the easiest method is to
use a graphics console.
</para>

<sect3 id="graphicsconsole">
<title>Using a graphic console</title>

<para>
Using a graphic console is just a fancy way of saying "use the monitor attached to the machine".  If you have a monitor for your PA-RISC system, you should be able to bring up a console using the monitor, without having to mess with changing to and configuring a serial console.  
</para>

<para>
Obviously, if you can use a graphic console, this is the easiest way to proceed.
</para>

</sect3>

<sect3 id="serialconsole">
<title>Using a serial console</title>

<para>
The only time that you should have to use a serial console is if you either don't have a monitor for your PA-RISC machine, or your machine doesn't support graphics.  If you need to use a serial console, use the following procedures to set up serial console support.
</para>

<sect4 id="cable">
<title>Serial Cable</title>
<para>
To connect your PA-RISC machine to your PC so you can boot the system using a console, you need a 9 pin-to-9 pin female null-modem cable.  You should be able to obtain such a cable at your local computer hardware supplier.
</para>
</sect4>

<sect4 id="minicom">
<title>Configuring minicom on Linux</title>
<para>
In order to communicate with your PA-RISC machine during this process,
you have to set it up in "serial console" mode and configure a serial
communication program.  We recommend "minicom", which is installed in most
default Linux distributions.  If you don't have minicom on your system,
you can find the latest package at any of the major Linux software
sites.
</para>

<para>
Most of the minicom configuration is machine-dependent.  You must,
however, ensure that:
</para>

<orderedlist numeration="loweralpha">
<listitem><para>the baud rate is set to 9600</para></listitem>
<listitem><para>parity is set to 8-N-1</para></listitem>
</orderedlist>
</sect4>

<sect4 id="switchingconsoles">
<title>Switching consoles</title>
<para>
Before you can set up a serial connection between your Linux machine and
your PA-RISC machine, you have to change the console mode on the PA-RISC
system.
</para>

<para>
The default console mode is <literal>graphic_1</literal>.  To change
this, use the following procedure:
</para>

<orderedlist numeration="arabic">
<listitem>
<para>
Turn the PA-RISC machine on.
</para>
</listitem>

<listitem>
<para>
During the boot process, the following message will
appear:
</para>

<programlisting>
Searching for Potential Boot Devices.
To terminate search, press and hold the ESCAPE key.
</programlisting>

<para>
When this message appears, press and hold the <keycap>Esc</keycap> key
until an options menu appears.
</para>
</listitem>

<listitem>
<para>
The options menu looks like this:
</para>

<programlisting>
b)    Boot from specified device
s)    Search for bootable devices
a)    Enter Boot Administration mode
x)    Exit and continue boot sequence
?)    Help

Select from menu: 
</programlisting>

<para>
Select "a)  Enter Boot Administration mode".  This will bring up a
"<computeroutput>BOOT_ADMIN></computeroutput>" prompt.  Everything else
you do will be in BOOT_ADMIN mode.
</para>
</listitem>
</orderedlist>

<sect5>
<title>Checking current console mode</title>
<para>
Type: <command>path console</command> to see to which mode the console is
currently set.  
</para>

<para>
If it's in graphic console mode, it will return "<computeroutput>Console
path     = graphic_1</computeroutput>".  
</para>

<para>
If it's set to serial console, it will return "<computeroutput>Console
path    = rs232_a.9600.8.none</computeroutput>" or something similar.
</para>
</sect5>

<sect5>
<title>Changing to serial console mode</title>
<para>
To change to serial console mode, type the following command at the
BOOT_ADMIN command prompt:
</para>

<para>
<command>
path console rs232_a.9600.8.none
</command>
</para>

<para>
To verify that the console path has been properly set, type
<command>path console</command>.  This should return
<computeroutput>Console path    = rs232_a.9600.8.none</computeroutput>,
indicating that the system is now set to boot in serial console mode.
</para>
</sect5>

<sect5>
<title>How can I change the boot console to serial on a 712?</title>
<para>
Unfortunately, you can't.  Although 712s are configured for in-house HP
development to use serial console, this configuration isn't supported in
the field.  You have to use a graphics console for 712s.
</para>
</sect5>
</sect4>
</sect3>
</sect2>

<sect2 id="bootnetwork">
<title>Preparing to boot from the network</title>

<sect3>
<title><command>rbootd</command> or <command>bootp</command>?</title>
<para>
All new machines can boot using <command>bootp</command>, including the
715/100, /120, and /75, as well as all 712s.  
</para>

</sect3>

<sect3>
<title>Using <command>rbootd</command></title>

<sect4>
<title>Obtaining <command>rbootd</command></title>

<para>
If you have an older machine that requires <command>rbootd</command> to
boot off a network, use the following procedure to set up, configure,
and boot using the PA-RISC/Linux kernel.
</para>

<para>
Older machines, including the 715/33 and /50, require
<command>rbootd</command>.  You can obtain <command>rbootd</command>:
</para>

<itemizedlist>
<listitem><para>
for RedHat, from <ulink url="ftp://puffin.external.hp.com/pub/parisc/binaries/RPMS/">ftp://puffin.external.hp.com/pub/parisc/binaries/RPMS/</ulink>
</para></listitem>

<listitem><para>
for Debian, from <ulink url="http://www.debian.org/Packages/stable/net/rbootd.html">http://www.debian.org/Packages/stable/net/rbootd.html</ulink>
</para></listitem>
</itemizedlist>

</sect4>

<sect4 id="rbootd">
<title>Configuring <command>rbootd</command></title>
<para>
To boot a PA-RISC 715 system, you have to have rbootd installed on the
Linux system (a "boot server") where you will be storing the
PA-RISC/Linux kernel image that you want to use to boot your PA-RISC
system.
</para>

<para>
Once installed, use the following procedure to configure rbootd to work
with your PA-RISC system:
</para>

<orderedlist numeration="arabic">
<listitem>
<para>
In <filename>/etc/rbootd.conf</filename> add the following line:
</para>

<para>
<command>
ethernet addr <replaceable>bootfile</replaceable>
</command>
</para>

<para>
Replace <replaceable>bootfile</replaceable> with the name of your
PA-RISC/Linux kernel image, usually "<literal>vmLinux</literal>".
</para>
</listitem>

<listitem>
<para>
Now get the ethernet address of your PA-RISC system by typing
<command>lan_addr</command> at the BOOT_ADMIN prompt on your PA-RISC
system.
</para>

<para>
It will return a number like
<computeroutput>080009-7004b6</computeroutput>.  Make note of the number
returned.
</para>
</listitem>

<listitem>
<para>
In <filename>/etc/rbootd.conf</filename> on your boot server, the
ethernet address has to be colon-delimited.  So, you'll have to modify
the number you just obtained so every two characters (after removing the
"-") is separated by a colon.  For example:
</para>

<programlisting>
080009-7004b6
</programlisting>

<para>
becomes
</para>

<programlisting>
08:00:09:70:04:b6
</programlisting>

<para>
Add the colon delimited ethernet address to
<filename>/etc/rbootd.conf</filename> on your boot server.  The
resulting file will look something like this:
</para>

<programlisting>
# ethernet addr        boot file(s)        comments

08:00:09:87:e4:8f      vmlinux             # Linux
08:00:09:70:04:b6      stanley             # Linux
</programlisting>

<para>
This <filename>rbootd.conf</filename> example contains the ethernet
addresses and boot file names for two different machines.
</para>

<para>
Once you have changed the configuration file, restart
<command>rbootd</command>.
</para>
</listitem>
</orderedlist>

<note>
<para>
By default, <command>rbootd</command> assumes that bootfiles are located
in <filename class="directory">/export/hp/rbootd/</filename>.  Therefore,
you will have to put your bootable kernel image in that directory, or,
if you really hate that directory for some reason, you can recompile
<command>rbootd</command> to use a different directory.
</para>

<para>
The easiest thing, of course, is to just drop your kernel images in
<filename class="directory">/export/hp/rbootd/</filename>.
</para>
</note>
</sect4>

<!--

<sect3>
<title>Booting your PA-RISC/Linux system</title>
<para>
You've done everything outlined above, your development machine
is hooked up to your PA-RISC machine, you've got a bootable
PA-RISC/Linux kernel image on your boot server, and you're ready to give
it a try.  If everything is as it should be, the following procedure
will allow you to boot your PA-RISC system into Linux.
</para>

<orderedlist numeration="arabic">
<listitem>
<para>
Make sure your development machine is connected to your PA-RISC machine
with a serial cable.  Sounds obvious, but check anyways.
</para>
</listitem>

<listitem>
<para>
Fire up <command>minicom</command> on your development machine.
</para>
</listitem>

<listitem>
<para>
Turn your PA-RISC system off then on again.
</para>
</listitem>

<listitem>
<para>
Watch your minicom console.  When the following message appears during
the PA-RISC machine's boot process, press and hold the
<keycap>Esc</keycap> key:
</para>

<programlisting>
Searching for Potential Boot Devices.                                     
To terminate search, press and hold the ESCAPE key.          
</programlisting>
</listitem>

<listitem>
<para>
Select "<literal>a)  Enter Boot Administration mode</literal>" from the
menu.  This brings up the <literal>BOOT_ADMIN></literal> prompt.
</para>
</listitem>

<listitem>
<para>
Type the following at the prompt: <command>boot alt</command>.
</para>
</listitem>

<listitem>
<para>
Watch your PA-RISC system magically become a PA-RISC/Linux system.  Ta
dah!
</para>
</listitem>
</orderedlist>
</sect3>

-->

</sect3>

<sect3>
<title>Using <command>bootp</command>/<command>tftp</command></title>

<sect4>
<title>Obtaining
<command>bootp</command>/<command>tftp</command></title>

<para>
TBD
</para>

</sect4>

<sect4>
<title>Configuring <command>bootp</command>/<command>tftp</command></title>
<para>
Use the following procedure to use <command>bootp</command> on your boot server:
</para>

<orderedlist numeration="arabic">
<listitem><para>
Configure <filename>/etc/inetd.conf</filename> on your boot server by adding the following lines:
</para>

<programlisting>
tftp    dgram   udp   wait   root   /usr/sbin/tcpd in.tftpd/tftpboot 
bootps  dgram   udp   wait   root   /usr/sbin/bootpd /etc/bootptab
</programlisting>

<para>
Here, <filename class="directory">/tftpboot</filename> is being used for all file placement.  You can choose another directory if you want.
</para>

<para>
When this is done, restart <command>inetd</command> with: <command>/etc/rc.d/init.d/inetd restart</command>.
</para>
</listitem>

<listitem><para>
Set up the <filename>/etc/bootptab</filename> file to contain:
</para>

<programlisting>
<replaceable>[hostname]</replaceable>:hd=/tftpboot/Image:\
                             :rp=/usr/src/parisc/:\
                             :ht=ethernet:\
                             :ha=<replaceable>[mac address]</replaceable>:\
                             :ip=<replaceable>[ip address]</replaceable>:\
                             :bf=<replaceable>[boot file
name]</replaceable>:\
                             :sm=255.255.255.0:\
                             :to=7200:
</programlisting>

<para>
You have to fill in the <replaceable>[hostname]</replaceable>,
<replaceable>[mac address]</replaceable>, and <replaceable>[ip
address]</replaceable> with the appropriate information, of course,
where:
</para>

<itemizedlist>

<listitem><para>
[hostname] is the name of the PA-RISC host
</para></listitem>

<listitem><para>
[mac address] is the ethernet address of the PA-RISC box, which you
obtain by typing <command>lan_address</command> at the
<literal>BOOT_ADMIN></literal> prompt
</para></listitem>

<listitem><para>
[ip address] is the IP address of the PA-RISC system
</para></listitem>

<listitem><para>
[boot file name] is the name of the bootable kernel image (usually
<filename>Image</filename>)
</para></listitem>

</itemizedlist>

<para>
You'll end up with something like this:
</para>

<programlisting>
vodka:hd=/tftpboot:\
                             :rp=/usr/src/parisc/:\
                             :ht=ethernet:\
                             :ha=080069088717:\
                             :ip=140.244.9.208:\
                             :bf=Image:\
                             :sm=255.255.255.0:\
                             :to=7200:
</programlisting>
</listitem>
</orderedlist>
</sect4>
</sect3>

</sect2>

<sect2 id="bootdisk">
<title>Preparing to boot from disk</title>

<para>
TBD
</para>

</sect2>

<sect2>
<title>Changing the boot path</title>

<sect3>
<title>When booting from the network</title>

<para>
You now have to change the PA-RISC system's boot path to allow for
booting from a Linux kernel image stored elsewhere on the network.
</para>

<para>
First, at the <literal>BOOT_ADMIN></literal> prompt, type <command>path alt lan</command>.
This sets the "alternet boot path" to "local area network".
</para>

<para>
Now type <command>autoselect off</command> to shut off the boot
autoselect mechanism.
</para>
</sect3>

<sect3>
<title>When booting from disk</title>
<para>
TBD
</para>
</sect3>

</sect2>

<sect2 id="kernel">
<title>Obtaining and using the latest kernel</title>
<para>
You can obtain the most recent PA-RISC/Linux development kernel at the following ftp site.  Note that the kernel images are named according to the date they were created:
</para>

<para>
<ulink url="ftp://puffin.external.hp.com/pub/parisc/binaries/kernels/">ftp://puffin.external.hp.com/pub/parisc/binaries/kernels/</ulink>
</para>

<para>
When you have downloaded the latest image, we recommend that you rename
it to <filename>Image</filename>.  You must then place it in one of the
following directories, depending on the boot method you are using:
</para>

<itemizedlist>

<listitem><para>
If you are booting using <command>rbootd</command>, put the
<filename>Image</filename> file in <filename class="directory"> x
</filename>
</para></listitem>

<listitem><para>
If you are booting using <command>bootp</command>, put the
<filename>Image</filename> file in <filename class="directory"> x
</filename>.
</para></listitem>

<listitem><para>
If you are booting from disk, put the <filename>Image</filename> file in
...
</para></listitem>

</itemizedlist>
</sect2>
</sect1>

<sect1 id="booting">
<title>Booting your PA-RISC/Linux system</title>

<sect2>
<title>Booting from the network</title>
<para>
Whether you're booting using <command>rbootd</command> or <command>bootp</command>, the procedure for booting is identical:
</para>

<orderedlist numeration="arabic">
<listitem><para>
Get to a <literal>BOOT_ADMIN></literal> prompt.
</para></listitem>
<listitem><para>
Type <command>boot lan</command>
</para></listitem>
</orderedlist>

<para>
This will retrieve the kernel from the network boot server and use it to boot the PA-RISC machine.
</para>

</sect2>

<sect2>
<title>Booting from disk</title>
<para>
TBD
</para>
</sect2>

</sect1>

<sect1 id="contributors">
<title>HOWTO contributors</title>
<para>
The following people contributed to this fine HOWTO in one way or
another.
</para>

<itemizedlist>
<listitem><para>David Alexander deVries
<email>adevries@thepuffingroup.com</email></para></listitem>
<listitem><para>Philip Imperial Schwan
<email>pschwan@thepuffingroup.com</email></para></listitem>
</itemizedlist>
</sect1>

</article>

