And here comes my new (smart)phone  

Posted by Fabiano 'elbryan' Francesconi in , ,

After 5 years of reliable and outstanding duty, I decided that was time for my Nokia 6630 to get retired.
In the last year I spent many time trying to spot the successor of my trusted old phone.
E52 has been my choice and I want to share my opinions with you.

It arrived Monday, ordered from Nokia store taking advantage of the 20% code-discount, and I instantly noticed how light and thin it is.
Plugged in the battery, I started it up and went through the first installation's steps.
It took a while for me to get used to the new UI and locating the right settings that I were aiming to but it proved to be quite easy to understand and get to work.
I have to admit it really almost freak the hell out of me when I wrote a text message to a friend of mine and I realized that I couldn't receive any message. Dammit!
I started thinking and wondering about what would had happen. I, then, switched the SIM card to my old phone with no luck.
Then I reminded about the time the carrier's repeater were troubling my days and when I discovered what the power of a simply fake call can do. I dialed 190 and all the messages began to get downloaded.

I easily established a connection to my home wifi, get the browser running, configured email (that I think it's quite bugged atm).

Some features that I appreciate:
* Bright screen. Really wonderful, colorful, bright.
* Handy keyboard, comfortable (maybe delete key is too close to the other but it's only a matter of habit).
* Symbian: it's just marvelous. It really improved a lot from the old version I had on my old phone. It's brilliant, quickly, responsive.
* Wifi stack: reliable, fast. Great reception.
* Browser: Fast and suits my thought. I needed a browser that refreshes a tab in background (because my University's proxy is such a pain in the ass). Test passed!

There are some things I don't like of the phone:
* Messages' ring volume isn't loud as much as I wish. I think the volume should be higher.
* Vibration isn't strong as the one I was get used. Maybe it's all shape-weight fault: my old phone was a brick, literally.

There are some bugs I ran into:
* The sensors are working quite great but there might be some unexpected behaviors when you start playing with it by moving the phone (left, top, left, top), the screen will become gray and it takes some time to fix.
* There's a bug if you try to assign a favorite number for a specified service in the address book. The number will be associated to the default number for the service (sms, for instance) but if you try to compose a message and select the contact as recipient, the phone will ask you to select the number you want to send the message to. I discovered that rebooting the phone fixes the problem.
* Email client: I don't get why it needs a specified access point in order to establish a connection. Can't it just use the I select for the browser? And, furthermore, why I have to re-issue my password every time I change the default AP? I think it's quite buggy and can be improved.
* Minor bugs: the screen may happen to freeze a while during normal cell utilization but it doesn't compromise whatever things you were doing.

There are some other things I don't care about:
* Camera: It's a business-oriented phone, not a childish one. I don't need a 190MP camera.
* Ringbell: I use my own sound for incoming calls so don't ask me if I like the shipped one.

There are things that I haven't tested enough to give them an opinion:
* Autonomy: I think it's great but I hadn't time to figured it out, sincerely.
* Voice: I had a long phone call but I used a bluetooth headset so I don't have a complete idea on how it's the "vanilla" one. It sounds good to me the few times I used it.

Tips & Tricks:
If you want to call someone you don't need to navigate through the Address Book, find the name and call him/her. Just write the name directly in the main screen as you were writing with T9 enabled (the phone will put digits) and the contact will appear. Example: Instead of looking for "Alessandro" in your Address Book, just write Alessandro in the main screen "253772" and Alessandro will pop out above the number you dialed. Press the up arrow and enjoy your call :)

Can't say anymore, I think. If something pops out of my mind I'll update this post.

Upgrade XEN dom0 to kernel 2.6.29-r4  

Posted by Fabiano 'elbryan' Francesconi in ,

I spent the last three days looking for a solution (a stable solution) to upgrade my XEN dom0 kernel running on my home-server "xevelon".

As you know, the latest stable XEN version is 2.6.18 that it's quite outdated.
This comes with few problems around latest chipsets, sata drive recognition and LVM support.

There are more than few reasons to upgrade a kernel, especially when it's an hypervisor kernel.
After some crashes I've finally been able to find the end of skein.

At first I tried downloading the nightly xen git version, with no luck. There are still some problems with PAE and, workarounding this, the kernel had serious problem booting.
I reverted to a .29-r4 kernel and I can say it works out of the box.

I had some problems with microcode (I've simply built it as module) and with AGP (that I disabled).

If you want to upgrade your xen dom0 kernel just do as follows:
- Download the xen-sources-2.6.29-r4.ebuild and put it into your PORTDIR_OVERLAY.
- Fetch (manually) this tarball (it's a set of patches): xen-patches-2.6.29-6.tar.bz2 and simply put it into distfiles.
- Chdir into your local overlay and run "repoman -d fix && repoman -d full"

Now an 'emerge -avuDN world' should be fine. The new kernel will be installed. Just copy your old kernel configuration and run 'make oldconfig' and select the options you need to be enabled on your system.

If everything went ok uname -a will show you something like this: "Linux xevelon 2.6.29-xen-r4 #4 SMP Mon Oct 26 19:25:20 CET 2009 i686 Intel(R) Atom(TM) CPU 330 @ 1.60GHz GenuineIntel GNU/Linux"

Have fun :)

How to getting your Linux backed up  

Posted by Fabiano 'elbryan' Francesconi in , ,

These days a few fella of mine have asked me how I perform backup on my home server / laptop / ecc.
I decided, then, to write a post in order to clarify my position on how backup should be done.

First of all I want to explain the differences between a "RAID" and a "backup".
Someone tends to mix these two by meaning the same "act" to "cover your butt if you loss data".
These are two _complete_ different things.

A RAID (software or hardware, in particular RAID 1) is a way to mirror data on two or more disks with the purpose of building a more reliable system. A RAID is the best solution, I guess, when you want your system (or rather, server) to stay online "whatever" (sort of) happens to your hard drive.
The goal, then, is to provide a "fallback hard drive" when things come bad and ugly.

A backup, instead, is a way to backup data. (Yea, I know, you cannot define something using the same noun used in the question). With "backup data" I mean the action where you grab your files/documents/video/music and put all of them into a different place, on different hardware (and, indeed, a different disk) in order to keep it into a safe place.
This means that whatever happens on the machine (even if it starts burning up and destroy itself by imploding leaving a black hole behind it) you'll have your data. Untouched.

And here come a question: What if something corrupts your data on your RAID? Will, the corruption, be mirrored among the RAID disks? If so: what a nice!

By the way, I'm fed up with babbling about this, so here comes my thought.
First of all let's distinguish about your "server machine" and your "notebook".
The first one, by definition, should be the epicentrum of your system (maybe the machine that downloads your tv series, that connects to irc - like quasselcore does -, that provides your own web site, that gives you a remote ssh connection, that $whatever you a $whatever) so it should be 100% time (nearly) up & running. I won't blame you if you have money to spend into a couple of disks in order to ensure system stability.
But, do you really need so much? And, mostly, do you really need an entire mirrored disk? I don't think so. (I'm reminding you that I'm talking about home server, not company server).

Here comes backup. When you installed your Linux distribution, you'd prepared your very base-system and then you started to add packets, build things.
There's a particular moment where you should stop adding packets and think about the following rows.
When you reach that, you should copy (1:1) your entire (system) partition and put it somewhere safe. Let's call this a Golden Image, or rather, a golden state of the system where everything basic is installed and configured and what comes lately is something that can be quickly redone.

(This Golden Image is especially useful when you play with Virtual Machines. Once the first VM is done, the others can be built in no-time).

So, let's talk in practice: how do I backup data?
I've been googling around a lot and I backed up in a lot of different ways, during these years, and I think I've found the easiest and most quickly way to do such a thing.
I think it's called stage 4 but I prefer to call it "tarball" since is the command that has to be issued: tar

This works in 2 steps:
- Prepare and exclude list (the things you do not want to be backed up)
- Tar everything else!

Preparing the exclusion list it's a silky operation since can happen you to 'looping backup' the same data, to forget directories, to backup something you really don't need (a wasted bit is a dead kitten; save the kitten, save the world).

Here's my home-server stage4.excl:

/mnt/*
/media/*
/tmp/*
/proc/*
/sys/*
/usr/portage/*
/var/tmp/portage/*
I don't need to backup mnt (I really do *NOT* want it to be backed up since it contains mount point to the backup itself: Backing up this will drive into a loop backup, as written above).
Same reason for media.
tmp is a temporary directory that is being wiped everytime you reboot your system. Save the kittens.
proc is a virtual filesystem that is neither on your disk. It's populated by the kernel during the boot. No need, thanks.
sys is proc's successor.
/usr/portage is on to a different partition, on my server. No need to back it up. Furthermore it's almost useless to back it up: can be regenerated with a trivial 'emerge --sync'.
/var/tmp/portage/ is where your packets are getting compiled (and, usually is wiped after a successful compilation). No need to back it up.

Well, remind, this is just a guideline, don't be a copy&paste monkey. Think about what you're doing. Some of you may want to add "/dev" as well. I don't think it's a good idea since udev could bitch about a missing /dev/console during boot and asking you to perform a re-mount in rw mode to transfer detected devices to your partition so.. Just back it up :P
As well, if you did split up your system using dedicated partition for /home or whatever, just exclude those from your stage4.

Once you've prepared your stage4 exclusion list, simply issue this command (as root):

tar cjf /path/where/to/store/backup/`date +%Y%m`_stage4.tar.bz2 / -X stage4.excl

I don't use cronjob, I don't use incremental backup, I don't backup every day or every week.
Once a month I backup the system-base (I've a 400mb xen dom0 stage4 atm) and the VMs (I backup quassel's log, transmission prefs, web server stats, and so on..).

One last thing: there's no "way to backup" but there's a way to "feel safe". It's just when having sex: there's no way to be 100% sure your girl won't be impregnate after the jam session but there's a latex way, for you two, to pass good time together.

No, not that latex. You geek.

A small script to synchronize portage tree  

Posted by Fabiano 'elbryan' Francesconi in , ,

Now that I've an home-server, I discovered the needness to sync the portage tree with it.
Since I do not want to do two 'emerge --sync' (one for my laptop and one for the server) I've written a small bash-script to handle this.

I know that some of you may objet about this talking about NFS, but I still prefer to have my lapdog working 'standalone'. Just in case, you know.
Maybe your system suddenly crashes and you have to re-emerge something to recover your system, or maybe you are out of your home and you can't reach your server so your portage tree will be empty. Or maybe you had mounted server:/usr/portage on your /usr/portage but it's *a lot* outdated and portage wants to downgrade your entire system.
By the way, yea.. it did happen to me this morning, a couple of hours before an exam was supposed to begin.. I literally crapped myself).

If you agree with me, keep on reading this post.

This is a small script, nothing extraordinary and it works, basically, with rsync.
The script, in addition, works using eix to popolate local tree and give diff-eix after the job has been completed.
Optionally it uses layman to keep your overlays updated.

I think it's just simple to make it work (just put your IP server and you are ready to go), it's a few customizable (for what it makes sense in such situations).
I'll just leave it here.. you know.. just in case someone wants to check it out.

Please, let me have some feedbacks if you try it. Thanks!

Actually, newest versions of this script are availabile on my personal website that you can find HERE

My new home server  

Posted by Fabiano 'elbryan' Francesconi in , ,

Few weeks ago I bought a new mini-itx solution from an Italian store called Abaco.
I was quite excited because it would be my first home server and the second machine that I would ever have to configure all by myself.

It arrived and I gathered an old 2.5'' ide hard drive where to install the basic operating system and, after that, I bought a WD Green Power 1TB 3.5'' hard drive.

I want to spend a word for Abaco as it seems, to me, a well-working society.
I found them very gentleness by replying my email on time and pleasureful.
Furthermore I found a small Mini Kaze fan produced by Schyte (known as one of the best cooling products seller in the Globe) since the "vanilla" one was claimed to be noisy and flickery. A sign that I appreciated.
Another one good thing I liked has been finding a flat connector converter from standard 3.5'' 40pin to a 2.5'' 40 pin plus power supply. I really needed it to install that old harddrive. For sure that was one thing I never thought I would had found in there!

Once me and a friend of mine have assembled it, there came the part where I'd have to install and configure an operating system.

The choice I made regarding the operating system has been quite simple: Linux.
The choice about the distro was simple as well: Gentoo.
It's a meta-distro that I admire for its concepts and the uncountable ways it gives to manage and work with it. I spent the last 2-3 years by learning some of it secrets and I think it suits my thoughts.

However, the most important and cool thing was the "architecture" I chose for the entire system. I decided to try to use the little Atom processor to run a Xen hypervisor and to run a virtual machine for the purpose I got.

Installing Xen has been quite difficult 'cause there are a lot of controversy informations on the net. Some old instructions suggest to set up the VM using hda/sda harddrives, the newest ones talks about xvda as new standard device-naming. And this is just one of the problem I encountered during this walk.
Despite difficults, now I've a reliable and robust system at my home running day and night and I'm really proud to have entirely configured it all by myself.

And there it goes. My little Xevelon (original name I picked up was Evelon.. but since there's a bit of Xen in there I opted for a leading 'X' :P) is running in my bedroom quite well.

I made a couple o photos when I (and Walter) assembled it. I hope you enjoy it as well as I hope you won't mind if I put an Abaco site here since I really advice you to take a look at their products.

Any questions, as always, are welcome (:

Here is their website: http://www.abacocomputers.com/

and here a couple of (X)Evelon pictures:
http://picasaweb.google.com/fabiano.francesconi/Evelon

(Yea, I used Picasa to host the photos despite someone told me to do not do that 'cause it sounds too geek to put computer photos on that portal)

iTunes e il pinguino  

Posted by Fabiano 'elbryan' Francesconi in , , , , ,

Nonostante la mia intenzione di dare un'impronta inglese al mio blog, ho deciso di scrivere questo "articolo" in italiano per potermi esprimere meglio per quanto concerne il discorso Apple/iTunes e la sua decisione di bloccare la diffusione di IpodHash e la successiva citazione in giudizio da parte dello sviluppatore.

Ovviamente le voci si suddividono in due macro gruppi: quelli che danno ragione ad Apple e quelli che invece supportano "fight the good fight" (citazione dal sito di IpodHash).

Apple fa buoni prodotti, ottimi prodotti. Non si può negare. I dispositivi come iPhone e iPod stanno letteralmente sbancando e vendendo ovunque. Vuoi per l'interfaccia, vuoi per la semplicità, vuoi per migliaia di motivazioni che non voglio elencare.
Ma pecca di una grande cosa: il supporto per piattaforma Linux.

Possiedo un iPod Touch 2G ed io stesso ho trovato (e trovo) molte difficoltà nell'integrare tale device con il mio sistema.
Il problema reale è che, allo stato corrente, non esiste la possibilità di gestire completamente un iPod/iPhone in ambiente Linux.
Esistono un sacco di librerie e applicativi (per citarne alcuni: libiphone/ifuse/libipod/gtkpod) che cercano di colmare tali lacune ma, spesso, risultano poco stabili e mal funzionanti (anche per via dei continui cambiamenti del modo di cifrare/salvare le cose in iTunes da parte di Apple).

Sembra quasi ci sia una sorta di "guerra fredda" da parte della casa di Cupertino contro il mondo dell'open-source. E qui mi chiedo il vero motivo di tutto ciò.

Vorrei innoltrarmi nel discorso facendo un esempio.
Io esco, mi compro un iPhone, spendo 499€ e me lo porto a casa.
L'unico (e ribadisco unico) modo che ho per interfacciarmi col mio nuovo device è quello di utilizzare iTunes su piattaforma Windows oppure Mac OS X.
Ma, come ben noto, iTunes è un prodotto gratuito, liberamente scaricabile dal sito di Apple.
Quindi, una volta spesi i miei 499€, non ho ulteriori cifre da spendere per configurare il mio iPhone (ad esempio un po' di musica, la rubrica, le caselle email, quant'altro).

Dal punto di vista economico quindi non vi è nessun ulteriore introito nelle casse di Apple.
Anzi, se pensiamo ad un utente Linux (che in casa ha solo macchine Linux) e vuole comprarsi un iPhone, magari ci pensa due o tre volte prima di spendere 499€ per un telefono che rischia di non poter utilizzare a pieno.

Quindi: qual è il motivo che spinge Apple a fornire zero supporto al mondo Linux?

Qui inizio a stilare un paio di teorie:

  • Sviluppare un intero applicativo per Linux risulterebbe essere più una spesa che un guadagno (probabilmente Apple crede che la maggior parte degli utenti Linux non comprerebbe mai un iPhone..basterebbe solo rilasciare un driver ufficiale, al resto ci penserebbe qualcun altro).
  • Sviluppare un driver per Linux aprirebbe le porte a jailbreak più facili/attuabili di quanto non lo siano già ora? (dubito, quasi mi rifiutavo di scrivere quest'ipotesi)
  • Apple si rifiuta di sviluppare per Linux poiché confida nel fatto che tali utenti, prima o poi, passino alla mela (ipotesi attendibile poiché Apple è sempre stata lungimirante).


In questo momento non mi esce altro dalla testa; resta di fatto che è una grande mancanza.

Ma la cosa che più mi sorprende è che si sia addirittura mossa per bloccare quelle persone che hanno speso tempo, energie e conoscenze per tentare di comprendere le modalità di cifratura con cui iTunes lavora per scrivere e sviluppare un protocollo compatibile.
A mio modo di vedere le cose non si tratta di violare il protocollo Fair Play, ma di scriverne uno simile.

Non sono uno di quelli che grida all'opensource sempre ed a prescindere; bensì sono uno di quelli che riconosce che, quando le cose non ci sono, bisogna farsele da se stessi.

Spero vivamente che un giorno potrò utilizzare iTunes dalla mia whitebox.

Broadcom-sta drivers and kernel >= 2.6.29  

Posted by Fabiano 'elbryan' Francesconi in , , , , ,

As many of you (or, better, us) have surely noticed, kernel's devs have completely removed every trace of old wireless stack since version 2.6.29 of the kernel.
This brokes broadcom proprietary driver (sta) compilation since that libraries are missing.

In this guide you'll encounter two patches. The first is an official patch provided by Broadcom that fixes a bug on WPA encryption and on hidden SSID.
The second one has been developed by some gentoo users that have released a patch for the last available driver (5.10.79.10 atm) in order to adapt it to the new kernel wireless stack.
Here is the link for gbo official discussion.

Here comes how to apply them. Once you've applied the patches you can continue with the process already explained into a mine previous post >HERE<

I'm going to maintain the notation and path I've used in the post linked above so let's say we have downloaded the drivers into /root/wifi/broadcom-patched-x86_32-5.10.79.10

It's important to keep in mind that the patches have to be downloaded in the directory above "src" one.

Now let's download the patches in there:

wget http://www.broadcom.com/docs/linux_sta/wl_iw_v2.patch
wget http://www.leprosys.net/files/broadcom-sta-5.10.79.10-linux-2.6.29.patch

Once you've downloaded them, let's apply the patches.

patch -p1 -d src/wl/sys < wl_iw_v2.patch
Note: This patch could annoy you by asking for which file apply the patch to.
This means that the file is already patched. So you can easily skip this step.
This will probably happen if you've downloaded the lastest version of the driver.

patch -p1 -d src/wl/sys < broadcom-sta-5.10.79.10-linux-2.6.29.patch

This patch should apply successfully.

Another bad thing you may encounter (expecially if you don't have a bloated-modular kernel) it's the TKIP module naming.
In fact, starting with kernel 2.6.29 it's name changed from ieee80211_crypt_tkip to lib80211_crypt_tkip.

To enable it (I suggest you to build it as built-in, no need for a module) make sure you have the selected item enabled in your kernel configuration:

| Device Drivers --->
| Network device support --->
| Wireless LAN --->
<*> IEEE 802.11 for Host AP (Prism2/2.5/3 and WEP/TKIP/CCMP)

Once you applied the patches and configured the kernel you can go ahead with the steps I explained time ago (above there's the link).

Little amusing information for Gentoo users (that I discovered just few days ago): It's available (masked but available) in portage the ebuilds for using broadcom-sta drivers (net-wireless/broadcom-sta). Just unmask the lastest one and emerge it. No more issues, no more complications, no more manual job. (: