Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
So, I have a computer with Windows on one hdd and Gentoo on the other. I had internet working on both at home. But now, I am at school and I cannot get internet working on Gentoo. Windows interenet is fine and the Gentoo installation CD can pick up internet.
Basically, gentoo is able to bring up eth0 (the interface I'm using), but then it runs dhcpcd and hangs for a while before goving up with exit code 14.
If I run /etc/init.d/netmount start (which is where problems occur during boot), after Running dhcpcd..., it gives
ERROR: Problem starting needed services.
"netmount" was not started.
I have tried running the command to see what module the LiveCD was using for internet, but the folder it brought me to was empty.
Since I have had this working before on this same computer (and the LiveCD works), I find it hard to believe that I have a incompatible ethernet card or sokmething like that, so the problem has to be in my configuration.
By the way, my /etc/conf.d/net file looks like:
Although I have tried many other combinations of commands for this file.
Ryan, what Gentoo versions do you use? (2005.0 or 2005.1)
These are the things you should keep in mind for a working network connection:[list=1][*] Configure your kernel good, include modules for any network card you have on that computer[*] If you have a RTL or Marvel based card use the NEW drivers included in the 2.6 kernels, not the old ones[*] Be sure to load the modules for your needed network devices at boot, they are listed in /etc/modules.autoload/kernel-2.6 for a 2.6 kernel[*] The order in which the modules are listed determines what ethX it is, i.e
would make the Realtek RTL based card eth0, the Intel PRO100 eth1, and so on[*] Be sure to have init scripts to bring the interfaces up, they are found in /etc/init.d/ and are in the form net.ethX. Actually they can be symlinks to the net.lo init script, so for every device you have do this
And so on, this would build a 'symlink chain', but you can also link every device to net.lo(try the example first )
Here is my current state:
pauls@theenemy ~ $ ls -lha /etc/init.d/net.*
lrwxrwxrwx 1 root root 6 Nov 20 05:02 /etc/init.d/net.eth0 -> net.lo
lrwxrwxrwx 1 root root 8 Nov 16 17:13 /etc/init.d/net.eth1 -> net.eth0
lrwxrwxrwx 1 root root 8 Nov 16 17:13 /etc/init.d/net.eth2 -> net.eth1
-rwxr-xr-x 1 root root 24K Nov 20 12:33 /etc/init.d/net.lo
[*] Also make sure you have good configs for your DHCP client (I recommend the dhcp package with dhclient) and that it is installed [*] Your /etc/conf.d/net does not look right to me, here's mine:
# This blank configuration will automatically use DHCP for any net.*
# scripts in /etc/init.d. To create a more complete configuration,
# please review /etc/conf.d/net.example and save your configuration
# in /etc/conf.d/net (this file :]!).
modules=( "dhclient" )
modules=( "ifconfig" )
config_eth0=( "dhcp" )
fallback_eth0=( "85.x.x.x/24" )
fallback_route_eth0=( "default via 85.x.x.x" )
config_eth1=( "noop" "192.168.0.1/24" )
#routes_eth1=( "default via 192.168.1.1" )
#config_eth2=( "noop" "192.168.1.1/24" )
#I don't use eth2 yet so:
config_eth2=( "null" )
# For TUN/TAP support emerge sys-apps/usermode-utilities
# NOTE: The interface name must be either tun or tap followed by a number
# For passing custom options to tunctl use something like the following. This
# example sets the owner to adm
# For GRE tunnels
#iptunnel_vpn0="mode gre remote 220.127.116.11 key 0xffffffff ttl 255"
# For IPIP tunnels
#iptunnel_vpn0="mode ipip remote 18.104.22.168 ttl 255"
# To configure the interface
#config_vpn0=( "192.168.0.2 pointopoint 192.168.1.2" ) # ifconfig style
#config_vpn0=( "192.168.0.2 peer 192.168.1.1" ) # iproute2 style
Don't understand something? Go to the Gentoo Handbook for x386, found on the site and on the install cd under /cdrom/doc
Come back if you need more help!
try to leave your /etc/conf.d/net file blank (comment out every single line, that is), and see if it makes a little difference. By default, all eth interfaces are assumed to be dhcp.
also, do a /sbin/ifconfig -a to see how many different eth interfaces you have. When I was installing my laptop, the liveCD recognized eth0 as THE card. But after the installation, I had a hell of a time trying to figure out why the ethernet stopped working anymore, only later to realize that it somehow became eth1, and eth0 was something else.
Hmm, this is what I think:
I had some difficulties at the begining to.
So if my guess is right, the problem is your dhcp client.
Try a different client.
Unfortunattely there was no client that worked perfect for me, from those that Gentoo provide.
One had a problem with releasing leases, one did not find some scripts, etc.
So most of the problems related to the scripts and config I tried to solve myself using the man pages to find their location and the sample files to actually build the configs and scripts(the man pages helped too). For example udhcp had a script in case of no lease can be obtained so I told it to stop eth and bring down the interface.
But one thing is for sure; the light clients are the most problematic. Don't use them, use the fully featured ones. Even if they are harder to set-up, there is probably no reason for them not to work.
Dhclient IIRC requested a dynamic dns update style for it to actually work, so you have to ad a line to the config.
Try to check your logs. Do tail -f /var/log/messages in another console and start the service, then watch what the logs write.
The 'problem starting needed devices' may be because you have an interface set up to run at a runlevel but there is no module or interface for it.
Try rc-update show and see what net.eth* you have set up to run. After that do rc-update del net.eth? that you want to remove from boot. And add the one that should and be sure to have the module for it in modules.autoload.d/kernel-2.6. For example rc-update add net.eth0 default.
If it still does not work then, if you can risk it, run the Live CD and start the ssh daemon, sshd by running just after booting the cd /etc/init.d/sshd start; and passwd to set up a root password. Then give access to someone, like me for example; to chroot in your environment and try to set-it up.
If you are sure you can risk that, then my email is djwman<at>gmail<dot>com.
Yes, the LiveCD uses hotplug and coldplug for detecting correct hardware and modules to load.
And yes, you need to use the LiveCD to install another dhcp client, if you haven't done so already.
Mount your partitions, proc filesystem, chroot in the environment, and emerge the clients.
Still from my experience you can not leave it at configuring ./conf.d/net; you have to check and edit the client's scripts too.
Have you seen; Gentoo Linux 2005.1-r1 was realeased, and the iso is about 200MB smaller since they did not include some stages, the stage-1's I guess.
Also there are some bug fixes, that I was confronted too. For example stage-3 sets wrong permission on root (/); to check this do stat / and see that your permissons are 0755.
And another one they said that skge module for Marvel based network cards, had some problems and the interface would go up and down; I haven't posted this on bugzilla but it happened to me too, but not with my Marvel Gigabit NIC, since I hardly have any use for it, but with my Intel PRO100/S Desktop Adapter.
You can use find to see what modules you have compiled for the current kernel.
find /lib/modules/<current_kernel_name>/ -type f -iname '*.ko' -or -iname '*.o'
I picked that up from the Gentoo Handbook . I still don't have time to learn bash better .
And if you want to do things faster you can do this to paste the ouptut to the ./modules.autoload.d/kernel-2.6
Then edit your kernel-2.6 file and exclude the file paths (/lib/modules/<kernel>/*) and .ko, .o extensions.
Don't load any unnecessary modules. Some are loaded automatically if needed like agpgart for example.
You can do this very easy with the nano editor, just do nano -w <file> and then use the shortcuts pointed in the program to replace strings with <null> (meaning just press Enter at replace with).
What emanresu said is true, blanking the net file assumes dhcp but Gentoo uses dhcpcd for that by default, and if you don't have it installed...
Having more clients installed is not a problem, you can select wich to use at a per connection bassis in net.
I don't know if you will get lucky with me ssh-ing in your LiveCD soon, since there is something wrong at my ISP, and my connection stops frequently during rush hours. Presumably it's because of soo many requests from clients, and many installations/server reconfigs everyday. Maybe sometime at 2 or 3 o'clock in the morning?
What network connection do you have?
So, I was able to put the modules into my kernel file.
I also tried using dhclient (I presume that's what you mena my dhclient iirc?), although I didn't have to emerge it.
So, I ran dhclient eth0, and it returns to me with:
Listening on LPF/eth0/00:01:29:f5:b7:9b
Sending on LPF/eth0/00:01:29:f5:b7:9b
Sending on Socket/fallback
receive_packet failed on eth0; Network is down
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
send_packet: Network is down.
If I plug in dhclient where I had dhcp in the net file, and then run netmount start, it fives me
No loaded modules provide "dhclient" (dhclient_start)
I'm not really sure what much of this means (please excuse my incompetance).
I am on a school LAN ethernet connection (a good one too, so my side of the internet is rather stable).
Apparentely you network is ... down.
It purely can't send because you don't have it pluged in....
It says it listens for a DHCP broadcast of the service to identify any possible servers.
Then it sends on eth0, broadcsting a request.
Sending on LPF. This I don't know what is, LPF.
Then Sending on socket failed... do you have 'unix sockets' compiled in the kernel? Check that!
Your net should be simple for eth0:
config_eth0=( "dhcp" ) #This tells Gentoo that it should use a dhcp client
modules_eth0= "dhclient" #This tells Gentoo to use dhclient for eth0
# modules= "dhclient" #This says to use dhclient for all other eth that don't have a specific modules_eth
Apparently it's the kernel config too...
It this machine a router/gateway?
How can I check the kernel compilation options after compiling (ie how do I see if 'unix sockets" was compiled)
My machine is not a router or gateway. When at home, I had my laptop acting as a router and the desktop (the computer we are talking about currently) plugged in to the laptop's LAN connection. Now, at school, I have both the laptop and desktop plugged into separate ethernet LAN jacks in my room.
Maybe I should just let you poke around and see what kind of eggregious error I have made in configuration (since I bet this is just some simple misconfiguration that I don't know about. Let me know when would be good for you and I'll set it up shortly before then.
I strongly advise you to do things yourself since this is the only to learn. Doing this yourself you bump into something else, sometimes, and you learn things that are not directly related to your problem. But if you are desperate and you need this working,i.e. you'll get your ass kiked if not solve it in 2 days, then I would help you as fast as I can, but there seems to be a problem with my cable modem, I've tried a friends modem, and it works, but mine gets limited network speed and stop frequently, so I can guarantee this will work(fast) if I don't get another modem from my ISP in the next few days. So if you are ready send me a mail with the password for root one day before setting it up and be sure it will be about 20:00 hours GMT+2 (Bucharest time) or 8:00 PM GMT+2 when you'll do it, i.e. start the LiveCD and sshd.
Well I guess I should be starting teaching now I have some problems here too, pretty frustrating since this is my only PC, I would have trashed it and use another, but there is only one way I see that could help you and after that I cant see what else you could ask for; give you all my conf files, tell you every step to take, everything to write to the cli and youll get nowhere if this would not do it. My system is still a little unstable right now so let me clean things out for a couple of days and then if you cant do it by then, Ill write you a book Ill tell you every scenario I can think of, what can go wrong, what there is to do, etc. Or if someone else might volunteer? Still ssh seems much faster! It's your choice