Remove,install and reconfigure xorg without reinstalling ubuntu

After installing ATI graphics drivers on ubuntu 11.10 the system got an “ASUS unsupported hardware message” on login screen and the login got stuck.Rather an uninstalling ubuntu i tried to reinstall and reconfigure xorg.i got console by using Ctrl+Alt+F1 and from console i tried this…

Remove existing xorg

sudo apt-get remove --purge xserver-xorg

Install xorg

sudo apt-get install xserver-xorg

Reconfigure xorg

sudo dpkg-reconfigure xserver-xorg

This fixed the xorg problem and got my window back………


Debian Kernels and Tigon TG3 Firmware

If you are updating the kernel on your Debian 5.0 (Lenny) or Debian 6.0 (Squeeze) installation and have a Tigon Gigabit ethernet controller, such as the one on the Dell Poweredge T110, you may receive the following warning messages:

W: Possible missing firmware /lib/firmware/tigon/tg3_tso5.bin for module tg3
W: Possible missing firmware /lib/firmware/tigon/tg3_tso.bin for module tg3
W: Possible missing firmware /lib/firmware/tigon/tg3.bin for module tg3

How to fix this problem

1.) Add the “non-free” repository to the sources.lst file.

vim /etc/apt/sources.list
deb squeeze main contrib non-free
deb-src squeeze main contrib non-free

2.) Update apt-get and install the “firmware-linux-nonfree” package.

apt-get update
apt-get install firmware-linux-nonfree

Upgrading the kernel to 2.6.39 in Debian 6

Some applications require a newer kernel version to make them work better . But the current stable kernel is 2.6.32.

First of all;
1. backup your /boot!

cp /boot /root -R

2. Make changes to your sources.list .

vim /etc/apt/sources.list

3. Add the line below to the bottom of the file.

deb squeeze-backports main

4. Update your repositories

apt-get update

5. Install  the backport and the kernel. (note: the linux headers and other dependencies will be installed aswell)

apt-get install -t squeeze-backports linux-image-2.6.39-bpo.2-amd64

The install will update the grub config aswell, and will put the 2.6.39 kernel at the top (so it will boot first). If all goes well you should reboot the server and the kernel will be loaded.

If the server doesnt reboot and gives you the grub shell . You can try to boot from a live disk, and copy the files from your backup back to /boot of your install.

How to Reinstall apache2 properly in GNU/Linux

If you have issues with apache2 and you want to reinstall it but you are getting errors,then here it isthe solution for you.

i had an issue with apache, when i tried to start it i got this error message.

 /etc/init.d/apache2   start.: 45: Can't open /etc/apache2/envvars

i need to remove it completely.To do that i will use this command :

 sudo apt-get remove --purge apache2 apache2-utils
This command will completely remove all apache2 configuration files and directories.
– Reinstall again apache using the normal command
sudo apt-get install apache2

How to configure RAID in Debian Squeeze

Purpose of RAID

Improve read/write performance and ensure redundancy in case of a hard disk failure.

RAID levels

Raid levels can be known in detail from wikipedia


cat /proc/mdstat

If there are any RAID devices present, they will be shown in the terminal…like this

md2 : active raid1 sda4[0] sdb4[1]

md1 is a RAID 1 (mirror) device, spanning sda4 and sdb4 partitions. This device is active and mounted. If it were not used, it would have been listed under unused devices further below.

458111864 blocks super 1.2 [2/2] [UU]

[2/2] [UU ]  – tells us both partitions are used.

if  it appears like this  [1/2]  or [U_] then you have a degraded RAID array.

Do manual partition and make partitions as per you need

edit partitions and select use as physical volume for raid

repeat this for all partitions and make all partitions physical volume for raid

Then select Configure Software Raid

Then select write changes to disk if correct

the next step is to create a new MD device.Choose Create MD device


Then choose the raid type you want

Choose no of devices

need to decide how many (active) devices will participate in the its two

The next step is to choose spares here its zero

Next choose devices we need to select which devices we want to use. For the first device, we’ll use sda1 and sdb1.

repeat the procedure for the other two devices

Now select root ,swap and home partitions….

Then installation begins………….

After  installation boot up to your system open terminal and type

cat  /proc/mdstat

SimpleHTTPServer using python

Python provides a simple http server so that you can share a specific folder on your network..Navigate tho the directory which you want to share using cd command… Now type this command in the terminal

python -m SimpleHTTPServer 7000

The command is case sensitive…no the content of the folder can be accessed by the entire network through web browser by typing by typing

http://<ip address of your machine>:<portnumber>  where port number is the 7000 we entered in command we can change the port number….