Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Unable to obtain a connection
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
abraxa5
n00b
n00b


Joined: 15 Aug 2012
Posts: 13

PostPosted: Wed Aug 15, 2012 6:50 am    Post subject: Unable to obtain a connection Reply with quote

I have very little linux/gentoo knoweldge. I just recently installed gentoo, and have no gui set up yet. I currently have no network connection, and when I do an ifconfig I get only the lo device, and with ifconfig -a i get lo and sit0. I am atempting to use an Alfa wnic (AWUS036H) which is usb. I have the drivers on a cd, but I am unable install them. Doing an ls -a within the driver directory results in these files:

Kconfig
Makefile
autoconf_rt18182c_usb_linux.h
autom4te.cache
clean
core
hal
ifcfg-wlan-
include
os_dep
runwpa
wlan0dhcp


Thank you
Back to top
View user's profile Send private message
wcg
Guru
Guru


Joined: 06 Jan 2009
Posts: 588

PostPosted: Wed Aug 15, 2012 7:57 am    Post subject: Reply with quote

When you say "drivers", do you mean the drivers directory
in /usr/src/linux?

Your first challenge would be finding out if the kernel is
seeing your network card over the usb bus. My first
choice for this would be a program called "lsusb",
part of the usbutils package. But if you don't have
network connectivity yet, your installation has not
reached the point where you can run emerge and
install packages like usbutils.

Have you installed a stage3 package yet? (I think maybe
not, but maybe you downloaded that when you downloaded
the install cd image.)

So let us find out if lsusb is installed. Try this (from a text mode
command prompt, like after logging in as root):
Code:

which lsusb


If it is installed, then "which" will tell you where on the path
it is found (and where on the path it is found first if there
happens to be more than "lsusb" installed). If it is not
installed, which will tell you that it cannot find it and where
it looked.

Alternatively, you can run
Code:

dmesg | less

after you have booted up your kernel and logged in.
That shows you the whole kernel boot log, and you can
see if anything in there looks like your usb network
device.

As a new user, there will be a ton of meaningless technical
gibberish in the output of both lsusb and dmesg. For people
familiar with the kernel and the usb subystems, though,
the output of these commands have some answers.

So have you ever used any other Linux distribution before,
just out of curiousity?
_________________
TIA
Back to top
View user's profile Send private message
DirtyHairy
l33t
l33t


Joined: 03 Jul 2006
Posts: 608
Location: Würzburg, Deutschland

PostPosted: Wed Aug 15, 2012 9:14 am    Post subject: Reply with quote

In linux, drivers are usually provided as part of the linux kernel. Only if no working in-kernel driver is available one should resort to external drivers, be they binary or source. A bit of googling suggests that your device is based on the RTL8187L chip which should be supported by the rtl818x driver in the kernel. You can find this driver in "Drivers->Network devices->Wireless LAN->Realtek 8187 and 8187B USB support" in menuconfig. Activate it in the configuration as either a part of the kernel or as a module and recompile your kernel.
Back to top
View user's profile Send private message
wcg
Guru
Guru


Joined: 06 Jan 2009
Posts: 588

PostPosted: Wed Aug 15, 2012 3:42 pm    Post subject: Reply with quote

Another question: what was the name of the install cd
that you originally downloaded?

I have only ever installed with one of the
"install-[cpu architecture]-minimal-[release].iso" images.
Perhaps my question about the stage3 did not make sense
in the context of a livecd image. The minimal installation cds
require downloading a "stage3" package and a "portage-latest"
package to finish the installation, and for that one needs
working internet networking connectivity after installing
the stage1 and stage2 parts from the minimal installation cd.

The livecd isos may be more complete, so lsusb may actually
be there already, and you can run it the same way that I suggested
running dmesg:
Code:

lsusb | less


(The "less" program is a text-mode pager. You can pipe the output of a
text-mode command to it and view the output a page at a time,
navigating forward and backward with the space bar, Page Up and
Page Down, and the arrow keys, search the output for a word, etc.
When you run
Code:

man lsusb

from a text-mode prompt, the man program formats manual
pages for the terminal in the background and pipes them into
a pager program, typically the "less" program.)

Code:

lsusb -v | less

would be the more "technically verbose" version of lsusb,
and
Code:

dmesg | less

might be considered the "technically extreme" alternative.

The livecd has most hardware drivers compiled as "loadable modules".
A probe program tests the hardware at boot and loads driver modules
for what hardware it finds. Typically, it loads the modules needed
to access your network hardware, and when you run network setup
during the initial installation, you get a working network connection.

Whether you continue to use loadable modules or built-in drivers
after compiling a kernel customized for your system, the device drivers
themselves are part of the linux kernel itself in 99%+ of all cases.
One usually finds out which device drivers are in use by a running
kernel with tools like "lspci", "lsusb", and so on.

(The windows system of downloading pre-compiled drivers from online
archives and loading them into a running kernel is extremely rare on linux.
The source code of the drivers is almost always already part of the kernel
source code, and it is compiled as part of a new kernel to make the drivers
available to the kernel at runtime. You choose which drivers your hardware
needs when configuring the linux kernel for compilation with
"make menuconfig" and its alternatives.)
_________________
TIA
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 42596
Location: 56N 3W

PostPosted: Wed Aug 15, 2012 5:05 pm    Post subject: Reply with quote

abraxa5,

Welcome to Gentoo.

As well as builing the kernel driver as other posters have suggested, you will need either or both of wireless-tools and wpa_supplicant to get connected.
You can get the sources for those tools on another system, then move them to your gentoo, or boot your gentoo with a CD that supports your networ, get into your chroot and emerge the packages normally.

Entering the chroot does not mean reinstalling.
Boot your CD/USB stick,
Mount all your partitions. mount /proc and /dev inside the chroot.
Copy over your /etc/reslov.conf
Do the three chroot steps.

Now you can fix your kernel and emerge the tools you need to connect.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
abraxa5
n00b
n00b


Joined: 15 Aug 2012
Posts: 13

PostPosted: Wed Aug 15, 2012 8:31 pm    Post subject: Reply with quote

the result of my lsusb is:
which: no lsub in (/usr/local/sbin:usr/local/bin:/usr/sbin:usr/bin:/sbin:/bin:opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/bin/4.5.3)

May I ask what may my usb device look like with a dsmeg | less look like?

The name of the install cd I used was: install-amd64-minimal-20120621.iso

And wcg,
Quote:
So have you ever used any other Linux distribution before,
just out of curiousity?

Yes, but only flirted with them. I have at most flirted with several distros, debian, backtrack 5, fedora 3, and Ubuntu (most of them only in a virtual machine to see which ones I liked). I decided I really wanted to learn linux, and after talking to a friend or two about it, they suggested going to gentoo, as using gentoo really forces one to learn the nuts and bolts of linux. Once you get a grasp of gentoo, one can use any other distro of linux with ease. I know Windows pretty well, and with a little research there is very few things I can't do that I desire. Linux drives me insane because I can't do things I take for granted on a day-to-day basis.

And NeddySeagoon,

Would the steps you are describing be:
1)Boot the live cd
2)from the boot: prompt boot a kernal
3)Mount my linux partition by using the mount -t /dev/sbc1 /dev/sbc2 /dev/sbc3
4) Where do I copy the /etc/reslov.conf to and from?
5)chroot /mnt/gentoo /bin/bash
6)env-update
7)source /etc/profile
8)export PS1="(chroot) $PS1"

And after I do that, where should I begin?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 42596
Location: 56N 3W

PostPosted: Wed Aug 15, 2012 8:54 pm    Post subject: Reply with quote

abraxa5,

Code:
1)Boot the live cd
2)from the boot: prompt boot a kernal
is correct.
The order in which you mount your partitions is important, I'don't have the information to tell which is which.
Mount exactly as you did when you installed.
4) is detailed in the handbook see coad listing 1.3
Don't forget to mount /proc and /dev either or lots of things won't work in the chroot.
Code:
5)chroot /mnt/gentoo /bin/bash
6)env-update
7)source /etc/profile
8)export PS1="(chroot) $PS1"
is correct - thats code listing 1.5 from my link above.

This entire process is called chrooting. You will get quite good at it :).

What next depends on the CD you are booting with. If you have networking,
Code:
emerge wgetpaste pciutils usbutils wireless-tools wpa_supplicant dhcpcd -av

This gets you some useful userspace tools.
wgetpaste puts things on a pastebin for you (needs networking)
pciutils shows information about devices on your PCI/AGP/PCIe/PCIx busses
usbutils shows information about usb devices
wireless-tools provides dianostic information aout wireless interfaces. It can connect using WEP too.
wpa_supplicant provides wireless association with WPa and WPA2 wireless networks, it will also do WEP.
dhcpcd sets up your network once te wireless is associated.

If you don't have networking, you have a few choices.
a) Get a different boot CD, like System Rescue CD, so your wireless can be made to work. You will need a wpa_supplicant.conf file
b) Change the -av to -pf in the emerge command above and fetch all files in the list it gives you onto a USB stick, so you can move them to /usr/portage/distfiles
With the distfiles installed, emerge will not need the internet to build those packages.

--- edit ---

You could take a flier and fix your kernel to include the driver for your USB wireless device too.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
abraxa5
n00b
n00b


Joined: 15 Aug 2012
Posts: 13

PostPosted: Thu Aug 16, 2012 6:38 pm    Post subject: Reply with quote

Thanks guys, I decided just to reinstall, my Ethernet worked right from the start, and I was able to get my wnic to work. I should be able to get wpa_supplicant to work as it seems standard, and there is good documentation out there.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum