Billsbox

The blog of Bill Hager

Ubuntu Karmic(9.10) doesn't support SheevaPlug

June 13, 2010

Per this post on the plugcomputer.org forum's versions of Ubuntu after 9.04 will not work on the any of the current plug computer platforms since Ubuntu is now compiling for a different(newer?) version of the ARM platform that none of the plugs are using. Looks like I've got some repair todo here.

SheevaPlug Release Upgrade: Jaunty(9.04) to Karmic(9.10)

June 13, 2010

I tried the install as follows, and it failed. That will be it for today. I'll do a fresh install of 10.04 later. During the the failed attempt today I Installed update-manager-core with apt-get install update-manager-core. Then did do-release-upgrade.

During the do-release-upgrade the process failed with the following output.

Fetching
Done downloading            

Upgrading
Done downloading            
Extracting templates from packages: 100%
Preconfiguring packages ...
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 13135 files and directories currently installed.)
Removing belocs-locales-bin ...
Selecting previously deselected package gcc-4.4-base.
(Reading database ... 13126 files and directories currently installed.)
Unpacking gcc-4.4-base (from .../gcc-4.4-base_4.4.1-4ubuntu8_armel.deb) ...
Setting up gcc-4.4-base (4.4.1-4ubuntu8) ...
(Reading database ... 13134 files and directories currently installed.)
Preparing to replace libgcc1 1:4.3.3-5ubuntu4 (using .../libgcc1_1%3a4.4.1-4ubuntu8_armel.deb) ...
Unpacking replacement libgcc1 ...
Setting up libgcc1 (1:4.4.1-4ubuntu8) ...

Processing triggers for libc6 ...
ldconfig deferred processing now taking place
Selecting previously deselected package libdbus-1-3.
(Reading database ... 13134 files and directories currently installed.)
Unpacking libdbus-1-3 (from .../libdbus-1-3_1.2.16-0ubuntu9_armel.deb) ...
Setting up libdbus-1-3 (1.2.16-0ubuntu9) ...

Processing triggers for libc6 ...
ldconfig deferred processing now taking place
Selecting previously deselected package libudev0.
(Reading database ... 13142 files and directories currently installed.)
Unpacking libudev0 (from .../libudev0_147~-6_armel.deb) ...
Setting up libudev0 (147~-6) ...

Processing triggers for libc6 ...
ldconfig deferred processing now taking place
Selecting previously deselected package libc-bin.
dpkg: considering deconfiguration of libc6, which would be broken by installation of libc-bin ...
dpkg: yes, will deconfigure libc6 (broken by libc-bin).
(Reading database ... 13148 files and directories currently installed.)
Unpacking libc-bin (from .../libc-bin_2.10.1-0ubuntu15_armel.deb) ...
De-configuring libc6 ...
Replacing files in old package libc6 ...
Setting up libc-bin (2.10.1-0ubuntu15) ...
Installing new version of config file /etc/bindresvport.blacklist ...

(Reading database ... 13154 files and directories currently installed.)
Preparing to replace libc6 2.9-4ubuntu6 (using .../libc6_2.10.1-0ubuntu15_armel.deb) ...
Removing obsolete conffile /etc/init.d/glibc.sh ...
Checking for services that may need to be restarted...
Checking init scripts...
Unpacking replacement libc6 ...
dpkg: warning - old post-removal script killed by signal (Illegal instruction)
dpkg - trying script from the new package instead ...
dpkg: error processing /var/cache/apt/archives/libc6_2.10.1-0ubuntu15_armel.deb (--unpack):
 subprocess new post-removal script killed by signal (Illegal instruction)
dpkg: error while cleaning up:
 subprocess pre-installation script killed by signal (Illegal instruction)
Errors were encountered while processing:
 /var/cache/apt/archives/libc6_2.10.1-0ubuntu15_armel.deb
Exception during pm.DoInstall():  E:Sub-process /usr/bin/dpkg returned an error code (1)

Could not install the upgrades 

The upgrade is now aborted. Your system could be in an unusable 
state. A recovery will run now (dpkg --configure -a). 

Please report this bug against the 'update-manager' package and 
include the files in /var/log/dist-upgrade/ in the bug report. 
installArchives() failed 


Upgrade complete 

The upgrade is completed but there were errors during the upgrade 
process. 

SheevaPlug Linux Upgrade

June 13, 2010

After going through the fixes specified in the New Plugger How To everything seems fine.

Next up is an Ubuntu upgrade with apt-get update, apt-get dist-upgrade, and apt-get autoremove. apt-get dist-upgrade wanted to do the following.

root@debian:~# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED:
  libxcb-xlib0
The following NEW packages will be installed:
  aptitude libc6-vfp libcap2 libclass-accessor-perl libcwidget3 libept0 libgdbm3 libio-string-perl libparse-debianchangelog-perl
  libsigc++-2.0-0c2a libtimedate-perl libxapian15 perl perl-modules python2.6 python2.6-minimal
The following packages will be upgraded:
  adduser apt apt-utils base-files base-passwd bash bsdutils busybox-initramfs console-setup cpio cryptsetup debconf debconf-i18n
  debianutils dhcp3-client dhcp3-common dmsetup e2fslibs e2fsprogs eject file gcc-4.3-base ifupdown initramfs-tools initscripts kbd
  klogd language-pack-en language-pack-en-base libblkid1 libc6 libcomerr2 libcups2 libcurl3-gnutls libdevmapper1.02.1 libgcc1
  libgnutls26 libgpm2 libkrb53 libldap-2.4-2 libmagic1 libncurses5 libncursesw5 libnewt0.52 libpam-modules libpam-runtime libpam0g
  libreadline5 libsasl2-2 libsasl2-modules libselinux1 libsepol1 libsqlite3-0 libss2 libssl0.9.8 libstdc++6 libuuid1 libvolume-id1
  libwbclient0 libx11-6 libx11-data libxcb1 locales login logrotate lsb-base lsb-release module-init-tools mount nano ncurses-base
  ncurses-bin netbase ntpdate openssh-client openssh-server openssl passwd procps python python-minimal python2.5 python2.5-minimal
  readline-common samba samba-common sudo sysklogd sysv-rc sysvinit-utils tasksel tasksel-data tzdata ubuntu-minimal ucf udev util-linux
  uuid-runtime vim-common vim-tiny whiptail xkb-data zlib1g
103 upgraded, 16 newly installed, 1 to remove and 0 not upgraded.
Need to get 57.1MB of archives.
After this operation, 62.5MB of additional disk space will be used.
Do you want to continue [Y/n]?

Update: The update completed successfully

SheevaPlug First Boot

June 13, 2010

In addition to my new SheevaPlug I'm using my Lenovo T60 running Ubuntu 10.04.

  1. Use the supplied USB cable to attach the SheevaPlug to your computer.
  2. Plug the SheevaPlug into the wall
  3. On Linux wait a few seconds then type run "tail | dmesg" Look for ttyUSBX. Here is the output on my system showing the SheevaPlug as ttyUSB3.
    hager@acornattack:~$ dmesg|tail
    [ 3442.662882] usb 4-1: Ignoring serial port reserved for JTAG
    [ 3442.662941] ftdi_sio 4-1:1.1: FTDI USB Serial Device converter detected
    [ 3442.662990] usb 4-1: Detected FT2232C
    [ 3442.662995] usb 4-1: Number of endpoints 2
    [ 3442.663000] usb 4-1: Endpoint 1 MaxPacketSize 64
    [ 3442.663004] usb 4-1: Endpoint 2 MaxPacketSize 64
    [ 3442.663008] usb 4-1: Setting MaxPacketSize 64
    [ 3442.665983] usb 4-1: FTDI USB Serial Device converter now attached to ttyUSB3
    [ 3442.666016] usbcore: registered new interface driver ftdi_sio
    [ 3442.666021] ftdi_sio: v1.5.0:USB FTDI Serial Converters Driver
    hager@acornattack:~$ 
    
  4. Open up minicom set your device to ttyUSBX from the previus step and set the modem to 115200 baud rate, 8 data bits encoding each character, N (none/no) parity, 1 stop bit, 0 (none) flow control. AKA 115200-8-N-1-0. On my system I get a nice "Marvell>>" prompt just like this:
    Welcome to minicom 2.4                                                                                 
                                                                                                           
    OPTIONS: I18n                                                                                          
    Compiled on Jan 25 2010, 06:49:09.                                                                     
    Port /dev/ttyUSB3                                                                                      
                                                                                                           
    Press CTRL-A Z for help on special keys                                                                
                                                                                                           
                                                                                                           
    Marvell>>  
    

Typing "help" gives a nice long list of commands.

Typing "version" showed the U-Boot version

Marvell>> version

U-Boot 1.1.4 (Jul 14 2009 - 06:46:57) Marvell version: 3.4.16
Marvell>>

Typing "boot" booted a pre installed version of "Ubuntu jaunty (development branch)". The username was "root" and the password was "nosoup4u".

Ubuntu jaunty (development branch) debian ttyS0

debian login:

Everything seems to be working just like it says on the New Plugger How To which is great.

SheevaPlug unboxing

June 13, 2010

I recently found out about Plug Computers. With the price point being just $99 I couldn't help but order one to try out. 37 days after I ordered it and just three days after my birthday I came home to find my new SheevaPlug computer waiting for me on my porch today. The packaging was very nice check out the unboxing here.

Hilarius Bollywood music video

December 9, 2009

This music video was on at an indian resturant my wife and I were eating dinner at last night. It's Hilarius! ROCKET SINGH - Salesman of the Year

Black Monday

November 30, 2009

Today was an interesting day. About half way through a morning of sifting through emails with "Call me as soon as your available" and "can you deliver this to me" and phone calls to follow up with the former I found one of the really scary notes. "It's broken, and I think it's one of the pieces you installed." So I hopped into my car and headed south to see if I could shed some light on to the issue. The reality is that after spending the afternoon on site more than likely the issue is too much Black Monday web surfing and too little bandwidth.

The good news about today is that after I getting back home I got to watch 3 episodes of Anthony Bourdain and one of Andrew Zimmern episode. I love these shows! One of my favorite things to do is drink with Anthony Bourdain. When his show is on I run to my fridge and grab whatever I happen to have available, pour it in a glass, and just enjoy it with Anthony for a little while.

In addition to all this fun I feel a little inspired as well. These TV shows really bring out the community feel good aspects of food. I wonder. Can I go a month with only eating home and friend prepared foods? That means nothing commercially prepared(i.e. restaurants). I'll think about how this sounds in the morning and let you know what happens!

HTTP Authentication with PLT Scheme

November 16, 2009

Beware all who use PLT Scheme for HTTP access. HTTP Authentication is not included in the net/url library. It's fairly easy to use HTTP Basic Auth, though. The functions below will create an HTTP Basic Auth header line which can be passed to any of the net/url HTTP access routines(like get-pure-port).

This code not exactly an optimal implementation. I use PLT's built in base64-encode and then take out all the new lines it puts in with the "remove-nl" routine instead of implementing a my-base64-encode that doesn't include new lines. On the upside, it works. :)

(define (make-basic-auth user pass)
  (let ((user-pass (remove-nl 
     (base64-encode 
         (string->bytes/locale (format "~a:~a" user pass))))))
    (format "Authorization: Basic ~a" user-pass)))

(define (remove-nl bstr)
  (list->bytes
   (reverse
    (foldl
     (lambda (byte rest)
       (if (eq? byte 10)
          rest
	     (cons byte rest)))
   '()
   (bytes->list bstr)))))

SSL + HTTP with PLT Scheme

November 9, 2009

PLT Scheme has a built in library for accessing web resources called net/url. Unfortunately, access to SSL web servers is not supported. Fortunately, with just a few lines of code you can get SSL working yourself. The code below is from my first stab at it tonight. I hope this helps.

#lang scheme/base

(require scheme/unit
 net/url-structs
 net/url-sig
 net/url-unit
 net/tcp-sig
 net/ssl-tcp-unit)

; You will want to point client-root-cert-files to your trusted
; root certificate files, otherwise any server certificate will
; be trusted which negates much of the value gotten from using
; SSL in the first place.
(define my-ssl-tcp@
  (make-ssl-tcp@ #f ; server-cert-file
                 #f ; server-key-file 
                 #f ; server-root-certs-file
                 #f ; server-suggest-auth-file
                 #f ; client-cert-file
                 #f ; client-key-file
                 #f)) ; client-root-cert-files (listof path-string?)

(define my-ssl-tcp+url@
  (compound-unit
   (import)
   (export URL)
   (link [((URL : url^)) url@ TCP]
 [((TCP : tcp^)) my-ssl-tcp@])))

(define-values/invoke-unit my-ssl-tcp+url@
  (import)
  (export url^))

; example function demonstrating access to a https web server
; You can test it out with (my-get-url "https://login.yahoo.com")
(define (my-get-url url)
  (read-string 
   100000 
   (get-pure-port (string->url url))))

USB drives suck!

August 10, 2009

Just in case anyone was wondering the USB interface sucks for drives. It doesn't matter if it's a disk drive or a flash drive. Any extended usage of the drive is *SLOW*. My proof is below. "FreeAgent\ Drive" is a 2.5" USB Free Agent drive from Seagate. The tests I've conducted with flash drives have exactly the same results. The average speed over a long I/O operation is really *SLOW*.

ubuntu@ubuntu:~$ dd if=/dev/zero of=/media/FreeAgent\ Drive/ext3.fs bs=1M count=20480
417+0 records in
417+0 records out
437256192 bytes (437 MB) copied, 27.5261 s, 15.9 MB/s
1136+0 records in
1136+0 records out
1191182336 bytes (1.2 GB) copied, 80.4907 s, 14.8 MB/s
1676+0 records in
1676+0 records out
1757413376 bytes (1.8 GB) copied, 123.998 s, 14.2 MB/s
3320+0 records in
3320+0 records out
3481272320 bytes (3.5 GB) copied, 305 s, 11.4 MB/s
8689+0 records in
8689+0 records out
9111076864 bytes (9.1 GB) copied, 1274.29 s, 7.1 MB/s
9328+0 records in
9328+0 records out
9781116928 bytes (9.8 GB) copied, 1448.38 s, 6.8 MB/s
12639+0 records in
12639+0 records out
13252952064 bytes (13 GB) copied, 2571.63 s, 5.2 MB/s
13305+0 records in
13305+0 records out
13951303680 bytes (14 GB) copied, 2888.83 s, 4.8 MB/s
20480+0 records in
20480+0 records out
21474836480 bytes (21 GB) copied, 6819.54 s, 3.1 MB/s
ubuntu@ubuntu:~$ 

Changing a filesystem size on AIX

March 12, 2009

The easiest way to grow or shrink a filesystem on AIX is to use chfs. Here are a couple examples for growing the /home filesystem chfs -a size=+256M /home chfs -a size=+2G /home Here are the same examples for shrinking instead of growing chfs -a size=-256M /home chfs -a size=-2G /home

How to fix grub after a Windows Install

February 26, 2009

I've had Ubuntu installed on my laptop for ages. Recently, I've wanted to play some Windows games with my co-workers, so the other night I shrunk my Ubuntu 8.10 partition with gparted and installed Windows on the free space.

After that I had a little trouble getting grub installed again. Here's how I finally got it fixed.

  1. Boot from Ubuntu CD
  2. Mount my Ubuntu partition (mount /dev/sda1 /mnt)
  3. Edit grub's menu.lst file(/mnt/boot/grub/menu.lst). I added these lines at the bottom.
    title		Windows XP
    root		(hd0,1)
    makeactive
    chainloader	+1
        
  4. remount dev (mount -o bind /dev /mnt/dev)
  5. remount prov (mount -o bind -t proc /proc /mnt/proc
  6. chroot (chroot /mnt)
  7. reinstall grub on the MBR (grub-install /dev/sda)
  8. exit and reboot

Logitech Keyboard

February 23, 2009

I purchased a Logitech Cordless Desktop Wave Pro the other day, and so far it's working great. I'm running Ubuntu 8.10 Intrepid Ibex. I plugged it in, and all of the standard keys work. There are a few "media" keys around the eges like zoom, music, photos, etc that don't. The volume buttons do work. In the short time that I've used it I've noticed that I do make more typos than I did with my Thinkpad keyboard. It may be that I'm still adjusting. For the past several years I've used an IBM Thinkpad keyboard almost exclusively.

The mouse stands out in my opinion. It's responsive to very small movements. The curves fit my hand very well. The buttons are just right. I especially like the scroll wheel. It's very easy to move, but at the same time it doesn't move more than I want it to. The back and forward buttons on the mouse work in Firefox, too.

I have noticed that the reception is not infallible. My desktop sits on the floor just to the right of my wooden desk which is a completely solid object. With the mouse and keyboard on top of the desk the mouse reception does not always reach the sensor. I fixed this by getting a USB extender cable, so the sensor could sit on top of the desk. However, without the solid desk in the way the reception works across the room.

If you're in the market for a keyboard/mouse. I hope this helps.

Copyright (c) 2009