Whole document tree
    

Whole document tree

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

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

5.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.

5.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. The major point is that lifimage file is a bootable kernel and vmlinux is the kernel itself and it needs PALO to be bootable.

5.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.

5.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 10.10.10.2 for IP adress, then the default file is ok because we can read into:
NFSROOT = 10.10.10.2
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.

5.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

5.6. How to use PALO at the boot ?

5.6.1. The theory

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.

5.6.2. One example

This example is the work of Michael Damaschke. So, let's go for the story of the happy PA/Linux user booting a kernel, also called I don' t know how I can configure my workstation to boot the right kernel I want ?.

After the power on of your workstation and monitor there is a message on the screen how told you that the workstation wants to start automatically an bootdevice or you can hold the Esc key to break up the auto-booting., on this situation you must hold the Esc key.

Note

Depending on your model, you need to press this key during a long time. Also, your monitor can be too slow to be up while the message is on the screen. So, if you see your leds on your keyboard blinking, it is the signal to press and hold the Esc key. If you still have troubles, please refer to the Consoles section.

Now, there is some little differences about the way to get access to BOOT_ADMIN If you have an old box, you get a new Information message on your screen where the workstation-firmware told you that it would like to search for all bootable devices or you can break this by holding the Esc key. So you must do the same procedure you have done before, you must hold the Esc key.

Then you get a menu where you must push the a-key with following ENTER-Key, so know you are on the BOOT_ADMIN Prompt. First, we must turn off the auto booting by the following lines on the BOOT_ADMIN Prompt:
BOOT_ADMIN> autoboot off
then press the ENTER key.

After that, you must tell the system from wich SCSI boot device you would like to boot. This device must have the f0 type partition where the PALO loader lives.

For this example, the old kernel is vmlinux-2.4.9-32 and the new one for example vmlinux-2.4.17-pa3. The format of the SCSI boot device is: SCSI.X.0 where X is the SCSI-ID of the disk you want. For example:
BOOT_ADMIN> boot SCSI.5.0
After the command boot and the SCSI-ID, you must add IPL if you have a HP 9000/7xx to tell that you want to interact with IPL. If you have a more recent hardware, the system will ask if you want to interact with IPL:
Interact with IPL (Y or N)?>
Now, you can manual configure the PALO booting parameters. For example:
BOOT_ADMIN> boot scsi.5.0 ipl
then press the ENTER key.

Now you can see a new Menu where you can configure on line 0 (default) the boot partition number, the path and the name where your boot kernel is. It should looks like this:
HARD Booted.
palo ipl 0.92 root@spqr Mon Jun 25 23:03:13 CEST 2001
3/vmlinux-2.4.9-32 3585851 bytes @ 0x6d8f800
Current command line:
3/vmlinux-2.4.9-32 root=/dev/sda3 console=ttyS0 TERM=vt102
 0: 3/vmlinux-2.4.9-32
 1: root=/dev/sda3
 2: console=ttyS0
 3: TERM=vt102

Edit which field?
(or 'b' to boot with this command line)? 0
You are asking PALO to boot the kernel file vmlinux-2.4.9-32 living on the third partition of scsi.5.0. But you want another kernel this time. So, you press the ENTER key and you modify the text to match with your needs, here vmlinux-2.4.17-pa3. You validate your input via the ENTER key. Then, it asks you which field you want to edit, just put "b" to boot your new kernel! After that you must press the ENTER key, please don't chance other parameters if you don't know what you do ! Now, PALO has no secret for you :-)