Monday, December 26, 2005

Linux woes with new hardwares.

As I fiddle with computer hardwares often, I usually have pretty decently new computer hardwares. Lately, migrating to linux became part of my past times as well. Those two have proven to be a fatal combination. A combination destined to cause trouble, and I mean lots of troubles.

Hardware compatibilities & drivers for linux are often hard to come by. Drivers availability & maturity in 6~9months times after the product being launched is pretty common. Problem is that, after 6~9 months when the product is matured enough to have good linux driver support & most compatibility issues ironed out, the product is probably no longer on sales in most computer shops around you. That is the dilemma. If I used new hardwares, I have poor linux drivers support. If I wait for 9 months for the product to mature, I probably cannot find the product any more.

The only way it seemed to bridge this gap is to patch & compile my own linux kernel to get my hardwares working. It's tough. Real tough.

One of my new motherboard uses SIS756 chipset, which has yet to have very matured driver support natively in the open linux kernel. Just to get it working I have to

1. Use a 5 years old PCI S3 Virge VGA card to install FC4. Cos FC4 failed to start graphic install with a nVidia 6600LE 3d card. And text install is even more buggy with other problem. Kinda tricky, but not that big a deal still, provided you still have a PCI VGA card in your storeroom. Hello, 2005's coming to an end & 2006 is just round the corner. PCI VGA card??

2. Download the latest kernel & modify the entry of the SIS IDE 5513 controller in the driver file & recompile it to get DMA enabled for the onboard IDE controller. The problem is rather silly that some one thought SIS5513 is compatible with SIS511 & identified them as SIS551X. Without DMA-enabled, disc access speed degraded to <3Mb/s & applications like TV-tuner will stutter when multiple applications are reading the harddisk simultaneously. Enabling it will return disc access to about 58Mb/s. How on earth do you think anyone will ever discover this? I have no idea. I only chance upon it from some forum to realised such silly problem with the linux kenel.

3, Onboard SIS190 network card is not recognised by the default FC4 kernel. And to solve this, I have to first wait for the FC4 kernel 2.6.14.1 to have support for the SIS190 chip, plug in a SMC network card to enable live update to upgrade FC4's kernel to 2.6.14.1. After which the SIS190 nic works, well sorta. Still I was met with another strange problem that all https sites failed to connect. Only lately, by chance that I said let's try getting the SIS190 linux driver from SIS manufacturer itself & overwriting the SIS190 driver provided in the open kernel source & recompile the whole kernel & see. Surprisingly, it finally solved this teething problem once & for all. And the cause is no other than a buggy driver released in the public kernel source.

So, now, I have resolved most, if not all of the hardwares compatibility problems with that motherboard. The effort, I must say is tremendous. And many a time, you need some luck to find the real solution. Who ever said that linux is ready for the consumers mass market? I shall shut him out from now on. Linux is really not for the faint hearted, unless you have say atleast a year old computer hardwares & the driver support for such hardwares are mature.

That is Linux, in reality.

Fixing linux network problem with https sites

For years, I kept encountering problems with https sites with various networking hardwares working in linux. Just to name a few, yahoo mail, my company's remote access using a secure https access with citrix client & the https secure online banking facility from Maybank2u.

The problems lies with the various linux nic drivers that is mixed & matched between different hardwares chipsets. The details is as follow:

I'm using a SIS190 onboard NIC from my flashy & new motherboard. And the default 2.6.11 kernel in Fedora Core 4 simply does not know & support this SIS190 network card. To solve that, I plug in a S$1 SMC network card & the machine is immediately up & alive. With that, I managed to live-update FC4's kernel to 2.6.14.1 & viola, the new kernel regconised the sis190 lan chip. Upon removing the SMC network card & rebooting, the SIS190 nic seemed to work fine. However, I kept having problem with connection to any https sites, from yahoo to Maybank2u sites. No amount of tweaking with linux's firewall or selinux helps. Even doing a self-compiled 2.6.14.4 kernel does not help, although it works with any non-https sites.

Today, I finally took the plunge & downloaded the SIS190 driver, from no other than the manufacturer SIS Taiwan instead. I unzipped the sis190.c file into

/usr/src/linux-2.6.14.4/drivers/net

overwriting the sis190.c driver obtained from www.kernel.org.

So I recompiled the whole kernel with the above & upon reboot, viola, all the https sites are working fine now.

This conclude that, the problem lies in the default sis190.c driver in the public kernel. The sis190.c driver from www.sis.com.tw works fine. Now that I recalled, I had similar problem with a Intel onboard lan chip years back, presumably the problem is the same. A problem with mixing & matching of lan chip drivers naming vs the actualy chipset used.

Friday, December 09, 2005

Linux tips: Guide of recovering GRUB after reinstalling Windows

Assuming that you dual-boot between windows & linux on the same pc. After re-installing windows, the GRUB bootloader will be replaced with ntbootloader & your linux os will not be accessible though you know it is still there.

Here is how you restore it. Before resinstalling windows, do

vi /etc/grub.conf

For my case, my linux partitions looks like this:

title Coyote's Custom Kernel (2.6.14.2)
root (hd0,6)
kernel /bzImage-2.6.14.2 ro root=/dev/VolGroup00/LogVol00 rhgb quiet enforcing=0

root (hd0,6) means, my linux os lies in hd0(first harddisk) & partition 6.

After finished installing windows, your grub bootloader will be overwritten. To recover do the followings:

Boot up with the first CD of your linux OS, for my case, it's Fedora Core 4's CD 1. At boot: type

linux rescue

to go into rescue mode.

When at the sh# prompt, do

chroot /mnt/sysimage

to gain root priviledge. Then

do

grub

to enter into grub. Type

root (hd0,6)

setup (hd0)

The first command, root (hd0,6), sets my linux root to (hd0,6), that is 1st harddisk & partition 6. The second command, setup (hd0), instruct grub to rewrite the MBR.

Upon completion, the output reads 'Running "install /grub/stage1 (hd0) (hd0)1+15.../grub/grub.conf"... succeeded'

Type 'exit' twice. Once to exit grub & second time to exit rescue mode & reboot the pc.

There, my FC4 recovered. Now, I can reinstall my windows as many times as I like, without ever loosing my linux os.

Thursday, December 08, 2005

Linux tips: Installing FC4 on nVidia 6150 chipset motherboard

After some pretty bad experience with installing FC4 on the SIS 756 chipset motherboard. Finally I had some better experience with installing FC4 on the nVidia 6150 chipset motherboard. Finally, it has proven yet again that nVidia is among the chipset manufacturer that has the best linux support. Thumbs up for nVidia.

Popping in the FC4 cd & booting up the computer, it feels so freshing that FC4 did not recognised the new 6150 onboard VGA chip & started graphical installation with the vesa driver. So everything is just smooth sailing & installation was hassel free.

Upon rebooting & getting into XWindows, the first thing I noticed was that the onboard nVidia LAN chip is not recognised by the default 2.6.11 kernel. As I usually do, I popped in the ever reliable SMC network card with the accton chipset & rebooted FC4. Sure enough, FC4 auto-configured the SMC nic & the network is up.

Doing a

yum install yumex

simply install yum extender package manager. This way I can select to update only the latest kernel for testing first.

Doing live-update using yum extender finally installed the latest kernel 2.6.14-1.1644_FC4. Upon rebooting, I see the forcedeth nVidia onboard lan chip detected. After removing the SMC nic & restarting the FC4, the system is up with all network connections up & running with the nVidia onboard lan chip.

Did a check on

vi /var/log/dmesg

& found that the nVidia's ide controller are all installed & well with dma enabled.

Next, I downloaded the nVidia graphic driver 1.0-8174 for linux. 1.0-8174 is known to be first nVidia driver to support the 6150 in linux. Installation was as simple as doing a

sh NVIDIA-Linux-x86-1.0-8174-pkg1.run

Sure enough, X started with the latest 6150 linux driver & the desktop response speed is notedly faster then the VESA driver mode, obviously.

Finally, the only problem seemed that the onboard nVidia sound chip's driver is still not in 2.6.14's kernel yet. It's only a matter of time, the next live update or so will get the onboard sound working with FC4 as well.

Thumbs up for nVidia for such good linux support. Undoubtedly, the best hardware manufacturer with the best linux support.

Another AMD64 3000+


On Dec 4, I finally bought the AMD64 3000+ with the Gigabyte K8N51-PVMT-9 from the local computer shop, Bell. The promoter told me it's the last 3 pieces of AMD64 3000+ in their shop. When I leave the shop at 5pm, after making payment, only 1 last piece of 3000+ left. After dinner, I went back for leisure browsing & when I leave the building at 6.15pm, the last piece of 3000+ is gone.

It was rumoured that AMD will stop making the entry level AMD3000+, 3200+ & 3500+ for their mainstream lines of socket939 cpu. Most shops in local computer shops have little to no stock of such cpu.

Thursday, December 01, 2005

First encounter with Mandriva 2006

In the midst of a planned upgrade & moving some computer parts & harddisk around. I decided might as well try out the Mandriva 2006 on my spare Duron 1000MHz cpu computer.

Few things I noticed.

Pros:
1. Download of the installation CD from the local mirror averse net is very fast. 1.4G in 1.5hr.

2. averse net is listed as an official live update site. Live update is very fast, ~3 minutes for 100+Mb of update.

3. Installation & startup of Mandriva on my 1000MHz Duron cpu is even faster than Fedora on my AMD64 3000+ cpu. Think this is part of the kernel optimization effort by the Mandriva team.

4. Sun java 1.5.0-05 works for MayBank online banking.

Cons:

5. All the touted benefits of skype & realplayer integration into Mandriva are removed from the free download community version. It's only available from the paid member version. And I still don't know how to get realplayer working in Mandriva. More time needed.

6. Live update by rpmdrake is largely controlled by Mandriva. And as a profit generating company, Mandriva has all the reason in the world not to release things like RealPlayer & Skype to non-paying customer. As we know, live update by third parties like freshrpm are usually much faster & answers to many more user needs without the burden of 'profit'. If you know of any agent like apt-get or yum for Mandriva, do let me know. Again, not enough time to explore.