Installing Display Drivers on CentOS Linux after installation

Writing by on Thursday, 22 of July , 2010 at 8:51 am

One of the biggest problems with Linux distributions is that if you don’t find the right driver, things may not work very smoothly.

Few things to remember (at least with some NVIDIA drivers) is that they require that you be out of X Server. (Can we make things a little harder?)
I think with ATI, things get more complicated – so good luck! So keep in mind:

Ctrl + Alt + F1 (Get out of X Server)
init 3 (really stop X Server)
init 5 (start X Server)

Ctrl + Alt + Backspace (used to restart the X Server)

So now to install the NVIDIA driver (good luck if you can find it), but if you have a Dell and somehow go to their site and figure out the right video card etc. and manage to get the right driver then here’s what you should do:

Ctrl + Alt + F1
init 3
sh NVIDIA-Linux-x86_64-xxx.yyy.run
init 5

Ofcourse, there have to be more problems right? They just can’t simplify things. Does it complain about kernel-devel and kernel-source?
So find out the version of the Kernel

uname -a
SMP

To further complicate things and make your life miserable, put back in the Linux CD and browse to the CentOS/RPMs folder and find the kernel-devel-xxxxx.rem and the kernel-smp-xxxxx.rpm

Now repeat these steps after you’ve installed the Source and you should be able to install without problems!

Ctrl + Alt + F1
init 3
sh NVIDIA-Linux-x86_64-xxx.yyy.run
init 5

This is pretty much a general idea and should get your driver installed. At least it worked for me!
I really suggest going with the Ubuntu distribution to make your life a little easier, but again Ubuntu has it own set of problems.

But with Linux, don’t mind the problems because – the price is right!

Leave a comment

Category: Linux

: bad interpreter: No such file or directory

Writing by on Monday, 4 of August , 2008 at 11:14 am

Running a bash script, gives the following error:

: bad interpreter: No such file or directory

The carriage return was not properly converted to *nix format. (maybe the file was created in Windows)
To fix it run the following.

$ dos2unix filename — convert to *nix format

To copy the file to Windows run the following.

$ unix2dos filename — convert to Windows/DOS format

Leave a comment

Category: Linux

bash script to edit a file

Writing by on Sunday, 3 of August , 2008 at 10:48 pm

You can use sed to edit the contents of a file (say, replace ‘old_str’ with ‘new_str’ in the file default.properties and send the result to default.properties.bak).

sed ‘s/old_str/new_str/g’ ./default.properties > ./default.properties.bak

The script below uses the eval command to use variables with sed.

#!/bin/sh

FIND=’old_str’
REPLACE=’new_str’
FILE=./default.properties

eval “sed -e ‘s/$FIND”/”$REPLACE/g’ $FILE > $FILE.bak”
mv -f $FILE.bak $FILE

For more information on sed read sed – An Introduction and Tutorial.

Leave a comment

Category: Linux,Tips and Tricks

Extact tar.gz files

Writing by on Thursday, 31 of July , 2008 at 9:59 am

Let’s say you have a tar.gz file. For example, apache-ant-1.6.1-bin.tar.gz

# Decompress the zip file
gzip -d apache-ant-1.6.1-bin.tar.gz
# Extract the ant files in verbose mode
tar -xvf apache-ant-1.6.1-bin.tar

Leave a comment

Category: Linux,Tips and Tricks

tcpdump to a .cap file and analyze using WireShark

Writing by on Friday, 18 of July , 2008 at 5:37 pm

To capture tcpdump output

tcpdump -v -s 4096 -w capfile.cap port 25

You can then read the capfile.cap file using WireShark

Leave a comment

Category: Linux,Tips and Tricks

Pressing “I” for interactive start-up does nothing

Writing by on Wednesday, 16 of July , 2008 at 6:15 pm

If at boot time you already know that you want an interactive start, and you know during CentOS boot process pressing “I” does nothing, here’s a trick.

At the grub boot screen press “a” (without quotes) to edit parameters
Append “confirm” (without quotes) to the kernel line

Leave a comment

Category: Linux,Tips and Tricks

Shivdev Kalambi's Blog

Shivdev Kalambi is a Software Development Manager, previously a Principal Software Engineer at ArcSight/HP. With over 16 years' experience in software development, he's worked on several technologies and played different roles and contributed to all phases of projects. Non-tech activies include Ping-pong, Rock Climbing and Yoga at PG, Golf, Skiing, Swimming & a beer enthusiast.