Wednesday, August 25, 2004

Making GCC Work with Secondary (non-primary) Glibc

Go to Google and type "gcc with non primary glibc" and press I'm Feeling Lucky. This will take you to the document on this topic, which I have written some time back.

Looks like it is been useful to lot of people out there, since I am getting mails saying thank you and asking for more help from time to time. The reason I wrote this was, when I actually did it there was not enough information available on the net. Probably I should update it some time filling the gaps.

Tuesday, August 24, 2004

Simple IE crash and Symantec Anti-Virus

I guess most of you know that following simple HTML code will crash IE [along with your desktop shell ;-)]. Put each line inside "<" and ">".

html
form
input type crash
/form
/html

But an interesting thing I found is that once you try to create a HTML file with this code Symantec Antivirus real time protection detects it and quarantines the file. It is good to know that some products are worth for the money you spend on them unlike M$ products. There is a way to bypass Symantec, replace the word crash with some random word then Symantec doesn't catch but your IE still goes for a spin.

Got a bang again!

Now days I am bit busy so couldn't post any thing here. Today morning while I was driving to office through Koramangala and slowed at a signal suddenly got jerk and a bang sound from back. That idiot says it is his fault completely (he is looking some where else and driving) what can I say to him in the middle of the traffic? Though nothing much happened to my brand new, shiny bumper except little scratch and a small dent but looks like it has bent towards the rear tire so I had to pull it up to continue my driving. Looks like garage is the favorite place for me to visit. I don't know why is this happening to me.

Tuesday, August 10, 2004

Working from Home

Last week I worked from home on Thursday, Saturday & Sunday. I felt that I am more productive when I worked from home. I also realized that Internet is the thing, which sucks most of my time at work. I wish they could block my machine for Internet access [hey I am just kidding ;-)]. What you guys feel about working from home?

Wednesday, August 04, 2004

Adjusting Display Video Setting for Xserver 4.x.x

The annoying thing I notice with dual booting Windows and Linux is that the display on monitor shifts whenever you switch from one to another (not with all monitors). The reason I found for this is that Xserver is unable to calculate the display timings for that mode correctly.

Until XFree86 release 4.0.0 the XF86Config file used to contain display timings (called modeline setting) for each mode (resolution). From 4.0.0 the XF86Config file got changed radically which removed all the modeline things from the configuration file and Xserver started calculating timings at run time from the specified H & V Sync frequency ranges given in the Monitor section. So if the display gets distorted it means that the Xserver calculations are not suiting the monitor for that mode so we need to give the correct timings in the configuration file with modeline statement.

How do we find out these modeline timing? It happens that the XFree86 4.x.x releases comes with a tool called xvidtune . Using this tool, you adjust all aspects of video setting dynamically when Xserver is actually running. Once you have done that you can ask tool to generate a modeline statement in a suitable format to put in the configuration file. Now copy this line to Monitor section of the XF86Config file and things should be fine.

One more reason for me to like Eric S. Raymond is for his excellent document on this.

Monday, August 02, 2004

Getting SATA Hard Disk Working with Kernel 2.4.x

This weekend finally RH9 is up and running on my new box. Interesting part is to get the SATA drive working with RH9. This is also applicable to any distribution, which is based on a 2.4.x kernel (less than 2.4.27 [which is not yet out]). Following is the procedure you can follow to get these distributions running with SATA.

- Set the SATA drive to compatible mode in BIOS so that older OSs recognize them as conventional IDE drives.

- Install the Linux

- Grab the latest release candidate of 2.4.27 kernel (rc4 at this point of time). Version 2.4.27 has the SATA drivers.

- Compile the new kernel, things to look for are
+ Enable the your serial ATA controller in ATA settings (mine was Intel ICH5 i.e Intel PIIX support option)
+ Enable serial ATA option in SCSI low-level drivers

- Install the Kernel (modify your grub configuration adding the new kernel option)

- Now the important thing before rebooting and enabling SATA in BIOS is that the drive name for your hard disk is going to change when you enable the SATA option in BIOS. So you have to specify the correct device name for ROOT partition in kernel boot parameters present in grub configuration file & modify your /etc/fstab to reflect the new drive name.

- Ok. How do I find new drive name? The BIOS maps the SATA channels as extra IDE channels, so when BISO setting is in SATA your hard disk appears in IDE channel 3 (connected to 1st SATA channel). This is assuming that you have only primary and secondary IDE channels. By this SATA disk on third IDE channel becomes hde (hda[master], hdb[slave] for primary, hdc[master], hdd[slave] for Secondary). Note that if you have connected your SATA disk to the second SATA channel leaving the first one empty this will go to IDE channel 4 and drive name becomes hdg. So you can calculate this before and change your grub configuration and /etc/fstab accordingly. When installing Linux in compatible mode the disk on SATA moves to one of the disks in Primary or Secondary channels that is the reason we need to do all this.

If you are unable to calculate this properly, use trail and error method by modifying the kernel command line options at grub startup screen. Once you get it right update the configuration files and also update the grub device map which is present in /boot/grub/device.map by running grub --device-map=device.map

Then every thing will work fine but if you want to boot your old kernel any time you need to take care of /etc/fstab.