Monday, July 26, 2010

How to install AR8151 v1.0 Gigabit Ethernet driver on Fedora 13

Ive spent at least a month, just trying to get my wired connection work on an ACER Aspire 4745G running on Fedora 13. The linux driver for my AR8151 v1.0 Gigabit Ethernet LAN card was giving me nightmares! It was always telling me that the driver cannot be built since I was using an old version of the linux kernel (which was really annoying, mind you, since I was running the latest version of the linux kernel (2.6.33.6-147.fc13.i686)). So here's how I made it work, with lots of help from my colleagues.

Prerequisites (Thanks to Nikhil Pawar for this info):
1. Install kernel-devel and kernel-headers. Do this using the following command:
yum install kernel-devel kernel-headers
2. Install compilers. Do this using the following command:
yum install make automake autoconf gcc gcc-c++

Installation Steps:

1. Download the Atheros ethernet driver for linux from here. Download the file named AR81Family-Linux-v1.0.1.9.tar.gz
2. Extract the contents of the gzip file using the following command
tar zxvf AR81Family-Linux-v1.0.1.9.tar.gz
3. Become root using the following command
su
4. Enter the root password.
5. Navigate to the src directory of the extracted files by executing the following command.
cd src
6. Build the driver from source by executing the following command.
make
NOTE: If it complains about your kernel version being outdated / and / or not being the latest version, do the following:
6.a) Edit the MakeFile. (the one inside the src folder from the file that you extracted on step 2) Comment out the following lines by adding a # sign before all of the lines.
ifeq ($(KKVER), 0)
$(error *** Aborting the build.
*** This driver is not supported on kernel versions older than 2.4.0)
endif
After editing, the said lines should look like the following:
# ifeq ($(KKVER), 0)
# $(error *** Aborting the build.
# *** This driver is not supported on kernel versions older than 2.4.0)
# endif
6.b) Save the MakeFile.
6.c) Execute the make command again. Ignore the warnings that you see, they're annoying.
make
7. Install the driver by executing the following command.
make install
8. Inside the src folder. Find the file atl1e.ko. Copy it to the following folder.
/lib/modules/"your kernel version"/kernel/drivers/net/atl1e/
NOTE: Replace the text "your kernel version" with the version of your kernel. You can find that out by executing the following command:
uname -r
For example, in my machine:
[root@mybox src]$ uname -r

2.6.33.6-147.fc13.i686
So the command to copy my .ko file to the proper folder will be:
cp ./atl1e.ko /lib/modules/2.6.33.6-147.fc13.i686/kernel/drivers/net/atl1e/
9. Make your system automatically load the driver modules during system boot by executing the following command.
modprobe atl1e
NOTE: After executing the command above and you got an error that looks like the following:
[root@mybox ~]$ modprobe atl1e

FATAL: Module atl1e not found.
Do the following:
9.a) Execute the following command.
depmod -a
9.b) Create a .module file inside /etc/sysconfig/modules by executing the following command.
echo /sbin/modprobe atl1e >> /etc/sysconfig/modules/local.modules
9.c) Chmod the newly created module file to 755 by executing the following command
chmod 755 /etc/sysconfig/modules/local.modules
10. Restart your machine.

Thats it! That should do it! It worked on my machine, I hope it will work on yours too!
Please comment on this post for any questions!

UPDATE!

I upgraded my kernel version to 2.6.33.6-147.2.4.fc13.i686, if you upgraded yours too, you'll have to repeat the process above all over again, I'll try to find a way so we can avoid that, but for the meantime, repeating the process above will solve the problem.

For Fedora 14, please refer to Patrik Martinsson's blog post.

Friday, July 2, 2010

Creating and Editing Symbolic Links

Creating a Symbolic Link
To create a symbolic link, you can use the ln command. Usage is as follows:

ln -s targetFile symbolicLinkName

For example, to create a symbolic link named "mylink" in the current folder that targets the executable file "/usr/java/default/bin/java", execute the following command in your terminal:

ln -s /usr/java/default/bin/java mylink

Changing the target of a Symbolic Link without deleting the file

You can also use the ln command to change the target of an existing symbolic link by using ln's -f option. Usage is as follows:

ln -f -s newTargetFile symbolicLinkName

For example if you want to change the target of the symbolic link "/home/user/mylink" to "/usr/bin/gedit", execute the following command in your terminal:

ln -f -s /usr/bin/gedit /home/user/mylink