The command line

GNU/Linux, web development and some other things

Debian SSH/OpenSSL Vulnerability Fix

Today I updated the Debian GNU/Linux machines under my control in order to apply the fixes for DSA-1571 and DSA-1576. I had to regenerate several keys in the servers but now it appears to be all safe again. That was an error from a Debian package mantainer but, in spite of that, Debian remains my GNU/Linux distribution of choice.

LaTeX Install on Debian GNU/Linux

Today I began to use LaTeX to write technical documents. I learned that teTeX, the original default TeX distribution (LaTeX need TeX to work) on Debian is no longer maintained. The current default is TeXLive. So I installed it with: # aptitude install texlive This downloaded 338 MB of packages (when I tried to install texlive-full it offered to download 582MB, no thanks) . I found this very helpful guide to LaTeX from Tobias Oetiker et al. Now to write LaTeX documents.

Wine Thoughts

In this moment I am drunk. And happy. A lot. The spiritual drinks (wine this day) are very strange. Some would say they are magical. Others that they are a drug. I’ll say that they are part of the humanity. When we are happy, when we are sad. In the success and in the tragedy. Alcohol has been always part of our lives. Wine, beer, fruit derivatives. A lot of options, a lot of flavors, a lot of circumstances. The fact is, they change (for a couple hours) our perception of life. My wife considers the wine the most mystical beverage (influenced a lot by her love for the ancient Greek’s culture and philosophie). I tend to agree with her. I agree with her fully in days like this. The Wine has a very tasteful flavor. And the sensation of being drunk with wine it is very different as being drunk with tequila, for example. It is soft. It is happy. In fact, I don’t think that someone sad could wish to be drunk with wine. The wine is for special moments. For happy ones. For memorable things. Or just for communion with the life. In this moment I don’t care for anything except this peaceful, grateful and happiness moment. My wife, the love of my life, is reading her book. I feel the taste of the remains of the wine in my tongue. Delicious. My son is in the room besides ours. Every now and then we hear his breath. Today I played with him. It is growing very fast. My son, Aline, the wine, the peaceful state of mind. A very good moment.

Linux Kernel Powered Wireless Card.

A bit of background first. Last year I got a new laptop (HP dv6420la). All worked fine, except for the wireless card. It is a BCM4312 rev 02. It only worked using ndiswrapper. This was acceptable, because in the end the important thing was that the tool (the laptop) worked. But I always had the feeling that it was not perfect. Besides, half the time it didn’t booted correctly because the wireless card didn’t initialized ok. This hanged the machine and the only solution was to cold reboot the laptop. Not very good for my files but that was the price to pay in order to have a working wireless card. All the time I follow the news on linuxwireless.org waiting for the time when native kernel support for my wireless card were incorporated to the mainline kernel. From time to time I installed new versions of the kernel and tested the card without success, but the progress was evident. My hopes were bigger and bigger as the months passed. Finally (thanks Larry Finger, the author of the patch, and the linux wireless team) mainstream kernel included the code necessary to drive the BCM4312 rev 02 card. It was included in kernel 2.6.25 and this kernel was stamped stable just two days ago. So, one more time (hoping it were the last) I put to test a new kernel in my laptop. I downloaded the full sources from kernel.org (because it isn’t yet in debian repositories). As root:

laptop:~# cd /usr/src
laptop:~# wget http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.25.tar.bz2
Then I installed the required dependencies needed to custom compile/install a kernel (instructions here):

laptop:~# apt-get install build-essential fakeroot
I unpacked the sources:

laptop:~# tar jxf linux-2.6.25.tar.bz2
laptop:~# cd linux-2.6.25
I copied the config file from my current kernel:

laptop:~# cp /boot/config-2.6.24-1-amd64 .config
and made the kernel package:

laptop:~# fakeroot make-kpkg --initrd --revision=miguel.1.0 kernel_image
This compiled the kernel and built the deb package leaving it in /usr/src/linux-image-2.6.25_miguel.1.0_amd64.deb. I chose the default answers in the config phase. Finally I installed it with:

laptop:~# dpkg -i /usr/src/linux-image-2.6.25_miguel.1.0_amd64.deb
As I was using ndiswrapper (as told here), I had to undo the changes made for ndiswrapper to work:

laptop:~# /etc/init.d/networking stop
laptop:~# rmmod ndiswrapper
laptop:~# ndiswrapper -r bcmwl5
laptop:~# m-a purge ndiswrapper --force
laptop:~# dpkg -l |grep ndiswrapper # to check ndiswrapper packages
# update the following accordingly
laptop:~# aptitude purge ndiswrapper-common ndiswrapper-source ndiswrapper-modules-2.6.22-2-amd64 ndiswrapper-utils-1.9
Also, I removed bcm43xx from /etc/modprobe.d/blacklist, and finally left just the following lines in /etc/network/interfaces:

auto lo
iface lo inet loopback
in order to let NetworkManager to manage the network interfaces (wired and wireless). The time to test this setup came, so I rebooted the laptop and watched the boot messages. No errors. Finally the led turned blue and when I logged in with my user the NetworkManager showed a list with all the wireless networks available. I chose mine and I was showed a windows asking for my password. I entered it and the connection was made. So here I am, writing this from my recently and brand new kernel powered BCM4312 rev 02 wireless card. So, thanks to the ndiswrapper team, but I have to say goodbye. I invite you to update to kernel 2.6.25 and to left behind ndiswrapper. Thanks to the Linux Wireless team, and in general to the FOSS community for the work made. Thank you all.

Goodbye Apache, Welcome Lighttpd

Finally, after several weeks of thinking about it, I removed Apache 2 from my server machine and replaced it with lighttpd. I don’t have anything against Apache. In fact has never gave me any problem. But, in a VPS environment, RAM memory is the main resource to save. And Apache is so RAM hungry (besides MySQL), that the server was almost Apache dedicated. After searching for a viable alternative I came to lighttpd. Small, low memory footprint, super fast, support for virtual hosts, php, fastcgi. Well, this blog is already running over lighttpd/fastcgi. Then only drawback was, lighttpd has no support (complete as today) for Web DAV, so Subversion couldn’t work with https, but as I am the only user for my repo, I now use svn+ssh to access it. So, the migration was OK.

Soy Tío

El 26 de marzo nació Ari, el hijo de mi hermano. Es idéntico a él cuando era chiquito (a juzgar por las fotos que de él existen). Viene en tamaño miniatura e hizo que vieramos  a Tristán enorme! Felicidades a Iván y Lula.