Once I got Debian 6 installed on my server I needed to connect it to the internet to download updates etc, however my network card wasn’t being detected correctly so I had to perform the following steps to get it to work correctly:
uname -a
It will give you a result like the following:
Linux StarKnight 2.6.30-2-686 #1 SMP Sat Aug 27 16:41:03 UTC 2011 i686 GNU/Linux
Now you need to install the kernel source code for this version on the server. First we need to find the package name of the kernel source code, we do that by running the following command:
apt-cache search linux |grep header |grep 2.6
If you have a 2.4.x kernel, replace grep 2.6 with grep 2.4. Once you have the package name install it using the following command as root:
apt-get install linux-headers-2.6.30-2-686
Make sure you replace linux-headers-2.6.30-2-686 with the package name you got.
Once we have the kernel source installed we can go ahead and install the driver using the following commands:
tar -jxvf r8168-8.025.00.tar.bz cd r8168-8.025.00 ./autorun.sh
This will compile the drive and install it. I didn’t get any errors when I ran it, but if you do get errors try searching for the error message on Google, it usually provides a solution.
After I installed the driver I tried initializing my network but kept getting the following error message:
StarKnight:~# ifdown eth0 ifdown: interface eth0 not configured StarKnight:~# ifup eth0 Ignoring unknown interface eth0=eth0.
Fixing it was fairly simple though, all I had to do was edit the /etc/network/interfaces file and add the following lines to it (This assumes you are using DHCP):
auto eth0 iface eth0 inet dhcp
Once you add the lines, you can try starting the network again using the command:
ifup eth0
If all went well, you will be assigned an IP address and will now be able to successfully browse the net.
Hope this helped.
– Suramya
This was a lifesaver – even nearly 2 years on from writing it. Thank you!
System – Linux Mint 14
Comment by Stilez — June 4, 2013 @ 7:08 PM
Glad to hear that. Gives me incentive to start posting again on a regular basis 🙂
– Suramya
Comment by Suramya — June 9, 2013 @ 11:24 AM