Jonathan Arbib

Tutorials


Alix 3d3 scripts

by on May.18, 2010, under Gadgets, Tutorials

Simple stats script:

#!/bin/bash
clear
while [ 1 ]
do
 uptime
 df -h | grep Filesystem
 df -h | grep rootfs
 df -h | grep usb
 echo ""
 Temp1=$(cat /sys/bus/i2c/drivers/lm90/0-004c/temp1_input)
 Temp2=$(cat /sys/bus/i2c/drivers/lm90/0-004c/temp2_input)
 echo "MB T  = "$Temp1
 echo "CPU T = "$Temp2
 sleep 1
 clear
done

Insert it in a file. I called it stats.sh

chmod a+x stats.sh

and run with ./stats.sh

It updates every second and returns:

  • uptime with load
  • Disk space and usb disk space
  • MB temp
  • CPU temp

You can add all you want in there or remove what you don’t need :-)

2 Comments :, , , more...

PC Engines – Alix 3d3

by on May.18, 2010, under Gadgets, Tutorials

Just purchased a PC Engines Alix 3d3. online from MS Distribution (UK) for ~£110.00. I have a plan for it… read on…

Specs follow:

CPU 500 MHz AMD Geode LX800
DRAM 256MB DDR DRAM
Storage CompactFlash socket
Power DC jack or passive POE, min. 7V to max. 20V
Expansion 2 miniPCI slots, LPC bus
Monitoring 3 LEDs
Connectivity 1 Ethernet , 1 dual USB
1 VGA, 2audio
Size 100 x 160 mm

First Mod: Heatsink with fan!

I noticed that my processor was going up to the 50′s plus degrees when working, so I decided to keep it cool by adding a Heatsing with a FAN. I found one on Amazon.co.uk, specifically designed for Graphics chips, so I thought it would be ok for my Alix. It came with a self-adhesive strip on the bottom which made installation simple. Then after seeing that an 18V supply for the Alix was too high, and hmm… I ran out of adequate resistors to step down the voltage… I hooked on the 5V supply right behind the Serial port! And that ensures i get minimal fan spin, and hence virtually no noise from the fan. The airflow is enough to cool down the heatsink, as there is a noticeable difference when the fan is operational and not.

Update: While compiling the kernel the cpu temperature stays below 42 degrees (Celsius)

Application:

I am now trying to develop a home-made GPS tracker with a GPRS modem to “report back” the location… More on this coming soon!

Leave a Comment :, , , , , , , , more...

Fix GNU screen backspace

by on May.14, 2010, under Tutorials

create a new .screenrc in your home directory and put these lines inside:

bindkey -d ^? stuff ^H
bindkey -d ^@ stuff ^H
2 Comments :, , , , , , , more...

Evermore GM-R700 Linux drivers

by on May.14, 2010, under Tutorials

These have no YET been tested, but should work on linux for the GM-R700 USB GPS receiver

evermore-gps-gmr700.tar.gz

Leave a Comment :, , , more...

Volume by UUID and adding the disk to a xen Virtual Machine

by on May.08, 2010, under Tutorials

Get the drive UUID by using the command vold_id

vol_id /dev/sda1

The string after “ID_FS_UUID=” is the UUID of the drive. Now open your /etc/fstab file and add the following line to the end. Replace the UUID string with your string, your mount point, and customize the other parameters if needed.

UUID=THE-UUID-HERE   /mnt/USBDrive   ext3   user,auto,rw   0   0

To then pass a disk to a xen virtual machine, look at the following lines of the domain config file:

disk        = [
#...root partition and other partitions here...
'phy:/dev/disk/by-uuid/89b976bc-2f66-4b93-abfb-358d6227f8be,sda,w',
'phy:/dev/disk/by-uuid/1871b9a1-8055-4392-8a94-f5407ff37483,sdb,w',
]

basically instead of passing the disk as a /dev/sda1 device, pass it by UUID using the path:

/dev/disk/by-uuid/<the uuid>

Enjoy!

Leave a Comment :, , , , , more...

Backups? Sharing? Collaborating? More Backups?

by on Apr.30, 2010, under Tech Junk, Tutorials

I needed a solution to easily share my documents from my home computer, to my laptop, and also have them available on the web… Manually syncronizing was not an option, and other solutions such as rsync were not user-friendly for a day-to-day use…
Finally I found two solutions able to give me what I needed:
Dropbox and iFolder!

Dropbox stores your files on their server (or in the cloud… depending how you look at it!) and gives you a client which synchronizes a folder on your local computer with the server and any other computer linked to that account. Dropbox also allows sync’ing over LAN, which greatly improves performance for large files if two computers are on the same network! There is a size limit of 2GB for free accounts. Dropbox clients are available for Windows, OSX and even Linux!

iFolder on the other hand allows you to “own” your files and host them on your own private machine. This removes also any space constraints that Dropbox gives you, as the limit is your drive, but adds the problem of being limited by your server’s connection speed, as you are limitied to the badwidth available where your server is. Hosting or colocating will help you overcome that barrier!

Personally I currently use dropbox as I have not (yet) installed a working xen virtual machine with iFolder to deploy on my server. When that happends I might move to iFolder.

Leave a Comment :, , more...

Installing Microsoft TrueType Fonts on Linux (debian example)

by on Mar.17, 2010, under Tutorials

Ensure your sources.list looks something like this:

deb http://ftp.uk.debian.org/debian/ lenny main non-free contrib
deb-src http://ftp.uk.debian.org/debian/ lenny main non-free contrib

Run the following commands:

apt-get update
apt-get install ttf-mscorefonts-installer

All done!

Leave a Comment :, , , , , more...

Lenny domU on xen with debootstrap

by on Mar.12, 2010, under Tutorials

This is a HowTo on installing Lenny on a xen system using the debootstrap method

(continue reading…)

Leave a Comment :, , , , more...

Recover MySQL password

by on Mar.05, 2010, under Tutorials

Lost your MySQL root password? No worries! :-)

Stop MySQL server

# /etc/init.d/mysql stop

Start MySQL server without password

# mysqld_safe --skip-grant-tables &

Login

# mysql -u root

Change password (replace XXX with your new root password)

mysql> use mysql;
mysql> update user set password=PASSWORD("XXX") where User='root';
mysql> flush privileges;
mysql> quit

Stop and Start MySQL server

# /etc/init.d/mysql stop
# /etc/init.d/mysql start

Test to see if it works! (Should ask you for your new password)

# mysql -u root -p

Enjoy!

Leave a Comment :, , , , , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Blogroll

A few highly recommended websites...