# Installing rt2500 wireless card driver on 2006.1

## lazaruX

Hi all, I installed gentoo last night so I'm very newb to this OS. I'm trying to install the rt2500 driver for my edimax wireless net card. I read the wireless networks section of the gentoo handbook as well as other links explaining how to install the rt2500 driver. The problem is that I can't use emerge to install packages from internet because I don't have an internet conection set on gentoo on this computer (for instance, when I execute 'emerge net-wireless/wpa_supplicant' it tries to fetch the packages from the net but, of course, it cannot grab them). So I booted ubuntu, went to http://distfiles.gentoo.org/distfiles/ and downloaded wpa_supplicant as well as wireless-tools and the rt2500 driver. The packages are in .tar.gz format, so shall I have to compile them my own, or is there a way to install them using some gentoo installer (if so, how to do it? how to install packages locally??; I tried running emerge to install these packages but I got a message telling me there were no ebuilds for these packages).

Oh, and another question: in order to install the rt2500 driver I need the genpatches-2.6.17-6.base.tar.bz2 package and the gentoo-sources-2.6.17-r5 kernel, but my kernel image is kernel-genkernel-x86-2.6.17-gentoo-r7 (note the difference between the *-r5 kernel and the *-r7 one, my current one); so doesn't it matter that the kernel source emerge is trying to install doesn't completely match my current kernel??

Thanks in advance, and please excuse my ignorance regarding gentoo; I've used other distros, but this is the first time I use this OS.

----------

## Hagar

Don't try to install anything on your own, you really should use portage/emerge for that.

Things will get very ugly if you don't stick to the package manager (there's no need to use Gentoo if you don't use it)

You can get a list of files emerge needs to build a package, download and put them in /usr/portage/distfiles/

emerge -pf <package_name>

rt2500 driver is supplied by the package net-wireless/rt2500, this should be in portage.

To install the rt2500 driver, it needs to compile against the kernel source.

So if you don't want to change your kernel version, you will need to get the correct source.

How did you end up with a newer kernel then is available in portage anyway?

----------

## lazaruX

Hi Hagar, thanks for your answer and sorry for the late reply, I was at work. I put all the necessary files inside /usr/portage/distfiles and ran emerge -pf rt2500 and this is what I got:

```
# emerge -pf rt2500

These are the packages that would be fetched, in order:

Calculating dependencies... done!

http://distfiles.gentoo.org/distfiles/genpatches-2.6.17-6.base.tar.bz2

***Long list of servers containing the package***

http://distfiles.gentoo.org/distfiles/linux-2.6.17.tar.bz2

...

http://distfiles.gentoo.org/distfiles/genpatches-2.6.17-6.extras.tar.bz2

...

http://distfiles.gentoo.org/distfiles/wireless_tools.28.tar.gz

...

http://distfiles.gentoo.org/distfiles/rt2500-1.1.0-b4.tar.gz

...
```

Ok, so now I have a question: now that I know which packages I need to install the rt2500 driver, how can I install them locally?? (I already have them inside /usr/portage/distfiles).

Thanks in advance.

P.S.: Oh, and about my kernel version, I just selected the 'standard' kernel image when installing gentoo; the only one available on the networkless installation, I think... 'uname -r' gives me this: 2.6.17-gentoo-r7

----------

## Hagar

The purpose of `emerge -pf rt2500` was to show you which files you need to compile rt2500 and it's dependencies.

Run `emerge rt2500` to actually compile/install the package.

You used the livecd installer?

I'm not familiar with it so I'm kinda flying blind.

----------

## lazaruX

Hi, if I just run 'emerge rt2500' I get the following output (very long):

```
# emerge rt2500

Calculating dependencies... done!

>>> Emerging (1 of 3) sys-kernel/gentoo-sources-2.6.17-r5 to /

>>> Downloading http://distfiles.gentoo.org/distfiles/genpatches-2.6.17-6.extras.tar.bz2

--23:09:42--  http://distfiles.gentoo.org/distfiles/genpatches-2.6.17-6.extras.tar.bz2

           => `/usr/portage/distfiles/genpatches-2.6.17-6.extras.tar.bz2'

Resolving distfiles.gentoo.org... failed: Temporary failure in name resolution.

>>> Downloading http://distro.ibiblio.org/pub/linux/distributions/gentoo/distfiles/genpatches-2.6.17-6.extras.tar.bz2

--23:09:42--  http://distro.ibiblio.org/pub/linux/distributions/gentoo/distfiles/genpatches-2.6.17-6.extras.tar.bz2

           => `/usr/portage/distfiles/genpatches-2.6.17-6.extras.tar.bz2'

Resolving distro.ibiblio.org... failed: Temporary failure in name resolution.

>>> Downloading http://mirrors.tds.net/gentoo/distfiles/genpatches-2.6.17-6.extras.tar.bz2

--23:09:42--  http://mirrors.tds.net/gentoo/distfiles/genpatches-2.6.17-6.extras.tar.bz2

           => `/usr/portage/distfiles/genpatches-2.6.17-6.extras.tar.bz2'

Resolving mirrors.tds.net... failed: Temporary failure in name resolution.

>>> Downloading http://ftp.gentoo.or.kr/distfiles/genpatches-2.6.17-6.extras.tar.bz2

--23:09:42--  http://ftp.gentoo.or.kr/distfiles/genpatches-2.6.17-6.extras.tar.bz2

           => `/usr/portage/distfiles/genpatches-2.6.17-6.extras.tar.bz2'

Resolving ftp.gentoo.or.kr... failed: Temporary failure in name resolution.

>>> Downloading http://ftp.snt.utwente.nl/pub/os/linux/gentoo/distfiles/genpatches-2.6.17-6.extras.tar.bz2

--23:09:42--  http://ftp.snt.utwente.nl/pub/os/linux/gentoo/distfiles/genpatches-2.6.17-6.extras.tar.bz2

           => `/usr/portage/distfiles/genpatches-2.6.17-6.extras.tar.bz2'

Resolving ftp.snt.utwente.nl... failed: Temporary failure in name resolution.

>>> Downloading http://open-systems.ufl.edu/mirrors/gentoo/distfiles/genpatches-2.6.17-6.extras.tar.bz2

--23:09:42--  http://open-systems.ufl.edu/mirrors/gentoo/distfiles/genpatches-2.6.17-6.extras.tar.bz2

           => `/usr/portage/distfiles/genpatches-2.6.17-6.extras.tar.bz2'

Resolving open-systems.ufl.edu... failed: Temporary failure in name resolution.

>>> Downloading ftp://ftp.rez-gif.supelec.fr/pub/Linux/distrib/gentoo/distfiles/genpatches-2.6.17-6.extras.tar.bz2

--23:09:42--  ftp://ftp.rez-gif.supelec.fr/pub/Linux/distrib/gentoo/distfiles/genpatches-2.6.17-6.extras.tar.bz2

           => `/usr/portage/distfiles/genpatches-2.6.17-6.extras.tar.bz2'

Resolving ftp.rez-gif.supelec.fr... failed: Temporary failure in name resolution.

>>> Downloading http://distro.ibiblio.org/pub/linux/distributions/gentoo/distfiles/genpatches-2.6.17-6.extras.tar.bz2

--23:09:42--  http://distro.ibiblio.org/pub/linux/distributions/gentoo/distfiles/genpatches-2.6.17-6.extras.tar.bz2

           => `/usr/portage/distfiles/genpatches-2.6.17-6.extras.tar.bz2'

Resolving distro.ibiblio.org... failed: Temporary failure in name resolution.

>>> Downloading http://gentoo.mirrors.pair.com/distfiles/genpatches-2.6.17-6.extras.tar.bz2

--23:09:42--  http://gentoo.mirrors.pair.com/distfiles/genpatches-2.6.17-6.extras.tar.bz2

           => `/usr/portage/distfiles/genpatches-2.6.17-6.extras.tar.bz2'

Resolving gentoo.mirrors.pair.com... failed: Temporary failure in name resolution.

>>> Downloading ftp://ftp.tu-clausthal.de/pub/linux/gentoo/distfiles/genpatches-2.6.17-6.extras.tar.bz2

--23:09:42--  ftp://ftp.tu-clausthal.de/pub/linux/gentoo/distfiles/genpatches-2.6.17-6.extras.tar.bz2

           => `/usr/portage/distfiles/genpatches-2.6.17-6.extras.tar.bz2'

Resolving ftp.tu-clausthal.de... failed: Temporary failure in name resolution.

>>> Downloading ftp://cudlug.cudenver.edu/pub/mirrors/distributions/gentoo/distfiles/genpatches-2.6.17-6.extras.tar.bz2

--23:09:42--  ftp://cudlug.cudenver.edu/pub/mirrors/distributions/gentoo/distfiles/genpatches-2.6.17-6.extras.tar.bz2

           => `/usr/portage/distfiles/genpatches-2.6.17-6.extras.tar.bz2'

Resolving cudlug.cudenver.edu... failed: Temporary failure in name resolution.

>>> Downloading http://cudlug.cudenver.edu/gentoo/distfiles/genpatches-2.6.17-6.extras.tar.bz2

--23:09:42--  http://cudlug.cudenver.edu/gentoo/distfiles/genpatches-2.6.17-6.extras.tar.bz2

           => `/usr/portage/distfiles/genpatches-2.6.17-6.extras.tar.bz2'

Resolving cudlug.cudenver.edu... failed: Temporary failure in name resolution.

>>> Downloading ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo/distfiles/genpatches-2.6.17-6.extras.tar.bz2

--23:09:42--  ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo/distfiles/genpatches-2.6.17-6.extras.tar.bz2

           => `/usr/portage/distfiles/genpatches-2.6.17-6.extras.tar.bz2'

Resolving ftp.gtlib.cc.gatech.edu... failed: Temporary failure in name resolution.

>>> Downloading http://gentoo.oregonstate.edu/distfiles/genpatches-2.6.17-6.extras.tar.bz2

--23:09:42--  http://gentoo.oregonstate.edu/distfiles/genpatches-2.6.17-6.extras.tar.bz2

           => `/usr/portage/distfiles/genpatches-2.6.17-6.extras.tar.bz2'

Resolving gentoo.oregonstate.edu... failed: Temporary failure in name resolution.

>>> Downloading ftp://lug.mtu.edu/gentoo/source/distfiles/genpatches-2.6.17-6.extras.tar.bz2

--23:09:42--  ftp://lug.mtu.edu/gentoo/source/distfiles/genpatches-2.6.17-6.extras.tar.bz2

           => `/usr/portage/distfiles/genpatches-2.6.17-6.extras.tar.bz2'

Resolving lug.mtu.edu... failed: Temporary failure in name resolution.

>>> Downloading ftp://gentoo.mirrored.ca/distfiles/genpatches-2.6.17-6.extras.tar.bz2

--23:09:42--  ftp://gentoo.mirrored.ca/distfiles/genpatches-2.6.17-6.extras.tar.bz2

           => `/usr/portage/distfiles/genpatches-2.6.17-6.extras.tar.bz2'

Resolving gentoo.mirrored.ca... failed: Temporary failure in name resolution.

>>> Downloading ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo/distfiles/genpatches-2.6.17-6.extras.tar.bz2

--23:09:42--  ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo/distfiles/genpatches-2.6.17-6.extras.tar.bz2

           => `/usr/portage/distfiles/genpatches-2.6.17-6.extras.tar.bz2'

Resolving ftp.snt.utwente.nl... failed: Temporary failure in name resolution.

>>> Downloading ftp://ftp.oregonstate.edu/pub/gentoo/distfiles/genpatches-2.6.17-6.extras.tar.bz2

--23:09:42--  ftp://ftp.oregonstate.edu/pub/gentoo/distfiles/genpatches-2.6.17-6.extras.tar.bz2

           => `/usr/portage/distfiles/genpatches-2.6.17-6.extras.tar.bz2'

Resolving ftp.oregonstate.edu... failed: Temporary failure in name resolution.

>>> Downloading http://gentoo.mirrored.ca/distfiles/genpatches-2.6.17-6.extras.tar.bz2

--23:09:43--  http://gentoo.mirrored.ca/distfiles/genpatches-2.6.17-6.extras.tar.bz2

           => `/usr/portage/distfiles/genpatches-2.6.17-6.extras.tar.bz2'

Resolving gentoo.mirrored.ca... failed: Temporary failure in name resolution.

!!! Couldn't download genpatches-2.6.17-6.extras.tar.bz2. Aborting.

localhost ~ #
```

(Sorry for the long output).

The weird thing is that all the necessary files are in /usr/portage/distfiles as (I suppose) they should and emerge marks them with an arrow in the output as you can see. The only package that's not in /usr/portage/distfiles is 'gentoo-sources-2.6.17-r5' because I don't find it in the servers (and the other weird thing regardnig this is that it doesn't match my 2.6.17-gentoo-r7 kernel). Another weird thing I noticed is that when executing 'emerge rt2500' emerge looks for different packages than when executing 'emerge -pf rt2500' (with the first one, it looks for the 'gentoo-sources-2.6.17-r5' package and with the second one it looks for the 'linux-2.6.17.tar.bz2' package)

As for the method of installation, I used graphical installer of the livecd installer

----------

## Naib

do a emerge rt2500 -vp

THIS will tell you what you if you have teh requried files in /usr/portage/distfiles

from that output portage cannot find them and thus is trying to d/l them (I guess you are not connected and thus d/l the tgz file elseware)

----------

## suicidal_orange_II

Basically any files you get in output as "failed" manually download them and put them in /usr/portage/distfiles.

If I am reading right you had internet when you booted the livecd, there is nothing stopping you booting that again and chrooting, env-update && source /etc/profile and then downloading all the files (emerge -f rt2500) even if it wont compile against the livecd's kernel you can then reboot and install it

HTH

Suicidal_Orange

----------

## lazaruX

Hi, thank you both for your help. I was missing the 'genpatches-2.6.17-6.extras.tar.bz2' package in /usr/portage/distfiles (though I'd swear I had put it there :-s ); that was why emerge failed to find the package. After putting the file in the appropriate place emerge tried to install the packages, but failed telling me there was no .config file in /usr/src/linux, so I had to manually configure the kernel and reinstall the driver. The problem is that emerge installed the 2.6.17-gentoo-r5 kernel and my current kernel is 2.6.17-gentoo-r7 (well, it actually didn't installed because it didn't create the necessary files on /boot; just put it in /usr/src); so I can't boot the *-r5 kernel, and when I run 'ifconfig -a' or 'iwconfig', it doesn't find my wireless card, so I can't configure it. Regarding this, something that really puzzles me is why emerge is trying to install the *-r5 kernel when my current kernel is the *-r7 one... maybe because the way I installed gentoo??

suicidal_orange_II, as for your question, I didn't have internet when I booted the livecd because my wireless card was not recognized, that was why I selected the networkless installation (I'm writing this from ubuntu now). I'm thinking this will be easier if I wire my machine directly to the router and reinstall gentoo again in the standard mode (with network) and then try to install the drivers (well, I have to move my machine to another room to do this, so I think I'll do it on weekend with plenty of time).

Thank you again.

Regards.

----------

## Hagar

make sure you have debianutils installed, it contains a script that will automate the installation of kernel images.

```
emerge --noreplace debianutils
```

Then to compile/install the kernel run this in /usr/src/linux

```
make && make install modules_install
```

This will copy the kernel image to /boot and creates a symlink /boot/vmlinuz pointing to the new kernel.

if /boot/vmlinuz already exists it will be moved to /boot/vmlinuz.old

Configure grub/lilo to have 2 entries.

One that uses the /boot/vmlinuz kernel image and one for /boot/vmlinuz.old

With grub you'll never have to touch the config again when upgrading your kernel.

If you don't use cold/hotplug you can let the module load automatically on boot like this:

```
echo "rt2500" >> /etc/modules.autoload.d/kernel-2.6
```

reboot, you should be able to use your rt2500 card now.

----------

## lazaruX

Well, people, something really weird just happened while I was working with gentoo (not related to what we have discussed before): I compiled/installed the kernel in the way, then I mounted ubuntu to edit its menu.lst and add the necessary entries for gentoo so I could boot the new kernel; while I was doing it, all of a sudden the screen started to look blurred and as if it was vibrating with strange lines everywhere, so I guess for some reason the monitor refresh rates changed on their own. Now I don't want to boot gentoo because I'm afraid it can damage mi monitor (it's a HP, 19 inches LCD screen, btw). Anyone has any idea about what might be happening?? I'm really scared to boot gentoo now    :Shocked: 

----------

## Hagar

Was this in an X or console session?

For console:

Do you have any `vga=XXX` or `vesa=` lines?

If you do, try to remove them, you can do this by selecting the kernel in the grub boot menu and pressing 'e' to edit the entry.

Select the kernel line, press 'e' again, remove the options, press ESC and then 'b' to boot.

For X:

Do you use any custom modelines/modes in /etc/X11/xorg.conf?

If you do, comment them and let Xorg find some safe defaults.

If neither apply check the cable between your monitor and videocard.

And if that doesn't help, make sure the videocard is correctly mounted in the motherboard slot.

----------

## lazaruX

As for my xorg.conf, I haven't touched it since I installed gentoo. Anyway, I have this entry in the monitor section of the xorg.conf file:

```
# Auto-generated by mkxf86config

Section "Monitor"

        Identifier   "Monitor0"

        HorizSync    28.0 - 96.0

        VertRefresh  50.0 - 75.0

EndSection
```

The screen resolution is 1024x768 (the default), though in debian and ubuntu I have it set to 1280x1024 with no problems.

As for the console, you mean the options on my menu.lst?? I have the following entry for gentoo:

```
title=Gentoo Linux

root (hd0,9)

kernel /boot/kernel-genkernel-x86-2.6.17-gentoo-r7 root=/dev/ram0 init=/linuxrc

ramdisk=8192 real_root=/dev/hda10

initrd /boot/initramfs-genkernel-x86-2.6.17-gentoo-r7
```

So I don't think that's the problem. I guess I have to check the monitor cable and the videocard, but after it happened I rebooted to ubuntu and my monitor is working perfect here, so I guess it could be some configuration problem with gentoo...

----------

## Hagar

Copy the monitor section in /etc/X11/xorg.conf over from your ubuntu install then.

----------

## lazaruX

well, my ubuntu xorg.conf doesn't have the refresh rates set, only the DPMS option:

```
Section "Monitor"

        Identifier      "HP L1706"

        Option          "DPMS"

EndSection
```

Would it be safe to copy the monitor settings of the xorg.conf from ubuntu to gentoo?? (I also checked my Elive install and it doesn't have the refresh rates set either and it also shows the DPMS option)

Oh, and by the way, the monitor is only 17 inches, not 19 inches like I said above (got confused).

----------

## Hagar

Yes that would be fine.

----------

## lazaruX

Hi again, I'm almost there!! I finally fixed the graphics issue, booted the new kernel (*-rc5) and my wireless card was recognized like a charm by the new kernel (thank you all for your help in this matter), but now I'm having problems configuring the network. I followed the steps detailed in the gentoo handbook for wireless connections, but that didn't work for me; so I followed the steps detailed in http://gentoo-wiki.com/HARDWARE_rt2500 but when I execute '/etc/init.d/net.ra0 start' it finds my ESSID, it's channel, etc. and tries to connect but then it fails with the following error message: "* No DHCP client installed". So I edited /etc/conf.d/wireless and added the following: config_ra0=( "my_local_IP" ). After that, restarted the service and got mi local IP set. Sent a ping to my mother's computer and received packets back, but when I try to navigate and open a web site (google, for example) firefox tells me it can't find the site. Any clue on how to get tmy network working on gentoo?? Which package(s) should I install for the DHCP client issue??

Thanks in advance.

----------

## Hagar

You probably need to specify some dns servers (and a default route if you're behind a router).

```
dns_servers_ra0("<DNS IP>")

routes_ra0=("default via <ROUTER IP>")
```

I recommend net-misc/dhcpcd as dhcp client.

----------

## lazaruX

Yes!!! Thanks a lot, Hagar, I added the dns_server and the routes values to the /etc/conf.d/wireless file and it worked, so now I'm writing this from gentoo   :Very Happy: 

btw, I immediatly installed the dchpd package to fine tune the connection process.

Thank you all that helped me solve this problem   :Wink: 

Regards.

----------

