7. Using ArLo - Booting Linux from EPOC

7.1. Introduction/Example Configuration File

ArLo is used to boot to linux after EPOC has been started. Note, however, that Bookboot described in the previous section seems to be the preferred booting approach. ArLo is installed by unzipping its distribution files onto the D:\ drive of the compactflash card, the EPOC partition. The ArLo distribution can be obtained from the Openpsion file releases. ArLo comes with a variety of elements, the one requiring user configuration is the arlo.cfg file. For the netBook, the option "machine = series 7" is used to tell ArLo the machine type; note the space between "series" and "7". You can use the arlo.cfg file below as a guide of how to configure ArLo. More about ArLo on the Series 7/netBook can be found at Peter van Sebille's Place and a manual for ArLo is available. Note that the Arlo GUI configuration save will not save the "machine = series 7" option, so the arlo.cfg file MUST be edited manually with a text editor.

The arlo.cfg file has an option "boot = init=/linuxrc" which will cause linux to first run "/linuxrc" on the initrd, and this script is normally used to take care of mounting the compactflash disk and transferring the root filesystem to it. A failsafe option is "boot = init=/bin/ash" (if you have /bin/ash on your system) which will merely start an ash shell (that you can't exit from without a system crash...) and do nothing else.

There are a number of other options described in the example arlo.cfg file.

Here is an example ARLO.CFG file:

# This configuration file will work for the Psion netBook.
# You must edit this file with a text editor to have "series 7" option saved properly.
#

[EPOC]
# The text within brackets "[XXX]" just defines a name.
# This "null" option boots back to ordinary EPOC.

[linux]
  image = D:\linux.image
  boot = root=/dev/hda2
# This option will not work at present, because we have no way of mounting /dev/hda2
# without using the PCMCIA modules.  So an initrd must first be used to mount the compactflash
# system and transfer root to it.

[linux initrd]
  image = D:\linux.image
  initrd = D:\initrd.gz
# Tells ArLo where to find the initrd.gz filesystem in EPOC.
# This will be the root filesystem, kept in memory.
  boot = init=/bin/ash
# * The "init=/bin/ash" option is for initrd's that do not have an init/sysvinit set up.  
#     It starts an ash shell as the initial program, and does nothing else. 
#     (change to /bin/bash, etc. if you like) 
#     Omit this if your initrd has a proper /sbin/init.
# * For compactflash support, use the boot option "init=/linuxrc" , or something similar, 
#    where /linuxrc is a script that will initialize and mount the compactflash partition. 
# * To have the system console be dumped down the serial line, add the boot option "console=ttySA0".
# * To enable ramdisk size's to be XXXXX KB in size, add the boot option "ramdisk_size=XXXXX".
#    This option seems to work sometimes, and not others.
  machine = series 7
# note the space between "series" and "7"!!! :)

#
# General options
#
default = linux initrd
# Tells ArLo that the default option is "linux initrd" - the 
#  option with this name will start by default.
# 

7.2. ArLo Kernel Memory Configuration Options

It is possible (through any boot method, including ArLo) to specify the memory config via options to the "boot=" commandline.

  1. For 32MB this should be: mem=16MB@0xc0000000 mem=16M@0xc8000000

  2. For 64MB this should be: mem=16MB@0xc0000000 mem=16M@0xc8000000 mem=16MB@0xd0000000 mem=16M@0xd8000000

Once again, the kernel will only use this information if the memory config is not hardwired; the 16MB kernels fulfill this criterion, while the 32MB and 64MB do not. Kernels booted through ArLo should use the 'default' memory config [16 MB] at compile time, and supply one of the above commandline items in the arlo.cfg file, depending on if you have a 32MB or 64MB system.

So for example a boot option to start a /linuxrc script on an initrd, configure 32 MB of system memory, and start the system console on the serial line, would be:

boot = init=/linuxrc mem=16MB@0xc0000000 mem=16M@0xc8000000 console=ttySA0 

7.3. Howto Boot ArLo First in EPOC

To boot up ArLo as the first thing to start after resetting your netBook, you can define a plain text file called D:\System\Data\wsini.ini containing the following lines (modified from the default Z:\SYSTEM\DATA\WSINI.INI):

BASERGB 255,255,255
PALETTE 0,85,150,255
AUTOCLEAR 1
SHELLCMD \System\Apps\Shell\Shell.APP
STARTUP D:\ARLO\ARLOSH.EXE
WINDOWMODE COLOR256
SCR_WIDTH1 640
SCR_HEIGHT1 480
SCR_WIDTH2 480
SCR_HEIGHT2 640
This will cause EPOC to startup ARLOSH.EXE at boot up first, giving the option of continuing to boot up EPOC or boot to linux. [This looks very much like the LILO prompt in an ordinary linuxbox.] The advantage here is that the start up time is much faster, since all of the EPOC programs don't have to startup before you get to ArLo.

7.4. ArLo Memory Limitations

Arlo has a design limitation that prevents initrd files that are larger than about 3.5-4 MB from loading properly. The size of the initrd.gz file must be less than this to work, even though the filesystem itself (once loaded in linux) can be any size. The number of applications that can be put on a working initrd filesystem is therefore greatly constrained. There has not been much progress on reworking Arlo (and boot2nd) to allow for larger initrd's; with compactflash support the need is not really there (though it would be nice to have larger initrd's). Technical details from Klaasjan:

Arlo and boot2nd assume that the memory_map is limited to one page (4096 
bytes). This memory_map contains word-size (4 bytes) entries of each page 
that needs to be relocated.  So the memory_map can contain 1024 entries, 
each pointing to a 4kB page, allowing for 4MB total space for everything 
needed in the second stage of the boot process: bootn2d, its parameters, 
kernel, and initrd.  Since the compressed kernel is about 0.5MB (while 
boot2nd and parameters only take a few pages), you're left with about 
3.5MB for the initrd.
So redesigning Arlo and boot 2nd for larger initrd's will take a bit of doing. I suspect that this is not likely to be developed any further for the forseeable future.