LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-15-2004, 03:19 PM   #1
robw
LQ Newbie
 
Registered: May 2003
Location: Cirencester, UK
Distribution: Libranet/Debian
Posts: 21

Rep: Reputation: 15
Lost internet access after compiling Debian 2.4


I'm switching from RH8 to Debian. Successfully installed 2.2.20 from CDs, then compiled 2.4.24 (to get USB etc).
Now my ethernet card is OK but I can't access internet (no ping). I guess the only difference between 2.2 and 2.4 will be the kernel config. What should I be looking for?

Here is dmesg | grep eth0:
eth0: RealTek RTL8139 at 0xd0860000, 00:40:05:84:24:29, IRQ 11
eth0: Identified 8139 chip type 'RTL-8100B/8139D'
eth0: link up, 100Mbps, full-duplex, lpa 0x45E1

(I don't know what it all means!)

Here is some stuff from /var/log/messages which might be relevant:
Feb 15 21:02:34 renoir kernel: NET4: Linux TCP/IP 1.0 for NET4.0
Feb 15 21:02:34 renoir kernel: IP Protocols: ICMP, UDP, TCP
Feb 15 21:02:34 renoir kernel: IP: routing cache hash table of 2048 buckets, 16Kbytes
Feb 15 21:02:34 renoir kernel: TCP: Hash tables configured (established 16384 bind 16384)
Feb 15 21:02:34 renoir kernel: NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
Feb 15 21:02:34 renoir kernel: ds: no socket drivers loaded!
Feb 15 21:02:34 renoir kernel: VFS: Mounted root (ext2 filesystem) readonly.
Feb 15 21:02:34 renoir kernel: Freeing unused kernel memory: 128k freed
Feb 15 21:02:34 renoir kernel: hub.c: new USB device 00:11.2-1, assigned address 2
Feb 15 21:02:34 renoir kernel: usb.c: USB device 2 (vend/prod 0x59b/0x50) is not claimed by any active driver.
Feb 15 21:02:34 renoir kernel: Adding Swap: 514072k swap-space (priority -1)
Feb 15 21:02:34 renoir kernel: 8139too Fast Ethernet driver 0.9.26
Feb 15 21:02:34 renoir kernel: eth0: RealTek RTL8139 at 0xd0860000, 00:40:05:84:24:29, IRQ 11
Feb 15 21:02:34 renoir kernel: eth0: link up, 100Mbps, full-duplex, lpa 0x45E1


Does this shed some light on things?
Any help would be appreciated. Rob
 
Old 02-15-2004, 10:47 PM   #2
smith847be
Member
 
Registered: Jun 2003
Location: Hanover, New Hampshire, USA
Distribution: Debian Sid (Unstable)
Posts: 143

Rep: Reputation: 15
Try typing the command 'route' and posting the output. It looks like the system recognizes your card perfectly fine, but no pinging probably means that the system doesn't know the route to take to get to the internet. Also, are you running on any sort of company or home network (any access points, whatever)? If you are, then you need to run this: 'route add default gw 192.168.0.1' . Obviously, '192.168.0.1' needs to be replaced with the IP address of the accesss point/router that leads to the internet. Finally, if that doesn't work, then could you post what happens when you ping other things (e.g. another computer in your home network, even 127.0.0.1 (localhost) if that doesn't work, or 216.239.39.99 (Google) in case DNS lookup isn't working)?
 
Old 02-16-2004, 08:19 AM   #3
sandesh_hs
LQ Newbie
 
Registered: Feb 2004
Distribution: Fedora,redhat linux
Posts: 4

Rep: Reputation: 0
probably u have not selected com 1 and com2 modules support it must be in networking section in kernel .
 
Old 02-16-2004, 08:31 AM   #4
go_sooner
Member
 
Registered: Feb 2004
Location: Norman, OK, USA.
Distribution: Mandrake 10.0
Posts: 33

Rep: Reputation: 15
lost internet access: same problem with me:

Smith is right. Just want to add this as I am a newbie.

you want to try this as I solved (partially) my problem.

become root and type '/sbin/route add default gw [your gateway address here]. You will get connected to the internet until you restart the networking or logout and login or reboot.

So dont do /etc/init.d/networking restart after this as this will revert back to the default configuration.

My Problem: Please see the following heading at the linux Newbie Forum: newbie: Internet connection: Debian. I explained everything what I could and Tiger tried to help me but no success till now. I route every time I login, :-),

Vgn
 
Old 02-16-2004, 01:25 PM   #5
robw
LQ Newbie
 
Registered: May 2003
Location: Cirencester, UK
Distribution: Libranet/Debian
Posts: 21

Original Poster
Rep: Reputation: 15
Thanks for the suggestions.

1. Here is the output from 'route'
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface

- that's it!

2. I do have a local network - the ADSL router/modem and another PC. So I entered 'route add default gw 10.0.0.2' (my router address) and got:
SIOCADDRT: Network is unreachable

3. Next I tried to ping 127.0.0.1:
PING 127.0.0.1 (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.0 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.0 ms

--- 127.0.0.1 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 0.0/0.0/0.0 ms.

I guess that looks OK

4. Finally pinging Google:
PING 216.239.39.99 (216.239.39.99): 56 data bytes
ping: wrote 216.239.39.99 64 chars, ret=-1
ping: wrote 216.239.39.99 64 chars, ret=-1
ping: wrote 216.239.39.99 64 chars, ret=-1
ping: wrote 216.239.39.99 64 chars, ret=-1

--- 216.239.39.99 ping statistics ---
4 packets transmitted, 0 packets received, 100% packet loss

Does this help?

I'm curious about a message in my /var/log/messages:
ds: no socket drivers loaded!

Does that mean trouble?

Thanks in advance, Rob
 
Old 02-16-2004, 02:54 PM   #6
go_sooner
Member
 
Registered: Feb 2004
Location: Norman, OK, USA.
Distribution: Mandrake 10.0
Posts: 33

Rep: Reputation: 15
Rob
I dont think the gateway address you entered is the correct one.

Excuse me if I am wrong, as I am also a newbie. So check the gateway address by typing "ipconfig /all" in windows. becoz I had the same problem as you had and it happens becoz 2.4 file structure is little different and the folder network under /etc is not there in the version 2.2.

Vgn
 
Old 02-16-2004, 03:54 PM   #7
subh
Member
 
Registered: Jun 2003
Posts: 78

Rep: Reputation: 15
Hi robw,
Why don't you try "bf24" kernel. It got usb module included. No need to compile kernel to get usb working.
 
Old 02-16-2004, 10:01 PM   #8
smith847be
Member
 
Registered: Jun 2003
Location: Hanover, New Hampshire, USA
Distribution: Debian Sid (Unstable)
Posts: 143

Rep: Reputation: 15
Quote:
ds: no socket drivers loaded!
Alright, that may be the problem if you have a CardBus (PCMCIA) card. go_sooner, you're right, though, a 10.whatever IP does seem weird - maybe double-check that, robw. The routers that I've seen have always defaulted to 192.something. Anyway, a socket driver with 'ds' is the driver that controls communication over a PCMCIA port. Is this a PCMCIA card? The system does at least think that it's initializing the card, though (hence this: "eth0: link up, 100Mbps, full-duplex, lpa 0x45E1"). If this is a PCMCIA card, then you may need to recompile your kernel with proper PC Card support. But it doesn't seem like that's the problem. Can you also (if your network is set up this way) check the internal IP address (should be within your routers big IP address range - i.e. 10.0.0.something if that's right) of your other PC and try pinging it from this Linux computer. If the problem isn't with that or a wrong IP address to your ADSL router, then there's something really weird here.

Finally, just for explanation's sake, your blank 'route' feedback means that the system doesn't know the path to take to get to the internet, or the path may be unreachable (i.e. can't communicate right over PCMCIA). You will know that your problem is fixed when 'route' at least gives some output. Being able to ping 127.0.0.1 means that the basic internet support is working (that's good, at least). The Google pinging just confirms what 'route' said, that the system can't reach the internet (would have been helpful feedback if you didn't have a router). I'm sorry if I'm being overly simple or longwinded here but I don't know exactly how much experience you've had. Just one final question, too - you said you upgraded from kernel 2.2 to 2.4 - did the card work with no hitches on the internet with kernel 2.2?

Last edited by smith847be; 02-16-2004 at 10:11 PM.
 
Old 02-16-2004, 10:15 PM   #9
smith847be
Member
 
Registered: Jun 2003
Location: Hanover, New Hampshire, USA
Distribution: Debian Sid (Unstable)
Posts: 143

Rep: Reputation: 15
Okay, just actually looked the RealTek RTL8139 card up. There is a download for the driver specifically for "Linux driver for kernel 2.4.x (RedHat 7.2/ 7.3/ 8.0/ 9.0)". Try installing that - maybe if the problem isn't the driver you have, the install in there might at least fix some setting that might be wrong for some reason. See here for the download: http://www.realtek.com.tw/downloads/...&Software=True
 
Old 02-17-2004, 03:26 PM   #10
robw
LQ Newbie
 
Registered: May 2003
Location: Cirencester, UK
Distribution: Libranet/Debian
Posts: 21

Original Poster
Rep: Reputation: 15
Thanks for all the help so far. To answer some questions:
a) the 10.0 etc address is correct for the modem/router (it's a PTI product); it does work fine under both RH8 and with the Debian 2.2.20 kernel
b) It's NOT a PCMCIA card - so the ds message is irrelevant
c) I'm new-ish to Linux; not much experience with installation etc, more as a user

I tried the suggestion to download the new 8139too driver for the RealTek card. This is where the fun starts!
I edited Makefile to have the include variable correct. Then I ran make and got (from memory) a separator error on line 28 (this is the line with just a . in the file, see below):

NEW_INCLUDE_PATH = /usr/src/linux-2.4.24/include/

# ----------------------------------------------------------------------------------------------------
# GNU C compiler and its flags
# ----------------------------------------------------------------------------------------------------
CC=gcc
MODCFLAGS := -O6 -Wall -DCONFIG_KERNELD -DMODULE -D__KERNEL__ -DLINUX -D${RTL_MEM_ACCESS}



all: 8139too

8139too: 8139too.c /usr/include/linux/version.h
$(CC) $(MODCFLAGS) -I$(NEW_INCLUDE_PATH) -c 8139too.c -o $@.o

.

I'm not too familiar with makefile syntax.
Any suggestions? Wondering if I should take up the suggestion from subh to try kernel bh24!
Rob
 
Old 02-18-2004, 10:21 PM   #11
smith847be
Member
 
Registered: Jun 2003
Location: Hanover, New Hampshire, USA
Distribution: Debian Sid (Unstable)
Posts: 143

Rep: Reputation: 15
Okay, unfortunately, I have no idea about makefile syntax either. Your guess is as good as mine in that. I do have one other idea about what might be wrong though. It's possible that somehow ipchains instead of iptables was activated as the system to deal with internet packets (I've seen threads, in particular, about Red Hat deciding randomly to use ipchains). Ipchains is the older system, with iptables replacing it. Anyway, this command will check if you are using ipchains:

$ chkconfig --list | grep ipchains

If anything comes up, then I suggest upgrading to iptables (which should be installed already, otherwise you may need to find the rpm). This series of commands will remove ipchains and add iptables if this is the case:

$ chkconfig --del ipchains
$ chkconfig --add iptables
$ ipchains -F
$ service ipchains stop
$ rmmod ipchains
$ service iptables start

Finally, just a couple more explicit commands to initialize stuff to try as well (replace XXX with the IP address that is assigned / likely assigned to your Linux computer):

$ ifup
$ ifconfig eth0 10.0.0.XXX netmask 255.255.255.0 up
$ ip route add 0/0 via 10.0.0.2 table main

By the way, just 'ifconfig' will also give you status information on the link, which may or may not be helpful. If this doesn't work, then I think your problem may be out of my realm of Linux knowledge. :-( I know a lot about Linux's internet setup, but I'm a bit limited beyond that for system stuffs.
 
Old 02-19-2004, 04:16 PM   #12
robw
LQ Newbie
 
Registered: May 2003
Location: Cirencester, UK
Distribution: Libranet/Debian
Posts: 21

Original Poster
Rep: Reputation: 15
Thanks for the continuing help! ipchains is not there (got 'incompatible with this kernel'); the ifconfig and ip route went in OK, but did not make any difference to internet.

I spent some time installing kernel 2.4.18-bf24 (which has USB) from CD. This worked fine - internet access and USB. But wouldn't you know it - my HP printer needs a kernel 2.4.19 or higher

So I tried compiling a 2.4.20 kernel (my previous one with the internet no-go was 2.4.24) just to see if it works with internet - it doesn't.

My conclusion is that installing from CD works, but compiling from source does not; therefore I must be choosing my configuration wrongly.

Oh well ....
 
Old 02-19-2004, 04:48 PM   #13
smith847be
Member
 
Registered: Jun 2003
Location: Hanover, New Hampshire, USA
Distribution: Debian Sid (Unstable)
Posts: 143

Rep: Reputation: 15
Well, sorry I couldn't get this fixed for you. :-( I guess you're right though that some configuration option in the kernel was set wrong when you compiled - easy to do. If the kernel images work, then that's probably the easiest way to do things. However, if you want to compile the source, I'd suggest just read through the helps on each and every kernel option (would take a few hours, but you only have to do it once - from then on just run 'make oldconfig' whenever you compile a new version - that only prompts you for options that are new) and when in doubt, compile a module. Anyway, if you want any more help, I can see what I can do. Otherwise, sorry I couldn't get this fixed for you. :-( But good luck anyways.
 
Old 02-21-2004, 05:04 AM   #14
robw
LQ Newbie
 
Registered: May 2003
Location: Cirencester, UK
Distribution: Libranet/Debian
Posts: 21

Original Poster
Rep: Reputation: 15
The problem is solved! It was a kernel config error.

With a lot of help from a friend the clue was found in /var/log/syslog:

Feb 20 21:46:51 renoir kernel: eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
Feb 20 21:46:52 renoir dhclient-2.2.x: socket: Protocol not available - make sure CONFIG_PACKET and CONFIG_FILTER are defined in your kernel> configuration!

So dhcp gave up and the network could not run.
I did have CONFIG_PACKET set, but not CONFIG_FILTER. I set this in xconfig and recompiled and now I have internet access!

Many thanks to all those who helped.
Rob

PS it would be nice to have a Linux guide to fault finding; there seem to be so many files to look at, and some of them are distribution-dependent. Does any such guide exist?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Debian Sarge Internet access problems Stimz Linux - Newbie 1 08-15-2005 03:31 PM
Lost access to internet KunoNoOni Linux - Networking 2 04-25-2005 09:02 AM
lost all sound after compiling kernel 2.6.11 TimmyP Linux - Software 2 04-04-2005 02:55 PM
Debian that does NOT require internet access to install. Lechium Linux - Newbie 3 07-29-2004 06:37 AM
Can't access the internet throught DCHP after compiling and installing a new kernel Rodcl Linux - Networking 4 08-23-2002 03:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration