December 27, 2009

Developing on Android

I've had an Android phone - the HTC Hero - for almost 3 weeks now and now I feel it is time to get to the next level - developing applications and widgets for this platform. That is why I chose to get an Android so I better get started on it.

This blog-entry is a place and thought holder for research, research plans and ideas for apps and widgets. It is primaryly for my own use and is put online so that I have access to it from different places. You are very welcome use and comment on it.

At a later stage I will put articles on my web site.

Android development can be done on several platforms including Windows, Linux and Mac.

My development platform is my laptop which is running Ubuntu (Linux) 9.10 Karmic Koala. I have to find an Integrated Development Environment (IDE), a Version Control System, the Android Source Development Kit. I also need to research the Android APIs.

Following the quick start guide at the Android Development web site the supported IDE is Eclipse version 3.4 and above. This ties in well with my choice of using Ubuntu 9.10 as it contains Eclipse 3.5 whereas Jaunty (9.04) contains only Eclipse 3.2.

First you have to install Eclipse and the lastest JDK.

... to be continued ...

... to be researched:
Android Development with Eclipse - Tutorial by Jack Vogel (Android 2.0 Eclipse 3.5)

December 14, 2009

pfSense 1.2.3 released

The Firewall/Router pfSense has been released in version 1.2.3. This is a maintenance release in the current stable release tree (1.2.x). For more info read the Release Notice.

pfSense is meant as a firewall application that is managed from a web interface and thus do not need a display and input attached except for installation.

It is based upon FreeBSD and grew out of the m0n0wall preject.

September 29, 2009

Regaining access to an encrypted /home directory after re-installation of Ubuntu Jaunty Jackalope - Part I

Following the disaster of upgrading to Ubuntu Karmic Koala Alpha 6 (see
Upgrading from Ubuntu 9.04 to Karmic Koala Alpha 6 failed ... - Part I, II and III
I decided to re-install 9.04 Jaunty Jackalope with the alternate CD to be able to regain access my encrypted files. (BAD IDEA - read ahead!)

I decided to do a clean install and in order not to disturb my original /home/UserA directory (/home is on a separate partition from /) I chose to use UserB as the pseudo root account.

Logging in using UserB I re-created UserA as a user using the GUI (menu: System -> Administration -> Users and Groups). As /home/UserA was already present, i had to use /home/UserA1 as the /home dir for this user.

Having created the UserA I went into a shell and did:

$ sudo chown -R UserA,UserA /home/UserA

as it incorrectly had the UID and GID of UserB (UID=1000,GID=1000).

Setting

Now /home/UserB is having his /home dir encrypted so at least encryption is up and running. But I still could not access the old encrypted /home/UserA dir neither from being logged in as UserA or UserB.

Looking closer at the home dir I realised that I had missed something. The /home/UserB/.ecryptfs is symlinked to /var/lib/ecryptfs/UserB. This is where the passphrases and signatures resides. And I just deleted those by re-installing. DOH!

Do not delete your partition that contains /var/lib!

I will be back soon with an alternative solution - I hope (otherwise my files are lost :-/)

September 25, 2009

Upgrading from Ubuntu 9.04 to Karmic Koala Alpha 6 failed ... - Part III

Final post regarding my failed upgrade from Ubuntu Jaunty (9.04) to Karmic Koala (future 9.10):

I deleted the /dev/sda2 partition that hosted the interim Ubuntu Studio install I used in Part I and grew the root partition on /dev/sda1 to it's full size again, both using GParted running off an external drive that used to be the hard drive for this laptop. Then I used resize2fs to let the fs knw it had the extra space.

Then I did #7-9 mentioned in Part II - only #8 took a little longer than 10 minutes :-)

And when I rebooted I got the new Karmic Koala splash screen. Woohooooo! And it recognises my encrypted /home partition so that is lovely!

Now my plan is to backup all my data and remove the data I do not need on the laptop and do a clean install of Karmic Koala Alpha. I am leaving behind the Ubuntu Studio stuff - I will do that on the desktop box instead. I will however put in Eclipse (www.eclipse.org) in order to play with Android (www.android.com) development

Mission Accomplished!

September 24, 2009

Upgrading from Ubuntu 9.04 to Karmic Koala Alpha 6 failed ... - Part II

Update from previous post:
I googled for some kind of solution to my problem and found this post from the ubuntu mail archive: [Bug 398214] Re: Karmic Koala stopps dead after /scripts/init-bottom

The solution there is the following:
1. Ensure you are connected to your router by DHCP.
2. Start your machine and select the "recovery kernel linux 2.6.31-10" with the
"down" button. Press "e" on your keyboard.
3. Select the "kernel uuid=..." entry with the "down" button and type "e" again.
4. Change "ro single" to "rw init=/bin/bash". Press "Enter" and "b" on the
keyboard.
5. Wait until booting stops and press "Enter".
6. "root@(none):" is displayed. Type in the konsole:
dhclient eth0
7. After this operation the connection to the internet is activated and you can
type in the konsole:
apt-get dist-upgrade
8. Wait 10 min until upgrade is done.
9. Reboot your machine and select "kernel linux 2.6.31-9" in grub.
I am running kernel 2.6.28-rt3 from UbuntuStudio 9.04 but I do not think that will be a problem. For the remainder of this post replace 2.6.31-39 with 2.6.28-rt3 (in my case) or what ever kernel you are running (within reason ;-)

I did #1-7 but got this error message:
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
As I was already in the root recovery shell there was no need for sudo so I did:
#dpkg --configure -a

I got various dependency problems but they were not the main showstoppers. However I got:
* Mounting securityfs on /sys/kernel/security
[357.593965] type=1505 audit(12xxxxxx32.173:2): operation="profile_replace" info="failed to unpack profile" name="/usr/sbin/mysqld" pid=2180
/sbin/apparmor_parser: unable to replace "/usr/sbin/mysqld" profile doesn't conform to protocol
[357.xxxxxx] type=1505 audit(12xxxxxx32.604:3): operation="profile_load" name="/sbin/dhclient_script" name2="default" pid=2181
[357.xxxxxx] type=1505 audit(12xxxxxx32.605:4): operation="profile_replace" info="failed to unpack profile" name="/sbin/dhclient3" pid=2181

[... several other lines both kernel and dpkg lines ...]

Recursive error fixed. Need to reboot.

Here i had to do - I never got a shell prompt. But the system shuts down nicely and reboots.

I did #1-5 after the reboot and then
#dpkg --configure -a
Still dependency problems but dpkg finishes this time.

Did #6 and got this response:
You might want to run 'apt-get -f install' to correct these
The following packages have unmet dependencies:
libgnomekbdei4: Depends: libgomekbd4 but it is not installed
libice-dev: Depends: libice6 (=2:1.0.5-1) but 2:1.0.4-1 is installed
ubuntu-minimal: Depends: rsyslog but it is not installed
xserver-xorg: Depends: console-setup (>= 1.29) or
console-setup-mini (>= 1.29) but it is not installed

#apt-get -f install
which finishes apparently without problems

#apt-get dist-upgrade
[ ... several lines from apt-get listing packages ... ]
1241 upgraded, 320 newly installed, 18 to remove and 3 not upgraded
1 not fully installed or removed
Need to get 0B/1938 MB of archives
After this operation 859 MB of additional disk space will be used
Do you want to continue [Y/n]?

Well normally I would answer yes here BUT - from a recent df I remembered I had only about 350 MB available disk space. From part I you might remember that I resized the / partition (/dev/sda1) and did an install of Ubuntu-Studio 9.04 on the freed 3 GB from this rezise. Now it seems it is time to delete this install and re-resize the sda1 partition to its former size to continue with the fix.

I will return with part III when this is done ...

September 22, 2009

Upgrading from Ubuntu 9.04 to Karmic Koala Alpha 6 failed ...

I wanted to try out the new Ubuntu Karmic Koala, destined to be Ubuntu 9.10 so I decided to upgrade my laptops Ubuntu 9.04 (Jaunty Jackalope) to Karmic Koala Alpha6.

Bad Idea.

The laptop has its /home directories encrypted and I think this is what is messing up the upgrade. So now I have an unusable laptop. Which is a bit sad, because it has our photos on it :-(

I am trying to figure out how to bring it back to life.

If I start is in a recovery session it boots the kernel(s) (2.6.28.-3-rt, 2.6.28-14 and 2.6.28-15) and (apparently) runs the /scripts/local-premount, /scripts/local-bottom and /scripts/init-bottom successfully (it replies "Done." "Done." to the two first scripts and just "Done." on the third). From there I can only press which briefly gives me the recovery console but after a few short seconds the system shuts down.

I tried installing Ubuntu Studio 9.04 on available space but included my old /home directory during the install (just putting it in /etc/fstab, not formatting the drive) so the files are still there, only they are encrypted.

When booting this partition I get to the login screen. I can login, but just get a black screen with the mouse pointer on it - the /home files are not accessible so Gnome does not know how to render the screen or setup panels, menus etc.

Next step is to install Ubuntu Studio 9.04 again without referring to the old /home. Then installing encryptfs to see if I can get access to the files. I will keep you posted.

July 05, 2009

Loading linux onto an IBM ThinkPad R30 without an optical drive

Problem: how to load Linux unto a PC that does not have an optical drive

Preface:
I have an elderly IBM ThinkPad R30 where the optical drive is missing. I would like to load xubuntu onto this machine. But how to go about that?

I tried making a USB-bootable drive but appenrently the BIOS of the ThinkPad is too old to be able to boot on it. It does have the option of booting from a USB floppy but I am using a 4 GB CompactFlash card in a crd reader and that is a no-go. I have also tried a USB DVD-drive with similar results.

I then thought of the netbook-remix. So I loaded that onto the hard drive hoping to recover that area later as Swap. For a little while I though it would work but the installation just dies.

But the idea of copying something on to the harddrive stuck. So my next try was an ordinary xubuntu bootable USB (using FAT as a filesystem) that I copied to the hard drive.

Now at least the installation starts and goes beyond the partition stage! But! When looking for the seed file and package repositories it looks for a CD-ROM drive :-(

So I thought; let's mount the FAT partition and make a symbolic link to /dev/cdrom. But the busybox mount command apparently does not recognise the FAT fs. So it will not let me mount the partition. Back to square one.

By chance I find out, that the kernel does recognise the card reader and assigns /dev/sdb to the CF card. Magically it actually will boot off the hard drive and mount its tmpfs from the compressed file on the harddrive. And with the card reader plugged in at boot time, it is recognised and mounted as a replacement for the CD-ROM. Great! So it actually select packages and starts installing the base system.

The snake in the paradise seems to be that some of the package files are corrupted and it does not complete the install.

So now I have to re-download the ISO image and retry the install this way. As I am on a slow net connection (128 kbit) this takes a little while. I will be back with an account of how I fare on this one, when I get the ISO afresh.

Jan Rasmussen
email: jan@kaddu.dk
web: http://www.kaddu.dk
blogs: http://janholbo.blogspot.com
http://janholbodk.blogspot.com
http://kaddulinux.blogspot.com

May 25, 2009

Low activity lately

There has not been many posts from me lately.

About a month ago me and my family moved so we have been busy getting everything packed - move - and now we are unpacking and settling in.

We still have no internet connection at home, but products are coming on the market that makes this more affordable. Prices here in Uganda are nowhere near the levels of Europe and North America.

Uganda Telecom (UTL) is putting a landline + 64 Kbit internet connection on the market for UGX 60,000 /=. Thats roughly USD 30 a month. They call it unlimited, but access is from 7 pm to 7 am Monday through Friday and all day Saturday and Sunday.

Now what remains is how long it will take UTL to establish the copper wiring to our house.

I am sorry for this Off-Topic post. More Linux related posts should come soon.

April 15, 2009

Windows Vira fixed with Ubuntu & ClamAV?

Earlier today to my fear and disgust I found out that I had been the "lucky" landlord of a Virus. Apparently the B****** crept in either because the Anti Virus software I am using was not fully updated. So what does a clever man do?

Luckily (hopefully) I found out while windows was booting which I aborted, so I am hoping not too much damage has been done.

On Ubuntu ClamAV is offered as both an Anti Virus Software in the personal sense as well as deamons that can be integrated into both email and HTTP (web) proxy servers in the defense of a network. This blog will concentrate on looking for and removing a virus/worm/trojan horse on a hard drive (and in this case a Windows partition)

Well as we speak I am currently screening the hard drive with ClamAV from Ubuntu as my laptop is a dual (actually triple) boot system with Windows XP and Ubuntu 9.04 Jaunty Jackalope Alpha6/Beta. (It was installed as Alpha6 but should have a Beta status, as it is updated almost daily).

So far the intruder (Trojan.Swizzor.Gen) has been found twice on the boot partition now I have to remove it, without too much damage. It might also have hid itself somewhere in the windows disguising itself from the AV-software, but I am hoping that ClamAV will get it. I hope to return to this matter with a positive report, probably tomorrow.

Update (April 16th, 7.05 am GMT+3):
The result of the scan was:
/media/ACER/i386/FONTEXT.DL_: Trojan.Swizzor.Gen FOUND
/media/ACER/WINDOWS/system32/fontext.dll: Trojan.Swizzor.Gen FOUND
/media/ACER/WINDOWS/Installer/$PatchCache$/Managed/00002119F20000000000000000F01FEC/12.0.4518/XL12CNV.EXE: W32.Virut.Gen.D-163 FOUND
/media/ACER/WINDOWS/Installer/$PatchCache$/Managed/00002119F20000000000000000F01FEC/12.0.4518/EXCEL.EXE: W32.Virut.Gen.D-163 FOUND
/media/ACER/WINDOWS/Installer/$PatchCache$/Managed/00002119F20000000000000000F01FEC/12.0.4518/VBE6.DLL: W32.Virut.Gen.D-159 FOUND
/media/ACER/WINDOWS/Installer/$PatchCache$/Managed/00002119F20000000000000000F01FEC/12.0.6215/EXCEL.EXE: W32.Virut.Gen.D-163 FOUND
/media/ACER/WINDOWS/Installer/$PatchCache$/Managed/00002119F20000000000000000F01FEC/12.0.6215/XL12CNV.EXE: W32.Virut.Gen.D-163 FOUND
/media/ACER/WINDOWS/Installer/15826ea.msp: W32.Virut.Gen.D-163 FOUND
/media/ACER/WINDOWS/Installer/15826fc.msp: W32.Virut.Gen.D-163 FOUND
/media/ACER/WINDOWS/Installer/1f3ab5.msp: W32.Virut.Gen.D-163 FOUND
/media/ACER/WINDOWS/Installer/1f3ac7.msp: W32.Virut.Gen.D-163 FOUND
/media/ACER/WINDOWS/Installer/2d377c4.msp: W32.Virut.Gen.D-163 FOUND
/media/ACER/WINDOWS/Installer/2d377d6.msp: W32.Virut.Gen.D-163 FOUND
/media/ACER/WINDOWS/Installer/a0f264.msp: W32.Virut.Gen.D-163 FOUND
/media/ACER/WINDOWS/Installer/a0f276.msp: W32.Virut.Gen.D-163 FOUND
/media/ACER/WINDOWS/$NtServicePackUninstall$/fontext.dll: Trojan.Swizzor.Gen FOUND
/media/ACER/WINDOWS/ServicePackFiles/i386/fontext.dll: Trojan.Swizzor.Gen FOUND
/media/ACER/Programmer/Microsoft Office/Office12/EXCEL.EXE: W32.Virut.Gen.D-163 FOUND
/media/ACER/Programmer/Microsoft Office/Office12/excelcnv.exe: W32.Virut.Gen.D-163 FOUND
/media/ACER/.Trash-1000/files/RESTORE/k-1-3542-4232123213-7676767-8888886/BLUE.exe: Trojan.Agent-81496 FOUND

Known viruses: 539153
Engine version: 0.95.1
Scanned directories: 12009
Scanned files: 121566
Infected files: 20

Apparently ClamAV does false positives on the Trojan.Swizzor.Gen virus. I do not know what to think but I am uploading the files to an online virus scan as we speak.

However the scan also found W32.Virut.Gen.D-163 and Trojan.Agent-81496 in my files. These are viruses. I am uploading all the files reported by ClamAV to virusscan.jotti.org to verify ClamAVs claims and to confirm if they are (a) false positive(s). An update on this will follow later.

April 07, 2009

Grabbing video off a DVD-video camera...

Having bought a DVD Video camera a little while back I now have 8 mini-DVDRWs (8 cm DVDRW discs) with recordings on. I would like to edit those into (a) DVD(s) that I could give to family and friends.

BUT. So far I have not been able to acquire the contents of these mini-DVDRWs without losing quality. As I would like to preserve my raw footage I can not ReWrite those discs and thus I am stuck with a camera with no recording ability. I could ofcourse buy more discs, but that would only postpone my problem.

So far I have looked at programs like dvd::rip, acidrip etc, but they all have the fault (for my purpose) of transcoding the video data to a lesser quality in order to save space.

I have thought about, and have done a series of .iso files to store the content of these discs but have resisted to erase them as my fear of losing an .iso file before I have had time to work on it.

Now time is working against me, as I need the discs for this easter, starting early tomorrow morning.

I need to have a look at k9copy which seems right for my purpose. I am currently running Ubuntu Jaunty Jackalope and I hope I can get a stable copy of it today, so that I can start rewriting those discs tonight.

So now (11:17 am, April 7th, 2009) I am waiting for the package-manager to download and install k9copy on my computer. I will get back to you for an update later today.

April 03, 2009

WLAN problems in Jaunty Alpha6

I decided to install the Jaunty Jackalope (the coming Ubuntu 9.04) on my laptop. So far I haven't experienced any glitches, except for my Wireless LAN.

The builtin WLAN card in the Acer TravelMate 2492 I am using is based on a Broadcom chipset. The chipset is recognised and I can download the proprietary hardware driver which seems to work - but doesn't.

I usually get a connection speed of 36-54 Mbit/s, both in Ubuntu 8.10 and Windows XP. Initially in 9.04 I get 48 and even 54 Mbit/s connection, but it quickly drops to 1 Mbit/s without any throughput. We are running WEP as the encryption (not very safe, I know - I am planning to replace it :-)

Luckily I have a D-Link N class PC-Card (DWA-645) which Ubuntu recognizes and that works perfectly and without proprietary drivers :-)

So far I have found no solutions (other than using the D-Link card). Does anyone have any pointers for me?

February 07, 2009

The Battle for Wesnoth

TheBattle for Wesnoth is a turn-based Fantasy Strategy game that I have lately used (far too much) time on. It is a free, open source offering (licensed under the GPL) that - in my view - offers everything that a for-money game should. On top of this it is actively developed upon, so much so, that the comming stable version - currently in beta - is available for the brave and adventourus people out there.

The Battle for Wesnoth - according to Wikipedia - is based on the SNES games (links refer to Wikipedia pages) and is written by David White. From the Wesnoth Wiki : "

The Battle for Wesnoth is a turn-based strategy game with a fantasy theme.

wesnoth-1.2-b-175.jpg

A magical lightning strike

Build up a great army, gradually turning raw recruits into hardened veterans. In later games, recall your toughest warriors and form a deadly host against whom none can stand! Choose units from a large pool of specialists, and hand-pick a force with the right strengths to fight well on different terrains against all manner of opposition."

There is both a campaign (single player) and multiplayer including Hot Seat and Internet games

I will play... uhmm research this game further and file a full review at a later date.

But for now I will say: It is highly addictive!

January 20, 2009

Silence on the western front ....

This blog has been quiet for quite some time now. More than a year. Due to other things I have not had time to work on this blog. In the meantime I have moved to Uganda to work as an IT Manager for an international church and NGO.

I am still using Linux, now running Ubuntu 8.10 Intrepid Ibex as well as Windows XP on my laptop. As we moved to Uganda, we left all the hardware in Denmark and only brought with us our laptops.

Sometime in the future I will start building a new HomeServer, as time and funds will allow it. It will probably be based upon a "green computer" that is a 2nd hand computer brought here to Uganda, refurshed and reinstalled often with Windows XP. Ofcourse I plan to install Linux, most likely Ubuntu Server or Debian Server.

In the meantime I will hopefully soon start using Ubuntu Server as a platform for virtual servers at my place of work. I will share with you my experiences on this.

As I am quite busy at work, and we do not have internet at home (yet) posts will not be frequent but I am hoping and planning for at least one planned post per month, supported by an occasional post when I have something interesting to tell or comment on.