Archive for the 'miscellaneous' Category

Merry Christmas

Joyeux Noël
メリークリスマス
Feliz Navidad
Bon Nadal

2005-12-25 09:43:38+0900

miscellaneous, p.d.o | Comments Off on Merry Christmas

Quote of the day

Anyone can speak Troll, all you have to do is point and grunt.

2005-12-22 19:35:19+0900

miscellaneous, p.d.o | Comments Off on Quote of the day

Revision Control

Seems there's been a lot of talking about revision control systems on p.d.o, recently. I am no SCM guru, and until quite recently, all I knew was CVS and its drawbacks, main one being that you lose file history whenever you rename, or even worse, move, it.

Then a few years ago I tried out svn and I liked the way it used similar command lines as cvs, while giving me what I missed the most in CVS. But SVN has its drawbacks too.

A few weeks ago, I took a look to different distributed SCM solutions. I gave a try to tla and baz waaaaay too different from CVS and svn, bzr, looking very promising and amazingly simple, and svk, compatible with svn, and bringing a brand new world to svn users.

And I made my choice : svk. Its compatibility with svn made the conversion painless, I could just use my svn repositories without any modifications. And I can now track my local changes on alioth's svn repositories while offline. The fact that there's no .svn/CVS/whatever directory inside a checkout can also be quite useful. As a bonus, svk is a much faster than svn to handle a repository, which can seem odd, svn being written in C while svk in Perl and using parts of svn...

2005-12-14 11:10:23+0900

miscellaneous, p.d.o | Comments Off on Revision Control

Hard Disk’s hard life

I knew that hard disks had a limited time-life park/unpark-wise, but I didn't know that was that bad. I always thought that because of ext3's commit every 5 seconds, disk would never spin out and park the head. I was wrong. It seems that whether or not the disk is accessed, every put here the time it is for your disk minutes, it does park and unpark the head. Well, at least on laptop disks, because it seems this is not the case for desktops.

My 3 year-old vaio, which is now this web server, has a Load_Cycle_Count of 580465 for 9775 Power_On_Hours, which is about 1 load cycle per minute.
My 1 year-old vaio, has a Load_Cycle_Count of 83718 for 4043 Power_On_Hours, which is about 1 load cycle every 3 minutes.

While I managed to actually stop the load cycles to occur on the older vaio, with hdparm -B254, nothing actually stopped it on the newer one. I tried to change some other parameters with hdparm -S but nothing did work. I still have to take a look at the BIOS, though.

Now, the question is : why the fuck are the heads parked/unparked every little while even when accesses occur ? Is it a conspiracy so that laptop disks won't last forever ?

Well, at least, I've never experienced a hard disk failure in 12 years of using computers with hard disks. For how long ?...

[Note: the Dell laptop provided by my company, running Windows XP (which also has a somewhat journalled filesystem and commits the journal every few seconds) has around 24000 load cycles for about 800 hours of use, which is 1 load cycle every 2 minutes, so this is not a Linux issue.]

2005-11-24 18:42:58+0900

miscellaneous, p.d.o | 8 Comments »

Xen

I've been playing a bit with xen the last few days, and it really rocks. It's been quite tricky to put up, though. I've been following two different guides, but they were missing some stuff for what i wanted to try.

I wanted to build the most generic kernel possible, so that it would be easily useable on most installations, like the generic debian kernels. Well, it has been quite painful. Trying to build in a sid chroot, I hit the first issue : while the xen patch doesn't apply to linux 2.6.12, linux 2.6.11 doesn't build with gcc 4.0. You get build errors in I2C, generic serial, and much more other stuff. Then, a bunch of drivers can't be built because of being unsupported.

When you finally succeed in building the kernel as a generic debian one, i.e. with an initrd, you realize the generated package (built with make-kpkg) doesn't build the initrd for you, and doesn't correctly build the modules dependencies (which prevent the initrd to be any useful), even though everything is (supposedly) correctly set-up.

So, after solving all these, I finally was able to boot on a generic xen system and to run some virtual machines. Main issue remaining : xen doesn't want to find an IRQ for the firewire controller, so i can't access my external hard-disk...

I'll try to finalize a clean generic kernel package that does all it is supposed to do, but in the meanwhile, here are the hints if you want to build your own domain 0 kernel :

  • install kernel-source-2.6.11 and kernel-patch-xen, and decompress /usr/src/kernel-source-2.6.11.tar.bz2
  • copy /boot/config-2.6.11-1-686 in /usr/src/kernel-source-2.6.11/.config
  • add CONFIG_XEN=y and CONFIG_XEN_PRIVILEGED_GUEST=y in it (otherwise, a whole bunch of modules get disabled)
  • run the following command in the kernel source directory : MAKEFLAGS="CC=gcc-3.4" PATCH_THE_KERNEL=YES make-kpkg --arch xen --append-to-version xen0 --revision 1 --initrd --config menuconfig kernel_image
  • adjust your configuration if you need (you might want to disable network and block device frontends for the dom0 kernel)
  • install the generated kernel
  • run depmod 2.6.11xen0 and check your /lib/modules/2.6.11xen0 is correct
  • run mkinitrd -o /boot/initrd.img-2.6.11xen0 /lib/modules/2.6.11xen0
  • add the following to your /boot/grub/menu.lst file:
    title Xen 2.0 / XenLinux 2.6
    kernel /boot/xen.gz dom0_mem=131072
    module /boot/xen-linux-2.6.11xen0 root=/dev/hda1 ro
    module /boot/initrd.img-2.6.11xen0

    (adjust the root device and the dom0 memory size if necessary)

And you might be able to get a working xen kernel...

2005-08-30 20:10:17+0900

miscellaneous, p.d.o | 3 Comments »

gaim & japanese

So, a few days ago, I kinda forced my wife to use gaim instead of using both MSN Messenger and ICQ on her computer. While it has the advantage of integrating every protocol she was using (plus the bonus of having access to jabber, now), it has some flaws on UI usability, and, more importantly, for japanese transmissions.

One could argue about this choice, but well, this is the only multi-protocol and jabber client I know that has been ported to Windows. Besides, it's the one I use on my Debian desktop.

I knew that gaim had some issues with mojibake, because I experienced them. One of them is when you receive messages while offline. The messages coming at login time are all mojibake. While it can be annoying, it doesn't happen that often, so...

But here, there was one I never experienced, for a simple reason : I don't use MSN. And here is the big problem : everything in MSN is just mojibake, which is, well, very annoying.

There I was, forcing people to use free software that doesn't work like expected. But hey, I told my friend Google something like "gaim MSN 文字化け", and guess what ? I found a patch, addressing some mojibake issues, including the MSN one, and some other japanese related issues (such as shortcuts conflicting with input methods keys...) !

Next step was to actually build the stuff. Pervert as I like to be, I tried to used cygwin under wine to cross-compile it. Didn't do the trick... bash doesn't even want to start. Since I didn't really want to spend that much time to figure out all the possible ways to cross-compile for windows under linux, I just went to the easy solution : building directly under Windows, following the build instructions. If you want to do it by yourself, be aware that you have to use the standalone MinGW, even the one provided with cygwin won't work, believe the build instructions.

If you can't or don't want to build gaim for Windows by yourself, you can get the installer for the patched version. And if you're a Debian user, you can also get the package.

The strange thing about this patch is that it's being maintained for a long time, and never got applied upstream to fix these mojibake issues. Why ? Maybe they just never heard of it... I'll try to drop them a note.

2005-08-21 12:10:58+0900

miscellaneous, p.d.o | 4 Comments »

exim, RBL and irony

There's nothing more annoying, when you want to send mail, than to receive the a "550-rejected because some.ip.add.ress is blacklisted at some.random.crap.rbl".

Actually, there is something more annoying : setting up an email alias to an external address and realize some weeks later that the server dealing with the external address does use such rbl. In such cases, senders get an error message and no way to warn about the problem. And the message is not queued.

So, I was wondering if there was a way, with exim (default mail server on debian, and suitable for my needs), to have a "conditional smarthost", something like "if when trying to deliver a mail, you get an rbl rejection from the remote server, try to send it through my ISP's smarthost".

Why not just use ISP's smarthost all the time ? The answer is simple : I don't see why i should do that while it just works the way it is most of the time.

And now for the irony : when trying to send a message to the exim-users mailing-list to ask for hints, what can have happened ?

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

exim-users@exim.org
SMTP error from remote mail server after RCPT TO:<exim-users@exim.org>:
host sesame.csx.cam.ac.uk [131.111.8.41]: 550 Access denied - x.y.z.t listed by rbl-plus.mail-abuse.ja.net -

Rhââââââââââ

2005-08-13 11:15:13+0900

miscellaneous, p.d.o | 1 Comment »

The Blog Effect

Though I thought it would be quicker, the blog effect happened.

So now, even Google is saying we're living in a Banana Republic ;).

2005-03-15 21:42:42+0900

miscellaneous | Comments Off on The Blog Effect

Not so bad…

... for a just woken up non-native speaker:

English Genius
You scored 86% Beginner, 93% Intermediate, 93% Advanced, and 77% Expert!

You did so extremely well, even I can't find a word to describe your excellence! You have the uncommon intelligence necessary to understand things that most people don't. You have an extensive vocabulary, and you're not afraid to use it properly! Way to go!

(From The Commonly Confused Words Test).

2005-03-13 09:31:42+0900

miscellaneous | Comments Off on Not so bad…

Banana Republic

Welcome in a political system where rules are not followed. Welcome in Europe.

Welcome in a Banana Republic (Google bombing in progress, seeing how many blogs link Banana Republic to http://ue.eu.int/).

2005-03-08 18:35:42+0900

miscellaneous | Comments Off on Banana Republic