Archive for the ‘Ubuntu Karmic’ Category


2, January 2011

Ok so I’ve had my Sheevaplug since January 2009 and have now bricked it at least 3 times trying to be too clever by half! As it’s getting to be a rugular thing and it always takes me hours to work out what to do, here are my instructions.

I have used the same info. from the page below and added/changed it to reflect my process, please read both to make sure you understand what you are doing! as I take no reponsibility for errors blah, blah etc.etc.

I found the “instructions”, script & packages on this site

SheevaPlug Installer Page;

but to be honest they are a bit difficult to follow for a bit of a noob so I’ve adapted them a bit.

The installer will reflash a bricked plug & can be used to install another distro [I’ve used Debian Squeeze this time] but if you just want it back to “factory settings” use the packages as they are.

My plug is the BFLS one supplied with Ubuntu Jaunty on the internal flash card and the PC I will use to reflash it has Ubuntu Jaunty on it so although the scipt includes Windows support I won’t mention it here, see the above page for details.

The runme.php would not run on Ubuntu 10.10 as the version of python on Ubuntu 10.10 has depreciated some terms. I got round this at the time by installing the old 32 bit Karmic Ubuntu and using that but since then I have found the possible answers in this post

but not tested the solution yet although I have saved copies of the files it talks about for future use, contact me if you need them.

If you can get onto the plug then backup your stuff as this script will delete the lot, be Warned

First Download the tarball from

This includes all the files you need to re flash your sheevaplug with the default install of Ubuntu Jaunty. Check out this post if you want to Install a Debian system, you can either download the pre-built Lenny or Squeeze rootfs.tar.gz files or use the script that mgillespie has created.

You now need to add the following packages to your host PC, cu, php5-cli, and libftdi1, so install with the following commands in a [Terminal];

$ sudo apt-get install cu

$ sudo apt-get install php5-cli


$ sudo apt-get install libftdi1

adding libftdi1 fixes the error message “openocd/openocd: error while loading shared libraries: cannot open shared object file: No such file or directory” latter on.

You now connect the Sheevaplug to your PC with the USB lead [supplied] and issue this command in a [Terminal];

$ cu -s 115200 -l /dev/ttyUSB1

Note: [you may need to try cu -s 115200 -l /dev/ttyUSB0 my plug seemed to use either!]

If you get any sort of error message along the lines of

cu: open (/dev/ttyUSB1): No such file or directory
cu: /dev/ttyUSB1: Line in use

you need to issue the following commands in a [Terminal] to remove then add the driver support and re try.

$ sudo rmmod ftdi_sio

followed by

$ sudo modprobe ftdi_sio vendor=0x9e88 product=0x9e8f

If you now get on then you can proceed to the task at hand, if not it’s time to Google!. However I found that I could not get onto the plug sometimes and then realised that the plug end connection of the usb PC to plug cable was working itself out socket in the plug.


1. Prepare an empty USB stick that is FAT16/32 formatted. [Note: the 2 USB sticks I used were not detected by the plug even though I had used 1 of then before to unbrick my plug, be warned]. Re formatting and unplugging safely etc.etc did not help.

2. Extract the tarball you downloaded earlier into a folder on your PC (for example: ~/plug)

3. Edit the ~/plug/uboot/uboot-env/uboot-mmc-custom.txt or uboot-nand-custom.txt file to the correct MAC address according to the MAC address on the back of the Plug (default set to ethaddr 00:50:43:01:c1:e6). If your system is to boot from the internal flash then it’s the nand file you change, if it boots from a flash card in the side slot it’s the mmc file you change.

4. Copy all the files from ~/plug/installer to the USB stick.
NOTE: that the files should be written to the root directory of the USB stick. For example:

$ sudo cp -a ~/plug/installer/* /media/usb-pen/

5. You should now have a copy of the following;

  1. Init ramdisk (initrd)
  2. Kernel modules (modules.tar.gz)
  3. README.txt
  4. Root file-system (rootfs.tar.gz) Note if you are installing Debian, replace this file with the Debian version you have either downloaded or created with the mgillespie’s script.
  6. Kernel (uImage)

6. Copy the uboot image (named uboot.bin) to the ~/plug/uboot/ directory, if it’s not there, mine was.

7. Safely remove the USB stick from the host PC, power off the plug and plug the USB stick into the Plug’s USB host interface (not via a USB HUB I disconnected all other periferals also!)

8. Connect the Plug to your PC with it’s USB cable.

9. On your PC in a [Terminal] again change to the working directory

$ cd ~/plug

and run the runme.php file with the command;

sudo php runme.php and either nand or mmc, nand if your system is on the internal flash mmc if on an external card, in my case;

$ sudo php runme.php nand

If you get an error message along these lines of;

Error: unable to open ftdi device: device not found
Runtime error, file “command.c”, line 469:
****    openocd FAILED
****    Is the mini USB cable connected?
****    Try powering down, then replugging the Sheevaplug

then try issuing these commands in a [Terminal] to delete and reload the driver, then retry;

$ sudo rmmod ftdi_sio
$ sudo modprobe ftdi_sio vendor=0x9e88 product=0x9e8f

[and make sure the USB cable at the plug end is firmly in]

If all goes well the process should start and end a couple of minutes later with a “beep” to indicate that the uboot install process has finished with the following message. [no beep on my plug]

****   U-boot should be up and running now. Open your console …

Now, open another Terminal  and log with this command

$ cu -s 115200 -l /dev/ttyUSB1

if you get this message;

## Booting image at 00800000 …
Bad Magic Number

as I did when using the first USB stick, then the process probably has not found the USB Stick and not loaded the o/s. You could try running the command;

run recover1

but in my case it just did not like the USB stick and I had to use another

If all goes well you should now see the o/s being installed with the final lines being..

* Starting kernel log daemon…
Ubuntu 9.04 ubuntu ttyS0

ubuntu login:                                                          [ OK ]
* Starting OpenBSD Secure Shell server sshd         [ OK ]
* Starting periodic command scheduler crond        [ OK ]
* Restarting OpenBSD Secure Shell server sshd     [ OK ]

with just an unhelpful flashing curser, in the centre of the last line!

After pressing [Enter] you get:

Ubuntu 9.04 ubuntu ttyS0

ubuntu login:

Just login with the default user root and password nosoup4u


Fingerprint Reader

30, May 2010

I just saw an article in Linux Format [LFX133] July 2010 about a program called Fingerprint GUI which lets you log-on to your PC/Laptop using a fingerprint scanner see Fingerprint GUI. I have no practical use for this other than it’s another toy to play with so I searched for a plug & Play scanner and bought an HP USB Fingerprint Reader model No: SK-3350 Part No: 405954-001 which uses the the industry-standard AuthenTec Inc AES2501A hardware from ebay for £15.00. The Pc I tested it on is a spare with a 2GB AMD Athlon XP 2K running Ubuntu Karmic 32 bit with Gnome desktop. I used the version [0.13] from the Mags. cover disc and after unpacking it I followed the install instructions provided. After running the install script with;

$s sudo ./

it listed some dependences which needed installing which where;

libfakekey0, libfprint0, libqca2-plugin-ossl & libQtGui4, I installed these, ran the script again and the program installed, I then enabling uinput and restart the PC. I then ran the fingerprint-gui command and my USB fingerprint reader was immediately recognised. The rest of the instructions are well written and easy to follow, so far I’ve enabled the su, sudo, gdm and screensaver options and all work.

Adding A Repository

22, February 2010

To add the Medibuntu repository, see here here for details or copy and paste this command into a [Terminal];

sudo wget –output-document=/etc/apt/sources.list.d/medibuntu.list$(lsb_release -cs).list && sudo apt-get –quiet update && sudo apt-get –yes –quiet –allow-unauthenticated install medibuntu-keyring && sudo apt-get –quiet update

all on one line.


21, February 2010
Ctrl+Alt+Backspace (i.e. the shortcut which was used to restart the X server) has to be enabled in a different way with respect to previous releases of Ubuntu.

This is due to the fact that “DontZap” is no longer an option in the X server and has become an option in XKB instead.


Goto [System], [Preferences], [Keyboard], select the [Layouts] tab and click on the [Layout Options…] button. Select the [Key sequence to kill the X server] option and enable “Control + Alt + Backspace” by ticking the box, then select [Close] and your done.


21, February 2010


Update: Jalbum is now provided as a deb, see my latest post Jalbum, create Photo web albums

This is the software I use to create my photo album on the web. I used it when I ran XP and was glad to see it came as a Linux option. It automatically creates the album in variety of skins and there is then an option to FTP the result direct from the program to your site. Visit the site and if you decide to user this program, download the file [JAlbuminstall.bin] to your [Home] folder. JAlbum needs Java 1.5 (or later) virtual machine to run so first we need to open the [Synaptic Package Manager] search for and install sun-java6-jre or later, from the listed packages and install it. Assuming you downloaded the JAlbum install file to your [Home] folder, in a [Terminal] type or copy and paste;


This will open the JAlbum installer which will guide you through the installation. When it asks which Java VM to use, select the java6 version. If the box is empty as mine was, tell it to search for a java VM which took a while then select it an move on. If this still fails [as mine did on Intrepid] open a [Terminal] type or copy and paste;

sudo update-alternatives --config java

which should give you an output like this;

There are 2 alternatives which provide `java’.
Selection Alternative
* 1 /usr/lib/jvm/java-6-sun/jre/bin/java
+ 2 /usr/lib/jvm/java-6-openjdk/jre/bin/java<
Press enter to keep the default[*], or type selection number:

Select java-6-sun and note the path to it i.e.


now run the Jalbum installer again


and use the [Choose Another] option to navigate to

/usr/lib/jvm/java-6-sun/jre/bin/java then click on [Next]

When it asks where do you want to install it will give the default path of /home/user/Jalbum I change this to /home/user/.Jalbum to make this folder hidden the “.” does this but still keeps it within your [Home] folder. The program can now be run from the link in your [Home] folder.

Quake One

13, December 2009

Well it’s been a while since I’ve played this but I finally got it working in Ubuntu Karmic using glquake, the .pak files from my Quake One CD and a script using the info. from this thread at I created a folder called quake_one and within it another called id1, I then copied the .pak files from the CD to the id1 folder making sure their filenames were in lowercase. Then copied the glquake file to the quake_one folder. Now I created a script in my path called with the following in it;

## Update Permissions
sudo chmod 666 /proc/asound/card0/pcm0p/oss
sudo chmod 666 /proc/asound/card0/pcm0c/oss
echo “Permissions changed…”
## change to quake one directory ##
cd ~/quake_one
## redirect quake sound ##
sudo echo “glquake 0 0 direct” > /proc/asound/card0/pcm0p/oss
sudo echo “glquake 0 0 disable” > /proc/asound/card0/pcm0c/oss
## run quake one prog ##

saved it to ~/bin  then made the script executable with;

chmod +x ~/bin/

Now run in a [Terminal] or create a launcher pointing to this script, all done.

Shared Directories with Samba

4, October 2009

Configuring the Samba conf.file [smb.conf]

First, create a shared folder by opening a [Terminal] and either typing or copy & pasting the following;

martin@linux:~$ sudo mkdir /home/my_share

make it available to all users;

martin@linux:~$ sudo chmod 0777 /home/my_share

install samba with;

martin@linux:~$ sudo apt-get install samba

stop samba running with;

martin@linux:~$ sudo /etc/init.d/samba stop

Under Lucid this is now; sudo service smbd stop

rename the current config file as a backup template with;

martin@linux:~$ sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.backup

create a new config template;

martin@linux:~$ sudo touch /etc/samba/smb.conf

open new config file with;

martin@linux:~$ sudo gedit /etc/samba/smb.conf

now copy & paste in the details from the smb.conf file here, changing details of network name [my_network], computer name [my_linux_box] and the shared folder details [my_share] as required.

save and close the config file.

start samba again with;

martin@linux:~$ sudo /etc/init.d/samba start

Under Lucid this is now; sudo service smbd start

Add yourself as a samba user with;

martin@linux:~$ sudo smbpasswd -L -a my_name

enter your admin password when asked.

martin@linux:~$ sudo smbpasswd -L -e my_name

Shutdown confirmation message

4, October 2009

Remove the 60 second to shutdown confirmation message in Karmic Beta.

Open a [Terminal] and type gconf-editor and press [Enter], now using the left-hand menu select [apps], then [indicator-sessions] and tick the box next to [ suppress_logout_restart_shutdown ]

An Apt Server using apt-cacher-ng

17, May 2009

I decided that due the increasing number of PC’s and laptops in the house all requiring the same package downloads from Ubuntu that downloading them once to a server and then serving them onto the various other machines was a better use of my broadband bandwidth. I therefore decided to install apt-cacher following this post with some changes, the main one being I used the Debian version of apt-cacher called apt-cacher-ng.

The PC I used for this is a laptop with a missing screen [don’t ask] with a standard install of Ubuntu.

First install apt-cacher-ng by copying & pasting the following into a terminal after the prompt;

sudo apt-get install apt-cacher-ng

and test that the service is running by typing this to http://your_server_name:3142/apt-cacher-ng into your web browser changing the your_server_name to the name of your server or it’s ip address. When I installed Ubuntu on my server I called the PC bob during the installation therefore I used http://bob:3142/apt-cacher-ng. You can also use http://[localhost]:3142/ the page that gets displayed is an error page with info. and links to various web pages.

If you want to change any of the settings in the apt-cacher config file then, copy & paste the following into your Terminal;

sudo gedit /etc/apt-cacher-ng/acng.conf

I changed the location of the Cache directory so that it was outside my o/s partition and within my home partition as the folder get quite large. If you do this then you need to change the permissions on the folder to add the apt-catcher-ng user group.

sudo chown -R apt-cacher-ng.apt-cacher-ng /Path/To/Your/New/apt-cache-archive

you can now update the repository source list on the server & all the client PC’s or add the redirection in /etc/apt/apt.conf.d/.

Redirection Method

adding a file called 02proxy to /etc/apt/apt.conf.d/ to redirect apt/synaptic requests via server to apt-cacher.
In a Terminal;

touch ~/02proxy

this creates a file called 02proxy in your home folder.

echo ‘Acquire::http { Proxy “http://bob:3142&#8221;; };’ >> ~/02proxy

change bob to your server name, this adds the line Acquire::http { Proxy “http://bob:3142&#8221;; };  to the file

sudo mv ~/02proxy /etc/apt/apt.conf.d/02proxy

this moves the file from your home folder to /etc/apt/apt.conf.d/

now go to “continue from here” below.

The source.list Method

Backup first In a terminal copy & paste;

sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup

to make a backup of the list in the same directory, then there are a couple of options to amend the sources.list file;

Option :1

sudo gedit /etc/apt/sources.list

when this opens you need to insert your_server_name:3142 in every line, i.e.

deb Jaunty main restricted


deb http://your_server_name:3142/ Jaunty main restricted

which made mine look like this;

deb http://bob:3142/ Jaunty main restricted

you can use the search and replace option in gedit to make this a faster process then save and close it.

Option :2

Another option is to open a Terminal and type;

sudo sed -i ‘s/http:\/\//http:\/\/bob:3142\//g’ /etc/apt/sources.list

this uses sed to search for the string http:// in each line of the sources.list file and replace it with http://bob:3142/, you just need to replace bob with the name of your server.

continue from here;

now restart the apt-cacher-ng

sudo /etc/init.d/apt-cacher-ng stop

sudo /etc/init.d/apt-cacher-ng start

if you get a permissions error here check the permissions on your new apt archive folder.

and update the source list with

sudo apt-get update

to update the package list.

if you get errors it’s worth rebooting the PC and trying again especially if you changed any details in the conf file.

Once the update has run you should see that it has placed several directories and files in the Cache directory at /var/cache/apt-cacher-ng or wherever you moved it too.

Now go to your client PC and after updating it’s source list run the apt-get update command to make sure that works ok.

Now we need to import any existing packages in the servers apt-get cache into the apt-cacher-ng cache, so copy and paste into a Terminal;

$ test -x /var/cache/apt-cacher-ng/_import || sudo mkdir -p -m 2755 /var/cache/apt-cacher-ng/_import

change the path if you have moved the cache ddirectory, this creates a new directory called _import within it.

Now in a Terminal;

$ cd /var/cache/apt/archives

import the old packages with:

sudo  cp *.* /var/cache/apt-cacher-ng/_import

Now open the apt-cacher-ng info. page at http://your_server-name:3142/acng-report.html

scroll down to the bottom of the page and hit the import button. After a while the import should finish and you should notice an increase in the space in the disk space that the cache directory takes.

You can now remove the _import directory with;

$ sudo rm -fr /var/cache/apt-cacher-ng/_import

and the old apt cache with;

$ sudo rm -fr /var/cache/apt/archives/*.deb

to save space.

Now download a different packages on each of your PC’s so that you can check each PC’s downloads are going into the apt-cacher-ng cache on the server. The only way I found to do this was to check the number of files in the cache at /var/cache/apt-cacher-ng using properties then add a package and re check to see if the count increased.

The apt-catcher-ng service produces a report at http://your_server_name:3142/acng-report.html i.e. mine is at http://bob:3142/acng-report.html.