LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-23-2009, 08:21 PM   #1
ryan858
Member
 
Registered: Feb 2009
Distribution: Slackware64-14.1
Posts: 43

Rep: Reputation: 17
Getting Ethernet card enabled at startup...


I searched around here and on the web for problems similar to this, got some good info, but my problem seems to be somewhat unique...

I've been trying to get my Ethernet card to auto-enable when the computer boots up, but so far, all I can manage to do is get it to not error out.

I'm using Slackware 12.2 with KDE. I got into the Network Settings app in KDE and got it configured and all that, but when I click "Activate when the computer starts" it puts:

eth_up 0
eth_up 0

at the very beginning of my /etc/rc.d/rc.inet1 file, even before #!/bin/sh.

This doesn't work so well. Originally, it had "eth_up 0" 50 or so times, i guess from me clicking that check box over and over because it always goes back to unchecked. But, when it had the 50 lines, it would enable the card at boot-time, but it would give me 50 errors saying "eth_up command not found".

So I removed the lines and now it doesn't want to enable it. I've gotten into the rc.inet1.conf file and put USE_DHCP="yes" for the net card, but it didn't do much. and I tried using static settings, but same deal. It works just fine with those settings, like i can browse the internet and stuff, but I can't figure out how to make it enabled during bootup.

I read that eth_up was replaced by if_up after slackware 10.2, and my rc.inet1 is stamped v10.2... like this:

# @(#)/etc/rc.d/rc.inet1 10.2 Sun Jul 24 12:45:56 PDT 2005 (pjv)

In case that may help...

But, I tried putting if_up 0 at the beginning, and then i tried it right after #!/bin/sh but it didn't do anything either time.

I don't know... I know I'm missing something, but I can't figure out what.

Thank you, Any help is greatly appreciated!

Last edited by ryan858; 02-23-2009 at 08:26 PM.
 
Old 02-24-2009, 12:05 AM   #2
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 55
I can't help much because I don't use KDE, but the usual answer to a problem like this is "did you run netconfig as root"
 
Old 02-24-2009, 12:06 AM   #3
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
I've gotten into the rc.inet1.conf file and put USE_DHCP="yes" for the net card, but it didn't do much. and I tried using static settings, but same deal. It works just fine with those settings, like i can browse the internet and stuff, but I can't figure out how to make it enabled during bootup.
You should not mess with rc.inet1. The network configuration is written in rc.inet1.conf. If you have backups of these files revert back to the backups and use
Code:
netconfig
to configure your network.
To bring the nic up at system startup just make sure that rc.inet1 is executable:
Code:
chmod +x /etc/rc.d/rc.inet1
 
Old 02-24-2009, 12:38 AM   #4
sigey
LQ Newbie
 
Registered: Feb 2009
Posts: 13

Rep: Reputation: 1
umm ... hope this will guide you in the right direction: (this is how it can be done on a redhat box, i am sure the file location will be pretty much the same in ur OS as well).
Though this is not a GUI based solution, this is what really happens when you do it via the GUI as well.

Open a console to your system, become root and look for the file /etc/sysconfig/network-scripts/ifcfg-eth0 - basically your interface config file.
The contents of the file will look something like this:

DEVICE=eth0 # the name of interface
BOOTPROTO=static # whether ur inteface is set for DHCP or static
ONBOOT=yes # this is the value that you should change - it means bring up interface when system boots (like enable on boot)
IPADDR=10.1.1.1
NETMASK=255.255.255.0


Hope this helps.

thanks
 
Old 02-24-2009, 04:50 PM   #5
ryan858
Member
 
Registered: Feb 2009
Distribution: Slackware64-14.1
Posts: 43

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by bathory View Post
You should not mess with rc.inet1. The network configuration is written in rc.inet1.conf. If you have backups of these files revert back to the backups and use
Code:
netconfig
to configure your network.
To bring the nic up at system startup just make sure that rc.inet1 is executable:
Code:
chmod +x /etc/rc.d/rc.inet1
Well, like I said,

Quote:
Originally Posted by ryan858 View Post
when I clicked "Activate when the computer starts" it put:

eth_up 0
eth_up 0

at the very beginning of my rc.inet1

So I removed the lines ... and got into the rc.inet1.conf file and put USE_DHCP="yes" for the net card, but it didn't do much.
I'm not messing with the actual script, just the config file. But KDE's net config app decided to put that those lines in before #!/bin/sh in the script, and that led to 50 "command not found" errors, as well as, when i put those lines back, it didn't even load the file because it didn't recognize it as a shell script, since those lines were in before #!/bin/sh. So I'm just going to leave those lines out because i doubt they're supposed to be there. I'm sure they weren't there before I messed with the GUI app.

But still, as for actually getting it working, I haven't seen anything in the conf file that will help. But I'll try netconfig. And make sure the script is executable.

Quote:
Originally Posted by sigey View Post
Open a console to your system, become root and look for the file /etc/sysconfig/network-scripts/ifcfg-eth0 - basically your interface config file.
The contents of the file will look something like this:

DEVICE=eth0 # the name of interface
BOOTPROTO=static # whether ur inteface is set for DHCP or static
ONBOOT=yes # this is the value that you should change - it means bring up interface when system boots (like enable on boot)
IPADDR=10.1.1.1
NETMASK=255.255.255.0


Hope this helps.

thanks
I don't even have that sysconfig directory. But I think that's basically what my /etc/rc.d/rc.inet1.conf is. Unfortunately, it has nothing about ONBOOT or anything about boot-time.

Thanks though.

Last edited by ryan858; 02-24-2009 at 04:57 PM.
 
Old 02-24-2009, 05:23 PM   #6
ryan858
Member
 
Registered: Feb 2009
Distribution: Slackware64-14.1
Posts: 43

Original Poster
Rep: Reputation: 17
Awesome!

I ran netconfig and I immediately noticed "Polling for DHCP Server" during boot!

So thanks everyone for your help!

I'm not quite sure what it did though. My rc.inet1.conf looks like it did before, and rc.inet1 remains unchanged. But it works!

Thank you!
 
  


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
Ethernet card doesn't load on startup (Mandrake) Luna-tic Linux - Hardware 1 04-26-2006 06:50 AM
activating ethernet card on startup Dakkar Linux - Newbie 1 10-13-2004 10:39 AM
Ethernet card on laptop: I installed my D-Link ethernet card into Redhat 9, not detec brighamr Linux - Hardware 0 05-18-2004 12:33 AM
DMA not enabled during linux startup premsaggar Linux - Hardware 3 12-11-2003 01:31 PM
ethernet card not being setup on startup kierse Linux - Hardware 6 05-06-2003 10:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:46 PM.

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