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.
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.
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! |
# 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 |
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 |
For advanced details on NFSROOT management, take a look at Bibliography for the appropriate HOWTOs.
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 :
A partition within the first 2GB of your target device has to be of partition type 'f0', which is the reserved partition type for PALO boot loader.
It does not need to be huge. This is were PALO will save its configuration, recovery kernel(s) - about 5MB each - and optional ramdisk. 16-32MB seems far sufficient.
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 :
recoverykernel is the path to the kernel that you want to boot within a failsafe session, it will be stored in the 'f0' partition.
bootloader is the path to the iplboot boot loader utility which is created by PALO when you issue a make iplboot.
init-partitioned is used to indicate the pre-partionned device where palo will write its boot parameters. The effect is immediate. It means that PALO is going to write on the first octets of the first partition of this device, which partition-type must be 'f0', as shown above.
commandline : the first digit is the number of your ext2 partition where the kernel file is located, as reported by fdisk. Logically, the next string is the absolute path to the kernel. The following space separated parameters will be passed to the kernel as its arguments. e.g. : HOME= and TERM= are environmental parameters passed to init when booting. They are not compulsory but they can be useful. root= tells the kernel which partition it must mount as the root file system while booting. It can be tricky when you have more than one disk.
You can also add console=, to force the designation of the output console. You should remind that console=ttyS0 is for a serial console and console=tty0 is for a STI-console. Recently, support for the PDC console (if enabled in the kernel, see Section 6.2.3) has been added, using console=ttyB0. Indeed, the latest versions of PALO autodetect the right console path (except for PDC), and can figure out whether a 32bit or 64bit kernel should be used. If not, please mail to the mailing list.
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 |