# SIOCSIFFLAGS problem, network card won't start

## corelli

Hi!

I have a dual boot xp/gentoo system. A while ago, my network connection died in both operating systems (was using motherboard ethernet) so I put in a new network card and tried to switch everything over. Got it working fine in windows, but i'm lost in Gentoo. I am a noob, so i really don't know how to switch over network cards. I tried my damndest. Now when I try to start eth0, it starts dhcpcd and says

err, eth0: ioctl SIOCSIFFLAGS: Invalid argument

I've looked around the system, in man pages, config files, but can'tfind out what that means. 

The mobo ethernet controller is (was?) a SiS900 PCI Fast Ethernet.

The new one is a 3Com Corporation 3c905 100BaseTX Boomerang.

I took out the SIS in the kernel and added the 3com.

lsmod shows that the 3c59x module, which i guess is the right one for the 3com, is loaded but not being used. 

Thanks for your help. I am obviously on a different computer, so I won't be able to drag entire log files on here, but I will try to retype anything you need. 

Thanks again!

----------

## mgrela

Post the results of the following commands:

```

ifconfig -a

```

```

dmesg

```

```

lspci

```

The driver you selected seems to be the correct one for this card. We will see if there are no initialization problems. BTW Have you tries eth1 instead of eth0 ?

----------

## corelli

alright, typing by hand so please excuse obvious typos.

ifconfig -a 

eth0   Link encap: Ethernet HWaddr 00:00:00:00:00:00

BROADCAST PROMISC MULTICAST  MTU:1500 Metric:1

RX packets, errors, dropped, overruns, frame *all 0*

TX *same, all 0's*

collisions:0 txqueuelen:1000

RX bytes:0 TX Bytes:0

Interrupt:19 Base address:0x7000

lo   link encap:local loopaback

inet addr:127.0.0.1 mask:255.0.0.0

inet6 addr: ::1/128 Scope:Host

UP LOOPBACK RUNNING MTU:16436 Metric:1

sit0  Link encap:IPv6-in-IPv4

NOARP MTU:1480 Metric:1

RX   packets..... *all 0*

TX .......... *all 0*

collisions:0 txqueuelen:0

Rx bytes 0    Tx bytes 0

----------

## corelli

and, ifconfig eth1 says device not found

----------

## mgrela

What happens, when you type:

```

ifconfig eth0 up

```

?

----------

## corelli

SIOCSIFFLAGS: Invalid Argument

----------

## mgrela

I think this qualifies as a bug in the kernel. Post an entry into http://bugzilla.kernel.org/ and don't forget to reference this thread in the bugreport.

Edit:

What kernel version do you have ? Try to update to the most recent one - 2.6.27.

----------

## corelli

I have 2.6.24 on right now. I'll compile a new kernel and see what happens.

----------

## corelli

Okay, i guess another newbie question.

I can't emerge gentoo-sources or a newer kernel within the gentoo OS because the network card doesnt work. Where do I find it   on the internet? I'll have to get it in windows and put it onthe gentoo drive. Where do i go to get the sources or anything? I looked in the installation handbook and it doesn't mention any way besides portage, which won't work.

----------

## mgrela

This command seems useful for the task:

```

idaho gentoo-sources # emerge -pf gentoo-sources | grep http | awk '{print $1;}'

 * Adjusting permissions for FEATURES=distcc: '/var/tmp/._portage_fetch_.7draUX/portage/.distcc'

 * Adjusting permissions for FEATURES=distcc: '/var/tmp/._portage_fetch_.7draUX/portage/.distcc/lock'

 * Adjusting permissions for FEATURES=distcc: '/var/tmp/._portage_fetch_.7draUX/portage/.distcc/state'

http://gentoo.prz.rzeszow.pl/distfiles/genpatches-2.6.27-9.base.tar.bz2

http://gentoo.prz.rzeszow.pl/distfiles/genpatches-2.6.27-9.extras.tar.bz2

http://gentoo.prz.rzeszow.pl/distfiles/linux-2.6.27.tar.bz2

```

Throw these files into /usr/portage/distfiles and off you go.

----------

## corelli

Do I do the command before I unzip the files? Where do I unzip them to? and, do I have to do the symbolic link to /usr/src that i saw in the gentoo kernel guide?

Thanks!!!

----------

## mgrela

 *corelli wrote:*   

> Do I do the command before I unzip the files? Where do I unzip them to? and, do I have to do the symbolic link to /usr/src that i saw in the gentoo kernel guide?
> 
> Thanks!!!

 

This command gives you the list of URLs to download, you download the files with another machine and copy them using a pendrive (or a CD) to the gentoo machine. You then place the files in /usr/portage/distfiles. No unzipping, just copy them.Then you run emerge like you normally would. It will find, that the files were already downloaded and their signatures match (hopefuly   :Smile:  ) and begin installation. As for the symlink proceed as the gentoo kernel guide advises. 

Best regards,

----------

## corelli

excellent. will try! thanks!

----------

## Tuxido

 *corelli wrote:*   

> SIOCSIFFLAGS: Invalid Argument

 

The two times I've gotten this error it has meant that I was missing the firmware for the card. Try to find the firmware for your card and put it in /lib/firmware.

----------

## cach0rr0

Do you have lshw already?

if so be curious what it shows for both those devices.

----------

## egberts

If you've shot yourself in the foot by booting into a kernel without a working network card.

Sometime, you can use the GRUB to pick an older kernel, just to get that 'loving' network card feeling back.

Of course, one would have to have at least one working kernel in the /boot directory, do you?  You do?

----------

## vaguy02

https://forums.gentoo.org/viewtopic-t-723401.html

This might be useful, similar flag issue.

----------

