全部博文(362)
分类: LINUX
2009-12-17 15:19:17
Sometimes you’ll have to update your Linux kernel. Not very often, but sometimes anyway
If, like me, you use a mainboard with a builtin Realtek ethernet controller, chances are that after installing your new kernel, the ethernet controller doesn’t come up. The problem is that your Linux kernel doesn’t have the correct module/driver.
You can very easily compile and install the driver by hand, but I tend to forget that and start wondering why things aren’t working
I’ve written a small script that checks to see if the correct kernel module exists. If not, it compiles the module and restarts the network services.
It’s compatible with CentOS 4(.5) and 5, but will most likely work with all Red Hat derivates.
Download the drivers and extract them in /usr/src like this:
cd /usr/src
tar xzf where-you-put-the-tgz-file/realtek_r1000.tgz
Copy the script to a location that makes sense to you (the script assumes /usr/src/LAN):
cp where-you-put-the-script/r1000.sh /usr/src/LAN
Edit your /etc/rc.d/rc.local to execute the r1000.sh file on system boot.
That should do the trick!
The drivers I’ve included with this post will work for RTL8169S/SB/SC, RTL8168B and RTL8101E chipsets.
#cd /usr/src
#tar xvf realtek_r1000.tgz
#chmod 777 r1000.sh
#./r1000.sh
这样子就可以有eth的接口了,要把网线接到网卡上哦。
#ifconfig下就有eth的接口了。r1000.sh和realtek_r1000.tgz如下。
|