From VoidWarranties - Hackerspace Antwerp, Belgium
Jump to: navigation, search

Voidwarranties acces and availability platform V.A.A.P
Den Bunker


Scoping the extendable monitoring rig

This platform exists in physical and logical form so it will be created out of sensors, detectors, push buttons but will also contain decision logarithms and best practice policy.


This might all sound abstract but in practice it will be a doorbell that decides to work depending on the fact that the space is:

Hardware implementation


Soekris prepping

There might be better boards available, but the soekris 4526 is what is available locally.

PXE booting the soekris beast

To put a useful OS on the board some hurdles are supposed to be taken. The board allows to boot over the network with PXE, effectively downloading the kernel and a ramdisk over ethernet and starting. To allow for this you need to do several things:

  1. A TFTP server, providing a download location for the kernel and ramdisk for the unit, which will finally end you with a command prompt. This would allow to start installing data on the flash limited amount of RAM available.
  2. A DHCP server instructing the board after requesting info where the tftpd data. Just an essential convenience on the network at early PXE boot
  3. A serial console view to monitor what the board is actually doing
  4. wireshark, to see what is going wrong during the PXE-phase, whilst the serial console is only showing garbled text...

So far the following is in place:

A TFTP daemon

On a Ubuntu install 10.04 LTS

$ sudo apt-get install tftpd-hpa

Have this in your /etc/default/tftpd-hpa:

# /etc/default/tftpd-hpa

# disable options. Het soekris bordje vindt "opties" blijkbaar niet goed

And restart the tftp-hpa daemon.

A DHCP daemon

Assumption here is to have the tftpd process running on the same machine as the DHCP server!

$ sudo apt-get install dhcp3-server

Contents of a sample /etc/dhcp3/dhcpd.conf file are as follows:

ping-check = 1;
log-facility local7;

option broadcast-address;
option domain-name-servers;

subnet  netmask {
# Soekris installations
group {
        #filename="pxelinux.0" ; # Results in: Only absolute filenames allowed
        #filename="/pxelinux.0" ; # Results in: Forbidden directory
        filename="/var/lib/tftpboot/pxelinux.0" ;
        option domain-name-servers ;
        option routers ;
        host soekris4526 {
                hardware ethernet 00:00:24:c2:38:0c ;

Please note, you would probably essentially need to change the network (192.168.178.x), use a ethernet cross-cable or both.

Minicom setup

To monitor the board during early-boot you need to set up mincom (if you like cu too...).
The following eternally interesting key strokes are of value:

Have this as the communication settings for Serial port setup to monitor the PXE process:

Comp| A -    Serial Device      : /dev/ttyUSB0                              |      
Port| B - Lockfile Location     : /var/lock                                 |      
    | C -   Callin Program      :                                           |      
Pres| D -  Callout Program      :                                           |      
    | E -    Bps/Par/Bits       : 9600 8N1                                 |      
    | F - Hardware Flow Control : No                                        |      
    | G - Software Flow Control : No                                        |      
    |                                                                       |      
    |    Change which setting?                                              |      

Now, you also know the correct Baud-rate :) Save this file (don't forget running minicom as root, or else you waste more time...)

Setting up debian linux 5.0 netboot files

  1. cd /var/lib/tftpd
  2. wget
  3. tar zxvf netboot.tar.gz

Follow Ultimate netboot howto. DHCP and TFTP are set up already...

pxe config and boot options

$cat /var/lib/tftpboot/pxelinux.cfg/01-00-00-24-c2-38-0c
# D-I config version 2.0
SERIAL 0 9600 0x000
include debian-installer/i386/boot-screens/menu.cfg
default debian-installer/i386/boot-screens/vesamenu.c32
prompt 1
timeout 2
$ cat /var/lib/tftpboot/debian-installer/i386/boot-screens/txt.cfg 
default install
label install
	menu label ^Install
	menu default
	kernel debian-installer/i386/linux
  append initrd=debian-installer/i386/initrd.gz -- debug vga=ask fb=false console=ttyS0,9600 console=ttyS1,9600 console=ttyUSB0,9600 console=ttyUSB1,9600 earlyprint=serial,ttyS1,9600

Note: the extra boot options (hoping to have some console issues fixed during netbooting.... no worky)

Booting up

So far so good. Booting as viewed throug minicom looks promising, but the linux kernel hangs or the serial console fails to show what is wrong after the following:

POST: 0123456789bcefghipajklnoq,,,tvwxy
comBIOS ver. 1.24  20040312  Copyright (C) 2000-2004 Soekris Engineering.


                                         CPU 80486 133 Mhz 0000 Mbyte Memory0002000300040005000600070008000900100011001200130014001500160017001800190020002100220023002400250026002700280029003000310032003300340035003600370038003900400041004200430044004500460047004800490050005100520053005400550056005700580059006000610062006300640064

Pri Mas  064MB ATA Flash Disk            LBA 977-4-32  62 Mbyte

PXE-M00: BootManage UNDI, PXE-2.0 (build 082)

Slot   Vend Dev  ClassRev Cmd  Stat CL LT HT  Base1    Base2   Int
0:00:0 1022 3000 06000000 0006 2280 00 00 00 00000000 00000000 00
0:18:0 100B 0020 02000000 0107 0290 00 3F 00 0000E001 A0000000 10

   Seconds to automatic boot.   Press Ctrl-P for entering Monitor. 5 4

comBIOS Monitor.   Press ? for help.

> show

ConSpeed = 9600
ConLock = Enabled
ConMute = Disabled
BIOSentry = Enabled
PCIROMS = Enabled
PXEBoot = Enabled
FLASH = Primary
BootDelay = 5
BootPartition = Disabled
ShowPCI = Enabled
Reset = Hard

> boot

BootManage UNDI, PXE-2.0 (build 082)
BootManage PXE-2.0 PROM 1.0, NATSEC 1.0, SDK 3.0/082 (OEM52)
Copyright (C) 1989,2000 bootix Technology GmbH, D-41466 Neuss.
PXE Software Copyright (C) 1997, 1998, 1999, 2000 Intel Corporation.
Licensed to National Semiconductor

CLIENT MAC ADDR: 00 00 24 C2 38 0C.^H
DHCP./^H/^H-^H-^H\^H\^H|^H|^H/^H/^H-^H-^H\^H\^H|^H|^H/^H/^H-^H-^H\^H\^H|^H|^H/^H/^H-^H-^H\^H\^H|^H|^H/^H/^H-^H-^H\^H\^H                                                                               CLIENT IP:  MASK:  DHCP IP:
                                                                               TFTP.                                                                               TFTP.\^H|^H                                                                                                                                                              PXELINUX 4.02 debian-20101014  Copyright (C) 1994-2010 H. Peter Anvin et al!PXE entry point found (we hope) at 9E79:0106 via plan AUNDI code segment at 9E79 len 1360UNDI data segment at 9A33 len 4460Getting cached packet  01 02 03My IP address seems to be C0A8B223 prefix: /var/lib/tftpboot/Trying to load: pxelinux.cfg/01-00-00-24-c2-38-0c                   ok
PXELINUX 4.02 debian-20101014  Copyright (C) 1994-2010 H. Peter Anvin et al
PXELINUX 4.02 debian-20101014  Copyright (C) 1994-2010 H. Peter Anvin et al
@lqqqqqqqqqqqqqqqqqqqqqqqqqqqkx   Installer boot menu^G    xtqqqqqqqqqqqqqqqqqqqqqqqqqqqux Install                   xx Advanced options        > xx Help                      xx                           xx                           xx                           xx                           xx                           xx                           xx                           xmqqqqqqqqqqqqqqqqqqqqqqqqqqqjPress ENTER to boot or TAB to edit a menu entryAutomatic boot in 0 seconds...lqqqqqqqqqqqqqqqqqqqqqqqqqqqkx   Installer boot menu^G    xtqqqqqqqqqqqqqqqqqqqqqqqqqqqux Install                   xx Advanced options        > xx Help                      xx                           xx                           xx                           xx                           xx                           xx                           xx                           xmqqqqqqqqqqqqqqqqqqqqqqqqqqqjPress ENTER to boot or TAB to edit a menu entryLoading debian-installer/i386/linux.....
Loading debian-installer/i386/initrd.gz.........ready.
Probing EDD (edd=off to disable)... ok
Press <ENTER> to see video modes available, <SPACE> to continue, or wait 30 sec

After this minicom shows not output anymore. It seems that the kernel does however boot, loads initrd.gz and also accepts the other options it is feed (vga).

Help needed here

At this point the adventure ends for now... Some helping hands are appreciated.

Personal tools
Content Creation
Belgian Spaces