Unscheduled blog downtime

March 12th, 2010 Sander Alberink No comments

We’re back up and running again, at least on this blog. I asked my hoster to upgrade my account with SSH, which seems to entail a server-move. During that move, the databases get migrated as well and during the migration they managed to lose all database contents. Of course, this left the blog in tatters. We’re back up and running, due to a restore of the old database-contents. Now, let’s see if I can get www.stampfini.org to run again…

Edit: and that is running again as well.

Bookmark and Share
Categories: General Tags:

Android or iPhone? Wrong Question « abovethecrowd.com

March 4th, 2010 Sander Alberink No comments

Found a great read on why Android or iPhone is the wrong question.

While Apple may have opened the proverbial Walled Garden, it is Google, with its aggressive Android offering, that aims to obliterate it. Make no mistake about it; Apple was the pioneer with the amazing revolutionary product. Also, with no iPhone, there is no Android. This is not to say that Android copied iPhone, but rather the impetus to adopt and trust Google’s Android offering was driven by a market dynamic that resulted directly from the iPhone’s success.

via Android or iPhone? Wrong Question « abovethecrowd.com.

Indeed, the iPhone represents only a very small portion of the global phone market. But it is the other portion of that same phone market that is the target for Google/Android. Google does not necessarily want to compete with the iPhone head-to-head (although they can!), but is more looking towards converting people that use a heavy feature-phone these days but may make the switch to a smartphone if a compelling enough offer comes along.

Bookmark and Share
Categories: Android Tags: ,

HD Crash…

February 17th, 2010 Sander Alberink No comments

So…. Here we go again: that all too familiar feeling of ‘uhoh’…. I was working on my PC the other night, doing a routine upgrade of KDE to the newly release version 4.4, when all of a sudden aptitude started spewing loads and loads of errors about not being able to save files and giving read-only errors all over the place. A quick check with mount and dmesg confirms my suspicion: a hard drive is giving problems and the file system has been remounted read-only. Dmesg confirmed that it was the drive timing out on commands, giving mentions that it was unable to remap a sector.

Now, this puts me into a bit of a bind. This is an olderly PC that I scrapped together from a Dell Dimension 8400 and an additional HD and SATA card. As it doubles as the media-server for my XBox, it has to have some additional storage, hence the extra harddisk. The extra harddisk was a 300Gb one, the system harddisk it came with (which started failing) was a 160Gb one. I’ve routinely run LVM2 on my system exactly for this case, being able to add additional diskspace easily without fiddling with mounting additional drives, running out of space on one partition while swimming in space on another one. This time, that may have gotten the better of me though. I don’t run LVM in a RAID setup, so if one drive fails, I’m up sh*t creek. My only luck may have been that I only very recently added that disk, and I hadn’t really started using it.

So, now I need to recover this data somehow. My plan of attack is as follows:

  • Put in another drive
  • Move the entire contents of the failing drive to the new drive
  • Try to reconstruct the LVM data from there.
  • Profit! :)

Step 1: find a new drive

We need a donor drive to transfer the data too. Preferably, use a drive that is bigger than the original drive. Nothing would be worse when you try to rescue your precious data and finding out that you are a few sectors short on the new drive. Even if both drives are advertised as being 160Gb drive, that doesn’t mean they will have the exact same sector count! When we have the drive, hook it up to the system

In my case, I bought a 250Gb Samsung drive, only to find out after I built it into my machine that it was a) refurbished (it had a complete Vista install on it) and b) dying! I immediately got a warning from Ubuntu that the SMART data indicated that the drive was failing… Not good. I removed the drive and replaced it with a slightly larger 160Gb drive I had lying around. I will replace that drive when I get a replacement for the refurbed drive, but by then, I can hopefully use the ‘pvmove’ commands.

When connecting the drives, make sure that you hook up the donor drive to the cable that was originally connected to the failing drive and connect the failing drive with an extra cable. This way, the device enumeration under Linux would be identical and the partitions we salvage will appear on the device files that LVM expects.

Step 2: re-create the partitions you had on the drive

This step, in retrospect, may not have been necessary. I booted the mediaserver into a bootable Ubuntu 9.10 CD-image and re-created the partitions using Gparted, ensuring that each partition was slightly larger than the corresponding partition on the failing disk. Note: gparted will complain that it is not capable of working with LVM2, but you can ignore that.

Step 3: get a copy of dd_rescue

For the copying of the data to succeed, we need a copy of dd_rescue. Dd_rescue is a clone of dd, that copies data from a file or device and does not abort when it encounters a read error. Instead, it will fall back to a ’sector-at-the-time’ reading mode, log the error and continue. Additionally, it has the option of reverse-copying, starting at the end of a device and working its way backwards, so that you can approach a problem area from both sides, maximizing the amount of a file or device that can be read.

Ubuntu 9.10 does not come with this by default, but the sources are tiny and luckily our live-CD includes a working gcc compiler. Compiling it is a breeze, just consisting of a ‘make’ call. We run it is follows:

$ sudo ./dd_rescue /dev/sdc1 /dev/sdb1

Of course, you will need to change /dev/sdc1 and /dev/sdb1 into their appropriate device files. Also, be very careful about the order  of these arguments. The first is the input file, the second argument is the output file. Mess these up and you are overwriting the data you want to recover with whatever was on the donor drive!

I had two partitions, so I executed this command twice. In retrospect I could have just specified the device files for the entire harddisk (i.e. /dev/sdc and /dev/sdb) and dd_rescue would have duplicated everything (including the partition table).

I got around 40 read-errors on the first partition, and about 520 on the second partition. Now we have the drives duplicated, but don’t throw the faulty drive away just yet! If we manage to cock up the LVM restore, we can re-attempt the saving.

Step 4: start salvaging using LVM

Now we have a copy of our physical volumes. We will try to activate the volumegroups they belong to by executing vgscan:

$ sudo vgscan -v
Wiping cache of LVM-capable devices
Wiping internal VG cache
Reading all physical volumes.  This may take a while…
Finding all volume groups
Finding volume group “htpc-server”
Found volume group “htpc-server” using metadata type lvm2

After this is done and our volumegroups have been found, we execute a vgchange:

$ sudo vgchange -a y
2 logical volume(s) in volume group “htpc-server” now active

vgdisplay will give us the names of all volumes and volumegroups:

$ sudo vgdisplay
— Volume group —
VG Name               htpc-server
System ID
Format                lvm2
Metadata Areas        3
Metadata Sequence No  5
VG Access             read/write
VG Status             resizable
MAX LV                0
Cur LV                2
Open LV               0
Max PV                0
Cur PV                3
Act PV                3
VG Size               428.24 GB
PE Size               4.00 MB
Total PE              109629
Alloc PE / Size       109629 / 428.24 GB
Free  PE / Size       0 / 0
VG UUID               2arhGV-xkVa-MUXt-38PD-XOmE-TaYN-tpPJBT

Finally, we can execute a full fsck on the volumegroups involved and if no unfixable errors are found, we can mount the filesystems and start assessing the real data-loss.

Bookmark and Share
Categories: Linux Tags: ,

Simple, succinct and true…

December 21st, 2009 Sander Alberink No comments

I bought a CD, not a licensing agreement – “Where words fail, music speaks”.

Nuff said…

Bookmark and Share
Categories: General Tags:

What have I been up to…

December 14th, 2009 Sander Alberink No comments

Well, it’s been a while, shall we say. In the mean time, I’m still in full swing on another embedded Linux project and got a chance to cut my teeth on some D-Bus actions. In addition, two of my little pet peeves have moved significantly:

  • Android on my HTC Touch Diamond has become much more useable
  • I bought an E-reader ( a Sony PRS-300)

Both items will be covered in more detail in the future here. Very soon I will have some more time to give out some more details on both matters.

Bookmark and Share
Categories: General Tags:

Git through proxy….

June 4th, 2009 Sander Alberink No comments

To access the Android code from my laptop at work I need to go through a proxy. I had a hard time finding info on how to use git with a proxy, but then I found this link detailing a script that uses socat to get through a proxy. The sample script they provided did half of the work of connecting to the proxy. However, it didn’t handle the authentication part. Fortunately, socat has a few more tricks up its sleeve and adding a proxyauth option handles this case as well.  Full script can be found below:

#!/bin/sh
# Use socat to proxy git through an HTTP CONNECT firewall.
# Useful if you are trying to clone git:// from inside a company.
# Requires that the proxy allows CONNECT to port 9418.
#
# Save this file as gitproxy somewhere in your path (e.g., ~/bin) and then run
# chmod +x gitproxy
# git config --global core.gitproxy gitproxy

# Configuration. Common proxy ports are 3128, 8123, 8000.
PROXY=yourproxy
PROXYPORT=8080
PROXY_AUTH=username:password

exec socat STDIO PROXY:$PROXY:$1:$2,proxyport=$PROXYPORT,proxyauth=$PROXY_AUTH

Be aware that your proxy must allow outbound connections to port 9418! If not, this script will not work

Bookmark and Share
Categories: Linux Tags:

Google Wave…

May 29th, 2009 Sander Alberink No comments
Google Wave screenshot

Google Wave screenshot

So I spent the last 1 1/2 hour looking at the promises of Google Wave. I have to say that I’m impressed. It is a great way of interacting with people and it tackles a lot of problems that you didn’t really knew you had. And that is part of the rub actually. Most people don’t perceive this as a problem. At least, not in my crowd….

Although it is very interesting technology-wise and the promise of all of this being open source is one that Google should be applauded for I cannot but fear for the acceptance. See, the problem with any kind of such site to achieve an amount of utility is scale. If only a fraction of the communities start using this technology then Google Wave is just yet another technology contender.

Anyway, more footage of the launch event can be seen below:

UPDATE: GigaOM also commented on Google Wave, arriving to much the same conclusion as I did: it depends heavily on the take-up they are able to generate with this.

Bookmark and Share
Categories: Internet Tags:

Mucking around with an embedded Linux board (again)

April 7th, 2009 Sander Alberink No comments

Well, got a nice perk this week at work: assisting in getting an embedded linux board up and running. To be honest: it is a nice little piece of work, called a FriendlyArm. It is an ARM9-based development board, costing less than $150 with an 3.5″ TFT with touchscreen (optional 7″ touchscreen). It is fitted with 64Mb RAM and 64Mb Flash, and 2Mb NOR.

I’ll be trying to get this to work, so expect updates on the blog. Eventually, I’d like to get Android running on this board as well (but memory may be a problem).

Full specs after the break

Read more…

Bookmark and Share
Categories: Linux Tags: ,

Browser market share of Android rising above 5%

March 26th, 2009 Sander Alberink No comments
Marketshare Android US

Marketshare Android US

Well, it does seem that Android is doing quite nicely on its own… Its market-share seems to have risen from nought to 5% in less than 5 months time. And that is with only 1 device out, on only 1 carrier (as opposed to Apple, who have 3 devices in the hands of 70 operators). The future is looking bright…

(via droideo.com)

Bookmark and Share
Categories: Linux, Telecom Tags:

How-to install Android on your HTC Touch Diamond

March 25th, 2009 Sander Alberink No comments

We have seen Android running on the T-Mobile G1 and very soon we will see Android on the HTC Magic (by Vodafone). But… did you know that you do not necessarily need a new mobile to run the Android OS? Due to its open source nature, the Android stack is available for everyone to tinker with, and tinkering they did. At the moment ports exist for the following phones (note: these are the ports that I’m aware of)

But also for our beloved mobile, the HTC Touch Diamond a port exists. It is not yet fully functional, as a few important areas are still missing, including power-management, sound and WIFI/Cellular data. But call management, SMS and the rest of the functionality of the Diamond works just as it should.

Detailed instructions for installation can be found on Connect-UTB, an enthusiast-run site, but it is as simple as downloading a zip-file and extracting it to a directory /tmp on the Internal Storage. Before running it, you should disable your PIN-code of your SIM, as the current port is not able to handle entry of the PIN-code after starting. Then it is just a matter of running haret.exe and having some patience. The first boot can take up to 2 hours.

Progress on this port can be followed here, or at the following pages:

let me know if it works for you!

Bookmark and Share
Categories: Java, Linux Tags:
Easy AdSense by Unreal