GPS Gem Find - TangoGPS

Published on Monday, June 29, 2009

I've been looking for a simple, no-hassles GPS display program for Linux, and I believe I finally found one: TangoGPS. My requirements were quite simple; I needed something that would talk to gpsd, and display a dot on OpenStreetMaps. I've been able to do this in other programs (even in 3d in WorldWind), but I wanted something to download the maps for me, and GTK+ would be a plus.

TangoGPS was easy to install (apt-get install tangogps), and on my test 'drive' home tonight on the train, worked a treat. See related screenshots.







ISO Code Error

Published on Wednesday, June 17, 2009

I've received this error a few times when working with pytz:

Error reading file '/usr/share/xml/iso-codes/iso_3166.xml'


In short, install the 'iso-codes' package in Ubuntu/Debian. I'm sure this is covered in the manual that I didn't read, but I'm sure others didn't read it too.

apt-get install iso-codes

Radius Backed ACL

Published on Sunday, June 14, 2009

Status: Not Started



I run OSSEC almost everywhere - it is one of my favourite software packages. I'm running it at home on my tiny "server", which works great. If somebody scans me, I know. I would ultimately like to be able to block them at the gateway. Because the normal Cisco router IOS doesn't have a 'shun' command (as compared to the normal firewalls), there isn't any easy way to script it (I've tried using expect, I can't see how it could be done). I found that ACLs can be stored in a database.
After finding this out, I've added another project to my list: create a dynamic ACL database for my Cisco to integrate with, and block traffic to/from that OSSEC detected as dangerous. I've even contemplated integration with various RBLs and Google's Safe URL API.
This project might remain idle for a while, however, as I need to focus my energies on other areas.

Additional Resources


CLI Config
Integration with Websense
IOS requirements
Details of URL Filter

Operation Cold House

Published on

Status: Done!



My house is cold. I want to start playing with simple electronics before starting Operation Field, so have created Operation Cold House.

This is just simply sticking a temperature sensor onto an Arduino, linking that up to my little home "server", and uploading that to my website. I'll display some nifty graphs, too, and link it to Pachube. Stay tuned.

Update: Complete! The proof is in the pudding. I now have a personal website from home (sorry, not public) that displays the daily and weekly temperature at home. The process is basically like this: my little Arduino gathers the temperature, and is polled every minute with a python script via cron. This script then sticks the time and temperature into MySQL. It also exports the temperature to Pachube. Every 30m I have a script that queries MySQL and uses Google's Chart's API to graph the temperature. Looks great, I'll post a graph soon.

Installing Debian 5.0 on Vortex86DX

Published on

After writing about compiling a new kernel for the Vortex86DX, I've had quite a few people email me asking how I installed Debian in the first place. The installation is actually quite straightforward, but it involved several quirky techniques. After doing another install I decided to keep track of the process of installing Debian 5.0 on my eBox-3300.

The following guide assumes a few things. First, you are currently using Linux and a debian variety (although instructions could be altered if using Windows). Second, your USB shows up as /dev/sdb. Third, your eBox-3300 has the HDD set in Native mode. Forth, you are patient.

1) Download the custom vmlinuz and initrd.gz files from my site. Also, download the custom deb files we'll use near the end of installation:

http://cdn.kelvinism.com/ebox/vmlinuz
http://cdn.kelvinism.com/ebox/initrd.gz
http://cdn.kelvinism.com/ebox/linux-headers-2.6.29.3-vortex86dx.deb
http://cdn.kelvinism.com/ebox/linux-image-2.6.29.3-vortex86dx.deb


2) Download an i386 netinst iso:

http://www.debian.org/CD/netinst/


3) Make sure the USB has an MBR installed:

apt-get install syslinux mtools mbr
install-mbr /dev/sdb

4) Format the device as FAT32 with whatever tool you like.

5) Run syslinux on it:

syslinux /dev/sdb1


6) Mount the USB (or pull it out and plug it in again so it shows up on your desktop), and copy the downloaded vmlinuz, initrd, netinst.iso and deb files onto the USB. There should be a file called ldlinux.sys already; create a file called syslinux.cfg and put the following in it:

default vmlinuz
append initrd=initrd.gz root=/dev/rd/0 devfs=mount,dall rw DEBCONF_PRIORITY=medium


It should look like this:

Ebox files


7) Unmount the USB, and put it in your eBox-3300. When the system boots up initially, hit F11. Select your USB device. Depending how you created the MBR it might come up as saying "MBR FA:". Press "A". When 1234F comes up, press "1". Press enter at the SYSLINUX "boot:" screen.

8) Proceed as normal through the menu. It will search for an ISO image, and should detect the netinst image you inserted earlier. When you get to the "Load installer components" section, it will complain about no kernel modules found. Select YES. On the next screen you shouldn't need to load any components, so hit continue. Proceed as normal.

9) If you are ever asked about starting PC card services, hit NO. Proceed as normal.

10) Eventually you will hit a screen that says LVM is not available, hit CONTINUE. Proceed as normal.

11) Near the end it will toss up a list of available kernels. Select either, it shouldn't matter. When you are allowed to select drivers to include in the initrd, select TARGETED. Proceed as normal.

12) You might get to a point where it says Install GRUB boot loader on a hard disk. This will fail. That's ok, just skip it and select "continue without boot loader".

13) You will end up on the "Finish the installation" menu. DO NOT finish! We now need to swap out the current kernel with one that works. Scroll down and select "Execute a shell". Press CONTINUE. Try these steps when the shell prompt appears:

cd hd-media
cp *.deb /target/usr/src/
cp vmlinuz /target/boot/vmlinuz-2.6.26-2.486
cp initrd.gz /target/boot/
cd /target/boot
gunzip initrd.gz
mv initrd initrd.img-2.6.26-2-486
reboot


Your system will now reboot, and it should actually boot correctly. However, you're using a kernel that doesn't have any headers or modules, which means you can't activate anything. Once the box boots up, login and install the included custom kernels:

cd /usr/src
dpkg -i linux-image-2.6.29.3-vortex86dx.deb
dpkg -i linux-headers-2.6.29.3-vortex86dx.deb
reboot


Once the system comes back up, you should be running a spiffy 2.6.29 kernel, with the ability to add modules.

You may want to follow the tuning section from the MicroClient page on Google Groups. I also modified my fstab file to help reduce wear on the CF card:

tmpfs /var/run tmpfs defaults,noatime 0 0
tmpfs /var/lock tmpfs defaults,noatime 0 0
tmpfs /var/tmp tmpfs defaults,noatime 0 0 

Contribution 1: Francois Fleuret emailed through a kind reminder that the qemu-onto-SD card method is a viable option. So, if you want to go the SD route, and have an SD reader, this might be what you're after!

Basically, install Debian on a SD card with qemu (start qemu with the
install disk iso as cdrom and the SD card as hda), while you are still
in qemu, download and install the kernel deb file

ftp://ftp.icop.com.tw/upload/Shawn/linux-image-2.6.27.9-vortex86dx_2.6.27.9-vortex86dx_i386.deb

then quit qemu, put the SD card in the box and reboot. You are done!



If you want the source file for the above kernels, you can get it from here: 2.6.29-3 source. I recently recompiled the kernel with some extra modules enabled (e.g. ecryptfs), so if you would like to try a newer kernel, you can download my updated kernels too:

http://cdn.kelvinism.com/ebox/linux-headers-2.6.30.4-vortex86dx.deb
http://cdn.kelvinism.com/ebox/linux-image-2.6.30.4-vortex86dx_2.6.30.4.deb


Contribution 2: Trent L has also recompiled a 2.6.28 kernel with wireless extensions built into it, which is what was needed for his wireless card. He has kindly allowed me to distribute them; you can find them here:

http://cdn.kelvinism.com/ebox/linux-source-2.6.28.10_vortex86dx.deb
http://cdn.kelvinism.com/ebox/linux-image-2.6.28.10_vortex86dx.deb
http://cdn.kelvinism.com/ebox/linux-headers-2.6.28.10_vortex86dx.deb
http://cdn.kelvinism.com/ebox/2.6.28.config

Contribution 3: If you have the ebox-3310, you can still read through this, but you may also want to see a suggested installation method and kernels from Stefan.

Contribution 4: Alexandru T. sent through some instructions directly received from ICOP. I've added another page with the details. Thanks Alex!

Contribution 5:: Rainbow sent through the solution if your kernel panics with:

it report "kernel bug at fs/buffer.c 1864" and system go mad, even
> "halt" "reboot" take no effect.



Rainbow reported that:

this issue cause by an error Vcore, 0.90v refered by datasheet, and it should be above 0.97.



Contribution 6:: Bob's also sent through his config file.

Contribution 7: Bob A. has sent through some resources about a special ISO specific for the ebox. It has been added to another page.

Update: I've needed to recompile a new Lenny vortex86dx-enabled kernel for 2.6.31.5: image, headers, source and config.

Downloading VMWare with Firefox

Published on Tuesday, June 9, 2009

I've had this issue happen to me several times, and I'm finally writing myself a note to fix it in the future. There seems to be an issue with downloading VMWare Workstation (.bundle). I first tried it with Firefox, but it just crapped out at loading it into /tmp. Next, I tried it with Lynx, but alas, it tried to download it as a text file.

Ahah! The quickest solution I could find is to right click the link, save as, and save it as a zip. Rename it to .bundle when you're done.

Create a Movie from Images

Published on Monday, June 1, 2009

I've started leaving my webcam on as a motion detector to find out who is leaving the shopping cards on our lawn, and ultimately have found it useful to stitch the images together into a movie. There are several ways to do this - and my way maybe isn't the best - but it works for me.



I first installed and configured motion, which I've used for years. I then created a file in ~/.motion called motion.com:

$ cat ~/.motion/motion.conf

height 480
width 640
framerate 2


By creating this file, it allows me to start motion without modifying the global motion.conf file permissions, or *gasp* running it under sudo. There are lots of options you can put in your motion.com file.

With motion installed, and configured, now install mencoder.

I prefer to generate a seed file based on the creation date for each image. If you try to use mencoder with just a *.jpg, it works, but my video jumped around.

$ pwd
/home/path/Desktop/motion
$ ls -rt *.jpg > list.txt


This list.txt file now has the filenames, in chronological order, ready for consumption. I create the video like so:

mencoder mf://@list.txt -o `date +%G%m%d`.avi -ovc lavc -lavcopts vcodec=mjpeg


This will output a file with today's date in a few seconds. Remember, the `'s are the key by the #1, not quotes.