Misc. Notes
some more notes for my bad memory

Make a Slug boot up again on its own when the power is connected
(essential for any home automation application)

I followed the advice here (14 Dec 06)

On the underside of the circuit board connect a wire between -
1) the centre pin of the 5V connector (the one furthest from the edge of the board)
2) pin 1 of the nearest USB - the pin nearest to the 5V connector, next to the marking "R94"

The Slug boots up as soon as the 5V plug is connected and also if the power goes off for an instant.
Then the first push of the power button makes Debian close down.
On my Slug in this down state the Ready/Status light then flashes on off Orange/Green and the DISK 1 and Ethernet lights stay on.
A second push makes it reboot and when running the Ready/Status light flashes long green/short orange/short orange.

I also connected a short wire between the pads of the absent ferrite bead, FB12, to provide power to the DISK 2 USB socket.
Note that the USB devices can now use as much power as the main supply can provide - BUT the main supply must be a stable 5V supply!

This also makes OpenWrt reboot on switch-on.

Setting up OpenWrt after my own compile - some notes for if I have to do it again

Set Slug for upgrade - hold reset and power push buttons then apply power (if using mod above)
count 10 to 14 seconds - see Ready/status flashing between 2 colours - release reset and power push buttons
upslug2 --image="image_name.bin"
wait 5 minutes
using serial link
ipkg update
ipkg install vsftpd

After first use of telnet - give it a password - then this Slug uses
ssh root@

ipkg install vsftpd

/etc/vsftpd.conf (default is OK)

#ftpd_banner=Welcome to blah FTP service.

Make a link in /etc/rc.d to the file /etc/init.d/vsftpd (created by the install process)
- otherwise vsftpd will not be present after boot
ln -s /etc/init.d/vsftpd /etc/rc.d/S50vsftpd

(use ftp not sftp in Fetch)


# Network configuration file

config interface loopback
option ifname lo
option proto static
option ipaddr
option netmask

config interface lan
option ifname eth0
option proto static
option ipaddr '' <---NB
option netmask ''
option gateway ''
option dns ''
option hostname Slug_52


config system
option hostname Slug_52 <<--NEW


Mount a USB drive
Use QTParted on Fedora7 to format the USB drive as ext3 - unmount cleanly !!!
(I spent ages messing with a USB drive that seemed OK
- it mounted manually but would not mount using a boot script
Perhaps it was Ext2 ???)

Once only do -
mkdir -p /mnt/usbdrive

create -
containing -
/dev/sda1 /mnt/usbdrive ext2 defaults 0 0

/etc/init.d/usbdrive contains -

#!/bin/sh /etc/rc.common


echo -n "Testing USB Partition: "
e2fsck -p /dev/sda1 &
sleep 5
echo -n "Mounting USB drive: "
mount -t ext3 -o noatime /dev/sda1 /mnt/usbdrive
echo "Done."
echo -n "Umounting USB drive: "
umount /dev/sda1
echo "Done."

make a link in /etc/rc.d/ so the script runs at boot time and mounts the drive -
ln -s /etc/init.d/usbdrive /etc/rc.d/S99usbdrive

Use the USB drive for program storage

Add the following line in /etc/ipkg.conf
dest usbdrive /mnt/usbdrive

In /etc/profile,
modify the line that reads -
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
to read -
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/mnt/usbdrive/bin:/mnt/usbdrive/sbin:/mnt/usbdrive/usr/bin:/mnt/usbdrive/usr/sbin
- and add the following line -
export LD_LIBRARY_PATH=/lib:/usr/lib:/mnt/usbdrive/lib:/mnt/usbdrive/usr/lib

To install packages to the external drive use the -d option
ipkg -d usbdrive install samba-client

Add a USB sound card

ipkg -d usbdrive install alsa-lib

ipkg -d usbdrive install alsa-utils
ipkg -d usbdrive install madplay

That did not run - after much experimenting I added the following -

find these in the toolchain and place in /lib/modules/


these were there before - I think....


add these into /etc/modules.d/60usbaudio


These were present anyway -

cd /mnt/usbdrive/music
madplay Pretty_Woman.mp3
It WORKS (only took 6 hours....Macs rule... )

Using the readymade bin files from

Notes for next time ....

I used (Google for s download )

This is the third file from the johnarthur site and runs well with Firefox - it is the time lapse camera version but defaults to 1 or 2 cameras if no USD memory stick is present.

I find it more stable as a camera host than Debian.

I want a simple website so need httpd from busybox. It is present in the busybox that was used in so I took it from there

to make the system use httpd etc from the new busybox I did -

cd /bin
ln -s /bin/busybox cut
ln -s /bin/busybox httpd
ln -s /bin/busybox killall

modify the path to httpd in /etc/init.d/httpd

httpd port number

Changed 80 to 8051 in /etc/init.d/httpd but the port stayed at 80
then found -
so made that -
config 'httpd'
option 'port' '8051'
option 'home' '/www'


try /etc/httpd.conf

config 'httpd'
option 'port' '8051'
option 'home' '/www'

That works!


For fixed address also use for /etc/config/

# Copyright (C) 2006

config interface loopback
option ifname lo
option proto static
option ipaddr
option netmask

config interface lan
option ifname eth0
option proto static
option ipaddr
option netmask
option gateway
option dns