Rg Install

From Bubble

Contents

Requirements

  • RG-1000 device :-?
  • TFTP Server
  • NFS Server
  • DHCP Server
  • RC-1000 ReseauCitoyen distribution.
    Download the latest build
    It contains 3 files:
    • firmware-rc1000.img: RG-1000 firware image (!KarlBridge) with Etherboot
    • kernel-rc1000.nbi: Linux kernel 2.4 in Network Bootable Image format
    • root-fs-rc1000.tbz: Root filesystem bzipped tarball

Flash the new RG-1000 Firmware

First, you need to re-flash your RG-1000 with the firmware-rc1000.img firmware

See the Rg Flash for more details

Upgrade the Orinoco card Firmware

The RG-1000 contains an Orinoco card with a relatively old firmware.
Although not mandatory, I strongly recommend to upgrade the firmware of the card.

You will have to open your RG-1000 (See pictures)
Follow these instructions

TFTP Server

We strongly recommend the use of the tftp-hpa server.
Debian: apt-get install tftpd-hpa

Configuring TFTP is very simple. You just need:

tftp  dgram  udp  wait  root  /usr/sbin/in.tftpd  tftpd -v -s /tftpboot

in /etc/inetd.conf (/tftpboot is the directory which will contains the boot images).
Do not forget to restart inetd after chanfing /etc/inetd.conf:

/etc/init.d/inetd reload

Copy the firmware into your /tftpboot directory.
E.g.:

mkdir /tftpboot/rc1000
cp kernel-rc1000.nbi /tftpboot/rc1000

NFS Server

Debian: apt-get install nfs-kernel-server
or the user-mode version: apt-get install nfs-user-server

Unpack the root image somewhere on your NFS Server.
This must be done as root to preserve the devices et permissions!
E.g.:

mkdir /home/rc1000
tar xjf root-fs-rc1000.tbz -C /home/rc1000

Export the directory: add a line in /etc/exports.
E.g.:

/home/rc1000 192.168.1.0/24(rw,no_root_squash,sync)

The no_root_squash option is important to grant full root access to the client. You may want to restrict the address to the single address of the RG-1000

Finally, activate the export (for the kernel-mode version):

exportfs -a

DHCP Server

We will need a BootP/DHCP server on the local network
Debian (ISC dhcpd 3.0): apt-get install dhcp3-server

Here is an example which show how to configure ISC dhcpd 3.0 (extract of /etc/dhcp3/dhcpd.conf):


subnet 192.168.1.0 netmask 255.255.255.0 {
    # Other declarations...

    # Etherboot Client Example
    host rc1000 {
        option host-name "rc1000";               # Hostname
        hardware ethernet  00:02:2d:15:2a:af;    # Mac address of the node
        fixed-address rc1000.bulles-dsl;         # Assigned IP (DNS will resolve the name)
        server-name "bulles-nc.bulles-dsl";      # Name of the DHCP server
        option tftp-server-name "bulles-nc";     # Name of the TFTP server (can be another host than the DHCP server)
        next-server bulles-nc.bulles-dsl;        # Address of the TFTP server
        filename "/rc1000/kernel-rc1000.nbi";    # Name of the kernel image (NBI format)
        option root-path "192.168.1.19:/home/rc1000"; # Address of the NFS Server and the directory containing the root image
    }
}


Boot your RG-1000

Let the magic happen!

/!\ Note: The very first boot takes some time, mainly due to the creation of the swap partition on the NFS root

Etherboot

With the RC-1000 custom firmware, the device will always jump to Etherboot and try to download the Linux kernel.

If you want to access !KarlBridge, see the next paragraphs.

Ensure the RG-1000 is on the network, and plug the power in.

Observe the LEDs:

LEDs (Red/Amber sometimes misleading on the picture...) Power Wireless Ethernet Modem Phase Duration
aan.jpg Amber Amber Amber Amber RG-1000 Initialisation 5 secs
aao.jpg Red Red Red Red Firware Initialisation 2 secs
aaq.jpg Red - Red Red Network Detected 4 secs
aap.jpg Red Green Green Green Etherboot started
The device will request an IP via DHCP and load linux kernel using TFTP
If the RG-1000 stays forever in this status, check your DHCP/TFTP settings
30 secs on first boot
10 on reboots
aar.jpg Amber Red Red Red Linux starts
Note hat I messed up in the LEDs in the 210304 build it is G-R-R-A
<1 sec
aas.jpg Amber - Green Blink- Linux boots 7 secs
aat.jpg Green - - - Linux ready
Wireless and Ethernet LEDs blink Green on access
-


You can now telnet to the device!

Booting the KarlBridge firmware

If you want to boot the !KarlBridge firmware, just boot the unit with the network cable disconnected.
Reconnect the cable once the devices is started.

[TODO] Document LEDs statuses

Connecting a Console

It is also possible to have access to the Linux Console via the modem port of the RG-1000.


  1. Il faut un 'vrai modem' -- je veux dire par là que le modem doit pouvoir supporter une communication sur laquelle il n'y a pas de courrant(à l'opposé d'une ligne téléphonique).
    N'importe quel 'vieux machin' doit faire l'affaire, mais ouliez un !WinModem ou la plupart des modems Laptops...
  2. Connecter le modem au RG-1000 en back-to-back (simple cable téléphonique droit)
  3. Connecter le modem au port série du PC (Cable série droit)
  4. Installez minicom sur Linux (ou utiliser WinTel HyperTerm) sur une Debian Sarge:
    1. En tant que root, installer le package
      `apt-get install minicom`
    2. En tant que root, s'ajouter dans le groupe "dialout"
      `adduser <your_user> dialout`
    3. En tant qu'utilisateur non privilégié, configurer minicom
      `minicom -s`
    4. On tombe dans une interface interactive en mode texte, le seul paramètre à changer est "Configuration du port série / Port série" qui est /dev/modem et que j'ai changé en /dev/ttyS0
      Ne pas oublier de sauver la config avant de sortir
      En tant qu'utilisateur non privilégié
      `minicom`
  5. verifier que le PC parle au modem (e.g. commande ATI)
  6. Booter le RG-1000, dès que les 4 LEDs ambre passent au rouge (pas avant!), appuyez sur 'forced reload' pendant 'un certain temps' (4 rouges -> 3 rouges -> autre chose: a ce point relachez le forced reload)
  7. Dans minicom: initialiser la connection -- l'incantation est: 'ATX1D'
  8. La console se connecte et demande si on veux Etherboot ou le firmware original -- choisir Etherboot


[TODO] Translate text :-)

Install Packages

The root file system (root-fs-rc1000.tbz) included in the distribution contains the bare minimum to boot the system and establish a network connection (no wireless at this stage).

You have to install additional packages to have a fully functional node

Why packages?

The first version of the distribution was monolythic. Easy to install, but a pain to upgrade as you always have to overwrite your previous configuration.

Then I came accross IPKG and decided to re-package the whole thing with it.

Now you just have to install once, update from time to time!

Obtaining packages / configuring ipkg

The official packages feed is available at

If your have internet access, and your DHCP server is well configured (that is: it provides the default gateway, ...) you just need to check the nameserver entries in /etc/resolv.conf and you are ready to go!

Telnet to your RG-1000, test your connectivity:

# ping  belnet.be
PING belnet.be (193.190.198.53): 56 data bytes
64 bytes from 193.190.198.53: icmp_seq=0 ttl=54 time=13.1 ms
...

(Do not attempt to ping reseaucitoyen.be as it does not answer ICMPs!)
and update your package list:

# ipkg update
Downloading http://ReseauCitoyen.be/diskless/rc1000/feeds/stable/Packages
Updated list of available packages in /usr/lib/ipkg/lists/stable

If you have internet access, but cannot ping reseaucitoyen.be, please check your network configuration -- this is a bit out of the scope of this Install Guide!

In case you cannot access reseaucitoyen.be from your RG-1000, then you can:

  • Copy the feed to a local system, and update `/etc/ipkg.conf` on the RG-1000 accordingly
  • Copy the feed to the nfs-mounted partition so that they are directly accessible from the RG-1000 and install directly from file.

In any case, please read the IPKG Documentation before bugging me :-?

Pre-installed packages

The initial disk image contains the following packages (minimal configuration to be able to boot the RG-1000 and access it through the LAN interface):

  • base-files (base configuration files, devices, ...)
  • hosts-file (/etc/hosts)
  • uclibc (base libraries)
  • busybox (base utilisties)
  • diffutils (diff -- needed by ipkg)
  • ipkg (the key to the rest of the install)

Packages you should install

To have a working node, you should install the following packages:

  • linux-modules (kernel modules, mainly the drivers for the wireless device)
  • iptables (firewall)
  • aodv-uu / aodv-uu-ipt (AOVD-UU without/with my iptables patch)
  • aodv-uu-cfg (aodv startup scripts)
  • wtools (wireless tools)
  • tinyhttp (small http server to get status of the node via the web)
# ipkg install linux-modules iptables aodv-uu-ipt wtools tinyhttp
Installing linux-modules (2.4.23-rc-1) to root...
Downloading http://ReseauCitoyen.be/diskless/rc1000/feeds/stable/linux-modules_2.4.23-rc-1_i386.ipk
Installing iptables (1.2.8-1) to root...
Downloading http://ReseauCitoyen.be/diskless/rc1000/feeds/stable/iptables_1.2.8-1_i386.ipk
Installing aodv-uu-ipt (0.8.1-1) to root...
Downloading http://ReseauCitoyen.be/diskless/rc1000/feeds/stable/aodv-uu-ipt_0.8.1-1_i386.ipk
Installing aodv-uu-cfg (0.8.1-1) to root...
Downloading http://ReseauCitoyen.be/diskless/rc1000/feeds/stable/aodv-uu-cfg_0.8.1-1_i386.ipk
Installing wtools (26-1) to root...
Downloading http://ReseauCitoyen.be/diskless/rc1000/feeds/stable/wtools_26-1_i386.ipk
Installing tinyhttp (1.0.0-1) to root...
Downloading http://ReseauCitoyen.be/diskless/rc1000/feeds/stable/tinyhttp_1.0.0-1_i386.ipk
Configuring aodv-uu-cfg
Configuring aodv-uu-ipt
Configuring iptables
Configuring linux-modules
Configuring tinyhttp
Configuring wtools
Successfully terminated.

Reboot to start all the services and you are all set!
(It looks like I am not able to reset the wireless card properly at reboot when we use hostap. So it is safer to halt the device, and power-off / power-on the unit)

Other packages

If needed, you can also install the following packages:

  • kismet (kismet drone)
  • libcpp (C++ libraries needed by kismet)
  • u-olsrd (If you want to experiment with OLSR and join the Guild of the Blue Trappis)
  • dropbear-sshd (ssh server)
  • zlib (needed by dropbear)

IPKG and Firewall

Note that once the iptables package is installed, you will not be able to access the internet anymore, due to the strict firewalling rules.

You can relax the protection during the upgrades -- e.g.:

# iptables -I OUTPUT -o eth0 -d 212.68.212.217 -j ACCEPT
# iptables -I INPUT -i eth0 -s 212.68.212.217 -j ACCEPT

Depending on your local configuration, you may need to give access to the nameservers as well...