4. Booting your PA-RISC/Linux system via PALO, the kernel loader

4.1. What is PALO?

PALO is two programs, a boot loader, which is loaded by the HP firmware into memory and then executed, and boot media management tool, which initializes and updates bootable media such as disks. The PALO boot loader executable is stored in a file called iplboot. "IPL" is HP jargon for Initial Program Loader. The boot media management tool is called PALO, just as on x86 the lilo boot media management tool is called LILO, though it's worth noting that PALO doesn't usually need to be used every time you build a new kernel, as LILO does.

4.2. What does PALO?

The main idea is to boot a kernel passing all the parameters it needs. The practical experience is a little more complicated. Indeed, PALO can transform the classical vmlinux into a HP-UX bootable lifimage including a RAMDISK or a NFSROOT redirection. However, it could make a hard disk drive bootable specifying the console output and the root device. We are going to see all these points precisely.

4.3. How to make a lifimage with RAMDISK ?

First point is to explain when you should use this way. At an earlier step of PA/Linux project, the lifimage was very useful. In fact, you put this file in the bootp server tree and then you can boot your HP box via boot lan instruction. The advantage of ramdisk is to unpack its own file system and to be completely independant. The main drawback is the fact that you have to build your own ramdisk if you have some memory constraints or some files customized. Now, let's see how to get a lifimage. So, you get the latest source of PA/Linux. Mainly, you will need a good cross-compiler and the linux and palo directory. Everything you need is at http://www.parisc-linux.org/. You do your make menuconfig. Then, you just have to do make palo. The point is that in the palo directory, you have the PALO Makefile in which you have to select the ramdisk file. So, initially, you can read:

# RAMDISK = ${PA}/ramdisk.bin
Thus, if you want to use the RAMDISK support with a file called for example ramdisk.bin and placed in the linux directory, you just have to uncomment it:
RAMDISK = ${PA}/ramdisk.bin
After configuring the Makefile, you can go into the linux directory and launch your make palo. The result, a lifimage file, is waiting for you in the PALO directory.

4.4. How to make a lifimage with NFSROOT ?

This method is widely used because the kernel and the file system is visible since your server. It is also very easy to test a new kernel. You just have to generate the kernel and then you put it in the correct directory. After rebooting, the HP box will find via boot lan instruction its new kernel. Getting the NFSROOT support is easier than the RAMDISK. You edit the Makefile of PALO and you specify the tftpboot server IP adress. In fact, if your server has for IP adress, then the default file is ok because we can read into:

If you have anything else, this field must be completed by the correct data. After configuring the Makefile, you can go into the linux directory and launch your make palo. The result, a lifimage file, is waiting for you in the PALO directory.

4.5. How to make bootable a partition ?

This part is where PALO will be seen as LILO. PALO is mainly a program that enables HP box to boot via a kernel on its own hard disk drive. This section is going to explain you how to make it right. When you install the PALO package, Paul Bame, the author and maintainer, put a copy of the default /etc/palo.conf in the /usr/doc/share/doc/palo/palo.conf. If you want to understand how PALO works, you just have to read this file! This sample comes from palo.conf. It is the default value. We advice you to stay close to this scheme. However, the parameter recoverykernel is the path to the kernel that you want to boot with in a failsafe session! The next one, bootloader, is the path to this utility which is produced by PALO when you ask for make iplboot. init-partitioned is used to tell on which device you want to write the result. The effect is immediate. It means that PALO is going to write on the first octets of this partition. A good advice will be to check this info with fdisk, in order to be sure to update the good drive. Finally, the last parameter is the commandline! The first number indicates which partition PALO has to mount in order to get the kernel file! Logically, the following string is the absolute path to the kernel. HOME and TERM seem to be some environmental parameters passed to init. They are not compulsory but they can be useful. The root parameter explains to the kernel which partition it must mount for the root file system in read-only while booting. It can be tricky when you plug two disks. You could add some very interesting parameters like console where you can specify the output for the console. You should know that console=ttyS0 is for a serial console and console=tty0 is for a STI-console. In the latest version of PALO, this path should be added automatically and correctly. If not, please mail to the mailing list.

# 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

4.6. How to use PALO at the boot ?

After installing your PALO, you would like to modify the parameters you pass to the kernel. First, you must know how to interact with PALO at the startup. For some old models, you must add ipl to your command in the boot admin console: BOOT_ADMIN> boot pri ipl For the recent HP boxes, the system will ask you if you want to interact with IPL. You just have to answer by a "y". Then, you are in PALO with the list of all the parameters and the corresponding number. Then, you enter the number of the parameter you want to change. You hit Enter and you modify it and you validate. The system will redisplay the new list. This modification is not permanent! To write your changes, you have to run /sbin/palo and it will write on the disk all the parameters contained in the default file, eg /etc/palo.conf. If you want to add another parameter, you select one parameter and write yours with a space between the two. If you want to delete one, you select it and erase the complete entry. You will see that the list counts one parameter less.

For more informations about PALO, please look at the PALO readme. This section is mainly inspired from this Paul Bame's file and my current page about PALO that you can find at http://mkhppa1.esiee.fr/palo.html.