Tuesday, 5 October 2004

Brazil!

London, Paris, São Paulo, Salvador da Bahia: 3, planes, 2 airlines, 18 hours. It was painful but it was worth it! I've been in Salvador since Sunday morning and I'm having a fantastic time! The beaches are great, the water is warm, the people are just fantastic. The only downside is blogger.com being a bit temperamental from here. Nevermind, I finally managed to get into my account to post.

I thought Brazil would be great but I didn't realise how great. It's really nice to be away from the rain of London and be able to drink a beer on the beach for the extortionate sum of 50 pence. I'll be in Salvador until the week-end. I still need to go and see Pelourinho, the historic centre so I'll make sure I do before I go. Then, off to Rio de Janeiro followed by Belo Horizonte (and Ouro Preto), Sao Paulo, Foz do Iguaçu; then cross into Argentina and down to Buenos Aires.

In the meantime, I'm spending my mornings in a local language school learning Portuguese which, if I were to unfairly summarise it in one sentence is Spanish grammar with French pronounciation. Luckily, the Brazilian version is much simpler than the original from Portugal. At least they don't swallow half the words all the time here. On the other hand, they're laid back enough to take their time when speaking. This is good for a beginner.

Speaking of culture, I'm going to a football match tonight between Bahia, the local team, and another team I can't remember the name of. When it comes to football here (soccer for the Americains), culture is not a strong enough word. Religion is more like it. It should be fun.

Time for a caipirinha, I'll be back soon.

Saturday, 25 September 2004

Hopeless train station

Ok, railways in the UK are not the best in the world but sometimes you really have the impression they're taking the piss. I need to go to Gravesend this afternoon. Trains leave from Charring Cross station. I need to be there at 7pm (before is no use, after is too late). I thought the best way was to go to the station, check the timetables and get a return ticket from the vending machine. Sounds too simple and indeed it is. Charring Cross doesn't have any timetables displayed. The only way to know about time is to ask at the information counter, which happens not to be staffed today, or to ask at the ticket office. Good I think, I'll go to the ticket office and buy the ticket at the same time. Sounds too simple again. There are only 2 windows open at the ticket office and the queues are huge, mainly because half the automated ticket machines are out of change and the ones that do have change don't accept bank notes. So mostly everybody has to go to the ticket counter. Fantastic! It only took me half an hour to check the times and get my ticket, when I should have been able to do this in 5 minutes. How useless is that? Then, next to the window, you have a board that says "If you have complaints about this station and its services, contact:" Contact who? The rest of it is so faded that it has become impossible to read.

This is 21st Century train services in the largest city in Europe.

Friday, 24 September 2004

How the music biz can live forever, get even richer, and be loved

The Register have a very interesting article on the future of the music industry and its relationship with technology, in particular P2P and file sharing. The main message is don't try to stop P2P and file sharing because will not succeed so the only way is to embrace it and find a way to make revenue out of it. All very sensible although I'm not too sure I like the taxes idea developed in the article.

Take the OS quiz

I found the OS quiz through Slashdot the other day. Quite interesting. Apparently, I am like HP-UX:

You are HP-UX. You're still strong despite the passage of time.  Though few understand you, those who do love you deeply and appreciate you.

Interestingly, HP-UX is the operating system we had at university and hence is the OS on which I learnt about UNIX and programming. So does it mean that the first real OS I played with influenced me that much? Or is it that it was a natural match? Or is this quiz just random?

Thursday, 23 September 2004

Spread Firefox

I've been using the Firefox browser for some time now and I recently upgraded to the 1.0 preview release. This browser is just what a good browser should be: easy to use, very fast, lightweight and has features that make browsing easy and painless again, such as a popup blocker, an integrated Google search box, tabbed browsing, etc. Also, because Firefox is open source, it is free, cross platform and you have complete visibility on what's under the hood. So, if you're fed up with Internet Explorer security patches or you just want the fastest browser on Earth, just go through 3 simple steps:
  1. Get Firefox Get Firefox!
  2. Register on Spread Firefox
  3. Spread the word!
In fact, I've not been the only one to get on the Firefox bandwagon, they've had a million downloads in just a few days. In my mind, the best thing about seeing Firefox succeed like this is that it gives an alternative to Internet Explorer. Fair enough, you already have alternatives out there, such as Netscape, Opera, Konqueror, etc. but I think Firefox is the only one that can really target the Windows and personal user market: Opera is not free unless you're happy with the ads; Konqueror only runs on Linux (as far as I know); Netscape is too bloated and too resource intensive. And having a real alternative to Internet Explorer can only be good as it will make web site designers think again when they want to use IE specific features. This is the best incentive for developers to follow standards and give back the choice to their users. So long live Firefox!

2 months without a post!

Yes, that's a long time! It's all been a bit hectic, at work and out of work. I went back home to France in July then to Azerbaijan in August and I'm about to go off to Brazil and Argentina. I've got to catch up now.

Monday, 26 July 2004

Friday, 23 July 2004

Gentoo Linux on IBM ThinkPad T20

Last night, I installed Gentoo Linux 2004.1 on an IBM ThinkPad T20 laptop. Here is a quick summary of the experience.

Background

In terms of general technical knowledge, I am a professional software architect. In a previous job, I used to install and maintain Sun servers and Sun or Windows workstations for bank trading rooms so I have installed and maintained every version of Sun's operating system, from SunOS 4.1.3 to Solaris 9, as well as every version of Microsoft Windows from 3.11 to XP. The last time I played with Linux was a few years ago with RedHat 6.2. I had a couple of problems that I did not have time to investigate so I stopped using it. Now, full of motivation and having heard only good things about Gentoo, I decided to try again.

In order to do this, I decided to install Gentoo on an IBM ThinkPad. This machine used to be used for development in my company and I was able to buy it for a small fee when it was decided to upgrade. The machine has a 700 MHz Penthium III with 256Mb RAM, on board ethernet card and modem, 2 PCMCIA slots, a DVD drive, a nice LCD screen that can support resolutions up to 1024x768 in 32M colours, 1 USB port, a PS/2 mouse/keyboard port and the ubiquitous IBM Trackpoint. No floppy drive is present. Ok so it's a laptop and hence has specialised hardware but IBM having said they supported Linux, my expectation was that all recent distros of Linux would have all the relevant drivers.

The Gentoo CDs I had where the generic x86 CDs bought from the Gentoo store a couple of weeks ago.

Booting the Live CD

Booting the Live CD for the first time went well. I had a look at the potential options for booting and decided to boot kernel gentoo with option dopcmcia. It all started fine except that it didn't manage to find the ethernet adapter. One very nice thing is that once it has booted, the first thing it tells you is where to find the documentation on the net. So, using the work machine sitting next, I browsed to it and my first impression is that the Gentoo doc is very well written and very clear. Definitely one of the best I've seen.

However, the first thing I learn when reading chapter 2 was that I should have booted with option dokeymap in addition to dopcmcia on the grounds that my machine has a UK keyboard, not a US one. So I decide to reboot and, as expected, the machine asks me for a keymap before giving me a prompt. It still doesn't see my network adapter though. I try a number of things suggested by the documentation, such as modprobe on some drivers but to no avail. After some investigation on the IRC channel and in the Gentoo forums, it appears this is a known bug with 2004.1 and, has been sorted and the fix will be in 2004.2. Nevermind, I'll do without the network for this first install, I can always add it later. This means I'll have to do a stage 3 install, which suits me fine. As a first time Gentoo user, this was my intention anyway.

Partitions and file systems

Before I can install anything, the first task is to partition the disk. Following the manual, this is very easy. However, if I were configuring a more complex system than an experimental laptop, I'd like to have more hints as to how large I should make the different partitions. In particular, how much do I need in swap? To solve the problem, I use the rule of thumb I've always used with Solaris: twice as much swap as physical memory so the documentation's example of 512Mb is just what I need. I'll just have to assume this rule of thumb also applies to Gentoo. For the rest, I also follow the example and, in the process get rid of the Windows 2000 install that resides on the machine (oops :-))

Creating the file systems and mounting them is also very easy. However, I am impressed by the number of different file systems that can are supported.

Installing a stage 3 and Portage from CD

I have no problem installing the stage 3 and Portage from CD, the documentaiton explains how to do this very well.

However, configuring /etc/make.conf could be improved. The CFLAGS and CXXFLAGS variables don't seem to need much change from what is in the default make.conf. The documentation does say though that one of the -O options, such as -O2 is a popular flag so why not add it to the default? As for the MAKEOPTS variable, on the grounds that its optimal value depends on the number of processors (namely n + 1, where n is the number of processors on the machine), it would be nice to have a configuration script that sets this and a few other popular options for you.

The USE variable

The USE flags is one of Gentoo's most powerful features and what makes it really configurable. However, this is Gentoo specific and, even though there is extensive documentation on the subject, a Gentoo beginner like me can find it difficult come up with a USE variable that actually makes sense for his system. It would be nice if the default /etc/make.conf contained commented out examples for a number of standard use cases, such as simple end user laptop and desktop, developer laptop and desktop or games desktop.

Configuring the kernel

There I decided to go with the default suggestion and configured the kernel manualy because the documentation said that the alternative of using genkernel would take more compilation time, which can be significant on a not very performant laptop. Altough Gentoo makes it easy to do and the documentation takes you through the steps, the sheer number of options, some of them quite obscure, make it difficult. In particular, I would have expected the configuration menu to take into account the specifics of my system and the installation so far. For instance, it didn't pick up the fact that I had an ext3 partition and that I needed Ext3 journalling file system support. So I ended up having a look at everything, not being very sure of what I was doing, in particular when it came to the power management options, which are essential when installing a laptop. A lot of guesswork. Maybe I should have used genkernel after all.

Compiling the kernel was very easy though.

Configuring the system

Configuring the disk by updating /etc/fstab was very straightforward and having done it countless times on Solaris, it was easy. However, it is very easy to do a spelling mistake that could be fatal in a file like this (as I was to discover later) and an inexperimented user could end up having serious issues with it.

No need to configure the network as I still don't have a network. Reading through it though, it looks well explained and once again standard UNIX so there should be no problem should I want to do it later.

Adding PCMCIA was also easy and well explained. Not having any PCMCIA card with me, I was unable to test it though.

Updating /etc/rc.conf was also straightforward so I changed the keymap setting to uk.

Configuring the boot loader

I decide to use GRUB, it all goes smoothly, nothing to comment on here, except that once again, this is an essential file that could easily get corrupted by a simple misspelling, especially considering the fact that GRUB refers to partitions in a different way than the operating system does. Mentally transforming hda1 into (hd0,0) is not difficult but prone to errors. This could easily be corrected by providing a simple script that reads you partition and file system configuration and produces a GRUB file.

Installing GRUB in the MBR was easy though.

Installing system tools

I had no problem in installing a system logger or a cron deamon. Once again the documentation is excellent.

Reboot!

Or rather, before rebooting, I take the time to install a standard user. Then this is the moment of truth.

Having removed the CD from the drive, I get the boot loader as expected. I select the only option I have and... it fails... and I get the maintenance login prompt. A quick investigation shows that I misspelt my root partition /dev/hga1 instead of /dev/hda1. However, my partition is currently mounted read only so I can't update /etc/fstab. The solution is to reboot using the CD, update the file and reboot again. This time it works and I get a login prompt. I have a very basic display though, probably because I forgot to enable the frame buffer in the kernel configuration but I don't really want to check: it's time to go home, this has taken me 4 hours.

Having decided to go home, I shut down the machine. It all seems to work at first. Then, after it displays the [ok] on the "Saving the random seed" task, it starts accessing the disk heavily with no message until it stops and stay there. I don't know if the machine has properly shut down, I suspect not so I just switch it off. I'll solve this another day.

Conclusion

Even though the documentation, the forums and the help I got from the IRC channel were excellent, I spent 4 hours installing a system that doesn't quite work properly. I will definitely try Gentoo again but it is a tough cookie and demonstrate how Linux can be difficult for newcomers, even experienced ones.

The main thing that could be done to improve this situation would be to provide an installation tool, similar to the one provided by Solaris, that would take the user through the different steps of the configuration. Of course, experienced people who don't want to use the tools wouldn't have to. Such a tool should follow the following guidelines:

  • Remember what the user did and don't ask the same question twice, e.g., once you've set up the partitions and file systems, this information should be used to select the relevant kernel options and set up the GRUB or LILO configuration.
  • Use sensible default vlaues, if possible derived from the hardware configuration. The Live CD can pick up most of it so the installer should as well.
  • When possible, guide the user through standard use cases, such as install a laptop profile or a games machine profile, or do everything custom.
  • Like the Solaris installer, ask all the questions before doing anything and then do all the installation in one go. Thus you can spend 15 minutes working on the setup and then let the tool spend the next 4 hours on its own installing your system.
All in all, it was a very interesting and valuable experience and once again I cannot praise too much the quality of the documentation. I am in two minds though as to whether I want to debug this installation or try something else, like installing Fedora Core 1 and comparing notes afterwards.

Monday, 19 July 2004

Back from holidays

I just came back from holidays. I went back home to see lots of tall ships. I also took lots of photographs but haven't had them developed yet.

As usual, I came back to the office to find a mountain of email. I also realised that the power pack (transformer and cord) of my laptop had gone missing. Interestingly enough, sending an email to everybody in the company had an immediate effect: I had my power pack back in less than 5 minutes.

Wednesday, 7 July 2004

GNER rolls out Wi-Fi on trains

GNER is to offer Wi-Fi on trains. Sounds great but the FAQ doesn't answer this:
  • do they also provide the power sockets?
  • is the access unprotected or do they run a firewall as well?
  • will the trains arrive on time?
We can guess the answer to the last question though: it depends whether there are leaves on the Wi-Fi antennae, especially the wrong type of leaves.