My uptime hits 50d

I am bored, working a little bit too much overtime, and I just realized that my work computer’s uptime exceeded 50 days today. Yes, this means that I last rebooted my computer 50 days ago.

I realize that this number is far from impressive, but I can’t help but compare it with the case of our only fellow workmate who uses Windows (XP). He once left his computer on and unattended for a couple of weeks (he went on a trip abroad), and to be fair Windows behaved: it didn’t crash. However, when he is working he religiously turns the computer off every evening, because (he says), “otherwise it eventually slows down to a crawl”. My beloved Debian runs as smoothly as the first day, after being on (and under heavy use) for almost two months.

Comments

Linux in the metropolitan buses of Donostia

Today I have taken the usual bus to the city center, and noticed that the monitors they have in the buses, showing general info and commercials, where blank. Well, not exactly blank: some white letters littered the black screens. “Oh, dear” – I thought – “another Windows crash”. Not quite: the messages the monitors where showing corresponded to GNU/Linux!!

Below you can see a photo I took. Click in the picture for full-size version.

I also took a second pic, without flash:

I apologize for the poor quality of the pictures, but taking photos of low-luminance screens in bright ambients, and inside a moving bus is not trivial (and my digital camera is not the best ever).

If one forces one’s eyes, the following fragments can be read:

* search_bg_key: invalid format found in block [...]
* is_leaf: free space seems wrong: level 1
* reiserfs_read_inode2: i/o failure ocurred trying to find [...]
* /home/terminal/datos/backup/20070217-def[...]-md5
* Unable to handle paging request at virtual address [...]

From my ignorance, it seems one hard disk failed, or maybe a connection (say, the USB cable to an external disk) was broken, or a device’s capacity exhausted. Of course, it might well be a failure of the OS (albeit quite unlikely, being GNU/Linux).

In any case, I was shocked to discover that the city council has decided to give Linux a go. Well done, Mr. Elorza!

Comments (3)

WiFi with WPA under Ubuntu/Debian

I finally made my new laptop connect with WPA encryption to my WiFi router!!

I could already connect it to WiFi networks with WEP encryption (or no encription at all), but WPA proved harder.

Mini HowTo

1) My setup is the following:

WiFi router: SMC Barricade WBR14-G2
WiFi card in laptop: Intel PRO/Wireles 3945
OS: Ubuntu 6.06 LTS (Dapper Drake)

2) The router settings:

Wireless encryption: WPA/WPA2 Only
Cipher suit: TKIP+AES (WPA/WPA2)
Authentication: Pre-shared Key (yes, I know 802.1X would be more secure… sue me)
Pre-shared key type: Passphrase (8~63 characters)

3) The package one needs to install:

# aptitude install wpasupplicant

4) Making WPA supplicant run:

First, create a config file, by the name /etc/wpa_supplicant.conf, and inside it, write:

ctrl_interface=/var/run/wpa_supplicant
ap_scan=1

network={
  ssid="your_ssid_name"
  scan_ssid=0
  proto=WPA RSN
  key_mgmt=WPA-PSK
  pairwise=TKIP CCMP
  group=TKIP CCMP
  psk="your_preshared_key"
  priority=5
}

At that point, you should make sure that the WiFi is turned on, and that the correct driver is loaded. In my case:

# modprobe ipw3945

Then, to test the WPA supplicant, run:

# wpa_supplicant -Dwext -ieth1 -c /etc/wpa_supplicant.conf

Recall I have used the wext device, instead of the ipw one, that would seem the appropriate one. Well, I read somewhere, that with 2.6.16 kernels and newer, this should be the case. Now I recall that my kernel is 2.6.15… nevermind, it works that way, and not the other (with -Dipw).

Recall also that my wireless device is eth1. Your mileage may vary (but each wireless card model gives rise to a precise device name, don’t worry).

If everything went fine, the output for the above command should be something like:


# wpa_supplicant -Dwext -ieth1 -c /etc/wpa_supplicant.conf
Trying to associate with xx:xx:xx:xx:xx:xx (SSID='xxxxxxxx' freq=0 MHz)
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
Authentication with 00:00:00:00:00:00 timed out.
Associated with xx:xx:xx:xx:xx:xx
WPA: Key negotiation completed with xx:xx:xx:xx:xx:xx [PTK=CCMP GTK=TKIP]
CTRL-EVENT-CONNECTED - Connection to xx:xx:xx:xx:xx:xx completed (auth)

If you see that “negotiation completed”, it worked (Ctr-C to exit the above).

5) Automating the WPA connection when bringing wireless interface up

Next, I’ll explain the small changes one has to make to /etc/network/interfaces to correctly bring up the interface. As I said, my wireless interface is eth1, so, I added the lines below to the aforementioned config file:


iface eth1 inet dhcp
wireless-essid my_wireless_essid
pre-up wpa_supplicant -Bw -Dwext -ieth1 -c /etc/wpa_supplicant.conf
post-down killall -q wpa_supplicant

And that’s all! Whenever you ifup eth1, you’ll bring up the wireless interface, with WPA encryption working.

Comments (5)

Blackout summary V

Last saturday, Iberdrola suspended the electrical power suply for a couple of hours. The only good thing is that they warned beforehand. The bad part is that they said that they’d cut it on tuesday, which they didn’t, for no apparent reason. Then, they actually cut it on saturday.

Here goes the updated list of blackouts I have been able to compile, with comments if any:

  1. 2005-Dec-13
  2. 2005-Dec-21
  3. 2006-May-26 (The card-based automated access to the Faculty broke down)
  4. 2006-Jun-04
  5. 2006-Jun-08
  6. 2006-Jun-13
  7. 2006-Jun-16
  8. 2006-Jul-04 (Orpheus didn’t fall)
  9. 2006-Sep-14 (Orpheus fell, the DNSs fell, the DHCP servers fell)
  10. 2006-Oct-21 (they warned beforehand)

Summary: 10 blackouts in 311 days, or 31.1 dpb (days per blackout). 37 days since last blackout. Average dpb went up by 0.7.

First post in the series: here

Comments

What I’ve done to my laptop

OK, this entry is just a reminder for myself.

Install ATI drivers

I followed the instructions at this wiki. For the record, I used method 1, and it worked.

Update: The link above seems dead. Read a a more recent post about Compiz Fusion under Debian Lenny for info on ATI drivers instalation.

Install a SMP kernel

My CPU is an Intel Core 2 Duo T7200… I want a SMP kernel, otherwise I am wasting one of the two cores!

Problem is, the friggin Ubuntu has no 2.6 kernels labeled “SMP”. Why, oh why!? OK, I found out: all 2.6.*-686 kernels are actually SMP, even if they don’t say anything. If you have 1 CPU, fine. If you have more, they’ll be detected at boot time. No more “-smp” in the kernel names.

Wireless with 686 kernel

The default 2.6.15-686 supports the wireless just fine, but installing a 686 kernel (required for SMP, see above) seems to break the wireless. However, the solution is easy. As stated in this Ubuntu forum thread, one just needs to install the “restricted” kernel modules corresponding to her kernel (in my case 2.6.15-27-686):

% aptitude install linux-restricted-modules-2.6.15-27-686

After that, reboot. I guess that the new module is loadable (try modprobe ipw3945), without having to reboot… dunno. Also, if you want to have the restricted modules package upgrade automatically, install linux-restricted-modules-686.

WPA encription for WiFi

Update: Read a more recent article: WPA under Ubuntu/Debian.

Install a 64-bit kernel

OK, installing the mainstream 32-bit Ubuntu was a success. Now I have given Ubuntu amd64 a try (amd64 is for both EM64T (Intel) and AMD64 (AMD)).

Everything went smooth, except installing the ATI drivers (as explained above): the screen froze black when loading GDM. To solve this, I read the troubleshooting section in the link above, and found out that I could either add:

Load "extmod"

or:

SubSection "extmod"
  Option "omit XVideo"
  Option "omit XVideo-MotionCompensation"
  Option "omit XFree86-VidModeExtension"
EndSubSection

to the Section "Modules" of /etc/X11/xorg.conf (beware, it’s one OR the other, not both). For me the Load "extmod" did not work, but the SubSection "extmod" did.

Now, for the Xgl thing in 64-bits…

Xgl for 64-bits

I followed the instructions in a previous post, but I found out that some packages were missing, so I manually downloaded them from the Xgl.compiz site. Namely, I downloaded them from the “Edgy” section. However, it didn’t work for me :^(

Update: Compiz Fusion under Debian Lenny in a more recent post.

Comments (2)

On-board sound hijacking my SBLive

OK, I made a fresh install of Debian Etch on my home computer, and a sound problem appeared. My computer has a soundcard integrated in the ASUS A7N8X-E Deluxe motherboard (best piece of hardware I ever bought, this mobo), but I use a spare Sound Blaster Live! I took from my previous computer, so I want the sound to come out of the latter, not the former.

However, the kernel modules to control the on-board soundcard seem to get loaded first, and sound output defaults to it. There could be more elegant solutions, but mine was to copy the following in the /etc/rc.local file (this file gets executed after the /etc/init.d/ services started at boot time):

modprobe -r snd_intel8x0
modprobe -r snd_emu10k1
modprobe snd_emu10k1
modprobe snd_intel8x0

What these lines do is remove the module for the on-board sound (intel8x0), then the SBLive! one (emu10k1), then reload them, but the SBLive! one first.

Comments

GParted and my laptop

OK, yesterday I bought a laptop (my first ever), and I am so excited about it! It’s specs:

Fujitsu-Siemes Amilo PI1536
CPU: Intel Core 2 Duo T7200 2×2.0GHz
RAM: 2x1Gb
HD: 120Gb SATA
Display: 15.4 WXGA
Graphics: ATI Mobility Radeon X1400 (128Mb dedicated/512Mb shared)

I chose it for its high quality CPU, and half-decent graphics card. It turns out most sellers have a large Core Duo stock, but a pitifully short list of Core 2 Duo models. Hence, they want to sell their already outdated Core models, and offer little choice in Core 2s (and a bit higher prices, although Intel sells them both at similar prices). The little choice in Core 2 Duos made it difficult to me to find what I was looking for, but I finally did.

However, this post is not only dedicated to spread my happiness. I also wanted to praise the Free Software program GParted, which I just used.

As any laptop+Linux user has experienced, usually Windows is pre-installed and shipped with the computer. In my case, I wanted to have it, so no problem with that. The bad part is that, of course, the whole hard disk is usually a single partition, with Windows being in it. Since I wanted to install Linux also, I had to make partitions. Although the laptop came with CDs for all the software that comes pre-installed (Windows included), I wanted to try to resize the Windows partition, and make room for the other partitions, without destroying the Windows installation.

I downloaded an Ubuntu ISO, burned it, then restarted the laptop with it. Good thing of Ubuntu is that its CD is a Live CD, which means that can be run without installing anything in the hard disk. Ubuntu started flawlessly, and I was presented with a GNOME desktop. There, I started GParted, and a simple, yet visually pleasing, GUI opened, and I point-and-clicked all the settings, which took me from:

1x 111Gb partition under NTFS

to:

1x 15Gb (NTFS)
1x 512Mb (swap) probably wasted disk, but oh well…
3x 10Gb (ReiserFS)
1x 50Gb (ReiserFS)
1x 18Gb (NTFS)

This way, the second NTFS partition can be used to store files Windows can access (I have to try if Linux can access that. If not, I’ll reformat with FAT32), and I still have room for three Linux distro installs (10 Gb Reiserfs), and a big home/ that all Linux-es can share.

Now, the delicate part… rebooting into Windows. I held my breath while the computer rebooted, but it did so fine. Windows started without problem, it just performed a disk integrity check at startup (which finished OK), and then said it had found new hardware, which turned out to be the second NTFS partition (the E: drive now). As we are used to with the stupid Windows, I was told to reboot to have the system recognize the recently-discovered hardware. So I did, and it worked!

Now Windows is installed in the 15Gb NTFS partition (and recall I didn’t reinstall anything. What was there, is still there), and sees a second 18Gb partition. As for Linux, I am looking forward to installing Debian, Ubuntu or something…

Comments (3)

Blackout summary IV

Today the power supply has failed again, suposedly due to an storm.

Here goes the updated list of blackouts I have been able to compile, with comments if any:

  1. 2005-Dec-13
  2. 2005-Dec-21
  3. 2006-May-26 (The card-based automated access to the Faculty broke down)
  4. 2006-Jun-04
  5. 2006-Jun-08
  6. 2006-Jun-13
  7. 2006-Jun-16
  8. 2006-Jul-04 (Orpheus didn’t fall)
  9. 2006-Sep-14 (Orpheus fell, the DNSs fell, the DHCP servers fell)

Summary: 9 blackouts in 274 days, or 30.4 dpb (days per blackout). 72 days since last blackout. Average dpb went up by 4.9. However, these data might be lacking, for I haven’t recorded the blackouts in August (I was on holiday for three weeks).

First post in the series: here

Comments

Photos to paper

Today I walked by a photograph development shop, and was struck by an ad they had showing:

Watch out for viruses! Put your digital photos to on paper, lest you lose them to computer failures.

Now, with the advance in popularity of digital photography, it is evident that development shops need to find (or invent) new incentives for attracting fleeing customers, who make do with watching their pics on the computer screen.

However, I think they miss the shot here (see the pun?), and for two reasons:

Paper is a bad format

Hard disks can fail, and digital contents (e.g. pictures), can be lost. However, putting them on paper is hardly a solution. The convenience, comfort and flexibility given by a digital format can not be matched by a paper copy. What if I want to manipulate a picture (say, with the GIMP)? What if I want to send a copy to a friend by e-mail? What if I want to make an arbitrary number of copies for free and with no quality loss?

One could argue that paper is indeed good in some cases, e.g. if we want to be able to watch the pics without turning the computer on. But then, those reasons should be called upon to suport the development shops, not the backup excuse!

Viruses don’t ruin digital content

OK, this is not completely true. With MS Windows, viruses can damage the contents of your hard disk. However, that poor excuse of an OS is hardly the only OS out there, and most others (all others?) are impervious to viruses. Taking care of potential (eventual?) errors in that lame plataform is like putting an airbag in your car because it doesn’t have brakes. Well, yes, the airbag is great (and would be a great improvement, even in a car with brakes), but who in her right mind would drive a car without brakes in first place, for god’s sake!?

Anyway, as mentioned above, hard disks do fail, regardless of the OS they run under, so some backup is highly desirable, that’s true. It just turns out that paper is not suitable for such a task.

The way to go is, obviously, backing up your photos (or whatever) into other digital media, such as another hard disk, a CD, a DVD, etc. No virus or critical error of my stupid OS can delete the photos in a CD sitting on a shelf. The CD can wear out and fail, but it would be too big a coincidence to have it happen the same day your hard disk is also damaged by your (if you use Windows) or your computer’s (if the HD wears out) error.

And if you are paranoid, just make TWO CD backups.

Comments

SATA HD plus IDE CD under 2.6 kernel

You can read in my troubleshooting page what problems I had with my CD unit in a computer with a SATA hard disk (under Linux kernel 2.6, not 2.4).

Basically it boils down to: if / is mounted on a SATA HD, the libata kernel module must be loaded at boot time. When libata is loaded, it “hijacks” not only the SATA interfaces, but also the IDE interfaces. When, later on, ide-generic and other IDE kernel modules are loaded, they don’t see the IDE ports, so the CDs/DVDs or other IDE HDs, are not found! Moreover, they can’t ever be found.

This can be overcome by loading some IDE modules before libata is loaded, as I outline in my “Troubleshooting” page. However, I recently discovered (with kernel 2.6.15), that an IDE module (precisely ide-generic would, conversely, hijack the SATA ports, making libata not find any SATA interface, and generating a kernel panic at boot time, because / could not be mounted.

Now, it seemed like I had no way to fix it, because if I loaded ide-generic first, I would get a kernel panic, whereas if I loaded libata first, I would have to make do without access to the CD. Luckily, I tried to find out how to load one of the modules without having it hijack the interface that it shouldn’t hijack. To do so, I used the modinfo utility:

Bart:~# modinfo libata
filename: /lib/modules/2.6.15-1-686-smp/kernel/drivers/scsi/libata.ko
author: Jeff Garzik
description: Library module for ATA devices
license: GPL
version: 1.20
vermagic: 2.6.15-1-686-smp SMP 686 gcc-4.0
depends: scsi_mod
srcversion: 54ECB7B28C0FB6028983484
parm: atapi_enabled:Enable discovery of ATAPI devices (0=off, 1=on) (int)

Then I tried to load libata (“load” means to put it in /etc/mkinitrd/modules), then running mkinitrd -o /boot/initrd.img-2.6.15-1-686-smp.custom 2.6.15-1-686-smp, then rebooting) with the atapi_enabled=0 parameter, so that it wouldn’t hijack the IDE, and it failed again :^(

They say that if you can’t beat an enemy you should join her, and that I did: I tried libata atapi_enabled=1 with the intention of having libata handle the IDE device properly (if I couldn’t make it ignore it), and it worked! The CD is emulated as a SCSI device (a /dev/sga0 device was generated), but it works.

Comments

« Previous Page« Previous entries « Previous Page · Next Page » Next entries »Next Page »