english
Backup your system for a desktop user
Sunday, April 5th, 2009 | desktop, english, utilities | 6 Comments
While Linux and Debian are plenty of programs for backing up your system, things change when you need a backup system for a common desktop user. In this area there is a lot of room for improvement, as programs for KDE and GNOME are years behind what programs for Windows and Mac OS X are offering.
There has been some programs intents of writing a good program, full featured and with a nice graphical interface, as Simple Backup, and its fork Not So Simple Backup, pybackpack, or TimeVault, an intent to clone Apple’s TImeMachine, and it’s fork TimeVaultNG written for KDE. Those are projects that start with a great impulse, even some of the mentored by Google Summer of Code, and when they reach some basic functionality, they get abandoned or not being properly maintained.
What I would like to see for a backup system for desktop user is:
- Desktop independent backend. Why implement and reimplement and reimplement again. A lot of effort is lost in early stages, until program starts to be functional. For this, using yet written utils as rdif-backup, duplicity or rdup would allow this step to get ready faster, and being more reliable.
- Frontend integrated with desktop, being it GNOME or KDE. This will imply implementing two desktop clients, so they can use technologies available to each one.
- Using dbus for communicating frontend and backend.
- Backend should be able to detect removable devicies as well as network based backups (think on NAS), and only perform the backup if they are present
- Allow to store backups also in Amazon S3. This could be in raw or even better, with a system that would allow mounting the remote device as a local HDD. This is something JungleDisk makes, and using fuse should not be hard to implement
A lot of improvement and innovation has taken place in Linux Desktop during all these years, but backups are also important for SOHO users, and they need a well integrated program for doing that, as console based solutions usually require configuration skills which desktop users don’t have.
Updated 6th April 22:26 CEST: I have been recommended in comments to try Back in Time and Déjà Dup. Both are in active delopment, which is a bonus. The first one works in a similar way to TimeVault, while the second one works using duplicity as backend, but has support to upload the resulting files to a remote server using SSH or to Amazon S3. I will investigate more on these apps.
Is ext4 unsafe?
Thursday, March 19th, 2009 | english | 1 Comment
There has been a lot of hype about ext4 lately, following an Ubuntu bug which rose a lot of concerns about ext4 security. I know these are no news, and I know also that I am not a kernel guru, but let’s resume some important concepts.
Ext4 implements something called allocate-on-flush. This means that kernel will decide how to write to disk in an efficient way by batching allocations together in larger runs. It increases performance and reduces fragmentation. But if a system crash happens between metadata and data is actually written to disk a 0-size length file can be found in the filesystem. With ext3 journal had a default timeout of 5 seconds and then was flushed to disk. With ext4 this time is unknown, so appplications that want to ensure everything is on disk have to call fsync() on file and directory after every operation. To avoid this, a series of patches have been queued for 2.6.30 so when a file is going to be replaced, it is written to disk with no delay.
Another concern raised is the need for atomicity and durability of files. For achieving this applications have first to write a temporary file and then rename() it over the old file. This will ensure that new or old file will be found in the filesystem after a crash, instead of a corrupted file that can be found when it is opened with O_TRUNC.
Anyway, my opinion is that when choosing a filesystem, one have to know what the computer is going to be used for. Using binary propietary drivers is an option, which can lead your Linux installation to behave most like Vista and filesystem cannot be blamed for losing files if it is making its job as designed. Perhaps, it’s better to use ext3 in this situation, but at the cost of missing performance.
If you want to learn more about this issues I recommend you to read both articles by Theodore Tso, “Delayed allocation and the zero-length file problem” and “Don’t fear the fsync!” and also AlessanderAlexander Larsson’s one “ext4 vs fsync, my take” as well as comment in all of them.
Upgrading my laptop to ext4
Sunday, March 15th, 2009 | debian, english, howto | 3 Comments
Warning: Don’t upgrade root partition (/) or the partition in which /boot is placed unless you know what you are doing. More on this later.
Warning2: Make backups of your data.
Last Friday I went on upgrading to ext4 my laptop. I decided to go first with /home partition, as / has also /boot and can give some problems if not handled with care. Upgrading it is quite easy, and fast, as the old data is not upgraded, only new files will be added using new features.
First, I installed latest linux-image package to start using kernel version 2.6.28, which includes production ready ext4 support. After rebooting, I logged in as root so I could umount /home. The steps to upgrade are as follows:
# uname -a
Linux gimli 2.6.28-1-686 #1 SMP Mon Feb 23 03:13:24 UTC 2009 i686 GNU/Linux
# umount /home
# tune2fs -O extents,uninit_bg,dir_index /dev/home_partition
# fsck -pfD /dev/home_partition
# mount /home
You MUST run fsck. If not, ext4 won’t mount your filesystem, so don’t forgive this step if you’re upgrading your / partition. You will see some checksums errors appear. Don’t be afraid, that’s expected, and that’s why -p is added to fsck command, you it is not asking which action to perform in every error.
Upgrading partition containing /boot
For upgrading your / partition you have to take into account what grub and klibc version you have installed. The former is need so grub can read your kernel image from filesystem, and the second is needed due a bug that made initramfs detect ext4 filesystems as ext3, and passing incorrect option to mount, which failed. Versions in Debian known to work are libklibc >=1.5.15-1 and grub2 (packaged as grub-pc). Make sure you have these versions installed before trying to go to ext4.
Also, as you have to upgrade having your partition unmounted, you will have to get a console before root partition is mounted. You can do that by passing mount=break break=mount to your boot options in grub.
ENJOY!
Innovation in netbooks
Wednesday, March 4th, 2009 | english, gadgets, howto | 3 Comments
After the release of Asus Eee PC and the discovery of the market that was eager to buy cheap and “wearable” computers every laptop manufacturer has jumped into the hype and released their own versions of netbooks, with different success.
But somehow it was a cloning phase. Vendors were just cloning what Asus did, with more or less changes, but without innovating. Now, it seems that the path has opened again, from the open source and open hardware front, and it has been released AlwaysInnovating’s touchbook. It is a netbook with a detachable keyboard (it is even sold separated) and built upon an ARM processor from Texas Instruments, and a 8GB microSD card. Thus they claim the battery last from 10 to 15h with the keyboard, and 3 to 5h in touchscreen mode.
As is said above, the whole machine is open source based. Software is based upon OpenEmbedded, and hardware schematics of the board are released under GPL on Beagleboard project. They say that you can also install Ubuntu, Android or even Windows CE on it.
Update: Just discovered that AlwaysInnovating is a Grégoire Gentil startup. Grégory is a Civil Engineer from École des ponts et Chaussées. We know how to build things
Debian on Android phone
Saturday, January 17th, 2009 | debian, english, gadgets | Comments Off
A Debian installer and boot loader for Android based phones has been released. It uses Debian ARM packages from standard repositories, so it makes available t you the full plethora of Debian packages. Also, as a bonus, you can still your phone as it was, an Android based device, with all its functionality.
Update: This entry was pending of an update since I read Joey Hess’ entry investigating into the supposed installer.
It seems that the .zip file is a complete disaster: it is a Debian chroot and 100MB of it are cached .deb files in /var and the init process is no more no less than a script that echoes some lines making you think that something is being booted and a last command (the only that actually makes something) is a mere chroot $mnt /bin/bash.
What does this mean? That you can run Debian in your Android phone by simply creating a chroot from your nearest Debian repository, and that’s all. No need of any supposed installer, just run debootstrap on the phone.
Speed up multiple SSH connections to same server
Wednesday, January 14th, 2009 | english, howto | Comments Off
I am copying here the tip I read in Linux Journal so I won’t need to google for it when needed. It works by multiplexing connections to the same server in the same TCP connection. For this to work, it needs a socket to track each connection.
You have to add these lines to ~/.ssh/config file:
Host *
ControlMaster auto
ControlPath ~/.ssh/master-%r@%h:%p
Postfix+TLS+SASL in Debian HowTo recovered
Tuesday, January 13th, 2009 | debian, english, howto | Comments Off
Once of the most visited pages in my site was the Postfix+SASL+TLS for Debian Sid and Sarge Howto, who I wrote 3 years ago. As I hosted it in my old home server, when it broke it went offline, and though there are still some copies around the net, there are a lot of referals still directing traffic to tribulaciones.org.
Now I have recovered it and it is now available again. I will write an .htaccess file to redirect people to the new place and, with some more time, I will review it to see if there are some changes needed for Lenny.
Enjoy!
UPDATED 14/01/2009: I have added promised .htaccess file, so every link to old URL (http://www.tribulaciones.org/docs/postfix-sasl-tls-howto.html) will work again.
Giver: little util for sharing folders
Wednesday, December 31st, 2008 | desktop, english, utilities | Comments Off
While searching for different options to share files among different computers in a local LAN I found via Planet Ubuntu giver a little util which uses avahi/zeroconf to publish shared folders or files. It is a easy tool, that works and that serve well its purpose.
But its development has stopped some time ago, and that means that nobody has cared to port it to Windows, where it would be an
interesting tool to avoid the need of using windows network to share folders, which in an ad-hoc network tends to work problematically.
These little gems should receive more care from freedesktop.org, GNOME Foundation, Canonical, Novell, … as are the utils that make a difference in desktop expecience. Having a nice visual effects is not enough to attract people to free destops, but having tools that make everyday life is.
git tips
Thursday, December 25th, 2008 | english, utilities | 4 Comments
Git is becoming my main utility for Debian packaging, as I am using it to keep my work on packages I maintain alone or in a team by using git.debian.org facilities. I am not still using tools like TopGit to keep patches, by I also intend to do so in a near future.
What does git give me over svn? Basically two things: branches and having the whole source code at hand. The first is obvious, I can easily create branches to experiment without having to change anything in the way the package is, so if a new upstream release occurs in the time it takes me to implement some change (and that usually happens) I can upload it straight, not affecting my undergoing changes.
Also I appreciate having the whole source code. This could have been also done using svn, but we preferred not to do so, and most packages only have debian dir in their svn repositories. This makes harder work with upstream sources, where they need to be patched. Git provides me the way to have always an upstream source code copy at hand, and the branch power can also be applied to it.
But I wanted to write about a couple of git tips that I found. Seems that they have already appeared on Planet Debian before, but I think that is not a bad idea to remember them (from damog’s blog):
1. Changing into a directory that contains a repo and shows you on PS1 what branch you are standing on:
On .bashrc I have:
GITPS1='$(__git_ps1 ":%s ")'
export PS1=”${GREEN}\w${RS} ${YELLOW}${GITPS1}${RS}\\$ ”
But what I didn’t want to lose was the code that was posted to paste.bin after in a comment someone pointed out that this trick was a bit annoying if your home dir were also a git repo. This is one solution:
__maybe_git_ps1 () {
local BRANCH=”$(__git_ps1 ‘%s’)”
case “$BRANCH” in
master)
# silent
;;
”)
# not a git repo? -> silent
;;
*)
if [ -n "$1" ]; then
printf “$1″ “$BRANCH”
else
printf ” (%s)” “$BRANCH”
fi
;;
esac
}
2. An alias I like to use on repos that are personal for quick tracking:
[alias]
…
log1 = log –pretty=oneline –abbrev-commit
Thanks damog for these tips!
NAS adapter
Sunday, December 14th, 2008 | english, gadgets | Comments Off
I have been always desiring to have a NAS adapter and printer server so I can easily share and use both my USB printer and a USB hard disk from every corner in the house. I was doing that when I had a home server, but when it died I losed that functionality. Once of the main reasons to buy a new one was to have this option again, but today I have discovered in Xataka a little device: Addonics NAS Adapter.
This is just what I wanted: NAS adapter, little size, can power 2.5 inch. HDD directly, and USB print server. Files are shared by Samba or FTP client, and can act also as DHCP server. As a bonus it has a little bittorrent client which can track 4 torrents at a time, and download them to attached USB device. The only thing I would like to know if is using an USB hub both a printer and a HDD can be attached at the same time. If that can be done, then for only $55 we have a winner.
The only last wish… that it uses Linux in their core (probably).

