Eventually, even my infinite patience is over. My laptop has a Centrino chipset and comes with the Intel Pro Wireless 2200 (ipw2200) network adapter. Some months ago I installed Fedora Core 4 and had quite a troubled time in making the card work. At the first kernel update the wifi ceased to work. Last week it was the third kernel update since when everything worked fine and the wifi was still dead.
I decided that there’s no sense in keeping using old kernel and it was time to fix the issue once for all.
First some history.
After the installation of Fedora Core 4 (FC4) you find that there no way how hard you try, your ipw2200 is not going to work. That’s odd – despite that kernel modules are available and the network wizard even succeeds (sometimes) in finding and configuring the adapter, root is unable to ‘ifup’ the wifi.
Searching around the internet you find that FC4 supports ipw2200, but the firmware for this device is not included in the distribution. They could have saved me some time (and some headaches) by stating somewhere, during the installation, that I had to complete the setup manually.
The firmware is a set of files (available here) that you have to download (uncompressed) and store in the ‘/lib/firmware’ directory.
After this operation the network wizard reliably finds and configures the adapter. Well the wizard is quite rough since it is not able to show a list of wi-fi network you can connect to, but this is a minor annoyance (at least if you know the SSID of the network).
As I said, my joy quit after the first kernel update. Well it could be a kernel problem I said to myself and stuck with the old kernel while waiting for the next update. Three kernel updates later still with a useless wi-fi device I decided that something had to be done.
The first doubt I had was that there was something in the firmware directory that was linked to some specific kernel directory. ‘find’ing in /etc, /lib, /lib/firmware, /boot yield no results.
Time for internet again.
The answer came quite quickly. The firmware on the site had been updated twice. I had v2.2 and version 3.0 was available. I tried first the latest version (3.0) but got no results. Of course the right one is the last you try. So version 2.4 proved to be fine with the latest kernel (kernel-2.6.15-1.1833).
The evening wasn’t over yet, so I gave another try to the Toshiba_acpi module. My laptop is a Toshiba. Linux kernel has specific acpi extensions to access the acpi functions of the Toshiba computer. Despite having the proper kernel module I got an error while attempting to load the module.
Googling for the obvious keywords I arrived at the toshiba acpi driver site where it is clearly stated that not all Toshiba laptops are supported and that the error I got was an indication that my system wasn’t supported.
Linux – Windows 1 – 0
Sometimes there are things you give for granted, like gravity, water being wet, 220V being harmful, and Windows interfacing painlessly with every kind of hardware. I was so convinced about this that I was utmost surprised to find problems with the wireless network of my notebook. In fact, I had no problem with Linux, Fedora Core 3 latest kernel (2.6.10-1.741_FC3) supports naively the Intel pro 2200BG hosted in my Toshiba. Just a matter of a few settings and I could access the internet from my living room without wire hassle.
I expected Windows XP HE to be more or less the same thing, and the starting was good – it told me it was looking up all available wireless networks. Good… But after some minutes of idle wait, it returned to me with one network that wasn’t mine for sure. So I tried to configure it manually with the network name (maxpagani.org 🙂 ), it waited another bunch of minutes, but wasn’t able to find it. So I tried to connect to the other network to get exactly the same result… no connection.
I spent something more than an hour trying to make it work with no success. What is puzzling is that XP-HE came pre-installed on my notebook and my wi-fi network is just a plain network with default options (even no encryption enabled).
So… Linux, good job!
Fedora Core 3
I nearly forgot I installed Fedora Core 3 both on my old laptop, on my desktop and on my new notebook. Things have quite changed from the first Fedora. Now it doesn’t force you to forget about windows preventing it from booting from Grub. Either it doesn’t mess up the partition table with some excuse. In all three cases the installation was really smooth. I was particularly admired of the new notebook install. Despite of being quite a new piece of hardware the installation worked out fine nearly everything.By “nearly” I mean that I had to manually set the correct resolution for the X Server. The Monitor Configuration failed to determine the resolution by itself. Setting it by hand was easy (just expand LCD panels and select 1280×800), but the video adapter configuration just ignored it. Nothing very bad happened. Just the basic 800×600 resolution was used and the image was stretched to fit the display.
The other part of ‘nearly’ was about the wireless adapter which wasn’t neither recognized nor detected. This seems to be quite common in linux distribution as knoppix failed to detect the card too. A quick search on google pointed me to the driver page (http://ipw2200.sf.net/) which clearly enough explained what to do to install the driver. Despite of the clear and direct explanations (and my quick-reading), everything went smooth and in a few minutes I had my card up and running.
On my previous laptop, an old Celeron 433Mhz Toshiba, Fedora Core 3 installed itself in a fast and friendly way, but it took too much disk space and too much CPU. So I decided to get rid of the GNOME stuff and head for the lighter xfce which is indeed part of the Fedora distribution.
After removing everything that could be removed (even by forcing some printer related stuff into the bit bucket), the system was running lighter, but it was immediately clear that this environment has been destined by Fedora developers to expert users.
First menus were not configured as for KDE and Gnome, missing all application and configuration items. Also some basic stuff such as a battery applet was missing, too. Finding a battery applet is quite straightforward, retyping the menu configuration is a boring task.
What is quite clear today is that if you want to make your Linux box out of some outdated hardware you have to be quite skilled in cutting off what is not needed and selecting the exact stuff that does what you need regardless of the latest version.
This is quite a curious trend if you think that anyway Linux is (at least) one step behind Microsoft in supporting the current generation hardware. So cutting edge hardware is off target, but if you have outdated hardware it requires you a great deal of Linux skill to have a current software to run on it.
Nvidia’n’Linux
There are some activities you fear of in advance. I was quite afraid of the Linux drivers for NVidia video card. Since yesterday the new 4k stack drivers were released an attempt was needed.I have to say that the installation was quite painless and the outcome good indeed. Nonetheless there are a number of subtleties that can misguide the less experiences linux user (by definition there is such a thing like a unexperienced Linux user 🙂 ).
First the right file should be downloaded. I headed for the AMD-Athlon version of the drivers (NVIDIA-Linux-x86_64-1.0-6106-pkg2.run), only to discover that Fedora Core 2 installs a x86 kernel on AMD and therefore I need the other drivers file (NVIDIA-Linux-x86-1.0-6106-pkg1.run).
Next I switched to a text console (Ctrl+Alt+F2) and then logged in as root. Since the installation should be performed without the X system running I changed the runlevel with init 3. This command actually prints some informations but leave your user logged in.
The I issued the command ./NVIDIA-Linux-x86-1.0-6106-pkg1.run. This action brings in the NVidia installer, which warned me of a previous installation (yes, there was one, but it was disabled), and then asked me for accessing NVidia ftp server to look for a new version of the drivers. At this time the application hung. I guess that this problem has something to do with my ADSL router/firewall not always happy with DNS resolution. Anyway I killed the application and restarted it.
This time everything went fine and I was left at the root prompt with some brief instruction about completing the installation. It is better to have handy the README, so I opened another console (Ctrl+Alt+F3) and used it for displaying the README.
The remaining operations are very straightforward, but I wonder why they haven’t coded the in the installer. Basically you have to edit the X configuration file (please note that by default on Fedora Core 2, this file is /etc/X11/xorg.conf) and:
- change line Driver “nv” to Driver “nvidia”;
- remove lines Load “dri” and Load “GLcore”;
- add the line Load “glx” (if not already present) in the same section the other ‘Load’ directives are listed.
Back to the prompt I changed the runlevel to 5 with init 5. Et voilà the X server started (with a while of suspance), displaying the NVidia logo.
Rushing to test with TuxRacer and Chromium proved me that the hardware acceleration was there for real.
Laptop Happy
After another session of troubleshooting I got my laptop up and running again. Here the story goes…Collecting a bunch of first HD sectors around my boxes convinced me that every first sector was different from the others. Scaring thoughts of trying all the 65535 values with a reboot in the middle were hitting my mind… but I had no better idea than this… Well to be honest I had a better idea – internetting to find the data structure of the first HD sector in order to put some proper values at offset 506.
This would have require an evening spent in front of my desktop in the other room, and neither my wife nor me would have appreciated 🙂 So I went the experimental way.
I started with 0x0000 value, anything magic with that, just a starting point, and rebooted.
The boot went fine and it happened to get over the ‘remounting root filesystem’ line just to produce a bunch of warnings such as: invalid swap partition, can’t activate swap and the like.
Anyway the system reached a usable state and I was able to login. First I launched fdisk and when issuing a ‘p’ command (print partitions) I was greet with a warning – logical end for partition /dev/hd4 different from physical end; plus some digits intended to help me in understanding the problem … I guess.
Well, if the problem is in the swap partition, maybe the best way to fix it is just to remove and re-create the swap partition. All this can be done without a reboot therefore it is worth a try.
After the reboot the box come up fine, and at last I stop holding my breath (my face should have been about blue in the face at the moment).
This morning while commuting I flipped just a couple of bits. I forgot to set the partition type to ‘Linux swap’ and to run the mkswap command on the partition. Lesson learned – don’t touch and watch astonished the blinken lights.
Harm Yourself with rdev and Superficial Reading
Fast reading technique is good to get the idea from a long document, but the more you use it the more you get accustomed and the more you use it without notice. That’s bad especially when you are dealing with something potentially dangerous – explosives, driving directions, contracts and … man pages. So when reading the rdev man pages I didn’t read it too carefully and missed the difference between kernel image and boot device. It didn’t help that the man page examples are quite misleading using many times the /dev/fd0 as kernel image synonym.
The rdev command (on Linux) works by chaining pairs of bytes at specific offsets in the kernel image. The usage of rdev is deprecated (I read this on man page O:-), since it is based on historical legacy and works only for x86 architectures.
Likely I was thinking about the grub boot code instead of kernel, so I launched rdev on /dev/hda and… it changed two bytes at offset 506,507. What did that two bytes contain? For sure not 0xFFFD since I guess this is the main cause for the boot failure of the notebook.
I hope this evening to verify my theory and eventually restore my notebook health.
The Too Short Blanket and Other Stories
Nothing of interest on tv last evening seemed a good excuse for some fun programming on my laptop while my wife watched some tv-drama. The next good excuse was to completely discharge batteries before recharging them, increasing their lifespan… and so on.Not to count that at last my desktop Linux PC was working and needed no more my caring attentions.
I switched my aging Toshiba on and waited for the good ol’ login screen… unfortunately the computer refused to proceed beyond the “remounting root file system in read/write mode” with a grinding sound. I started feeling uneasy.
That kind of sound and that kind of halt couldn’t be any good. So I restarted the thing, only to have it halted on the same boot line with the same sound. I’m not only very aficionado to my laptop, but to my fun programming stuff too. And the fact that it was nearly time to switch to a new laptop it wasn’t a good reason to die for it that way without a notice.
Time to get that Fedora Core 2 Rescue Disc I burnt on a mini-CD (nice).
The mini-CD booted without a glitch (while it took quite a time to get to the prompt), and I was dropped in a root shell.
I found the root partition by using fdisk, and then, after a bit of experiments with –help and some command line switches I launched:
fsck.ext3 -f -v /dev/hda2
And after some time astonished I learned that no problems were found. So I tried harder with a badblock thorough check:
fsck.ext3 -f -c /dev/hda2
And after more time and even more astonished I learned that the disk was really ok. To be really sure, I mounted the partition and chroot’ed there:
mount /dev/hda2 /mnt/source mount /dev/hda1 /mnt/source/boot mount proc /mnt/source/proc -t proc chroot /mnt/source
And, yes everything worked, and my files was still there… I stopped holding my breath. Maybe it was just a transient problem. I rebooted and … no the system hadn’t been impressed by my exercise with the rescue disc.
Thinking of what could have caused that state I recalled about the ‘rdev’ command I twiddled with. My intention was to restore the text video mode at boot time in something suitable with the 800×600 resolution of the screen. In fact after having tried Knoppix I got the boot video resolution set to 640×480. Maybe that rdev could have messed up something, since it can control also the read/write mode of the root filesystem.
I had another round with rescue disc, mount and chroot, to run ‘yum update’. I got a lot of new stuff among which a brand new kernel. Useless to say but the update didn’t solve the problem. I hope to solve it soon without resorting to reinstalling Linux.
Maybe you remember the digital camera I got as bonus for “Beyond Good&Evil”. Well I discovered, to my surprise, that this is a real camera and is sold for about $38… The price is disappointingly high compared to the quality. I think that this camera can be successfully used only as a webcam. We used the camera to take some shots during a trek on “Corni di Canzo” only to discover the day after that no picture was present in the camera memory. My wife used the camera to shot some picture during a live concert and the result was more or less the same. Only 3/4 of a picture survived.
The battery lasted for no more than 100 shots. Consider that when the camera is connected to PC it should pull juice from the USB cable.
Definitively I don’t recommend this Vivitar camera to anyone.
The positive side of the story is that this experiences convinced my wife of the need of a (real) digital camera :-).
Fedora Done
Yesterday I had some time to waste on Linux, so I went on with my twiddling on Fedora Core 2. Despite this story was starting to be likely never-ending, I got the USB system to work. I’m not sure if I have to thank a new version of the kernel I yum’ed yesterday, or the ‘module_upgrade’ cast I invoked after some googling around. Anyway the USB flash disk is now properly working.I’m still perplexed about the new version of Nautilus that has not the directory tree view. You can ‘explore’ by choosing the proper item in the ‘hat’ menu, but when you double click on a folder on the desktop you get just the folder view. It was like that once upon a time on the Amiga… but nowadays we are used to tree views… And I feel they are really handy.
Fe-fe-fe… Fedora
Last Friday I got a gadget – a mini digital camera. I have never seen this kind of gadgets in local stores… I suppose either because the shop owners shame to have such a item or because they are too greedy and there isn’t enough margin. Anyway the camera is a ViviCam 5 (pdf reader required for the link). And since this is a gift, I’m very happy to have received it for free.
Friday I took some shots and then I wanted to download them to my PC. So I switched on my desktop system and discovered that… Fedora Core 2 messed up something with GRUB and my Windows didn’t boot.
I use Windows mainly for playing games and for compatibility, moreover I didn’t want to spent huge amounts of time to resurrect Fedora Core 2 support for USB.
Saturday morning I tried to solve the thing. Apparently it seems that FC2 installer is somewhat broken and doesn’t always handle correctly the multiboot issue.
Luckily on www.fedorafaq.org there is a brief description on how to fix and some links for more detailed explanations.
Fixing involves two invocations of ‘sfdisk’ which is a stream line version of fdisk (sfdisk is to fdisk, what sed is to vi). Unfortunately the solution proposed in fedorafaq doesn’t work because the first sfdisk is issuing some warnings about disk geometry. I remember I got the same warning during installation. It is easy to get rid of such warnings by using an intermediate text file as described in one of the links.
So far so good, the pictures weren’t great, but funny for sure.
While I was playing with Fedora I tried to put USB back to work. After a bit of investigation I discovered that apparently the kernel doesn’t find the usbcore module which is the base for handling USB. A quick search through Internet showed up that I’m not alone, there is at least another Internet user who had the same problem. Unfortunately he (or she) didn’t get any sensible suggestion apart than recompiling the kernel.
I’m not afraid of recompiling the kernel, but it’s more a question of principle, not counting all the goods I get with a standard kernel (such as pre-compiled drivers).
Still convinced that reinstalling is the way to go.
Fedora Core 2 – part 2
Upgrading my home PC to Fedora Core 2 proved to be the most troubled Linux upgrading I ever did. It’s likely I started with the wrong foot, but things got worse and worse during the way. It all began quite innocently with my decision of not reformatting Linux partitions. Well it’s just laziness since I didn’t want to backup my personal data. Laziness sometimes can be a virtue… not this time.
The second mistake was to instruct Fedora installer to ‘Install’ instead of ‘Upgrade’. My intention was good, I meant – get rid of all the old configuration, install a brand new system. Unfortunately the installer speaks another language and it understood something like: install the new system, but keep the old one altogether.
The resulting mess was a system in which most of the packages were duplicated, one FC2 version and one RH9 version. Oddly enough files weren’t duplicated… I mean the files on the disk replaced the old ones.
Configuration files were a mess, sometimes the new version was installed, in other cases just the opposite. To FC2 credit I have to state that no configuration was lost and all the conflicts were reported in the install.log.
I started to wipe out all the old packages by ‘rpm -e’ them by hand one at time. Luckily the system wasn’t too picky on the dependencies for these obsoleted packages and let me remove them quite freely.
Then I turned to configuration files and tried to merge them in a sensible result. The system seemed to react fine, but it was only appearance. At the first reboot the X system didn’t come up.
Logging in the text console I discovered that X-related programs weren’t able to find their shared libraries. A quick check confirmed me that the libraries were still in their place, so the problem had to be in the search for shared libraries.
This pointed me to /etc/ld.so.conf and ldconfig. The configuration file turned out to be empty… likely either I deleted inadvertently the content during my merge, or the system regenerated it (empty) for some reason. Anyway I filled in the X lib directories and gnome came to life again.
So far so good. The mail and spamassassin configuration seemed fine, and I was able to receive and send mails. I get through fedorafaq and applied all the enhancements listed (java, mozilla/java plugin, macromedia flash plugin, mp3, pdf).
Anyway the system proved to be still somewhat broken, since when I plugged in my USB disk, FC2 ignored it. I ran usbview to check the usb bus, but usbview wasn’t unable to find anything since the usbdevfs was missing. Apparently something in the kernel or kernel configuration was broken. The situation didn’t solve even after I downloaded and installed the NVidia NForce drivers.
That’s all… Likely I would have spent less time by reinstalling everything at the first sign of troubles. And I think this will be the way I go. Nonetheless all this problem solving is a good exercise. (Not clear for what, but a good exercise for sure 🙂 ).