Next Previous Contents

3. Installation of your iPAQ

This chapter describes, how to install a "new" Linux version including QPE on your iPAQ. Your iPAQ should have already a Linux running. Otherwise you have to follow the instructions for reflashing a Windows-Version. As I had a Linux-Version from the box (LISA), I can only describe my experiences.

3.1 Linux on your ipaq

To install Linux on your iPAQ from scratch, read the instructions on Handhelds.org

If you have an iPAQ already running Linux (available e.g. from, Lisa), or already installed by yourself, go on here.

Requirements (familiar 0.5.3)

To install the familiar 0.5.3 stable version, you can use the URLs below.

You need the following things to install 0.5.3 (for unstable versions use the newer packages):

Requirements (familiar 0.6-pre1)

To install the familiar 0.6-pre1 pre version, you can use the URLs below.

The installation of 0.6-pre1 including either gpe or opie is very easy now, because you only have to install the bootloader and than flash a root image containing everything required.

As familiar 0.6-pre1 comes with busybox tools (instead of single applications), the root image including the deskto environment is much smaller, than before. Nevertheless the task-opie has 10MBytes, which means, that you have some time to study the opie user doc at Opie user manual.

You need the following things to install 0.6-pre1:

Handling ipkgs (still 0.5.1)

This section describes, howto handle ipkgs.

Ipkgs are packages, that contain programm or library-modules for the iPAQ (and other handhelds). The reason to use ipkgs instead of e.g. rpms is, that they are small and flexible. Included is a possiblity to load packages directly from the internet. A short description is available via wiki/ipkg.

The following list gives an overview for the most used commands. The ipkg version 0.9 (included in familiar 0.5 is called by

ipkg [options...] sub-command [arguments...].

Try ipkg without any argument and you will get a list of possibilities.

See also Building your own ipkgs.

Installation of familiar on your iPAQ (0.5.3)

The installation procedure is well described in the file installation description available by internet. It works pretty fine.

As root-file system, I use the task-bootstrap. It comes with pcmcia and ssh, but without any special pcmcia card module. To get the network up, read the next chapter.

Installation of familiar on your iPAQ (0.6-pre1)

The installation procedure is well described in the file installation description available by internet. It works pretty fine.

You might want to load also the md5sum files and compare the transfered images. For this you have to call md5sum yourfile > yourfile.md5x;diff yourfile.md5 yourfile.md5x. If diff reclaimes differences, something went wrong during the data transfer. Under no circumstances you should try to install your bootloader then.

After the bootloader and bootimage is installed, you can boot the handheld. The system will come up directly with opie (if the opie boot installed).

Network preparation for PCMCIA on your iPAQ

Now it is time to setup the network on the iPAQ correctly. If you use a PCMCIA network, you should follow the instructions here. If you want to use a PPP connection, read the next subchapter.

see also Network preparations on your host

You will find out, that it is very boring to use the integrated vi via serial connection. The editor shows a lot of boring bugs, leading to total confused terminal output. For this, send the files to be adapted now to your host, edit them and resend them to your handheld. If the network is up, you can use ssh to login. Then the vi works fine. It seems to be a strange terminal emulation on the serial connection.

A sz /etc/pcmcia/network.opts sends the file to your download-directory. Do the same with /etc/hosts. Enter your ipaq as well as your host into the /etc/host-file and fill in the fields in the network.opts file. The following three paragraphs show my /etc/hosts, /etc/pcmcia/network.opts and /etc/resolv.conf. The resolv.conf is not found on the handheld, but can be copied from your host and be modified for the handheld (normally can stay, as it is). This file is needed for internet access.

The next paragraph shows a simple /etc/hosts file for the handheld.

        # hostfile of Werners iPAQ
        127.0.0.1       localhost familiar
        192.168.0.200   yourhost
        192.168.0.201   ipaq
        192.168.76.1    yourhosts
        192.168.76.2    ipaqs
        

The next paragraph shows the /etc/pcmcia/network.opts file for the iPAQ.

        # Network adapter configuration of Werners iPAQ
        #
        # The address format is "scheme,socket,instance,hwaddr".
        #
        # Note: the "network address" here is NOT the same as the IP address.
        # See the Networking HOWTO.  In short, the network address is the IP
        # address masked by the netmask.
        #
        case "$ADDRESS" in
        *,*,*,*)
            INFO="Sample private network setup"
            # Transceiver selection, for some cards -- see 'man ifport'
            IF_PORT=""
            # Use BOOTP (via /sbin/bootpc, or /sbin/pump)? [y/n]
            BOOTP="n"
            # Use DHCP (via /sbin/dhcpcd, /sbin/dhclient, or /sbin/pump)? [y/n]
            DHCP="n"
            PUMP='n'
            # If you need to explicitly specify a hostname for DHCP requests
            DHCP_HOSTNAME=""
            # host's IP address, netmask, network address, broadcast address
            IPADDR="192.168.0.201"
            NETMASK="255.255.0.0"
            NETWORK="192.168.0.0"
            BROADCAST="192.168.0.255"
            # Gateway address for static routing
            GATEWAY="192.168.0.200"
            # Things to add to /etc/resolv.conf for this interface
            DOMAIN="local"
            SEARCH="online.de"
            DNS_1="192.168.0.200"
            DNS_2="192.25.2.129"
            DNS_3=""
            # NFS mounts, should be listed in /etc/fstab
            MOUNTS=""
            # If you need to override the interface's MTU...
            MTU=""
            # For IPX interfaces, the frame type and network number
            IPX_FRAME=""
            IPX_NETNUM=""
            # Extra stuff to do after setting up the interface
            start_fn () { return; }
            # Extra stuff to do before shutting down the interface
            stop_fn () { return; }
            # Card eject policy options
            NO_CHECK=n
            NO_FUSER=n
            ;;
        esac
        

As you see, DHCP and PUMP are off, the standard gateway and nameserver is my host (Desktop-PC).

The next paragraph shows the /etc/resolv.conf file for the iPAQ.

        ### BEGIN INFO
        #   Werners iPAQs /etc/resolv.conf file
        ### END INFO
        domain local
        search online.de
        nameserver 192.168.0.200
        nameserver 194.25.2.129
        

Transfer all files back to your iPAQ (using the rz-method (described above)) into your iPAQs root-directory. Copy them from there to their destination locations overwriting the originals.

Note
If you get the message, that the file could not be transfered either to or from the host, normally, you have already a copy in the destination dir. In this case remove that copy and try again.

Get your PCMCIA-network card out and in again and try ifconfig. If you see the interface eth0 with the IP-address from your network.opts, everything is fine, if not, something can be wrong with the scripts, or maybe your PCMCIA-card is not known from the card-services. In this case consult the PCMCIA-howto on your host.

If the network is up, start your hosts internet connection and try ping www.suse.de on your iPAQ. If www.suse.de answers (takes some seconds), everything looks fine, if not see chapter FAQ.

Get the familiar package list by entering ipkg update. The iPAQ now has the list with all available packages from the handhelds.org host. You should install some packages from handhelds.org, before cleaning up the system. Follow the list below.

Using a self defined ipkg to get network up

see ipkg example : netup

From familiar 0.6-pre1 on, I had only to postinstall my pcmcia network card module. I transfer the xirc2ps module to the ipaq via the ppp connection and install it manually. From that point on the network is available.

3.2 Network preparation for PPP on your iPAQ

see also PPP preparations on the host and the iPAQ

Postinstallation

On older versions of familiar (before 0.5.3) you have to prepare ssh manually after installation. If you use an older version read this chapter. If you have 0.5.3, you can ignore it, because the installation does it automatically.

Get the familiar package list by entering ipkg update. You maybe asked to install the pending package ssh. Confirm that with Yes. You maybe need that for network login (see also Postinstallation ssh).

The iPAQ now has the list with all available packages from the handhelds.org host. You should install some packages from handhelds.org, before cleaning up the system. Follow the list below.

Postinstallation of SSH

Hint : this is not any more necessary from 0.5 on.

Included in the familiar-0.4 distribution, you can find a SSH package, that includes a client, as well as a server. As it is more comfortable to use ssh instead of minicom rzsz and it is the only method, if you dont have a login prompt (e.g. QPE does not start, but the network is up), you should make the ssh-system running.

After the /root complete-flash run, the ssh-package is installed the first time, you call ipkg (for e.g update). It is located in the pendig directory and you shuld confirm the question for installation with Y. After the installation is done, you can delete the content of the dierectory /usr/lib/ipkg/pending. If not, you are asked everytime, you want to use ipkg.

I installed ssh by creating a /etc/hosts.equiv file with the following content.

        ### BEGIN INFO
        #   Werners iPAQs /etc/hosts.equiv file
        ### END INFO
        schomep2
        sclap-3
        

Also I modified the config-files /etc/ssh/ssh_config and /etc/ssh/sshd_config The following paragraphs show both files.

        # This is ssh client systemwide configuration file.  This file provides
        # defaults for users, and the values can be changed in per-user configuration
        # files or on the command line.

        # Configuration data is parsed as follows:
        #  1. command line options
        #  2. user-specific file
        #  3. system-wide file
        # Any configuration value is only changed the first time it is set.
        # Thus, host-specific definitions should be at the beginning of the
        # configuration file, and defaults at the end.

        #######
        ### ForwardX11 & ForwardAgent
        ###   For security reasons, OpenSSH defaults to ``no'' for these settings
        ###   You should only enable them for hosts where you specifically trust the
        ###   administrators of the remote machine, otherwise you are leaving
        ###   yourself open to X11 based attacks, or to allowing your keys to be used
        ###   by others from the remote machine.   See also: ssh -X -x -A & -a options

        # we might as well switch them back on for localhost though
        host *
            ForwardAgent yes
            ForwardX11 yes

        # Site-wide defaults for various options

        # host *
        #   ForwardAgent no
        #   ForwardX11 no
            RhostsAuthentication no
            RhostsRSAAuthentication yes
            RSAAuthentication yes
            PasswordAuthentication yes
            FallBackToRsh no
            UseRsh no
        #   BatchMode no
        #   CheckhostIP yes
        #   StricthostKeyChecking no
        #   IdentityFile ~/.ssh/identity
        #   Port 22
        #   Protocol 2,1
        #   Cipher blowfish
        #   EscapeChar ~
        

        # This is ssh server systemwide configuration file.
        Port 22
        #Protocol 2,1
        ListenAddress 0.0.0.0
        #ListenAddress ::
        hostKey /etc/ssh/ssh_host_key
        ServerKeyBits 768
        LoginGraceTime 600
        KeyRegenerationInterval 3600
        PermitRootLogin yes
        #
        # Don't read ~/.rhosts and ~/.shosts files
        IgnoreRhosts yes
        # Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
        #IgnoreUserKnownhosts yes
        StrictModes yes
        X11Forwarding yes
        X11DisplayOffset 10
        #PrintMotd no
        #PrintLastLog no
        KeepAlive yes

        # Logging
        SyslogFacility AUTH
        LogLevel INFO
        #obsoletes QuietMode and FascistLogging

        RhostsAuthentication yes
        #
        # For this to work you will also need host keys in /etc/ssh_known_hosts
        RhostsRSAAuthentication no
        #
        RSAAuthentication yes

        # To disable tunneled clear text passwords, change to no here!
        PasswordAuthentication yes
        PermitEmptyPasswords yes
        # Uncomment to disable s/key passwords
        #SkeyAuthentication no

        # To change Kerberos options
        #KerberosAuthentication no
        #KerberosOrLocalPasswd yes
        #AFSTokenPassing no
        #KerberosTicketCleanup no

        # Kerberos TGT Passing does only work with the AFS kaserver
        #KerberosTgtPassing yes

        CheckMail no
        #UseLogin no

        #Subsystem      sftp    /usr/local/sbin/sftpd
        #MaxStartups 10:30:60
        

After that, you have to create the pulic and private keys. Enter
ssh-keygen -b 1024 -f /etc/ssh/ssh_host_key -N '' for the public key and
ssh-keygen for the private one. Confirm all questions and use a passphrase if you want.

After that is done, you can restart the ssh-server by entering /etc/rc2.d/S50ssh restart. The startup will give you the information, that the dsa-key is not found and Level 2 is disabled. This is OK, you can login now from your host.

3.3 QPE on your ipaq

To install QPE on your iPAQ, follow the steps described in this chapter.

Hint : using opie and qpe mixed is not recommended, though the programs are binary compatible. For this you have to make sure that either qpe or opie is allowed in your ipkg.conf. Just swith the other one of (using a leading #).

Requirements

You need the running familiar-0.4 or 0.5 distribution (installation described above).

Change or add a src-line in your /etc/ipkg.conf file. Change the url-entry to the sourceforge url (or to your host) to download the QPE-packages. The following paragraph shows the result for downloading from your own host.

If you are using an older distribution, you may use an old ipkg. In this case load the ipkg-0.9 or later ipk from the 0.5 distribution.

        # Must have one or more source entries of the form:
        #
        #       src <src-name> <source-url>
        #
        # and one or more destination entries of the form:
        #
        #       dest <dest-name> <target-path>
        #
        # where <src-name> and <dest-names> are identifiers that
        # should match [a-zA-Z0-9._-]+, <source-url> should be a
        # URL that points to a directory containing a Familiar
        # Packages file, and <target-path> should be a directory
        # that exists on the target system.

        src sclocal http://yourhost/familiar-0.5.3/packages/armv4l
        # src crl-demo ftp://lorien.handhelds.org/pub/linux/feeds/demo
        # src familiar-unstable http://familiar.handhelds.org/familiar/feeds/unstable/packages/armv4l
        # src sc-unstable http://schomep2/usr2/sc1/downloads/familiar-unstable/unstable/packages/armv4l
        # src sc-stable http://schomep2/usr2/sc1/downloads/familiar-0.4/Packages
        src qpe http://qpe.sourceforge.net/packages/ipaq/

        dest root /
        dest ram /mnt/ramfs
        dest ext /mnt/hda

        # Proxy support:
        #
        # option http_proxy proxyurl
        # option ftp_proxy proxyurl
        # option no_proxy noproxyhosts
        #option proxy_username <username>
        #option proxy_password <password>

        # Offline mode (for use in constructing flash images offline)
        #option offline_root target
        

Transfer the file back to your handheld and copy it to /etc/ipkg.conf.

Hint
You should never use multiple src locations in the ipkg.conf lines. This may give you random results. Always comment double ipk lines off (e.g. qpe from internet and from you host).

Installation of QPE on your handheld.

Make sure that only one qpe version is in your ipkg.conf file (also opie is one). Otherwise you might have problems installing qpe-base (needed by qpe-qipkg).

Connect your host to the internet and just enter ipkg update on your handheld. The handheld now loads an new update package (QPE-packages). After the update-list has received, you just have to install qpe-qipkg (ipkg install qpe-qipkg). This command will install a minimum qpe on your handheld. As it includes the qte-library and some other large files, this takes several minutes.

After the download succeded, you may reboot your handheld by entering reboot on your console. The system reboots and starts QPE. If that works, you have the system running.

!!! Attention !!!
As a non working QPE can stop your login process, this can lead to an inaccesable handheld, which normally means that you have to reflash your root filesystem and start the installation again. Because of this, remove the /etc/rc2.d/S98qpe file (is a symlink to /etc/init.d/qpe) and start qpe from the command line if logged in.

Congratulations !!!

The screen is empty, but you find a tool AddRemove Software in the second (setup-) tab-dialog. If you start that, you get the list of packages found in the /usr/lib/ipkg/available-file, which was downloaded by ipkg update before.

You see, which packages are already there and which not. By double clicking the package- line, you get the description and can choose, whether you want to install or remove the package. A quick method to choose packages is clicking on the symbol in the left column of the list.

If all required packages are selected, you can choose the DOIT-button on the bottom of the window to start the installation (your host has to be connected to the network). Everything else is done automatically now. The progress bar shows the actual state of the installation.

!!! Known Bugs !!!
If qpe-qipkg installation complains some pictures in /opt/QtPalmtop/pics where already installed by other packages, the ipkg program stops because of an error during installation process. Also the -force-reinstallation does not help. In this case you must manually remove the complained pictures and start the installation again. This may be necessary multiple times.

3.4 Where to find ipkgs

The main servers for ipkgs are already mentioned.

Beside it, there is also an ipkg-search engine page available. Here you can enter some search criteria and get links to the pages, where ipgs are found.

http://ipkgfind.handhelds.org/.

3.5 OPIE on your ipaq

To install OPIE on your iPAQ, follow the steps described in this chapter.

If you are using familiar 0.6-pre1, you may do that using the bootopie image. In this case nothing else is required, than the bootimage.

Requirements

You need the running familiar-0.5.3 distribution (installation described above).

Change or add a src-line in your /etc/ipkg.conf file. Change the url-entry to the sourceforge url (or to your host) to download the OPIE-packages. The following paragraph shows the result for downloading from your own host.

        # Must have one or more source entries of the form:
        #
        #       src <src-name> <source-url>
        #
        # and one or more destination entries of the form:
        #
        #       dest <dest-name> <target-path>
        #
        # where <src-name> and <dest-names> are identifiers that
        # should match [a-zA-Z0-9._-]+, <source-url> should be a
        # URL that points to a directory containing a Familiar
        # Packages file, and <target-path> should be a directory
        # that exists on the target system.

        src sclocal http://yourhost/familiar-0.5.3/packages/armv4l
        # src crl-demo ftp://lorien.handhelds.org/pub/linux/feeds/demo
        # src familiar-unstable http://familiar.handhelds.org/familiar/feeds/unstable/packages/armv4l
        # src sc-unstable http://schomep2/usr2/sc1/downloads/familiar-unstable/unstable/packages/armv4l
        # src sc-stable http://schomep2/usr2/sc1/downloads/familiar-0.4/Packages
        src opie http://131.152.105.154/feed/ipaq/unstable

        dest root /
        dest ram /mnt/ramfs
        dest ext /mnt/hda

        # Proxy support:
        #
        # option http_proxy proxyurl
        # option ftp_proxy proxyurl
        # option no_proxy noproxyhosts
        #option proxy_username <username>
        #option proxy_password <password>

        # Offline mode (for use in constructing flash images offline)
        #option offline_root target
        

Transfer the file back to your handheld and copy it to /etc/ipkg.conf.

Installation of OPIE on your handheld.

Connect your host to the internet and just enter ipkg update on your handheld. The handheld now loads an new update package (OPIE-packages). After the update-list has received, you just have to install task-opie (ipkg install task-opie). This command will install a minimum opie on your handheld. As it includes the qte-library and some other large files, this takes several minutes.

After the download succeded, try to call /etc/init.d/opie start. Opie should start with the calibration screen.

!!! Attention !!!
As a non working OPIE can stop your login process, this can lead to an inaccesable handheld, which normally means that you have to reflash your root filesystem and start the installation again. Because of this, remove the /etc/rc2.d/S98qpe file (is a symlink to /etc/init.d/qpe) and start qpe from the command line if logged in.

You may reboot your handheld by entering reboot on your console. The system reboots and starts OPIE. If that works, you have the system running.

Congratulations !!!

The screen is empty, but you find a tool Software in the second (setup-) tab-dialog. If you start that, you get the list of packages found in the /usr/lib/ipkg/available-file, which was downloaded by ipkg update before.

You see, which packages are already there and which not. By double clicking the package- line, you get the description and can choose, whether you want to install or remove the package. A quick method to choose packages is clicking on the symbol in the left column of the list.

If all required packages are selected, you can choose the Install-button on top of the window. A new window is opened and shows the selected install / remove packages. Confirm that with the windows OK button. The installation progress is shown in a multitextlineview.

!!! Bug !!!
The opie-oipkg does not work always. I did not yet find out, but I assume, that it crashes because of selecting more than one package. Im trying to find out, what is the reason, because installations from the console always work.

Installation of OPIE unstable

If you are using familiar 0.5.3 and the unstable opie feed, the system denies task-opie installation because libuuid1 is not found as a package. Libuuid1 should be installed in familiar 0.5.3 but is not a single package. To get arround this problem you may modify the /usr/lib/ipkg/status and insert the folling lines.

        Package: libuuid1
        Version: 1.25.1-6
        Status: install ok installed
        

The version number should match the version installed. After the modification the ipkg system does not complain task-opie installation any more.

Hint
If libuuid1 is not installed on you system, you ma try to install it from opie feed using ipkg install libuuid1.

3.6 Very helpfull packages

You will find out, that some very important functions like find, ps, e.g. are missing in the familiar distro. To get around this, you can install the busybox called package which is partly commercial.

BusyBox

The busybox ipkg can be found using the ipkgfind page. Transfer it to your iPaq and install it. You will find out, that you still cannot call ps, find, e.g. Thats correct.

It is also availlable here : familiar unstable.

Busybox is a multi application program. Dependend on the name you call it with, busybox does totally other things.

To get for example the function ps working, you just have to set a link to the busybox binary called ps. You can do that using

ln -s /usr/bin/busybox /usr/bin/ps

If you now call ps -ef it works. Magic !!!

Busybox version 0.60.3-1 contains the following commands ( busybox output ):

        sh-2.03#busybox
        BusyBox v0.60.3-pre (2002.01.18-05:00+0000) multi-call binary

        Usage: busybox [function] [arguments]...
           or: [function] [arguments]...

                BusyBox is a multi-call binary that combines many common Unix
                utilities into a single executable.  Most people will create a
                link to busybox for each function they wish to use, and BusyBox
                will act like whatever it was invoked as.

        Currently defined functions:
                [, basename, busybox, cat, chgrp, chmod, chown, chroot, chvt,
                clear, cmp, cp, cpio, cut, date, dd, df, dirname, dmesg, dos2unix,
                dpkg, dpkg-deb, du, dumpkmap, dutmp, echo, egrep, env, expr, false,
                fbset, find, free, grep, gunzip, gzip, halt, head, hostid, hostname,
                id, ifconfig, init, insmod, kill, killall, klogd, linuxrc, ln,
                logger, ls, lsmod, makedevs, md5sum, mkdir, mkfifo, mknod, mkswap,
                mktemp, modprobe, more, mount, msh, mv, nc, nslookup, pidof, ping,
                pivot_root, poweroff, printf, ps, pwd, readlink, reboot, renice,
                reset, rm, rmdir, rmmod, route, sed, sh, sleep, sort, stty, swapoff,
                swapon, sync, syslogd, tail, tar, tee, telnet, test, tftp, time,
                touch, tr, traceroute, true, tty, umount, uname, uniq, unix2dos,
                update, uptime, usleep, uudecode, uuencode, vi, watchdog, wc,
                wget, which, whoami, xargs, yes, zcat

        sh-2.03#
        

Attention !!!
You could be tempted to throw all included programs away and just use busybox to spare space. As not all busybox functions are compatible, I suggest to use only that ones missing. My proposal is integrated into a script, which does all links for you (script.tar.gz - busybox/lnbusybox.rc). It contains

                clear, find, killall, mkswap, more, nslookup, ps, swapoff, swapon,
                telnet, tftp, traceroute, uptime, zcat
        

Transfer the script to your handheld and call sh lnbusybox.rc there. The script will remove all old links and set new ones to busybox.

3.7 Removing complete desktop applications

If you want to install qtopia or qpe instead of opie, you will find out, that it is very boaring to remove every package from your system using single ipkg remove package-name commands (with full package name).

Opie comes with a package opie-remove. If you want to remove opie, this is ok. But whats with qpe ?

I use a self arranged script (using shell / grep / sed) to remove multiple packages.

iremove.rc gpattern removes all packages, which package name fit the grep pattern "gpattern". The script uses ipkg status

You can find the script in the scripts.tar.gz download (scripts/ipkg-tools).


Next Previous Contents