# Help I am missing net.eth0 net.lo

## jrmontg

I am trying to enable my wireless card.  I am following a guide that tells me to 

you need to symlink to net.lo instead of net.eth0 

I don't have either.  

I followed the setup guide that told me to 

# cd /etc/init.d

# ln -s net.eth0 net.eth1

# rc-update add net.eth1 default

I do have that file with its contents.

net.eth1

----------

# Copyright 1999-2005 Gentoo Foundation

# Distributed under the terms of the GNU General Public License v2

# $Header: $

How to I get these files?

----------

## Sadako

What is the output of ifconfig and "/etc/init.d/net.lo status"?

----------

## jrmontg

mako conf.d #  ifconfig

eth0      Link encap:Ethernet  HWaddr 00:02:B3:BF:61:61

          inet addr:192.168.5.101  Bcast:192.168.5.255  Mask:255.255.255.0

          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:97050 errors:0 dropped:0 overruns:0 frame:0

          TX packets:72276 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:64279163 (61.3 Mb)  TX bytes:12353340 (11.7 Mb)

eth1      Link encap:Ethernet  HWaddr 00:40:05:39:AF:97

          inet addr:192.168.5.8  Bcast:192.168.5.255  Mask:255.255.255.0

          UP BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

          Interrupt:11 Base address:0xc000

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

mako conf.d # /etc/init.d/net.lo status

 * status:  started

I can ssh to 192.168.5.8 and 192.168.5.101(DHCP'd)

----------

## RayDude

 *jrmontg wrote:*   

> I am trying to enable my wireless card.  I am following a guide that tells me to 
> 
> you need to symlink to net.lo instead of net.eth0 
> 
> I don't have either.  
> ...

 

Have you emerged the latest baselayout?

You need the latest to use the wireless features of sysvinit.

```
*  sys-apps/baselayout

      Latest version available: 1.11.12-r4 <-- You need this version

      Latest version installed: 1.9.4-r6 <- This is the stable version

      Size of downloaded files: 152 kB

      Homepage:    http://www.gentoo.org/

      Description: Filesystem baselayout and init scripts

      License:     GPL-2
```

The way to do this is:

```
echo sys-apps/baselayout ~x86 >> /etc/portage/package.keywords

emerge -v baselayout
```

Raydude

----------

## jrmontg

I got this

mako conf.d # echo sys-apps/baselayout ~x86 >> /etc/portage/package.keywords

mako conf.d # emerge -v baselayout

Calculating dependencies -

!!! All ebuilds that could satisfy ">=sys-libs/readline-5.0-r1" have been masked.

!!! One of the following masked packages is required to complete your request:

- sys-libs/readline-5.0-r2 (masked by: ~x86 keyword)

For more information, see MASKED PACKAGES section in the emerge man page or

section 2.2 "Software Availability" in the Gentoo Handbook.

!!!    (dependency required by "sys-apps/baselayout-1.11.12-r4" [ebuild])

----------

## RayDude

 *jrmontg wrote:*   

> I got this
> 
> mako conf.d # echo sys-apps/baselayout ~x86 >> /etc/portage/package.keywords
> 
> mako conf.d # emerge -v baselayout
> ...

 

Oh, I forgot, do this:

```
echo sys-libs/readline ~x86 >> /etc/portage/package.keywords

emerge -v baselayout
```

Raydude

----------

## jrmontg

About the same

mako conf.d # echo sys-apps/baselayout ~x86 >> /etc/portage/package.keywords

mako conf.d # emerge -v baselayout

Calculating dependencies -

!!! All ebuilds that could satisfy ">=sys-libs/readline-5.0-r1" have been masked.

!!! One of the following masked packages is required to complete your request:

- sys-libs/readline-5.0-r2 (masked by: ~x86 keyword)

For more information, see MASKED PACKAGES section in the emerge man page or

section 2.2 "Software Availability" in the Gentoo Handbook.

!!!    (dependency required by "sys-apps/baselayout-1.11.12-r4" [ebuild])

mako conf.d #

mako conf.d # echo sys-libs/readline ~x86 >> /etc/portage/package.keywords

mako conf.d # emerge -v baselayout

Calculating dependencies \

!!! All ebuilds that could satisfy ">=sys-apps/sysvinit-2.84" have been masked.

!!! One of the following masked packages is required to complete your request:

- sys-apps/sysvinit-2.85-r1 (masked by: ~x86 keyword)

- sys-apps/sysvinit-2.86 (masked by: ~x86 keyword)

For more information, see MASKED PACKAGES section in the emerge man page or

section 2.2 "Software Availability" in the Gentoo Handbook.

!!!    (dependency required by "sys-apps/baselayout-1.11.12-r4" [ebuild])

----------

## MrApples

heh, now you need to

```
echo sys-apps/sysvinit ~x86 >> /etc/portage/package.keywords

emerge -v baselayout
```

follow the same protocol for others

----------

## jrmontg

mako conf.d # echo sys-apps/sysvinit ~x86 >> /etc/portage/package.keywords

mako conf.d # emerge -v baselayout

Calculating dependencies |

!!! All ebuilds that could satisfy ">=app-shells/bash-3.0-r10" have been masked.

!!! One of the following masked packages is required to complete your request:

- app-shells/bash-3.0-r11 (masked by: ~x86 keyword)

For more information, see MASKED PACKAGES section in the emerge man page or

section 2.2 "Software Availability" in the Gentoo Handbook.

!!!    (dependency required by "sys-apps/baselayout-1.11.12-r4" [ebuild])

----------

## overkll

jrmontg

You get the idea now?  Every one of the blocked packages is a dependency of the baselayout package.  Keep going....you are almost there.....bash should be the last one.....

echo "app-shells/bash ~x86" >> /etc/portage/package.keywords

emerge baselayout

Nextime you want to emerge a masked package, you can check the dependencies first, then manually add them to your /etc/portage/package.keywords file

ACCEPT_KEYWORDS="~x86" emerge baselayout -p

```
polly linux # ACCEPT_KEYWORDS="~x86" emerge baselayout -p

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild     U ] sys-libs/readline-5.0-r2 [4.3-r5]

[ebuild  N    ] sys-apps/sysvinit-2.86

[ebuild     U ] app-shells/bash-3.0-r11 [2.05b-r9]

[ebuild     U ] sys-apps/baselayout-1.11.12-r4 [1.9.4-r6]
```

----------

## jrmontg

ok...I see how that works, thanks.

I have those installed now.  

This is what I have in my  /etc/init.d so its there.

bootmisc     crypto-loop   halt.sh   localmount  netmount   rsyncd        syslog-ng

checkfs      depscan.sh    hdparm    modules     nscd       runscript.sh  urandom

checkroot    domainname    hostname  net.eth0    numlock    serial        vixie-cron

clock        functions.sh  keymaps   net.eth1    reboot.sh  shutdown.sh

consolefont  gpm           local     net.lo      rmnologin  sshd

Following the instructions

 *Quote:*   

> 
> 
>  Then symlink any net.* devices to net.lo instead of net.eth0 
> 
> 

 

So I did a 

mako init.d # ln -f net.lo net.eth1

mako init.d # ln -f net.lo net.eth0

do I do the same for net.ath0?[/code]

----------

## jrmontg

I went ahead and did it and I did a 

mako init.d # vi /etc/conf.d/net

mako init.d # /etc/init.d/net.ath0 start

 * Caching service dependencies ...                                                         [ ok ]

 * Bringing ath0 up ...                                                                     [ ok ]

but it is not showing up

mako init.d # ifconfig -a

eth0      Link encap:Ethernet  HWaddr 00:02:B3:BF:61:61

          inet addr:192.168.5.101  Bcast:192.168.5.255  Mask:255.255.255.0

          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:108486 errors:0 dropped:0 overruns:0 frame:0

          TX packets:83853 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:69937674 (66.6 Mb)  TX bytes:13577885 (12.9 Mb)

eth1      Link encap:Ethernet  HWaddr 00:40:05:39:AF:97

          inet addr:192.168.5.8  Bcast:192.168.5.255  Mask:255.255.255.0

          UP BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

          Interrupt:11 Base address:0xc000

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

mako init.d # iwconfig

lo        no wireless extensions.

eth0      no wireless extensions.

eth1      no wireless extensions.

----------

## RayDude

 *jrmontg wrote:*   

> I went ahead and did it and I did a 
> 
> mako init.d # vi /etc/conf.d/net
> 
> mako init.d # /etc/init.d/net.ath0 start
> ...

 

Please post /etc/conf.d/net so we can check it over.

Do you have WEP or WPA enabled on your wireless network?

Raydude

----------

## overkll

 *Quote:*   

> So I did a
> 
> mako init.d # ln -f net.lo net.eth1
> 
> mako init.d #ln -f net.lo net.eth0

 

Woah, backup sparky! I think you just terminated your net.eth0 file!

Do:

```
ls -l /etc/init.d/net*
```

What you got there?  Full output please.

----------

## jrmontg

 *Quote:*   

> Woah, backup sparky! I think you just terminated your net.eth0 file!
> 
> Do: 

 

Yep, I did.   

Is there a way to restore?

----------

## overkll

emerge baselayout

----------

## jrmontg

I don't have a working interface anymore

----------

## overkll

DOH!  That makes sense.

You should still have the necessary files on your machine to install w/o a connection.  Portage saves downloaded dist files in /usr/portage/distfiles.  Did you try?

----------

## RayDude

 *jrmontg wrote:*   

> I don't have a working interface anymore

 

You can't boot from CD and do a chroot? I don't know what you mean by working interface...

Make sure you delete net.lo, net.ath0, and net.eth0 before doing the emerge baselayout.

And don't forget to do your etc-update if necessary.

Raydude

----------

## jrmontg

Ok I am where I was at the start.

I did the following

```

echo "=sys-apps/baselayout-1.11.0 ~x86" >> /etc/portage/package.keywords

emerge sync

emerge -av sys-apps/baselayout

etc-update

```

I have 

livecd conf.d # ifconfig

eth0      Link encap:Ethernet  HWaddr 00:02:B3:BF:61:61

          inet addr:192.168.5.101  Bcast:192.168.5.255  Mask:255.255.255.0

          inet6 addr: fe80::202:b3ff:febf:6161/64 Scope:Link

          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:137801 errors:0 dropped:0 overruns:0 frame:0

          TX packets:85096 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:75921398 (72.4 Mb)  TX bytes:23681962 (22.5 Mb)

eth1      Link encap:Ethernet  HWaddr 00:40:05:39:AF:97

          inet addr:192.168.5.8  Bcast:192.168.5.255  Mask:255.255.255.0

          inet6 addr: fe80::240:5ff:fe39:af97/64 Scope:Link

          UP BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:5 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:0 (0.0 b)  TX bytes:378 (378.0 b)

          Interrupt:11 Base address:0xc000

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

I did this

livecd conf.d # ls -l /etc/init.d/net*

-rwxr-xr-x  1 root root 9776 Jun  2 09:47 /etc/init.d/net.eth0

-rwxr-xr-x  1 root root 9776 Jun  2 08:35 /etc/init.d/net.eth0.copy

lrwxrwxrwx  1 root root    8 Jun  2 08:35 /etc/init.d/net.eth1 -> net.eth0

-rwxr-xr-x  1 root root  512 Jun  2 09:47 /etc/init.d/net.lo

-rwxr-xr-x  1 root root 2520 Jun  2 09:47 /etc/init.d/netmount

I still don't think I did it right.  I cannot find wireless.example.  The guide said that it would be in /etc/conf.d

----------

## overkll

From your ifconfig output, looks like you have two interfaces up, eth0 and eth1.  both have an ip address assigned to them and both are up.  From the output of ls -l /etc/init.d/net*, net.eth1 is a symlink linked to net.eth0.  This doesn't work?

I have some questions.

Are you looking the file /etc/conf.d/net?  This is the networking configuration file.

What kind of wireless card are you using?

What package/module/software are you using?

What guide are you following?

Do you have a Gentoo base system installed already or are you trying to do a network install by getting you wireless up first?

What's the output of iwconfig?

FYI, The command

```
echo package-category/package ~x86" >> /etc/portage/package.keyword
```

only needs to be done once per package.  You can view/edit the file /etc/portage/package.keywords with

```
nano -w /etc/portage/package.kewords
```

----------

## jrmontg

livecd dhcp # iwconfig

lo        no wireless extensions.

eth0      no wireless extensions.

eth1      no wireless extensions.

sit0      no wireless extensions.

eth0 is a 8139too

eth1 is a e100

I have a third card that is a D-Link DWL-G520

Here is the guide https://forums.gentoo.org/viewtopic.php?t=122435

but I just found this one

http://www.gentoo.org/doc/en/handbook/draft/handbook-x86.xml?part=4&chap=4

Not sure which I should follow

----------

## overkll

AFAIK, You DO need some type of driver for a wireless card, and it needs work for you specific card.  For example, I have an Hawking pci 54mb card based on the RaLink 2500 chip.  Luckily for me, RaLink has released there source code, and there's a good package in portage for it.  Most wireless chipsets code HAS NOT been released so you need to find a way to make it work by either using ndiswrapper with a windows driver for that chip, or another method.

Basically, the driver is a kernel module.  I don't know which you need to use with that card, but if I were you, I'd do a search on these forums with "DWL-G520".  I think your card is widely available at retail stores so I'm sure someone has figured out which driver/module to use, and how to get it to work.

Do you have a driver already?

----------

## jrmontg

I have used madwifi on a fedora server.  I guess I will try emerge madwifi

----------

## jrmontg

I emerged madwifi-drivers

I opened /etc/conf.d/net 

and added

iface_ath0="dhcp"

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

ap_scan=1

network={

	ssid="myinformation"

	psk="mypasswrd"

	# The higher the priority the sooner we are matched

	priority=5

}

then I ln -s net.eth0 net.ath1

then tried to bring the interface up:

/etc/init.d/net.ath0 start 

and got this

init.d # /etc/init.d/net.ath0 start

/sbin/runscript.sh: line 32: /var/lib/init.d/softlevel: No such file or directory

 * Bringing ath0 up via DHCP...                                           [ !! ]

----------

## RayDude

 *jrmontg wrote:*   

> I emerged madwifi-drivers
> 
> I opened /etc/conf.d/net 
> 
> and added
> ...

 

Strictly speaking your supposed to sym link net.ath0 and net.eth1 to net.lo, not net.eth0.

I don't understand the runscript.sh failure. Never seen it before.

Did you: 

```
modprobe ath-pci
```

 And it helps to add ath-pci to /etc/modules.autoload.d/kernel-2.6. I find if I don't do that wireless sometimes fails to start on boot up.

Here's how I configure my madwifi card. It's a biotch to setup, but works pretty well once its going.

/etc/wpa_supplicant.conf 

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

eapol_version=1

ap_scan=1

fast_reauth=1

network={

        ssid="SECRET_NET"

        scan_ssid=1

        proto=WPA

        key_mgmt=WPA-PSK

        pairwise=TKIP

        group=TKIP

        psk="Password_shh_its_a_secret"

# The higher the priority the sooner we are matched.

        priority=5

}
```

And here's my /etc/conf.d/net file:

```
iface_ath0="dhcp"

dhcpcd_ath0="-t 30 -N"

wpa_supplicant_ath0="-Dmadwifi"

modules=( "!iwconfig" "wpa_supplicant" )
```

Sounds like you are getting closer.

Raydude

----------

## jrmontg

I relinked the files and tried this

```

/ # modprobe ath-pci

WARNING: Error inserting ath_hal (/lib/modules/2.6.11-gentoo-r3/net/ath_hal.ko):

 Invalid module format

WARNING: Error inserting wlan (/lib/modules/2.6.11-gentoo-r3/net/wlan.ko): Inval

id module format

WARNING: Error inserting ath_rate_onoe (/lib/modules/2.6.11-gentoo-r3/net/ath_ra

te_onoe.ko): Invalid module format

FATAL: Error inserting ath_pci (/lib/modules/2.6.11-gentoo-r3/net/ath_pci.ko): I

nvalid module format

```

must be a kernel problem

----------

## RayDude

 *jrmontg wrote:*   

> I relinked the files and tried this
> 
> ```
> 
> / # modprobe ath-pci
> ...

 

gentoo-r3 is the boot cd kernel, isn't it?

The error message you are getting implies that the running kernel is not the same as the kernel you compiled the madwifi drivers against.

Wait a minute here, I'm confused. Have you booted your own kernel? What version do you have installed? Are you trying to emerge madwifi and run it while still in a chroot environment?

You need to boot to your kernel, I presume linux-2.6.11-gentoo-r9, because its the latest, you must have a symlink pointing to it: /usr/src/linux -> /usr/src/linux-2.6.11-gentoo-r9, and then you need to do an emerge madwifi-driver madwifi-tools.

You also have to install modules and kernel from /usr/src/linux with a "make install && make modules_install"

Does this help?

Raydude

----------

## jrmontg

wait, yes I have done a make install && make modules_install after choosing all of my kernel options  

I ls the file in usr

```

mako root # cd /usr/src/

mako src # ls

linux  linux-2.6.11-gentoo-r3

mako src #

```

I must be doing something wrong.  I had the instal disk from gentoo and followed the 2005 guide.

----------

## RayDude

Do me a favor. At the command promt type this and copy and paste the result into a post:

```
uname -a
```

This will tell me which kernel you are running.

Then, type this:

```
cd /usr/src

ls -las
```

And post the result, this will verify that linux is symlinked to gentoo-r3.

Now, assuming that all of that is correct, and I figure its got to be we just have to figure out why your emerge madwifi-driver madwifi-tools didn't link against the correct kernel version.

To be sure you are using the code in /usr/src (if you are using genkernel, you probably don't want to do this)

```
cd /usr/src/linux

mount /boot

make

make modules_install

make install
```

Then:

```
cd /boot

ls -las
```

Make sure you can see your kernel installed there: vmlinuz-2.6.11-gentoo-r3, and that vmlinuz is a symlink pointing to it

*** Here's my ls -las in /boot so you can compare. I have marked the important files that we're interested in ***

```
inductor boot # ls -las

total 6544

   4 drwxr-xr-x   4 root root    4096 May 31 16:14 .

   4 drwxr-xr-x  18 root root    4096 Jun  3 00:50 ..

   0 -rw-r--r--   1 root root       0 May 28 10:41 .keep

   0 lrwxrwxrwx   1 root root      27 May 31 16:14 System.map -> System.map-2.6.11-gentoo-r9

 880 -rw-r--r--   1 root root  893636 May 31 16:14 System.map-2.6.11-gentoo-r9

 876 -rw-r--r--   1 root root  891886 May 29 11:12 System.map-2.6.11-gentoo-r9.old

   0 lrwxrwxrwx   1 root root      31 May 31 16:14 System.map.old -> System.map-2.6.11-gentoo-r9.old

   0 lrwxrwxrwx   1 root root       1 May 28 02:25 boot -> .

   0 lrwxrwxrwx   1 root root      23 May 31 16:14 config -> config-2.6.11-gentoo-r9

  32 -rw-r--r--   1 root root   29292 May 31 16:14 config-2.6.11-gentoo-r9

  32 -rw-r--r--   1 root root   31936 May 29 11:12 config-2.6.11-gentoo-r9.old

   0 lrwxrwxrwx   1 root root      27 May 31 16:14 config.old -> config-2.6.11-gentoo-r9.old

1240 -rw-r--r--   1 root root 1265009 May 28 11:20 fbsplash-livecd-2005.0-1024x768

   4 drwxr-xr-x   2 root root    4096 May 28 11:34 grub

  16 drwx------   2 root root   16384 May 28 02:19 lost+found

********************************************************************************

   0 lrwxrwxrwx   1 root root      24 May 31 16:14 vmlinuz -> vmlinuz-2.6.11-gentoo-r9

1728 -rw-r--r--   1 root root 1765273 May 31 16:14 vmlinuz-2.6.11-gentoo-r9

********************************************************************************

1728 -rw-r--r--   1 root root 1764298 May 29 11:12 vmlinuz-2.6.11-gentoo-r9.old

   0 lrwxrwxrwx   1 root root      28 May 31 16:14 vmlinuz.old -> vmlinuz-2.6.11-gentoo-r9.old
```

Also make sure that the date on the vmlinuz-2.6.11-gentoo-r3 file is current (should just be minutes old), that is one way to know for sure that its really been installed as you expect. (mine is r9 and a couple of days old, May 31 16:14)

Then:

```
cd grub

nano -w grub.conf
```

Verify that your kernel is pointing to vmlinuz or vmlinuz-2.6.11-gentoo-r3. Your root drive should be correct assuming you can already boot the hard disk.

Now, once you are sure all of that is correct, do this:

```
echo "net-wireless/madwifi-driver ~x86" >> /etc/portage/package.keywords

echo "net-wireless/madwifi-tools ~x86" >> /etc/portage/package.keywords

emerge madwifi-driver madwifi-tools -p
```

This will output something that looks like this:

```
inductor boot # emerge madwifi-driver madwifi-tools -p

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild   R   ] net-wireless/madwifi-driver-0.1_pre20050420

[ebuild   R   ] net-wireless/madwifi-tools-0.1_pre20050420
```

In your case it will likely have an "U" after the word ebuild

Next, hit the up arrow and remove the -p from the end of the previous command:

```
emerge madwifi-driver madwifi-tools
```

This will install the latest madwifi driver and tools, you may need the latest version to get wireless working.

At this point type:

```
rc-update -s
```

Verify that net.ath0 is starting at the default run level, you'll see a line like this:

```
            net.ath0 |      default
```

If you don't have ath-pci in the kernel-2.6 file, then run this command:

```
 rc-update add net.ath0 default
```

If you get errors post them here.

Next confirm that you have ath-pci in /etc/modules.autoload.d/kernel-2.6:

```
cat /etc/modules.autoload.d/kernel-2.6

# /etc/modules.autoload.d/kernel-2.6:  kernel modules to load when system boots.

# $Header: /var/cvsroot/gentoo-src/rc-scripts/etc/modules.autoload.d/kernel-2.6,v 1.1 2003/07/16 18:13:45 azarah Exp $

#

# Note that this file is for 2.6 kernels.

#

# Add the names of modules that you'd like to load when the system

# starts into this file, one per line.  Comments begin with # and

# are ignored.  Read man modules.autoload for additional details.

# For example:

# 3c59x

ath-pci

i8k
```

If you don't have ath-pci, then you can add it this way:

```
echo ath-pci >> /etc/modules.autoload.d/kernel-2.6
```

Now, reboot and watch the start up sequence, you should get something like this:

(taken from memory, not exact)

Starting ath0

starting wpa on ath0 (if you have wpa enabled which you should, the sooner the better)

(big long pause)

dhcpcd ath0

received address w.x.y.z

If you get any error messages, copy them to a piece of paper, if X starts automatically switch back to console by pressing and holding CTRL and ALT and then Press F1.

To get back to X press and hold CTRL and ALT then press F7.

You may need the latest gentoo-sources, if this doesn't work I'll explain how to do that in another post.

Raydude

----------

## jrmontg

```

mako root # uname -a

Linux mako 2.6.11-gentoo-r3 #3 SMP Mon Jun 6 18:41:42 CDT 2005 i686 Pentium III (Coppermine) GenuineIntel GNU/Linux

```

```

mako src # ls -las

total 12

4 drwxr-xr-x   3 root root 4096 Jun  2 07:45 .

4 drwxr-xr-x  13 root root 4096 Jun  2 09:47 ..

0 -rw-r--r--   1 root root    0 Jun  2 09:47 .keep

0 lrwxrwxrwx   1 root root   22 Jun  2 07:45 linux -> linux-2.6.11-gentoo-r3

4 drwxr-xr-x  19 root root 4096 Jun  6 18:41 linux-2.6.11-gentoo-r3

```

I did not use genkernel

 *Quote:*   

> 
> 
> echo "net-wireless/madwifi-driver ~x86" >> /etc/portage/package.keywords
> 
> echo "net-wireless/madwifi-tools ~x86" >> /etc/portage/package.keywords
> ...

 

did this

```

mako src # rc-update add net.ath0 default

 * net.ath0 added to runlevel default

 * Caching service dependencies...

 * rc-update complete.

```

```

mako src # /etc/init.d/net.ath0 start

 * Bringing ath0 up via DHCP...                                           [ !! ]
```

----------

## jrmontg

also see above, but I go this

mako src # iwconfig

lo        no wireless extensions.

eth0      no wireless extensions.

eth1      no wireless extensions.

ath0      IEEE 802.11  ESSID:"LAFAYETTE"

          Mode:Managed  Frequency:2.427 GHz  Access Point: FF:FF:FF:FF:FF:FF

          Bit Rate:1 Mb/s   Tx-Power:50 dBm   Sensitivity=0/3

          Retry:off   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management:off

          Link Quality=0/94  Signal level=-95 dBm  Noise level=-95 dBm

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

----------

## jrmontg

SUCCESS!!!

mako init.d # /etc/init.d/net.ath0 start

 * Bringing ath0 up via DHCP...                                           [ ok ]

 *   ath0 received address 192.168.5.102

I had to turn the encryption off on the router but it works.  

How do I turn the encryption on?

----------

## RayDude

 *jrmontg wrote:*   

> SUCCESS!!!
> 
> mako init.d # /etc/init.d/net.ath0 start
> 
>  * Bringing ath0 up via DHCP...                                           [ ok ]
> ...

 

Good! That's the first part, and the pretty hard part...

The best security available for wireless right now is called WPA-PSK.

Search the forums for how to use wpa_supplicant. Its a bit of a biotch but it works well once you figure out how to configure it.

You need to enable it in your router first, and then configure /etc/conf.d/net to enable wpa.

Search around, there's a whole thread I posted to another guy trying to help him get wpa running. Plus there's some good howtos...

Raydude

----------

## jrmontg

I had to enable my wireless security again because of my neighbor.  I have tried everything to get WPA to work.

From what I can see I might need to enable wlan_wep kernel module I looked for it but I can not find it.

Please help

----------

## RayDude

 *jrmontg wrote:*   

> I had to enable my wireless security again because of my neighbor.  I have tried everything to get WPA to work.
> 
> From what I can see I might need to enable wlan_wep kernel module I looked for it but I can not find it.
> 
> Please help

 

WEP is not necessary for WPA (in fact I don't think it even works with it.

The one thing you need to make sure is that ndiswrapper supports WPA with your card. Have you checked out the ndiswrapper home page to find out if WPA is supported?

Also, its possible the windows driver you are using doesn't support WPA (can you check in windows?) if it doesn't you may be able to download a later version that does to get it to work.

Without any description of the errors you are receiving when you run wpa_supplicant, we can't help you. Tell us exactly what you are doing (cut and paste it if you can) and maybe we'll be able to see a mistake or misunderstanding.

Help us, help you.

Raydude

----------

## jrmontg

Understood, where can I find the log file for this?

Wait? I am using madwifi as the driver...Why do I need to use ndiswrapper?  Maybe I don't understand I thought you used one of them not both together.  

My /etc/wpa_supplicant.conf

```
mako etc # vi wpa_supplicant.conf

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

eapol_version=1

ap_scan=1

fast_reauth=1

network={

        ssid="LAFAYETTE"

        scan_ssid=1

        proto=WPA

        key_mgmt=WPA-PSK

        pairwise=TKIP

        group=TKIP

        psk="key"

# The higher the priority the sooner we are matched.

        priority=5

}

```

----------

## RayDude

 *jrmontg wrote:*   

> Understood, where can I find the log file for this?
> 
> Wait? I am using madwifi as the driver...Why do I need to use ndiswrapper?  Maybe I don't understand I thought you used one of them not both together.  
> 
> My /etc/wpa_supplicant.conf
> ...

 

My mistake, I got this thread and another confused. Yeah you use what ever wireless driver you need. So stick to mad.

I use mad also. It works for me.

Now, since I got the threads confused, I haven't told you how to run wpa_supplicant from the command line (I think).

Do this:

```
rc-update del net.ath0
```

Then reboot. That should insure the network doesn't try to load...

Now log in as root and:

```
ifconfig ath0 up

wpa_supplicant -dd -Dmadwifi -iath0 -c /etc/wpa_supplicant.conf
```

Now watch the tool try to register on the network... If you get only one error message:

```
ioctl[SIOCSIWPMKSA]:operation not permitted
```

Then its alive... In another window, type this command:

```
dhcpcd ath0
```

If it registers, you are done. All you have to do is figure out how to configure /etc/conf.d/net to get it to work...

If it doesn't work, you will get error messages from wpa_supplicant, search the forums, and google, and then failing to find leads, post here. I've seen many many of those damn messages, as I'm sure everyone has... I'm sure someone will be able to help.

Raydude

----------

## jrmontg

That works...

Is there a way to do this at reboot?

Also I get this repeating:

EAPOL: Port Timers tick - authWhile=0 heldWhile=0 startWhen=19 idleWhile=00

I just closed that window and opened a new one.  Is that a error?

After a while it stopped working..

----------

## RayDude

 *jrmontg wrote:*   

> That works...
> 
> Is there a way to do this at reboot?
> 
> Also I get this repeating:
> ...

 

If wpa_supplicant works at the command prompt, then you just need to specify it in the /etc/conf.d/net file.

First off make sure you have the latest (stable as of a few days ago, horay!) baselayout.

Then make your /etc/conf.d/net look something like this:

```
# /etc/conf.d/net:

# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/net,v 1.7 2002/11/18 19:39:

22 azarah Exp $

iface_eth0="dhcp"

dhcpcd_eth0="-t 30 -N"

iface_ath0="dhcp"

dhcpcd_ath0="-t 30 -N"

wpa_supplicant_ath0="-Dmadwifi"

modules=( "!iwconfig" "wpa_supplicant" )
```

Everything else should happen automagically.

Raydue

----------

## jrmontg

Noticed a wierd problem today.  I unplugged eth0 but it still pinged.  It seems somehow eth0 and eth1 are linked together.  How can I seperate them?

I am not starting up ath0 becuase when I do none of my nics work.

ifconfig:

```
eth0      Link encap:Ethernet  HWaddr 00:02:B3:BF:61:61

          inet addr:192.168.5.105  Bcast:192.168.5.255  Mask:255.255.255.0

          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:143 errors:0 dropped:0 overruns:0 frame:0

          TX packets:155 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:14431 (14.0 Kb)  TX bytes:14433 (14.0 Kb)

eth1      Link encap:Ethernet  HWaddr 00:40:05:39:AF:97

          inet addr:192.168.5.8  Bcast:192.168.5.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:3 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:180 (180.0 b)  TX bytes:0 (0.0 b)

          Interrupt:11 Base address:0xc000

```

----------

## RayDude

 *jrmontg wrote:*   

> Noticed a wierd problem today.  I unplugged eth0 but it still pinged.  It seems somehow eth0 and eth1 are linked together.  How can I seperate them?
> 
> I am not starting up ath0 becuase when I do none of my nics work.
> 
> ifconfig:
> ...

 

Are you sure you unplugged the right port?

This is strange. And its even stranger that ath0 interferes with eth0 or eth1...

Raydude

----------

## jrmontg

I am 100% I didn't believe it either.  How I found out is that I pluged my cable modem to the eth0 port and it got a local address.  I unplugged the cable completly and I still got a response from both 192.168.5.8 (eth1) and 192.168.5.105 (dhcp eth0)

----------

## RayDude

 *jrmontg wrote:*   

> I am 100% I didn't believe it either.  How I found out is that I pluged my cable modem to the eth0 port and it got a local address.  I unplugged the cable completly and I still got a response from both 192.168.5.8 (eth1) and 192.168.5.105 (dhcp eth0)

 

I just tested that on my Gentoo box here at work and I have news for you...

Unplugging the cable will not prevent you from pinging your own IP Address. The network driver is still running so it responds. You just can't ping out over the cable...

So that's a red herring...

Raydude

----------

## jrmontg

Well I was pinging it from the windows machine 192.168.5.6 too.  I still got a reply

----------

## RayDude

 *jrmontg wrote:*   

> Well I was pinging it from the windows machine 192.168.5.6 too.  I still got a reply

 

Do you have the linux box set up as a router? It will route from one ethernet device to the other if you have it set up to do so.

At any rate, I think you're chasing your tail here.

Lets step back and start over.

Exactly what is it we are debugging?

What is the nature of the problem at this point?

Raydude

----------

## jrmontg

Yes I am turing the gentoo box into a router.  I plug the cable modem into the eth0 port and do not get a WAN address but I keep getting a local IP - 192.168.5.105

My goal in the end is to have 

eth0 - WAN 

eth1- LAN

ath0 - Wireless AP

----------

