4.3. PALO management tool usage

Here we will show you what can be done with the PALO boot media management tool. For in-depth information about palo usage, we strongly advise you to take a look at PALO's README file, which can be found in palo/ directory on http://cvs.parisc-linux.org/.

For the next two steps, you will need a compiler toolchain, see Section 6.1.

4.3.1. Making a lifimage with RAMDISK

First things first : when should you go this way ?

At an earlier step of the PA/Linux project, the lifimage was very useful. In fact, simply putting this file in a boot server tree allows you to boot your HP box via the boot lan instruction without any further involvement (see Section 5.3). The main advantage of a RAMDISK is that it unpacks its own file system in RAM, and therefore is completely independant from the machine I/O capabilities (hard drives, etc). The main drawback is that you have to build your own RAMDISK if you have memory constraints or some customized files. Now, let's see how to obtain a lifimage with RAMDISK.

Tip

If you don't want to mess with building your own RAMDISK, you can use root.bin that can be found on Debian Boot-Floppies.

We assume you got the latest source of the PA/Linux kernel. Mainly, you will need a (cross-)compiler, the linux/ directory and the PALO package installed. If you do not have it, run as root apt-get install palo. Everything can be found at http://www.parisc-linux.org/. Go through the make menuconfig step. Then, run make palo and if you have the PALO installed, you should get this message at the end of the compilation :

A generic palo config file (./palo.conf) has been created for you.
You should check it and re-run "make palo".
WARNING: the "lifimage" file is now placed in this directory by default!
So, edit the palo.conf file :

# This a generic Palo configuration file.  For more information about how
# it works try 'palo -?'.
#
# Most people using 'make palo' want a bootable file, usable for
# network or tape booting for example.
--init-tape=lifimage
--recoverykernel=vmlinux

########## Pick your ROOT here! ##########
# You need at least one 'root='!
#
# If you want a root ramdisk, use the next 2 lines
#   (Edit the ramdisk image name!!!!)
--ramdisk=ram-disk-image-file
--commandline=0/vmlinux HOME=/ root=/dev/ram initrd=0/ramdisk

# If you want NFS root, use the following command line (Edit the HOSTNAME!!!)
#--commandline=0/vmlinux HOME=/ root=/dev/nfs nfsroot=HOSTNAME ip=bootp

# If you have root on a disk partition, use this (Edit the partition name!!!)
#--commandline=0/vmlinux HOME=/ root=/dev/sda1
As you can see, the RAMDISK mode is the default. The string ram-disk-image-file should give to PALO the path of your RAMDISK file. You shouldn't change anything else to this file. After configuring the palo.conf, you can go back to your make palo. The result, a lifimage file, is waiting for you in the linux/ directory.

4.3.2. Making a lifimage with NFSROOT

This method is widely used because the kernel and the file system are directly accessible on your boot server. It is also very easy to test a new kernel. You just have to generate the kernel and put it in the correct directory. When starting up, the PA-RISC box will boot via the boot lan instruction its new kernel.

Getting the NFSROOT support is easier than RAMDISK. You have to edit the palo.conf to specify the boot server IP address instead of the string HOSTNAME. In fact, if your server has 10.10.10.2 as its IP adress, then the palo.conf file should contain :

# This a generic Palo configuration file.  For more information about how
# it works try 'palo -?'.
#
# Most people using 'make palo' want a bootable file, usable for
# network or tape booting for example.
--init-tape=lifimage
--recoverykernel=vmlinux

########## Pick your ROOT here! ##########
# You need at least one 'root='!
#
# If you want a root ramdisk, use the next 2 lines
#   (Edit the ramdisk image name!!!!)
#--ramdisk=ram-disk-image-file
#--commandline=0/vmlinux HOME=/ root=/dev/ram initrd=0/ramdisk

# If you want NFS root, use the following command line (Edit the HOSTNAME!!!)
--commandline=0/vmlinux HOME=/ root=/dev/nfs nfsroot=10.10.10.2 ip=bootp

# If you have root on a disk partition, use this (Edit the partition name!!!)
#--commandline=0/vmlinux HOME=/ root=/dev/sda1
If you have another IP, this field must be filled in with the correct data. You shouldn't change anything else to this file. After having configured the palo.conf, you can go into the linux/ directory and issue a make palo. The result, a lifimage file, is as usual waiting for you in the linux/ directory.

For advanced details on NFSROOT management, take a look at Bibliography for the appropriate HOWTOs.

4.3.3. Making a bootable partition

This part is where PALO can be seen as a LILO clone. PALO is mainly a program that enables a PA box to boot a kernel present on its own hard disk drive. This section is going to explain how to make it work. When installing the PALO package, Paul Bame, the author and maintainer, put a copy of the default /etc/palo.conf in /usr/share/doc/palo/palo.conf. If you want to understand how PALO works, you just have to read this file !

To setup a bootable hard disk, you have to partition properly your hard drive (if any, and if you want to use it as your primary boot device). This implies that this step can only be achieved either if you have already booted a minimal system on your PA-RISC box (via CD or network, see Chapter 5), or if you intend to prepare your hard disk using another computer than the target (which can be useful to unpack and setup a downloaded file system for example). The point of this HOWTO is not to teach you how to use fdisk or other, so here are the few things you HAVE TO know :

Warning

Beware ! Your vmlinux has also to be located within the first 2GB of the hard disk. We strongly recommend to create a separated /boot partition at the front of the disk if your '/' is bigger than that, because if ever your vmlinux goes above the first 2GB of the disk (like when filling up '/' with data), the box won't boot anymore.

Here is the output of fdisk which represents the hard drive of a box with 16MB PALO space, 128MB swap space and about 1GB '/' partition :


bash# fdisk -l /dev/sda

Disk /dev/sda: 133 heads, 62 sectors, 1017 cylinders
Units = cylinders of 8246 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sda1   *         1         4     16461   f0  Linux/PA-RISC boot
/dev/sda2             5        34    123690   82  Linux swap
/dev/sda3   *        35       277   1001889   83  Linux

Now let's deal with PALO configuration. Here are the various parameters you can change :

In fact, this third usage of PALO is the most common but the default /etc/palo.conf makes it easy to configure. Just choose your root partition. It should the partition containing your root directory. According our fdisk example, we want /dev/sda3. Thus, the configuration file should look like that :

# The following arguments are set up for booting from /dev/sda3, specifically
# mounting partition 3 as root, and using /boot/vmlinux as both the
# recovery kernel, and the default dynamically-booted kernel.
--recoverykernel=/boot/vmlinux
--bootloader=/boot/iplboot
--init-partitioned=/dev/sda
--commandline=3/boot/vmlinux HOME=/ TERM=linux root=/dev/sda3